Le 29/11/2013 04:48, Rikki Cattermole a écrit :
On Thursday, 28 November 2013 at 12:13:42 UTC, Chris wrote:
On Thursday, 28 November 2013 at 12:05:09 UTC, Jacob Carlborg wrote:
On 2013-11-28 11:12, Chris wrote:

+1 GtkD & Glade (UI builder) are very good (http://gtkd.org/).
Hopefully
one day we will have our own pure D GUI toolkit.

DWT is a pure D GUI toolkit.

What I meant was no bindings to native widgets or other toolkits. DWT
(like SWT) uses the native widgets and needs an interface. I was
thinking of a toolkit where everything is provided by D and done in D
without any reference to native frameworks (Cocoa etc.).

DOOGLE[1] currently only depends on libfreetype2, (with Windows as only
target) Windows API and OpenGL. I would remove libfreetype2 but.. its
basically standard for font rasterization cross platform wise.
I have designed it to have its interface abstracted away from the
implementation fully.

Its current state is well listed on my blog[2] it may not look much now
and not ready for production use, but definitely should be said.

[1] https://github.com/rikkimax/doogle
[2]
http://alphaglosined.blogspot.com/2013/11/web-services-and-opengl-oh-my.html


You may want take a look to DQuick :
https://github.com/D-Quick/DQuick

It's run on top of openGL too, the main difference is that you describe the UI in dedicated script files. Scripts provide allow to provide fully dynamical UIs.

An UI file (original lua script format for the moment) :

GraphicItem
{       
    id = "main",

        Image {
                id = "kerningImageButton",
                
                source = "images/border-image.png",
                width = 300,
                height = 50,

                MouseArea {
                        id = "kerningButton",
                        width = function()
                                return kerningImageButton.width
                        end,
                        height = function()
                                return kerningImageButton.height
                        end,
                },
        },

        ScrollView {
                id = "scrollView",
        
                y = function()
                        return kerningImageButton.height
                end,
                width = function()
                        return main.width
                end,
                height = function()
                        return main.height - scrollView.y
                end,
                
                clip = true,

                Text {
                        id = "text",
                
                        wrapMode = Text.WrapMode.WordWrap,
                
                        width = function()
                                return scrollView.width
                        end,
                        height = function()
                                return scrollView.height
                        end,

                        text = textFr,
                        family = function()
                                if (kerningButton.pressed) then
                                        return "AngsanaUPC"
                                end
                                return "Arial"
                        end,
                        fontSize = 24,
                        fontStyle = function()
                                if (kerningButton.pressed) then
                                        return Text.FontStyle.Italic
                                end
                                return Text.FontStyle.Regular
                        end,
                },
        },
}

Reply via email to