elements icon indicating copy to clipboard operation
elements copied to clipboard

choose color dialog

Open Xeverous opened this issue 5 years ago • 3 comments

This issue is for tracking any decisions before implementing this widget.

Windows how-to: https://docs.microsoft.com/en-us/windows/win32/dlgbox/color-dialog-box

Xeverous avatar Jan 21 '20 15:01 Xeverous

After a bit of thinking, such feature should not be a widget but a reusable callback (std::function perhaps) that can be attached to event handlers.

Few things need to be decided upon:

  • where to put all such callbacks in elements
  • how to implement their behavior (should be trivial if all such modals on all platforms are blocking)
  • how to unify the interface of all platforms so that elements API is platform-independent

Xeverous avatar Feb 10 '20 20:02 Xeverous

Makes sense! I think we can probably put that in support. I do not have answers now, but I am pretty sure it will become evident once we implement it. I think it can simply be a free function. Cross platform might be interesting :-)

djowel avatar Feb 10 '20 23:02 djowel

Got any links/references for relevant functions on different systems? I have no knowledge of Mac OS and not sure if Linux has the same interface on all distributions.

Xeverous avatar Feb 11 '20 09:02 Xeverous

IDK about the callback idea, I see 2 basic options: native (as late reply to the above comment):

or an elements specific widget.

I like more the native option (that might be implemented in a small external library), though the only dialog that I see useful for a plugin UI framework would be a filedialog (in which case I also prefer native, especially on Linux that can use Freedesktop portal).

redtide avatar Oct 19 '23 18:10 redtide

Or just use this: https://sourceforge.net/projects/tinyfiledialogs/

djowel avatar Oct 19 '23 22:10 djowel