MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
uienumerations.h
1 // © Copyright 2010 - 2014 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _uienumerations_h
41 #define _uienumerations_h
42 ///////////////////////////////////////////////////////////////////////////////
43 //Any global enumerations shared between multiple classes in the UI namespace is to be declared here.
44 ///////////////////////////////////////
45 
46 namespace Mezzanine
47 {
48  namespace UI
49  {
50  /// @enum AspectRatioLock
51  /// @brief Used by sizing behavior classes to determine how resizes that preserve aspect ratio should behave.
53  {
54  ARL_Ratio_Unlocked = 0, ///< The aspect ratio is not locked and both dimensions can resize freely.
55  ARL_Ratio_Locked_Expanding = 1, ///< The aspect ratio is locked. When multiple axes are resized the axis with more growth is used to determine the size of the other axis.
56  ARL_Ratio_Locked_Shrinking = 2 ///< The aspect ratio is locked. When multiple axes are resized the axis with less growth is used to determine the size of the other axis.
57  };
58 
59  /// @enum Border
60  /// @brief Used by various basic renderables for border effects.
61  /// @details Internally border information is stored in small arrays, and this facilitates the proper index being called every time.
62  enum Border
63  {
64  Border_North = 0,
65  Border_South = 1,
66  Border_East = 2,
67  Border_West = 3
68  };
69 
70  /// @enum Gradient
71  /// @brief Used by various basic renderables for applying a gradient effect to a colour or texture on a quad.
72  /// @details Details regarding the colour or texture depends on the individual settings of the renderable the gradient is being applied to.
73  /// Gradients simply allow one colour on one portion of a quad to fade into another.
74  enum Gradient
75  {
76  Gradient_NorthSouth = 0,
77  Gradient_WestEast = 1,
78  Gradient_Diagonal_1 = 2,
79  Gradient_Diagonal_2 = 3
80  };
81 
82  /// @enum LinearAlignment
83  /// @brief Used by various UI classes to determine the alignment of their child objects, such as text in text lines, or quads in a layout container.
84  /// @details This enum is only ever used to describe one axis at a time. Thus the values do not represent
85  /// corners, but rather the appropriate side on the axis in question.
87  {
88  LA_TopLeft,
89  LA_Center,
90  LA_BottomRight
91  };
92 
93  /// @enum OrderingPriority
94  /// @brief Used by container widgets to determine which axis is considered primary for children/pages.
96  {
97  OP_Horizontal_Vertical = 1,
98  OP_Vertical_Horizontal = 2
99  };
100 
101  /// @enum RepositionFlags
102  /// @brief Used by UI container classes to determine their movement behavior when the container is resized.
103  /// @details These flags are not used if the container object is simply repositioned. Only when a new position
104  /// is needed after the container is resized. If rules for one axis isn't covered, the Unified position is used.
106  {
107  PF_Unified_Pos = 0, ///< Does not anchor to any side, using only the provided unified dimensions.
108  PF_Top = 1, ///< Anchors to the top side of the quad.
109  PF_Bottom = 2, ///< Anchors to the bottom side of the quad.
110  PF_Left = 4, ///< Anchors to the left side of the quad.
111  PF_Right = 8, ///< Anchors to the right side of the quad.
112 
113  PF_TopLeft = (PF_Top | PF_Left), ///< Anchors to the top and left sides of the quad.
114  PF_TopRight = (PF_Top | PF_Right), ///< Anchors to the top and right sides of the quad.
115  PF_BottomLeft = (PF_Bottom | PF_Left), ///< Anchors to the bottom and left sides of the quad.
116  PF_BottomRight = (PF_Bottom | PF_Right), ///< Anchors to the bottom and right sides of the quad.
117 
118  PF_VerticalCenter = (PF_Top | PF_Bottom), ///< Centers along the Y axis of the quad.
119  PF_HorizontalCenter = (PF_Left | PF_Right), ///< Centers along the X axis of the quad.
120 
121  PF_Center = (PF_TopLeft | PF_BottomRight) ///< Centers within the quad.
122  };//*/
123 
124  /// @enum QuadCorner
125  /// @brief Used by Sprites and Glyphs for tracking their placement on a TextureAtlas.
126  /// @details This helps to ensure the proper indexs are accessed at all times when getting UV information.
128  {
129  QC_TopLeft = 0,
130  QC_TopRight = 1,
131  QC_BottomRight = 2,
132  QC_BottomLeft = 3
133  };
134 
135  /// @enum RenderPriority
136  /// @brief Used by UI elements created by layers to determine z-ordering within a layer.
137  /// @details This essentially means we're adding layers to our layers without the messy
138  /// and un-intuitive re-coding necessary to actually accomplish that.
140  {
141  RP_Low,
142  RP_Medium,
143  RP_High
144  };
145 
146  /// @enum ScrollbarStyle
147  /// @brief Used by the scrollbar class to determine what styling should be used for the scrollbar.
148  /// @details These values are mostly self explanitory, the scrollbar class documentation has more details.
150  {
151  SB_NoButtons,
152  SB_Separate,
153  SB_TogetherUpLeft,
154  SB_TogetherDownRight
155  };
156 
157  /// @enum SizingRules
158  /// @brief Used by UI container classes to determine their resize behavior on a given axis when the container is resized.
160  {
161  SR_Unified_Dims = 0, ///< Resizing will use the provided unified dimensions with no further alterations.
162  SR_Match_Other_Axis = 1, ///< The calculated value for the perpendicular axis will be used as the final value for this axis.
163  SR_Fill_Available = 2, ///< Unified dimensions are ignored and will instead us all available space.
164  SR_Fixed_Size = 3 ///< No resizing of any kind will take place.
165  };
166 
167  /// @enum SpinnerStyle
168  /// @brief Used by the spinner class to determine what styling should be used for the spinner.
169  /// @details In the case of the buttons being together, the increment button will be above the decrement button.
171  {
172  Spn_Separate,
173  Spn_Together_Left,
174  Spn_Together_Right
175  };
176 
177  /// @enum TextOrdering
178  /// @brief This enum describes the direction of advancing characters or lines along the X axis.
180  {
181  TO_Left_To_Right = 1, ///< Characters/New Lines originate from the left, and advance to the right.
182  TO_Right_To_Left = 2 ///< Characters/New Lines originate from the right, and advance to the left.
183  };
184  }//UI
185 }//Mezzanine
186 
187 #endif