source: OGRE/trunk/ogre_dependencies/Dependencies/include/CEGUI/elements/CEGUIEditboxProperties.h @ 692

Revision 692, 9.1 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/************************************************************************
2        filename:       CEGUIEditboxProperties.h
3        created:        9/7/2004
4        author:         Paul D Turner
5       
6        purpose:        Interface to Properties for Editbox class
7*************************************************************************/
8/*************************************************************************
9    Crazy Eddie's GUI System (http://www.cegui.org.uk)
10    Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
11
12    This library is free software; you can redistribute it and/or
13    modify it under the terms of the GNU Lesser General Public
14    License as published by the Free Software Foundation; either
15    version 2.1 of the License, or (at your option) any later version.
16
17    This library is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20    Lesser General Public License for more details.
21
22    You should have received a copy of the GNU Lesser General Public
23    License along with this library; if not, write to the Free Software
24    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25*************************************************************************/
26#ifndef _CEGUIEditboxProperties_h_
27#define _CEGUIEditboxProperties_h_
28
29#include "CEGUIProperty.h"
30
31
32// Start of CEGUI namespace section
33namespace CEGUI
34{
35
36// Start of EditboxProperties namespace section
37/*!
38\brief
39        Namespace containing all classes that make up the properties interface for the Editbox class
40*/
41namespace EditboxProperties
42{
43/*!
44\brief
45        Property to access the read-only setting of the edit box.
46
47        This property offers access to the read-only setting for the Editbox object.
48
49        \par Usage:
50                - Name: ReadOnly
51                - Format: "[text]"
52
53        \par Where [Text] is:
54                - "True" to indicate the edit box is read-only.
55                - "False" to indicate the edit box is not read-only (text may be edited by user).
56*/
57class ReadOnly : public Property
58{
59public:
60        ReadOnly() : Property(
61                "ReadOnly",
62                "Property to get/set the read-only setting for the Editbox.  Value is either \"True\" or \"False\".",
63                "False")
64        {}
65
66        String  get(const PropertyReceiver* receiver) const;
67        void    set(PropertyReceiver* receiver, const String& value);
68};
69
70
71/*!
72\brief
73        Property to access the mask text setting of the edit box.
74
75        This property offers access to the mask text setting for the Editbox object.
76
77        \par Usage:
78                - Name: MaskText
79                - Format: "[text]"
80
81        \par Where [Text] is:
82                - "True" to indicate the text should be masked.
83                - "False" to indicate the text should not be masked.
84*/
85class MaskText : public Property
86{
87public:
88        MaskText() : Property(
89                "MaskText",
90                "Property to get/set the mask text setting for the Editbox.  Value is either \"True\" or \"False\".",
91                "False")
92        {}
93
94        String  get(const PropertyReceiver* receiver) const;
95        void    set(PropertyReceiver* receiver, const String& value);
96};
97
98
99/*!
100\brief
101        Property to access the mask text setting of the edit box.
102
103        This property offers access to the mask text setting for the Editbox object.
104
105        \par Usage:
106                - Name: MaskCodepoint
107                - Format: "[uint]"
108
109        \par Where:
110                - [uint] is the Unicode utf32 value of the codepoint used for masking text.
111*/
112class MaskCodepoint : public Property
113{
114public:
115        MaskCodepoint() : Property(
116                "MaskCodepoint",
117                "Property to get/set the utf32 codepoint value used for masking text.  Value is \"[uint]\".",
118                "42")
119        {}
120
121        String  get(const PropertyReceiver* receiver) const;
122        void    set(PropertyReceiver* receiver, const String& value);
123};
124
125
126/*!
127\brief
128        Property to access the string used for regular expression validation of the edit box text.
129
130        \par Usage:
131                - Name: ValidationString
132                - Format: "[text]"
133
134        \par Where:
135                - [Text] is the string used for validating text entry.
136*/
137class ValidationString : public Property
138{
139public:
140        ValidationString() : Property(
141                "ValidationString",
142                "Property to get/set the validation string Editbox.  Value is a text string.",
143                ".*")
144        {}
145
146        String  get(const PropertyReceiver* receiver) const;
147        void    set(PropertyReceiver* receiver, const String& value);
148};
149
150
151/*!
152\brief
153        Property to access the current carat index.
154
155        \par Usage:
156                - Name: CaratIndex
157                - Format: "[uint]"
158
159        \par Where:
160                - [uint] is the zero based index of the carat position within the text.
161*/
162class CaratIndex : public Property
163{
164public:
165        CaratIndex() : Property(
166                "CaratIndex",
167                "Property to get/set the current carat index.  Value is \"[uint]\".",
168                "0")
169        {}
170
171        String  get(const PropertyReceiver* receiver) const;
172        void    set(PropertyReceiver* receiver, const String& value);
173};
174
175
176/*!
177\brief
178        Property to access the current selection start index.
179
180        \par Usage:
181                - Name: SelectionStart
182                - Format: "[uint]"
183
184        \par Where:
185                - [uint] is the zero based index of the selection start position within the text.
186*/
187class SelectionStart : public Property
188{
189public:
190        SelectionStart() : Property(
191                "SelectionStart",
192                "Property to get/set the zero based index of the selection start position within the text.  Value is \"[uint]\".",
193                "0")
194        {}
195
196        String  get(const PropertyReceiver* receiver) const;
197        void    set(PropertyReceiver* receiver, const String& value);
198};
199
200
201/*!
202\brief
203        Property to access the current selection length.
204
205        \par Usage:
206                - Name: SelectionLength
207                - Format: "[uint]"
208
209        \par Where:
210                - [uint] is the length of the selection (as a count of the number of code points selected).
211*/
212class SelectionLength : public Property
213{
214public:
215        SelectionLength() : Property(
216                "SelectionLength",
217                "Property to get/set the length of the selection (as a count of the number of code points selected).  Value is \"[uint]\".",
218                "0")
219        {}
220
221        String  get(const PropertyReceiver* receiver) const;
222        void    set(PropertyReceiver* receiver, const String& value);
223};
224
225
226/*!
227\brief
228        Property to access the maximum text length for the edit box.
229
230        \par Usage:
231                - Name: MaxTextLength
232                - Format: "[uint]"
233
234        \par Where:
235                - [uint] is the maximum allowed text length (as a count of code points).
236*/
237class MaxTextLength : public Property
238{
239public:
240        MaxTextLength() : Property(
241                "MaxTextLength",
242                "Property to get/set the the maximum allowed text length (as a count of code points).  Value is \"[uint]\".",
243                "1073741824")
244        {}
245
246        String  get(const PropertyReceiver* receiver) const;
247        void    set(PropertyReceiver* receiver, const String& value);
248};
249
250
251/*!
252\brief
253        Property to access the normal, unselected, text colour used for rendering text.
254
255        \par Usage:
256                - Name: NormalTextColour
257                - Format: "aarrggbb".
258
259        \par Where:
260                - aarrggbb is the ARGB colour value to be used.
261*/
262class NormalTextColour : public Property
263{
264public:
265        NormalTextColour() : Property(
266                "NormalTextColour",
267                "Property to get/set the normal, unselected, text colour used for rendering text.  Value is \"aarrggbb\" (hex).",
268                "FFFFFFFF")
269        {}
270
271        String  get(const PropertyReceiver* receiver) const;
272        void    set(PropertyReceiver* receiver, const String& value);
273};
274
275
276/*!
277\brief
278        Property to access the colour used for rendering text within the selection area.
279
280        \par Usage:
281                - Name: SelectedTextColour
282                - Format: "aarrggbb".
283
284        \par Where:
285                - aarrggbb is the ARGB colour value to be used.
286*/
287class SelectedTextColour : public Property
288{
289public:
290        SelectedTextColour() : Property(
291                "SelectedTextColour",
292                "Property to get/set the colour used for rendering text within the selection area.  Value is \"aarrggbb\" (hex).",
293                "FF000000")
294        {}
295
296        String  get(const PropertyReceiver* receiver) const;
297        void    set(PropertyReceiver* receiver, const String& value);
298};
299
300
301/*!
302\brief
303        Property to access the colour used for rendering the selection highlight when the edit box is active.
304
305        \par Usage:
306                - Name: ActiveSelectionColour
307                - Format: "aarrggbb".
308
309        \par Where:
310                - aarrggbb is the ARGB colour value to be used.
311*/
312class ActiveSelectionColour : public Property
313{
314public:
315        ActiveSelectionColour() : Property(
316                "ActiveSelectionColour",
317                "Property to get/set the colour used for rendering the selection highlight when the edit box is active.  Value is \"aarrggbb\" (hex).",
318                "FF6060FF")
319        {}
320
321        String  get(const PropertyReceiver* receiver) const;
322        void    set(PropertyReceiver* receiver, const String& value);
323};
324
325
326/*!
327\brief
328        Property to access the colour used for rendering the selection highlight when the edit box is inactive.
329
330        \par Usage:
331                - Name: InactiveSelectionColour
332                - Format: "aarrggbb".
333
334        \par Where:
335                - aarrggbb is the ARGB colour value to be used.
336*/
337class InactiveSelectionColour : public Property
338{
339public:
340        InactiveSelectionColour() : Property(
341                "InactiveSelectionColour",
342                "Property to get/set the colour used for rendering the selection highlight when the edit box is inactive.  Value is \"aarrggbb\" (hex).",
343                "FF808080")
344        {}
345
346        String  get(const PropertyReceiver* receiver) const;
347        void    set(PropertyReceiver* receiver, const String& value);
348};
349
350} // End of  EditboxProperties namespace section
351
352} // End of  CEGUI namespace section
353
354
355#endif  // end of guard _CEGUIEditboxProperties_h_
Note: See TracBrowser for help on using the repository browser.