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