View previous topic :: View next topic |
Author |
Message |
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Sat Feb 18, 2006 2:57 am Post subject: the next Hello World |
|
|
Duit (the DUI replacement) can now compile and run a hello world.
(no event or signals yet)
Code: |
// the minimalistic version
module gtk.HelloWorld;
private import gtk.Window;
private import gtk.Label;
private import gtk.Duit;
void main(char[][] args)
{
Duit.init(args);
with (new Window("Duit"))
{
add(new Label("Hello World"));
setBorderWidth(10);
showAll();
}
Duit.main();
}
|
changes from DUI:
- new class Duit replaces DUI
- Duit is a class with static methods, not a singleton
(this might change as multiple main loops are allowed by Gtk and so we migh need multiple instances of Duit)
- Duit.init replaces DUI.dui
- Duit.main replaces dui.go
- Widgets are not shown by default - use showAll() on the container
- package names follow Gtk+ lib names
these changes make Duit more similar to Gtk without compromising the ease of use.
next to code:
- properties and style properties (never fully supported on DUI )
Ant |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sat Feb 18, 2006 1:14 pm Post subject: |
|
|
Those look like great improvements, Ant. Keep up the good work!
-JJR |
|
Back to top |
|
|
|