Window » History » Version 6
iri, 02/28/2011 09:35 PM
1 | 1 | iri | h1. Window |
---|---|---|---|
2 | |||
3 | 5 | iri | {{>toc}} |
4 | |||
5 | 1 | iri | h2. _gtkWindowNew |
6 | |||
7 | 5 | iri | Create a new window |
8 | 1 | iri | |
9 | 5 | iri | Prototype : |
10 | *fun [Chn ObjGtkWidget S [I I] [I I]] ObjGtkWidget* |
||
11 | 1 | iri | |
12 | 5 | iri | * Channel : Chn :any channel |
13 | * Parent : ObjGtkWidget : a parent, can be nil |
||
14 | * Title : S : a title |
||
15 | * Position : [I I] : x and y |
||
16 | * Size : [I I] : width and height |
||
17 | * *Return* : ObjGtkWidget : the new window or nil if error |
||
18 | 1 | iri | |
19 | |||
20 | h2. _gtkWindowAddChild |
||
21 | |||
22 | 5 | iri | Add a child to a window |
23 | 1 | iri | |
24 | 5 | iri | Prototype : |
25 | *fun [ObjGtkWidget ObjGtkWidget] ObjGtkWidget* |
||
26 | 3 | iri | |
27 | 5 | iri | * window : ObjGtkWidget : the parent |
28 | * child : ObjGtkWidget : a child (typically a container but can be a single widget like a button) |
||
29 | * *Return* : the same window |
||
30 | 1 | iri | |
31 | |||
32 | 5 | iri | h2. _gtkWindowCBdestroyed |
33 | 1 | iri | |
34 | 5 | iri | Callback called when the window is destroyed |
35 | 1 | iri | |
36 | 5 | iri | Prototype : |
37 | *fun [ObjGtkWidget fun [ObjGtkWidget u0] u1 u0] ObjGtkWidget* |
||
38 | 1 | iri | |
39 | 6 | iri | Note : you can define it too via "_gtkWidgetCB":http://trac.scolring.org/projects/lib2dgtk/wiki/Widget_callbacks#SCOL_GTK_WIDGET_DESTROY with the flag SCOL_GTK_WIDGET_DESTROY. |
40 | |||
41 | 5 | iri | h2. _gtkWindowDeleteEvent |
42 | 1 | iri | |
43 | 5 | iri | Define if the delete-event (e.g. a user press the close button) destroys the window or hide the window |
44 | If the window is hidden, it can be shown later without rebuild it. |
||
45 | 1 | iri | |
46 | 5 | iri | Prototype : |
47 | *fun [ObjGtkWidget I] ObjGtkWidget* |
||
48 | * window : ObjGtkWidget : any window |
||
49 | * flag : I : 1 to hide, otherwise the window will be destroyed |
||
50 | 1 | iri | |
51 | |||
52 | |||
53 | Return [[API]] |