Crazy Eddies GUI System  0.7.8
CEGUIWindowProperties.h
1 /***********************************************************************
2  filename: CEGUIWindowProperties.h
3  created: 5/7/2004
4  author: Paul D Turner
5 
6  purpose: Interface to available window base class properties
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining
12  * a copy of this software and associated documentation files (the
13  * "Software"), to deal in the Software without restriction, including
14  * without limitation the rights to use, copy, modify, merge, publish,
15  * distribute, sublicense, and/or sell copies of the Software, and to
16  * permit persons to whom the Software is furnished to do so, subject to
17  * the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be
20  * included in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28  * OTHER DEALINGS IN THE SOFTWARE.
29  ***************************************************************************/
30 #ifndef _CEGUIWindowProperties_h_
31 #define _CEGUIWindowProperties_h_
32 
33 #include "CEGUIProperty.h"
34 #include "CEGUIXMLSerializer.h"
35 
36 // Start of CEGUI namespace section
37 namespace CEGUI
38 {
39 
40 // Start of WindowProperties namespace section
45 namespace WindowProperties
46 {
60 class ID : public Property
61 {
62 public:
63  ID() : Property(
64  "ID",
65  "Property to get/set the ID value of the Window. Value is an unsigned integer number.",
66  "0")
67  {}
68 
69  String get(const PropertyReceiver* receiver) const;
70  void set(PropertyReceiver* receiver, const String& value);
71 };
72 
73 
87 class Alpha : public Property
88 {
89 public:
90  Alpha() : Property(
91  "Alpha",
92  "Property to get/set the alpha value of the Window. Value is floating point number.",
93  "1")
94  {}
95 
96  String get(const PropertyReceiver* receiver) const;
97  void set(PropertyReceiver* receiver, const String& value);
98 };
99 
100 
114 class Font : public Property
115 {
116 public:
117  Font() : Property(
118  "Font",
119  "Property to get/set the font for the Window. Value is the name of the font to use (must be loaded already).",
120  "")
121  {}
122 
123  String get(const PropertyReceiver* receiver) const;
124  void set(PropertyReceiver* receiver, const String& value);
125  bool isDefault(const PropertyReceiver* receiver) const;
126 };
127 
128 
142 class Text : public Property
143 {
144 public:
145  Text() : Property(
146  "Text",
147  "Property to get/set the text / caption for the Window. Value is the text string to use.",
148  "")
149  {}
150 
151  String get(const PropertyReceiver* receiver) const;
152  void set(PropertyReceiver* receiver, const String& value);
153 };
154 
155 
171 {
172 public:
174  "MouseCursorImage",
175  "Property to get/set the mouse cursor image for the Window. Value should be \"set:<imageset name> image:<image name>\".",
176  "")
177  {}
178 
179  String get(const PropertyReceiver* receiver) const;
180  void set(PropertyReceiver* receiver, const String& value);
181  bool isDefault(const PropertyReceiver* receiver) const;
182 };
183 
184 
199 class ClippedByParent : public Property
200 {
201 public:
203  "ClippedByParent",
204  "Property to get/set the 'clipped by parent' setting for the Window. Value is either \"True\" or \"False\".",
205  "True")
206  {}
207 
208  String get(const PropertyReceiver* receiver) const;
209  void set(PropertyReceiver* receiver, const String& value);
210 };
211 
212 
227 class InheritsAlpha : public Property
228 {
229 public:
231  "InheritsAlpha",
232  "Property to get/set the 'inherits alpha' setting for the Window. Value is either \"True\" or \"False\".",
233  "True")
234  {}
235 
236  String get(const PropertyReceiver* receiver) const;
237  void set(PropertyReceiver* receiver, const String& value);
238 };
239 
240 
255 class AlwaysOnTop : public Property
256 {
257 public:
258  AlwaysOnTop() : Property(
259  "AlwaysOnTop",
260  "Property to get/set the 'always on top' setting for the Window. Value is either \"True\" or \"False\".",
261  "False")
262  {}
263 
264  String get(const PropertyReceiver* receiver) const;
265  void set(PropertyReceiver* receiver, const String& value);
266 };
267 
268 
283 class Disabled : public Property
284 {
285 public:
286  Disabled() : Property(
287  "Disabled",
288  "Property to get/set the 'disabled state' setting for the Window. Value is either \"True\" or \"False\".",
289  "False")
290  {}
291 
292  String get(const PropertyReceiver* receiver) const;
293  void set(PropertyReceiver* receiver, const String& value);
294  bool isDefault(const PropertyReceiver* receiver) const;
295 };
296 
297 
312 class Visible : public Property
313 {
314 public:
315  Visible() : Property(
316  "Visible",
317  "Property to get/set the 'visible state' setting for the Window. Value is either \"True\" or \"False\".",
318  "True")
319  {}
320 
321  String get(const PropertyReceiver* receiver) const;
322  void set(PropertyReceiver* receiver, const String& value);
323  bool isDefault(const PropertyReceiver* receiver) const;
324 };
325 
326 
343 {
344 public:
346  "RestoreOldCapture",
347  "Property to get/set the 'restore old capture' setting for the Window. Value is either \"True\" or \"False\".",
348  "False")
349  {}
350 
351  String get(const PropertyReceiver* receiver) const;
352  void set(PropertyReceiver* receiver, const String& value);
353 };
354 
355 
371 {
372 public:
374  "DestroyedByParent",
375  "Property to get/set the 'destroyed by parent' setting for the Window. Value is either \"True\" or \"False\".",
376  "True")
377  {}
378 
379  String get(const PropertyReceiver* receiver) const;
380  void set(PropertyReceiver* receiver, const String& value);
381 };
382 
383 
399 {
400 public:
402  "ZOrderChangeEnabled",
403  "Property to get/set the 'z-order changing enabled' setting for the Window. Value is either \"True\" or \"False\".",
404  "True")
405  {}
406 
407  String get(const PropertyReceiver* receiver) const;
408  void set(PropertyReceiver* receiver, const String& value);
409 };
410 
411 
428 {
429 public:
431  "WantsMultiClickEvents",
432  "Property to get/set whether the window will receive double-click and triple-click events. Value is either \"True\" or \"False\".",
433  "True")
434  {}
435 
436  String get(const PropertyReceiver* receiver) const;
437  void set(PropertyReceiver* receiver, const String& value);
438 };
439 
440 
457 {
458 public:
460  "MouseButtonDownAutoRepeat",
461  "Property to get/set whether the window will receive autorepeat mouse button down events. Value is either \"True\" or \"False\".",
462  "False")
463  {}
464 
465  String get(const PropertyReceiver* receiver) const;
466  void set(PropertyReceiver* receiver, const String& value);
467 };
468 
469 
483 class AutoRepeatDelay : public Property
484 {
485 public:
487  "AutoRepeatDelay",
488  "Property to get/set the autorepeat delay. Value is a floating point number indicating the delay required in seconds.",
489  "0.3")
490  {}
491 
492  String get(const PropertyReceiver* receiver) const;
493  void set(PropertyReceiver* receiver, const String& value);
494 };
495 
496 
510 class AutoRepeatRate : public Property
511 {
512 public:
514  "AutoRepeatRate",
515  "Property to get/set the autorepeat rate. Value is a floating point number indicating the rate required in seconds.",
516  "0.06")
517  {}
518 
519  String get(const PropertyReceiver* receiver) const;
520  void set(PropertyReceiver* receiver, const String& value);
521 };
522 
537 {
538 public:
540  "DistributeCapturedInputs",
541  "Property to get/set whether captured inputs are passed to child windows. Value is either \"True\" or \"False\".",
542  "False")
543  {}
544 
545  String get(const PropertyReceiver* receiver) const;
546  void set(PropertyReceiver* receiver, const String& value);
547 };
548 
561 {
562 public:
564  "CustomTooltipType",
565  "Property to get/set the custom tooltip for the window. Value is the type name of the custom tooltip.",
566  "")
567  {}
568 
569  String get(const PropertyReceiver* receiver) const;
570  void set(PropertyReceiver* receiver, const String& value);
571 };
572 
584 class Tooltip : public Property
585 {
586 public:
587  Tooltip() : Property(
588  "Tooltip",
589  "Property to get/set the tooltip text for the window. Value is the tooltip text for the window.",
590  "")
591  {}
592 
593  String get(const PropertyReceiver* receiver) const;
594  void set(PropertyReceiver* receiver, const String& value);
595 };
596 
612 {
613 public:
615  "InheritsTooltipText",
616  "Property to get/set whether the window inherits its parents tooltip text when it has none of its own. Value is either \"True\" or \"False\".",
617  "True")
618  {}
619 
620  String get(const PropertyReceiver* receiver) const;
621  void set(PropertyReceiver* receiver, const String& value);
622 };
623 
624 
637 class RiseOnClick : public Property
638 {
639 public:
640  RiseOnClick() : Property(
641  "RiseOnClick",
642  "Property to get/set whether the window will come tot he top of the z order hwn clicked. Value is either \"True\" or \"False\".",
643  "True")
644  {}
645 
646  String get(const PropertyReceiver* receiver) const;
647  void set(PropertyReceiver* receiver, const String& value);
648 };
649 
650 
665 {
666  public:
668  "VerticalAlignment",
669  "Property to get/set the windows vertical alignment. Value is one of \"Top\", \"Centre\" or \"Bottom\".",
670  "Top")
671  {}
672 
673  String get(const PropertyReceiver* receiver) const;
674  void set(PropertyReceiver* receiver, const String& value);
675 };
676 
677 
692 {
693  public:
695  "HorizontalAlignment",
696  "Property to get/set the windows horizontal alignment. Value is one of \"Left\", \"Centre\" or \"Right\".",
697  "Left")
698  {}
699 
700  String get(const PropertyReceiver* receiver) const;
701  void set(PropertyReceiver* receiver, const String& value);
702 };
703 
704 
723 class UnifiedAreaRect : public Property
724 {
725  public:
727  "UnifiedAreaRect",
728  "Property to get/set the windows unified area rectangle. Value is a \"URect\".",
729  "{{0,0},{0,0},{0,0},{0,0}}")
730  {}
731 
732  String get(const PropertyReceiver* receiver) const;
733  void set(PropertyReceiver* receiver, const String& value);
734 };
735 
736 
751 class UnifiedPosition : public Property
752 {
753  public:
755  "UnifiedPosition",
756  "Property to get/set the windows unified position. Value is a \"UVector2\".",
757  "{{0,0},{0,0}}", false)
758  {}
759 
760  String get(const PropertyReceiver* receiver) const;
761  void set(PropertyReceiver* receiver, const String& value);
762 };
763 
764 
778 {
779  public:
781  "UnifiedXPosition",
782  "Property to get/set the windows unified position x-coordinate. Value is a \"UDim\".",
783  "{0,0}", false)
784  {}
785 
786  String get(const PropertyReceiver* receiver) const;
787  void set(PropertyReceiver* receiver, const String& value);
788 };
789 
790 
804 {
805  public:
807  "UnifiedYPosition",
808  "Property to get/set the windows unified position y-coordinate. Value is a \"UDim\".",
809  "{0,0}", false)
810  {}
811 
812  String get(const PropertyReceiver* receiver) const;
813  void set(PropertyReceiver* receiver, const String& value);
814 };
815 
816 
831 class UnifiedSize : public Property
832 {
833  public:
834  UnifiedSize() : Property(
835  "UnifiedSize",
836  "Property to get/set the windows unified size. Value is a \"UVector2\".",
837  "{{0,0},{0,0}}", false)
838  {}
839 
840  String get(const PropertyReceiver* receiver) const;
841  void set(PropertyReceiver* receiver, const String& value);
842 };
843 
844 
857 class UnifiedWidth : public Property
858 {
859  public:
861  "UnifiedWidth",
862  "Property to get/set the windows unified width. Value is a \"UDim\".",
863  "{0,0}", false)
864  {}
865 
866  String get(const PropertyReceiver* receiver) const;
867  void set(PropertyReceiver* receiver, const String& value);
868 };
869 
870 
883 class UnifiedHeight : public Property
884 {
885  public:
887  "UnifiedHeight",
888  "Property to get/set the windows unified height. Value is a \"UDim\".",
889  "{0,0}", false)
890  {}
891 
892  String get(const PropertyReceiver* receiver) const;
893  void set(PropertyReceiver* receiver, const String& value);
894 };
895 
896 
911 class UnifiedMinSize : public Property
912 {
913  public:
915  "UnifiedMinSize",
916  "Property to get/set the windows unified minimum size. Value is a \"UVector2\".",
917  "{{0,0},{0,0}}")
918  {}
919 
920  String get(const PropertyReceiver* receiver) const;
921  void set(PropertyReceiver* receiver, const String& value);
922 };
923 
924 
939 class UnifiedMaxSize : public Property
940 {
941  public:
943  "UnifiedMaxSize",
944  "Property to get/set the windows unified maximum size. Value is a \"UVector2\".",
945  "{{1,0},{1,0}}")
946  {}
947 
948  String get(const PropertyReceiver* receiver) const;
949  void set(PropertyReceiver* receiver, const String& value);
950 };
951 
952 
966 {
967  public:
969  "MousePassThroughEnabled",
970  "Property to get/set whether the window ignores mouse events and pass them through to any windows behind it. Value is either \"True\" or \"False\".",
971  "False")
972  {}
973 
974  String get(const PropertyReceiver* receiver) const;
975  void set(PropertyReceiver* receiver, const String& value);
976 };
977 
978 
989 class WindowRenderer : public Property
990 {
991  public:
993  "WindowRenderer",
994  "Property to get/set the windows assigned window renderer objects name. Value is a string.",
995  "")
996  {}
997 
998  String get(const PropertyReceiver* receiver) const;
999  void set(PropertyReceiver* receiver, const String& value);
1000 
1001  void writeXMLToStream(const PropertyReceiver* receiver, XMLSerializer& xml_stream) const;
1002 };
1003 
1004 
1015 class LookNFeel : public Property
1016 {
1017  public:
1018  LookNFeel() : Property(
1019  "LookNFeel",
1020  "Property to get/set the windows assigned look'n'feel. Value is a string.",
1021  "")
1022  {}
1023 
1024  String get(const PropertyReceiver* receiver) const;
1025  void set(PropertyReceiver* receiver, const String& value);
1026 
1027  void writeXMLToStream(const PropertyReceiver* receiver, XMLSerializer& xml_stream) const;
1028 };
1029 
1043 class DragDropTarget : public Property
1044 {
1045 public:
1047  "DragDropTarget",
1048  "Property to get/set whether the Window will receive drag and drop related notifications. Value is either \"True\" or \"False\".",
1049  "True")
1050  {}
1051 
1052  String get(const PropertyReceiver* receiver) const;
1053  void set(PropertyReceiver* receiver, const String& value);
1054 };
1055 
1074 {
1075 public:
1077  "AutoRenderingSurface",
1078  "Property to get/set whether the Window will automatically attempt to "
1079  "use a full imagery caching RenderingSurface (if supported by the "
1080  "renderer). Here, full imagery caching usually will mean caching a "
1081  "window's representation onto a texture (although no such "
1082  "implementation requirement is specified.)"
1083  " Value is either \"True\" or \"False\".",
1084  "False")
1085  {}
1086 
1087  String get(const PropertyReceiver* receiver) const;
1088  void set(PropertyReceiver* receiver, const String& value);
1089 };
1090 
1107 class Rotation : public Property
1108 {
1109  public:
1110  Rotation() : Property(
1111  "Rotation",
1112  "Property to get/set the windows rotation factors. Value is "
1113  "\"x:[x_float] y:[y_float] z:[z_float]\".",
1114  "x:0 y:0 z:0")
1115  {}
1116 
1117  String get(const PropertyReceiver* receiver) const;
1118  void set(PropertyReceiver* receiver, const String& value);
1119 };
1120 
1133 class XRotation : public Property
1134 {
1135  public:
1136  XRotation() : Property(
1137  "XRotation",
1138  "Property to get/set the window's x axis rotation factor. Value is "
1139  "\"[float]\".",
1140  "0", false)
1141  {}
1142 
1143  String get(const PropertyReceiver* receiver) const;
1144  void set(PropertyReceiver* receiver, const String& value);
1145 };
1146 
1159 class YRotation : public Property
1160 {
1161  public:
1162  YRotation() : Property(
1163  "YRotation",
1164  "Property to get/set the window's y axis rotation factor. Value is "
1165  "\"[float]\".",
1166  "0", false)
1167  {}
1168 
1169  String get(const PropertyReceiver* receiver) const;
1170  void set(PropertyReceiver* receiver, const String& value);
1171 };
1172 
1185 class ZRotation : public Property
1186 {
1187  public:
1188  ZRotation() : Property(
1189  "ZRotation",
1190  "Property to get/set the window's z axis rotation factor. Value is "
1191  "\"[float]\".",
1192  "0", false)
1193  {}
1194 
1195  String get(const PropertyReceiver* receiver) const;
1196  void set(PropertyReceiver* receiver, const String& value);
1197 };
1198 
1213 class NonClient : public Property
1214 {
1215 public:
1216  NonClient() : Property(
1217  "NonClient",
1218  "Property to get/set the 'non-client' setting for the Window. "
1219  "Value is either \"True\" or \"False\".",
1220  "False")
1221  {}
1222 
1223  String get(const PropertyReceiver* receiver) const;
1224  void set(PropertyReceiver* receiver, const String& value);
1225 };
1226 
1245 {
1246 public:
1248  "TextParsingEnabled",
1249  "Property to get/set the text parsing setting for the Window. "
1250  "Value is either \"True\" or \"False\".",
1251  "True")
1252  {}
1253 
1254  String get(const PropertyReceiver* receiver) const;
1255  void set(PropertyReceiver* receiver, const String& value);
1256 };
1257 
1280 class Margin : public Property
1281 {
1282 public:
1283  Margin() : Property(
1284  "Margin",
1285  "Property to get/set margin for the Window. Value format:"
1286  "{top:{[tops],[topo]},left:{[lefts],[lefto]},bottom:{[bottoms],[bottomo]},right:{[rights],[righto]}}.",
1287  "{top:{0,0},left:{0,0},bottom:{0,0},right:{0,0}}")
1288  {}
1289 
1290  String get(const PropertyReceiver* receiver) const;
1291  void set(PropertyReceiver* receiver, const String& value);
1292 };
1293 
1308 class UpdateMode : public Property
1309 {
1310  public:
1311  UpdateMode() : Property(
1312  "UpdateMode",
1313  "Property to get/set the window update mode setting. "
1314  "Value is one of \"Always\", \"Never\" or \"Visible\".",
1315  "Visible")
1316  {}
1317 
1318  String get(const PropertyReceiver* receiver) const;
1319  void set(PropertyReceiver* receiver, const String& value);
1320 };
1321 
1338 {
1339 public:
1341  "MouseInputPropagationEnabled",
1342  "Property to get/set whether unhandled mouse inputs should be "
1343  "propagated back to the Window's parent. "
1344  "Value is either \"True\" or \"False\".",
1345  "False")
1346  {}
1347 
1348  String get(const PropertyReceiver* receiver) const;
1349  void set(PropertyReceiver* receiver, const String& value);
1350 };
1351 
1352 } // End of WindowProperties namespace section
1353 
1354 
1355 } // End of CEGUI namespace section
1356 
1357 #endif // end of guard _CEGUIWindowProperties_h_