compiler: (WIP) Fixes for MinGW/GCC 5
[sdk] / doc / ecere / ecere / gui / Window.econ
1 {
2    name = "Window",
3    description = "The base class for any Window, and many Controls as well. Contains many methods and properties that are inherited and used by these other Windows and Classes.",
4    fields = [
5       {
6          "sbh",
7          {
8             description = "This is the instance of the horizontal ScrollBar. Generally only used internally by eC."
9          }
10       },
11       {
12          "sbv",
13          {
14             description = "This is the instance of the vertical ScrollBar. Generally only used internally by eC."
15          }
16       }
17    ],
18    properties = [
19       {
20          "alphaBlend",
21          {
22             description = "When true, applies Alpha Blending to the background of the Window. Used for transparency effects."
23          }
24       },
25       {
26          "anchor",
27          {
28             description = "Very similar to position, only with more versatility. Anchor allows you to set the top, left, bottom, and right settings relative to the top, left, bottom and right of the Window/Controls parent's clientArea."
29          }
30       },
31       {
32          "background",
33          {
34             description = "The Color of the Client Area.\n"
35                "Example: background = { r = 53, g = 100, b = 203 };"
36          }
37       },
38       {
39          "borderStyle",
40          {
41             description = "The type of Window frame your Window has."
42          }
43       },
44       {
45          "clickThrough",
46          {
47             description = "When true, this Window/Control redirects mouse clicks to its parent rather than processing the mouse clicks itself. Essentially, the mouse becomes invisible to this item."
48          }
49       },
50       {
51          "clientSize",
52          {
53             description = "Sets the size of the interior of the Window; the Client Area.\n"
54                "Example: clientSize = { 190, 290 };"
55          }
56       },
57       {
58          "closeButton",
59          {
60             description = "This is the control for the CloseButton at the top right of the Window."
61          }
62       },
63       {
64          "disabled",
65          {
66             description = "Greys out ALL controls within the Window making them unusable, including the controls on the TitleBar. When applied to an individual control, rather than an entire Window, then only that control is greyed out an unusable."
67          }
68       },
69       {
70          "dontHideScroll",
71          {
72             description = "When true, the Horizontal and Vertical Scroll Bars are not hidden when all the contents are within the viewspace."
73          }
74       },
75       {
76          "drawBehind",
77          {
78             description = "When true(default), then the contents of the screen behind the Window are still redrawn. If false, then the screen behind is not redrawn, which can leave \"ghosts\" of the Window on the screen when it is moved or resized."
79          }
80       },
81       {
82          "font",
83          {
84
85          }
86       },
87       {
88          "foreground",
89          {
90             description = "The Color of the text in the Client Area.\n"
91                "Example: foreground = { r = 0, g = 0, b = 0 };"
92          }
93       },
94       {
95          "hasClose",
96          {
97             description = "When true, the Window will contain a Close button on the top right side of the Title Bar."
98          }
99       },
100       {
101          "hasHorzScroll",
102          {
103             description = "When true, the Window has a Horizontal Scroll bar across its bottom. When the contents of the Window exceeds its horizontal borders."
104          }
105       },
106       {
107          "hasMaximize",
108          {
109             description = "When true, the Window will contain a Maximize button on the right side of the Title Bar."
110          }
111       },
112       {
113          "hasMenuBar",
114          {
115             description = "When true, the Window will contain a Menu Bar immediately below the Title Bar."
116          }
117       },
118       {
119          "hasMinimize",
120          {
121             description = "When true, the Window will contain a Minimize button on the right side of the Title Bar."
122          }
123       },
124       {
125          "hasStatusBar",
126          {
127             description = "When true, the Window will contain a Status Bar at the bottom."
128          }
129       },
130       {
131          "hasVertScroll",
132          {
133             description = "When true, the Window has a Vertical Scroll bar along the right hand side. When the contents of the Window exceeds its vertical borders."
134          }
135       },
136       {
137          "hotKey",
138          {
139             description = "The key associated with a particular Window or Control. Pressing this key, or key combination will automatically activate the associated Window or Control.\n"
140                "Note: If the tabCycle property of the parent is not true, then hotKey will not work unless the parent is active."
141          }
142       },
143       {
144          "isDocument",
145          {
146             description = "When true, this Window/Control would be treated as a document, enabling things like having the path show up in the Title Bar. \n"
147                "Note: For best results, set this property true on a Window rather than on a Control."
148          }
149       },
150       {
151          "master",
152          {
153             description = "Typically, the Master is the Controlling Window of the application. The Master receives all the messages.\n"
154                "Example: master = this;"
155          }
156       },
157       {
158          "maxClientSize",
159          {
160             description = "The Maximum allowable size for the Client Area within the window.\n"
161                "Example: maxClientSize = { 120, 400 };"
162          }
163       },
164       {
165          "maximizeButton",
166          {
167             description = "This is the control for the MaximizeButton at the top right of the Window."
168          }
169       },
170       {
171          "menu",
172          {
173             description = "The Menu portion of the Window."
174          }
175       },
176       {
177          "minClientSize",
178          {
179             description = "The Minimum allowable size for the Client Area within the window.\n"
180                "Example: minClientSize = { 50, 50 };"
181          }
182       },
183       {
184          "minimizeButton",
185          {
186             description = "This is the control for the MinimizeButton at the top right of the Window."
187          }
188       },
189       {
190          "name",
191          {
192             description = "This is the name of the instantiation. Typically this is only adjusted in the property editor.\n"
193                "Example: name = \"editBox1\";\n"
194                "or: EditBox editBox1;"
195          }
196       },
197       {
198          "noCycle",
199          {
200             description = "When true, then the particular control which this is set on becomes exempt from the Tab cycling normally available from it's parents tabCycle property."
201          }
202       },
203       {
204          "nonClient",
205          {
206             description = "When true, enables the Window/Control to inhabit a region outside of the clientArea, but still constrained to the Parent. Normally this is used for system controls like the buttons in the Title Bar."
207          }
208       },
209       {
210          "normalAnchor",
211          {
212             description = "The anchor of the Window in its normal state, that is not minimized or maximized."
213          }
214       },
215       {
216          "opacity",
217          {
218             description = "A real number between 0 and 1, setting how translucent a control is. 0 is completely transparent, and 1 is completely opaque.\n"
219                "Example: opacity = 0.45;"
220          }
221       },
222       {
223          "parent",
224          {
225             description = "The Window which the current Window/Control belongs to.\n"
226                "Example: parent = this;"
227          }
228       },
229       {
230          "position",
231          {
232             description = "The position of a Window/Control relative to the top left client area of the Parent. \n"
233                "Example: position = { 10, 10 };"
234          }
235       },
236       {
237          "size",
238          {
239             description = "Sets the size of the Window, including all the decorations.\n"
240                "Example: size = { 200, 300 };"
241          }
242       },
243       {
244          "state",
245          {
246             description = "Sets the state of the Window, either Normal, Minimized, or Maximized.\n"
247                "state = Normal;"
248          }
249       },
250       {
251          "stayOnTop",
252          {
253             description = "When true, the Window will stay on top of all other windows. Does not apply to controls."
254          }
255       },
256       {
257          "tabCycle",
258          {
259             description = "When true, then it becomes possible to use the tab key to cycle through all of the children of this Window/Control. The order of cycling is determined by the order of instantiation.\n"
260                "Note: If tabCycle is not true on the parent, then children with hotKeys set, will not be activated by pressing the hotKey, unless the parent is currently active."
261          }
262       },
263       {
264          "text",
265          {
266             description = "The title bar text for the Window. For other controls such as a Label or a Button, text is the descriptive text that the user sees.\n"
267                "Example: text = \"This is a Window\";"
268          }
269       },
270       {
271          "visible",
272          {
273             description = "When true, the Window/Control is actually visible on the screen."
274          }
275       }
276    ],
277    methods = [
278       {
279          "Destroy",
280          {
281             description = "Destroys the current Window/Control.",
282             usage = "Used in the statement section of the source code.",
283             example = "Window\n"
284                "{\n"
285                "   text = \"Destroy Example\";\n"
286                "   Button \n"
287                "   {\n"
288                "      text = \"Destroy this Window!\";",
289             parameters = [
290                {
291                   "code",
292                   {
293                      description = "0",
294                      position = 1
295                   }
296                }
297             ]
298          }
299       },
300       {
301          "OnCreate",
302          {
303             description = "Called any time a Window is created. And can be overridden to perform actions at the time that a window is created.",
304             returnValue = "When true, the Window creation was successful."
305          }
306       },
307       {
308          "OnRedraw",
309          {
310             description = "This method is called anytime the Window is redrawn. Usually when it is resized or moved, however can also be called manually by calling Update() to redraw the contents of the window.",
311             usage = "Use this method by overriding it in your own code, within the Window class that it belongs to.",
312             example = "class Form1 : Window\n"
313                "{\n"
314                "   void OnRedraw(Surface surface)\n"
315                "   {\n"
316                "      surface.blit( image, xdest, ydest, sourceX, sourceY, sourceW, sourceH );\n"
317                "   }\n"
318                "}",
319             remarks = "Typically this method is responsible for the actual drawing of all the graphics for your program.",
320             also = "OnApplyGraphics(), OnLoadGraphics(), OnResize(), OnResizing(), Update(), Window",
321             parameters = [
322                {
323                   "surface",
324                   {
325                      description = "The graphical context which is obtained for this window, which will be drawn to.",
326                      position = 1
327                   }
328                }
329             ]
330          }
331       },
332       {
333          "Update",
334          {
335             description = "Causes the OnRedraw() method of the Window to be called.",
336             usage = "Used in the statement section of the code.",
337             example = "class Form1 : Window\n"
338                "{\n"
339                "   Update( null ); // update the entire window\n"
340                "   Update( { 0, 0, 50, 50 } ); // update the region from 0 to 50 on the x axis, and 0 to 50 on the y axis.\n"
341                "} ",
342             remarks = "One should only update the necessary areas when possible, as updating the entire window indiscriminately can hog precious CPU cycles.",
343             also = "UpdateDisplay(), OnRedraw()",
344             parameters = [
345                {
346                   "region",
347                   {
348                      description = "Defines the area of the Window to be updated. If null is specified, then the entire window is updated.",
349                      position = 1
350                   }
351                }
352             ]
353          }
354       }
355    ]
356 }