further enhancements for the GTK wrapper
This commit is contained in:
parent
df672f5b9a
commit
4ee65a08dd
84 changed files with 7864 additions and 1288 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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.} =
|
||||
|
|
|
|||
|
|
@ -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.} =
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue