Crazy Eddies GUI System 0.7.6
CEGUIEditboxProperties.h
00001 /***********************************************************************
00002         filename:       CEGUIEditboxProperties.h
00003         created:        9/7/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Interface to Properties for Editbox class
00007 *************************************************************************/
00008 /***************************************************************************
00009  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00010  *
00011  *   Permission is hereby granted, free of charge, to any person obtaining
00012  *   a copy of this software and associated documentation files (the
00013  *   "Software"), to deal in the Software without restriction, including
00014  *   without limitation the rights to use, copy, modify, merge, publish,
00015  *   distribute, sublicense, and/or sell copies of the Software, and to
00016  *   permit persons to whom the Software is furnished to do so, subject to
00017  *   the following conditions:
00018  *
00019  *   The above copyright notice and this permission notice shall be
00020  *   included in all copies or substantial portions of the Software.
00021  *
00022  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00023  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00024  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00025  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00026  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00027  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00028  *   OTHER DEALINGS IN THE SOFTWARE.
00029  ***************************************************************************/
00030 #ifndef _CEGUIEditboxProperties_h_
00031 #define _CEGUIEditboxProperties_h_
00032 
00033 #include "../CEGUIProperty.h"
00034 
00035 
00036 // Start of CEGUI namespace section
00037 namespace CEGUI
00038 {
00039 
00040 // Start of EditboxProperties namespace section
00045 namespace EditboxProperties
00046 {
00061 class ReadOnly : public Property
00062 {
00063 public:
00064         ReadOnly() : Property(
00065                 "ReadOnly",
00066                 "Property to get/set the read-only setting for the Editbox.  Value is either \"True\" or \"False\".",
00067                 "False")
00068         {}
00069 
00070         String  get(const PropertyReceiver* receiver) const;
00071         void    set(PropertyReceiver* receiver, const String& value);
00072 };
00073 
00074 
00089 class MaskText : public Property
00090 {
00091 public:
00092         MaskText() : Property(
00093                 "MaskText",
00094                 "Property to get/set the mask text setting for the Editbox.  Value is either \"True\" or \"False\".",
00095                 "False")
00096         {}
00097 
00098         String  get(const PropertyReceiver* receiver) const;
00099         void    set(PropertyReceiver* receiver, const String& value);
00100 };
00101 
00102 
00116 class MaskCodepoint : public Property
00117 {
00118 public:
00119         MaskCodepoint() : Property(
00120                 "MaskCodepoint",
00121                 "Property to get/set the utf32 codepoint value used for masking text.  Value is \"[uint]\".",
00122                 "42")
00123         {}
00124 
00125         String  get(const PropertyReceiver* receiver) const;
00126         void    set(PropertyReceiver* receiver, const String& value);
00127 };
00128 
00129 
00141 class ValidationString : public Property
00142 {
00143 public:
00144         ValidationString() : Property(
00145                 "ValidationString",
00146                 "Property to get/set the validation string Editbox.  Value is a text string.",
00147                 ".*")
00148         {}
00149 
00150         String  get(const PropertyReceiver* receiver) const;
00151         void    set(PropertyReceiver* receiver, const String& value);
00152 };
00153 
00154 
00166 class CaratIndex : public Property
00167 {
00168 public:
00169         CaratIndex() : Property(
00170                 "CaratIndex",
00171                 "Property to get/set the current carat index.  Value is \"[uint]\".",
00172                 "0")
00173         {}
00174 
00175         String  get(const PropertyReceiver* receiver) const;
00176         void    set(PropertyReceiver* receiver, const String& value);
00177 };
00178 
00179 
00191 class SelectionStart : public Property
00192 {
00193 public:
00194         SelectionStart() : Property(
00195                 "SelectionStart",
00196                 "Property to get/set the zero based index of the selection start position within the text.  Value is \"[uint]\".",
00197                 "0")
00198         {}
00199 
00200         String  get(const PropertyReceiver* receiver) const;
00201         void    set(PropertyReceiver* receiver, const String& value);
00202 };
00203 
00204 
00216 class SelectionLength : public Property
00217 {
00218 public:
00219         SelectionLength() : Property(
00220                 "SelectionLength",
00221                 "Property to get/set the length of the selection (as a count of the number of code points selected).  Value is \"[uint]\".",
00222                 "0")
00223         {}
00224 
00225         String  get(const PropertyReceiver* receiver) const;
00226         void    set(PropertyReceiver* receiver, const String& value);
00227 };
00228 
00229 
00241 class MaxTextLength : public Property
00242 {
00243 public:
00244         MaxTextLength() : Property(
00245                 "MaxTextLength",
00246                 "Property to get/set the the maximum allowed text length (as a count of code points).  Value is \"[uint]\".",
00247                 "1073741824")
00248         {}
00249 
00250         String  get(const PropertyReceiver* receiver) const;
00251         void    set(PropertyReceiver* receiver, const String& value);
00252 };
00253 
00254 
00266 class NormalTextColour : public Property
00267 {
00268 public:
00269         NormalTextColour() : Property(
00270                 "NormalTextColour",
00271                 "Property to get/set the normal, unselected, text colour used for rendering text.  Value is \"aarrggbb\" (hex).",
00272                 "FFFFFFFF")
00273         {}
00274 
00275         String  get(const PropertyReceiver* receiver) const;
00276         void    set(PropertyReceiver* receiver, const String& value);
00277 };
00278 
00279 
00291 class SelectedTextColour : public Property
00292 {
00293 public:
00294         SelectedTextColour() : Property(
00295                 "SelectedTextColour",
00296                 "Property to get/set the colour used for rendering text within the selection area.  Value is \"aarrggbb\" (hex).",
00297                 "FF000000")
00298         {}
00299 
00300         String  get(const PropertyReceiver* receiver) const;
00301         void    set(PropertyReceiver* receiver, const String& value);
00302 };
00303 
00304 
00316 class ActiveSelectionColour : public Property
00317 {
00318 public:
00319         ActiveSelectionColour() : Property(
00320                 "ActiveSelectionColour",
00321                 "Property to get/set the colour used for rendering the selection highlight when the edit box is active.  Value is \"aarrggbb\" (hex).",
00322                 "FF6060FF")
00323         {}
00324 
00325         String  get(const PropertyReceiver* receiver) const;
00326         void    set(PropertyReceiver* receiver, const String& value);
00327 };
00328 
00329 
00341 class InactiveSelectionColour : public Property
00342 {
00343 public:
00344         InactiveSelectionColour() : Property(
00345                 "InactiveSelectionColour",
00346                 "Property to get/set the colour used for rendering the selection highlight when the edit box is inactive.  Value is \"aarrggbb\" (hex).",
00347                 "FF808080")
00348         {}
00349 
00350         String  get(const PropertyReceiver* receiver) const;
00351         void    set(PropertyReceiver* receiver, const String& value);
00352 };
00353 
00354 } // End of  EditboxProperties namespace section
00355 
00356 } // End of  CEGUI namespace section
00357 
00358 
00359 #endif  // end of guard _CEGUIEditboxProperties_h_