Crazy Eddies GUI System  0.6.2
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 
610 {
611 public:
613  "InheritsTooltipText",
614  "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\".",
615  "False")
616  {}
617 
618  String get(const PropertyReceiver* receiver) const;
619  void set(PropertyReceiver* receiver, const String& value);
620 };
621 
622 
635 class RiseOnClick : public Property
636 {
637 public:
638  RiseOnClick() : Property(
639  "RiseOnClick",
640  "Property to get/set whether the window will come tot he top of the z order hwn clicked. Value is either \"True\" or \"False\".",
641  "True")
642  {}
643 
644  String get(const PropertyReceiver* receiver) const;
645  void set(PropertyReceiver* receiver, const String& value);
646 };
647 
648 
663 {
664  public:
666  "VerticalAlignment",
667  "Property to get/set the windows vertical alignment. Value is one of \"Top\", \"Centre\" or \"Bottom\".",
668  "Top")
669  {}
670 
671  String get(const PropertyReceiver* receiver) const;
672  void set(PropertyReceiver* receiver, const String& value);
673 };
674 
675 
690 {
691  public:
693  "HorizontalAlignment",
694  "Property to get/set the windows horizontal alignment. Value is one of \"Left\", \"Centre\" or \"Right\".",
695  "Left")
696  {}
697 
698  String get(const PropertyReceiver* receiver) const;
699  void set(PropertyReceiver* receiver, const String& value);
700 };
701 
702 
721 class UnifiedAreaRect : public Property
722 {
723  public:
725  "UnifiedAreaRect",
726  "Property to get/set the windows unified area rectangle. Value is a \"URect\".",
727  "{{0,0},{0,0},{0,0},{0,0}}")
728  {}
729 
730  String get(const PropertyReceiver* receiver) const;
731  void set(PropertyReceiver* receiver, const String& value);
732 };
733 
734 
749 class UnifiedPosition : public Property
750 {
751  public:
753  "UnifiedPosition",
754  "Property to get/set the windows unified position. Value is a \"UVector2\".",
755  "{{0,0},{0,0}}", false)
756  {}
757 
758  String get(const PropertyReceiver* receiver) const;
759  void set(PropertyReceiver* receiver, const String& value);
760 };
761 
762 
776 {
777  public:
779  "UnifiedXPosition",
780  "Property to get/set the windows unified position x-coordinate. Value is a \"UDim\".",
781  "{0,0}", false)
782  {}
783 
784  String get(const PropertyReceiver* receiver) const;
785  void set(PropertyReceiver* receiver, const String& value);
786 };
787 
788 
802 {
803  public:
805  "UnifiedYPosition",
806  "Property to get/set the windows unified position y-coordinate. Value is a \"UDim\".",
807  "{0,0}", false)
808  {}
809 
810  String get(const PropertyReceiver* receiver) const;
811  void set(PropertyReceiver* receiver, const String& value);
812 };
813 
814 
829 class UnifiedSize : public Property
830 {
831  public:
832  UnifiedSize() : Property(
833  "UnifiedSize",
834  "Property to get/set the windows unified size. Value is a \"UVector2\".",
835  "{{0,0},{0,0}}", false)
836  {}
837 
838  String get(const PropertyReceiver* receiver) const;
839  void set(PropertyReceiver* receiver, const String& value);
840 };
841 
842 
855 class UnifiedWidth : public Property
856 {
857  public:
859  "UnifiedWidth",
860  "Property to get/set the windows unified width. Value is a \"UDim\".",
861  "{0,0}", false)
862  {}
863 
864  String get(const PropertyReceiver* receiver) const;
865  void set(PropertyReceiver* receiver, const String& value);
866 };
867 
868 
881 class UnifiedHeight : public Property
882 {
883  public:
885  "UnifiedHeight",
886  "Property to get/set the windows unified height. Value is a \"UDim\".",
887  "{0,0}", false)
888  {}
889 
890  String get(const PropertyReceiver* receiver) const;
891  void set(PropertyReceiver* receiver, const String& value);
892 };
893 
894 
909 class UnifiedMinSize : public Property
910 {
911  public:
913  "UnifiedMinSize",
914  "Property to get/set the windows unified minimum size. Value is a \"UVector2\".",
915  "{{0,0},{0,0}}")
916  {}
917 
918  String get(const PropertyReceiver* receiver) const;
919  void set(PropertyReceiver* receiver, const String& value);
920 };
921 
922 
937 class UnifiedMaxSize : public Property
938 {
939  public:
941  "UnifiedMaxSize",
942  "Property to get/set the windows unified maximum size. Value is a \"UVector2\".",
943  "{{0,0},{0,0}}")
944  {}
945 
946  String get(const PropertyReceiver* receiver) const;
947  void set(PropertyReceiver* receiver, const String& value);
948 };
949 
950 
964 {
965  public:
967  "MousePassThroughEnabled",
968  "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\".",
969  "False")
970  {}
971 
972  String get(const PropertyReceiver* receiver) const;
973  void set(PropertyReceiver* receiver, const String& value);
974 };
975 
976 
987 class WindowRenderer : public Property
988 {
989  public:
991  "WindowRenderer",
992  "Property to get/set the windows assigned window renderer objects name. Value is a string.",
993  "")
994  {}
995 
996  String get(const PropertyReceiver* receiver) const;
997  void set(PropertyReceiver* receiver, const String& value);
998 
999  void writeXMLToStream(const PropertyReceiver* receiver, XMLSerializer& xml_stream) const;
1000 };
1001 
1002 
1013 class LookNFeel : public Property
1014 {
1015  public:
1016  LookNFeel() : Property(
1017  "LookNFeel",
1018  "Property to get/set the windows assigned look'n'feel. Value is a string.",
1019  "")
1020  {}
1021 
1022  String get(const PropertyReceiver* receiver) const;
1023  void set(PropertyReceiver* receiver, const String& value);
1024 
1025  void writeXMLToStream(const PropertyReceiver* receiver, XMLSerializer& xml_stream) const;
1026 };
1027 
1041 class DragDropTarget : public Property
1042 {
1043 public:
1045  "DragDropTarget",
1046  "Property to get/set whether the Window will receive drag and drop related notifications. Value is either \"True\" or \"False\".",
1047  "True")
1048  {}
1049 
1050  String get(const PropertyReceiver* receiver) const;
1051  void set(PropertyReceiver* receiver, const String& value);
1052 };
1053 
1054 
1055 } // End of WindowProperties namespace section
1056 
1057 
1058 } // End of CEGUI namespace section
1059 
1060 #endif // end of guard _CEGUIWindowProperties_h_