further enhancements for the GTK wrapper

This commit is contained in:
Andreas Rumpf 2010-03-01 19:37:33 +01:00
commit 4ee65a08dd
84 changed files with 7864 additions and 1288 deletions

View file

@ -11,7 +11,7 @@ var
nimrod_init()
window = window_new(WINDOW_TOPLEVEL)
button = button_new_with_label("Click me")
button = button_new("Click me")
set_border_width(PContainer(Window), 5)
add(PContainer(window), button)
discard signal_connect(window, "destroy",

View file

@ -3,7 +3,7 @@ import
glib2, gtk2
proc newbutton(ALabel: cstring): PWidget =
Result = button_new_with_label(ALabel)
Result = button_new(ALabel)
show(result)
proc destroy(widget: pWidget, data: pgpointer){.cdecl.} =

View file

@ -3,7 +3,7 @@ import
glib2, gtk2
proc newbutton(ALabel: cstring): PWidget =
Result = button_new_with_label(ALabel)
Result = button_new(ALabel)
show(result)
proc destroy(widget: pWidget, data: pgpointer){.cdecl.} =

View file

@ -10,7 +10,7 @@ proc widgetDestroy(w: PWidget) {.cdecl.} =
nimrod_init()
var window = window_new(WINDOW_TOPLEVEL)
var button = button_new_with_label("Click me")
var button = button_new("Click me")
set_border_width(Window, 5)
add(window, button)
discard signal_connect(window, "destroy",

View file

@ -24,13 +24,12 @@ proc disablesignal(widget: pWidget, data: pgpointer){.cdecl.} =
s.disable = not s.disable
var
quitsignal: guint
QuitState: TButtonSignalState
nimrod_init()
var window = window_new(WINDOW_TOPLEVEL)
var quitbutton = button_new_with_label("Quit program")
var disablebutton = button_new_with_label("Disable button")
var quitbutton = button_new("Quit program")
var disablebutton = button_new("Disable button")
var windowbox = vbox_new(TRUE, 10)
pack_start(windowbox, disablebutton, True, false, 0)
pack_start(windowbox, quitbutton, True, false, 0)

View file

@ -15,7 +15,7 @@ var
nimrod_init()
var window = window_new(gtk2.WINDOW_TOPLEVEL)
var stackbox = vbox_new(TRUE, 10)
var button1 = button_new_with_label("Move mouse over button")
var button1 = button_new("Move mouse over button")
var buttonstyle = copy(get_style(Button1))
ButtonStyle.bg[STATE_PRELIGHT].pixel = 0
ButtonStyle.bg[STATE_PRELIGHT].red = -1'i16