On Saturday, 30 November 2013 at 10:02:40 UTC, Russel Winder
wrote:
I am using QML/Go (and QML/Python, two separate backend
implementations
based on the same QML) for a pet project (which as a sideline
supports
my Python and Go training courses and is research for a possible
startup). I had been hoping to do QML/D as well but the only
graphics
engine that is really viable with D just now is GtkD. I may
well try a
GtkD/Vibe.d/D version of this but it is really back burner. If
there was
a possibility of QML/Vibe.d/D now that would be really
interesting.
You may want take a look at DQuick :
https://github.com/D-Quick/DQuick
It runs on top of openGL too, the main difference is that you
describe the UI in dedicated script files. Scripts 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,
},
},
}