DQuick a GUI Library (prototype)

Flamaros flamaros.xavier at gmail.com
Thu Aug 29 16:25:45 PDT 2013


On Thursday, 29 August 2013 at 17:08:22 UTC, Andrej Mitrovic 
wrote:
> On 8/22/13, goughy <andrew at goughy.org> wrote:
>> Could I recommend you evaluate IUP first?
>> (http://www.tecgraf.puc-rio.br/iup/)
>
> I've had another look at this, and the documentation tells me 
> there's
> limitations and generally a requirement to handle 
> platform-specific
> behavior in many cases, which could get in the way.
>
> For most widgets, after you create them, you can't change their
> behavior except maybe their appearance (e.g. text and image). 
> That's a
> big limitation imo.
>
> There's platform-dependent behavior that you need to be aware 
> of, such as:
>
> -----
> When you change the active tab the focus is usually not 
> changed. If
> you want to control the focus behavior call IupSetFocus in the
> TABCHANGE_CB callback. Unfortunately this does not works in GTK 
> and in
> Motif, because in both systems the focus will be set by the 
> system
> after the callback is called.
> -----
>
> There's a lot of these GTK/Windows specific notes, I'd hate to 
> end up
> writing a lot of code wrapped inside of version(GTK) statements.
>
> There's basic features not supported such as:
>
> -----
> Notice that there is no attribute to disable a single tab. This 
> is a
> design decision of all native toolkits, not a IUP decision. It 
> is so
> because a disabled tab is a confusing interface situation.
> -----
>
> Tcl's Tk does it, as does Qt, and probably other libraries. 
> Here's the
> Tkinter version:
> http://www.pyinmyeye.com/2012/08/tkinter-notebook-demo.html.
>
> Anyway, as a simple GUI library it might even be worth 
> wrapping. But I
> think the DQuick devs and D programmers want something much 
> more.

As DQuick isn't based on OS native GUI libraries and it's intend 
to have exactly the same behaviors of those native libraries, the 
user will have the responsibility to customize those kind of 
behaviors.
In the default package there will be no support for focus for 
sample. I don't know how is it on other OS, but on windows 
buttons and scroll-bars have really weird behaviors, for 
scroll-bars you'll loose control on it if your mouse cursor is 
too far (button always down), but when the cursor come back to an 
acceptable distance the scroll-bar move appropriately,...

With DQuick it will not a problem to have larger mouse area than 
a button which is really useful for interfaces controlled by 
fingers.

To have some controls (around widget) that have simple behaviors 
acceptable for almost all OS/platform, we'll certainly do 
something like QtQuick Controls. This is an add-on which provide 
a simple way to support focus.


More information about the Digitalmars-d mailing list