1 /***********************************************************************
2     created:    Mon Jun 13 2005
3     author:     Paul D Turner <paul@cegui.org.uk>
4 *************************************************************************/
5 /***************************************************************************
6  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
7  *
8  *   Permission is hereby granted, free of charge, to any person obtaining
9  *   a copy of this software and associated documentation files (the
10  *   "Software"), to deal in the Software without restriction, including
11  *   without limitation the rights to use, copy, modify, merge, publish,
12  *   distribute, sublicense, and/or sell copies of the Software, and to
13  *   permit persons to whom the Software is furnished to do so, subject to
14  *   the following conditions:
15  *
16  *   The above copyright notice and this permission notice shall be
17  *   included in all copies or substantial portions of the Software.
18  *
19  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  *   OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _CEGUIFalEnums_h_
28 #define _CEGUIFalEnums_h_
29 
30 #include "CEGUI/PropertyHelper.h"
31 
32 // Start of CEGUI namespace section
33 namespace CEGUI
34 {
35     /*!
36     \brief
37         Enumeration of possible values to indicate what a given dimension represents.
38     */
39     enum DimensionType
40     {
41         DT_LEFT_EDGE,       //!< Dimension represents the left edge of some entity (same as DT_X_POSITION).
42         DT_X_POSITION,      //!< Dimension represents the x position of some entity (same as DT_LEFT_EDGE).
43         DT_TOP_EDGE,        //!< Dimension represents the top edge of some entity (same as DT_Y_POSITION).
44         DT_Y_POSITION,      //!< Dimension represents the y position of some entity (same as DT_TOP_EDGE).
45         DT_RIGHT_EDGE,      //!< Dimension represents the right edge of some entity.
46         DT_BOTTOM_EDGE,     //!< Dimension represents the bottom edge of some entity.
47         DT_WIDTH,           //!< Dimension represents the width of some entity.
48         DT_HEIGHT,          //!< Dimension represents the height of some entity.
49         DT_X_OFFSET,        //!< Dimension represents the x offset of some entity (usually only applies to an Image entity).
50         DT_Y_OFFSET,        //!< Dimension represents the y offset of some entity (usually only applies to an Image entity).
51         DT_INVALID          //!< Invalid / uninitialised DimensionType.
52     };
53 
54     /*!
55     \brief
56         Enumeration of possible values to indicate the vertical formatting to be used for an image component.
57     */
58     enum VerticalFormatting
59     {
60         VF_TOP_ALIGNED,         //!< Top of Image should be aligned with the top of the destination area.
61         VF_CENTRE_ALIGNED,      //!< Image should be vertically centred within the destination area.
62         VF_BOTTOM_ALIGNED,      //!< Bottom of Image should be aligned with the bottom of the destination area.
63         VF_STRETCHED,           //!< Image should be stretched vertically to fill the destination area.
64         VF_TILED                //!< Image should be tiled vertically to fill the destination area (bottom-most tile may be clipped).
65     };
66 
67     /*!
68     \brief
69         Enumeration of possible values to indicate the horizontal formatting to be used for an image component.
70     */
71     enum HorizontalFormatting
72     {
73         HF_LEFT_ALIGNED,        //!< Left of Image should be aligned with the left of the destination area.
74         HF_CENTRE_ALIGNED,      //!< Image should be horizontally centred within the destination area.
75         HF_RIGHT_ALIGNED,       //!< Right of Image should be aligned with the right of the destination area.
76         HF_STRETCHED,           //!< Image should be stretched horizontally to fill the destination area.
77         HF_TILED                //!< Image should be tiled horizontally to fill the destination area (right-most tile may be clipped).
78     };
79 
80     /*!
81     \brief
82         Enumeration of possible values to indicate the vertical formatting to be used for a text component.
83     */
84     enum VerticalTextFormatting
85     {
86         VTF_TOP_ALIGNED,         //!< Top of text should be aligned with the top of the destination area.
87         VTF_CENTRE_ALIGNED,      //!< text should be vertically centred within the destination area.
88         VTF_BOTTOM_ALIGNED       //!< Bottom of text should be aligned with the bottom of the destination area.
89     };
90 
91     /*!
92     \brief
93         Enumeration of possible values to indicate the horizontal formatting to be used for a text component.
94     */
95     enum HorizontalTextFormatting
96     {
97         HTF_LEFT_ALIGNED,        //!< Left of text should be aligned with the left of the destination area (single line of text only).
98         HTF_RIGHT_ALIGNED,       //!< Right of text should be aligned with the right of the destination area  (single line of text only).
99         HTF_CENTRE_ALIGNED,      //!< text should be horizontally centred within the destination area  (single line of text only).
100         HTF_JUSTIFIED,           //!< text should be spaced so that it takes the full width of the destination area (single line of text only).
101         HTF_WORDWRAP_LEFT_ALIGNED,    //!< Left of text should be aligned with the left of the destination area (word wrapped to multiple lines as needed).
102         HTF_WORDWRAP_RIGHT_ALIGNED,   //!< Right of text should be aligned with the right of the destination area  (word wrapped to multiple lines as needed).
103         HTF_WORDWRAP_CENTRE_ALIGNED,  //!< text should be horizontally centred within the destination area  (word wrapped to multiple lines as needed).
104         HTF_WORDWRAP_JUSTIFIED        //!< text should be spaced so that it takes the full width of the destination area (word wrapped to multiple lines as needed).
105     };
106 
107     /*!
108     \brief
109         Enumeration of possible values to indicate a particular font metric.
110     */
111     enum FontMetricType
112     {
113         FMT_LINE_SPACING,       //!< Vertical line spacing value for font.
114         FMT_BASELINE,           //!< Vertical baseline value for font.
115         FMT_HORZ_EXTENT         //!< Horizontal extent of a string.
116     };
117 
118     /*!
119     \brief
120         Enumeration of values representing mathematical operations on dimensions.
121     */
122     enum DimensionOperator
123     {
124         DOP_NOOP,       //!< Do nothing operator.
125         DOP_ADD,        //!< Dims should be added.
126         DOP_SUBTRACT,   //!< Dims should be subtracted.
127         DOP_MULTIPLY,   //!< Dims should be multiplied.
128         DOP_DIVIDE      //!< Dims should be divided.
129     };
130 
131     /*!
132     \brief
133         Enumeration of values referencing available images forming a frame component.
134     */
135     enum FrameImageComponent
136     {
137         FIC_BACKGROUND,             //!< References image used for the background.
138         FIC_TOP_LEFT_CORNER,        //!< References image used for the top-left corner.
139         FIC_TOP_RIGHT_CORNER,       //!< References image used for the top-right corner.
140         FIC_BOTTOM_LEFT_CORNER,     //!< References image used for the bottom-left corner.
141         FIC_BOTTOM_RIGHT_CORNER,    //!< References image used for the bottom-right corner.
142         FIC_LEFT_EDGE,              //!< References image used for the left edge.
143         FIC_RIGHT_EDGE,             //!< References image used for the right edge.
144         FIC_TOP_EDGE,               //!< References image used for the top edge.
145         FIC_BOTTOM_EDGE,            //!< References image used for the bottom edge.
146         FIC_FRAME_IMAGE_COUNT       //!< Max number of images for a frame.
147     };
148 
149     /*!
150     \brief
151         Enumeration of actions a WidgetLook can take in response to some event
152         firing on a child WidgetComponent.
153     */
154     enum ChildEventAction
155     {
156         //! The window with the WidgetComponent as child is redrawn.
157         CEA_REDRAW,
158         //! The window with the WidgetComponent as child performs child layout.
159         CEA_LAYOUT
160     };
161 
162 
163 } // End of  CEGUI namespace section
164 
165 
166 #endif  // end of guard _CEGUIFalEnums_h_
167