Project

General

Profile

Create » History » Version 1

iri, 02/22/2011 12:39 AM

1 1 iri
h1. Create a button
2
3
* _gtkButtonNew :
4
> Create a button.
5
> Differents styles are available :
6
7
> * Classic (flag = SCOL_GTK_BUTTON_LABEL) 
8
!http://library.gnome.org/devel/gtk/unstable/button.png!
9
> * With Mnemonic (like a keybord shortcut) (flag = SCOL_GTK_BUTTON_MNEMONIC) 
10
!http://library.gnome.org/devel/gtk/unstable/button.png!
11
> * With a stock item (standard icon like "open", "exit", "copy", ...) (flag = SCOL_GTK_BUTTON_STOCKITEM)
12
13
> * With a link (uri) (flag = SCOL_GTK_BUTTON_LINK) 
14
!http://library.gnome.org/devel/gtk/unstable/link-button.png!
15
> * A check box (with a short label) (flag = SCOL_GTK_BUTTON_CHECK) 
16
!http://library.gnome.org/devel/gtk/unstable/check-button.png!
17
> * With a toggle state (flag = SCOL_GTK_BUTTON_TOGGLE) 
18
!http://library.gnome.org/devel/gtk/unstable/toggle-button.png!
19
> * With a switch (flag = SCOL_GTK_BUTTON_SWITCH) 
20
!http://library.gnome.org/devel/gtk/unstable/switch.png!
21
> * An empty button (flag = SCOL_GTK_BUTTON_EMPTY) : can add a valid widget, like an image widget, etc ...
22
23
> h3. Prototype :
24
>> fun [Chn S I u0] ObjGtkWidget
25
26
>> * Channel : Chn
27
>>> any channel
28
29
>> * Label : S
30
>>> Can be any label (with SCOL_GTK_BUTTON_LABEL, SCOL_GTK_BUTTON_TOGGLE, SCOL_GTK_BUTTON_SWITCH),
31
>>> a mnemonic label (with SCOL_GTK_BUTTON_MNEMONIC)
32
>>> or a stock item name (with SCOL_GTK_BUTTON_STOCKITEM). 
33
>>> Should be nil with SCOL_GTK_BUTTON_EMPTY.
34
35
>> * flag : I
36
>>> SCOL_GTK_BUTTON_EMPTY : empty button. Cf 'param'.
37
>>> SCOL_GTK_BUTTON_LABEL : classical button with the label 'label'.
38
>>> SCOL_GTK_BUTTON_MNEMONIC : a button with a mnemonic (can be activate with ALT + key).
39
>>> SCOL_GTK_BUTTON_STOCKITEM : a button with a standard stock item.
40
>>> SCOL_GTK_BUTTON_LINK : button with a link (uri).
41
>>> SCOL_GTK_BUTTON_CHECK : check button (with mnemonic) with a short label
42
>>> SCOL_GTK_BUTTON_TOGGLE : toggle button
43
>>> SCOL_GTK_BUTTON_SWITCH : switch button
44
45
>> * param : u0
46
>>> A supplemental parameter if flag need
47
>>> ObjGtkWidget : child. If Type is SCOL_GTK_BUTTON_EMPTY only , child will be displayed into the new button.
48
>>> S : url if type set to SCOL_GTK_BUTTON_LINK only
49
>>> I : active (1), inactive (0) if flag is SCOL_GTK_BUTTON_CHECK, SCOL_GTK_BUTTON_TOGGLE or SCOL_GTK_BUTTON_SWITCH