Spinning Topp Logo BlackTopp Studios
inc
uienumerations.h
1 // © Copyright 2010 - 2016 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  /// @brief Used by sizing behavior classes to determine how resizes that preserve aspect ratio should behave.
52  {
53  ARL_Ratio_Unlocked = 0, ///< The aspect ratio is not locked and both dimensions can resize freely.
54  ARL_Ratio_Y_Axis = 1, ///< The X axis is limited by the change to the Y axis. The Y axis can resize freely.
55  ARL_Ratio_Locked_Expanding = 2, ///< 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 = 3 ///< 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  /// @brief Used by various basic renderables for border effects.
60  /// @details Internally border information is stored in small arrays, and this facilitates the proper index being called every time.
61  enum Border
62  {
63  Border_North = 0,
64  Border_South = 1,
65  Border_East = 2,
66  Border_West = 3
67  };
68 
69  /// @brief Used by various basic renderables for applying a gradient effect to a colour or texture on a quad.
70  /// @details Details regarding the colour or texture depends on the individual settings of the renderable the gradient is being applied to.
71  /// Gradients simply allow one colour on one portion of a quad to fade into another.
72  enum Gradient
73  {
74  Gradient_NorthSouth = 0,
75  Gradient_WestEast = 1,
76  Gradient_Diagonal_1 = 2,
77  Gradient_Diagonal_2 = 3
78  };
79 
80  /// @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.
81  /// @details This enum is only ever used to describe one axis at a time. Thus the values do not represent
82  /// corners, but rather the appropriate side on the axis in question.
84  {
85  LA_TopLeft,
86  LA_Center,
87  LA_BottomRight
88  };
89 
90  /// @brief Used by container widgets to determine which axis is considered primary for children/pages.
92  {
93  OP_Horizontal_Vertical = 1,
94  OP_Vertical_Horizontal = 2
95  };
96 
97  /// @brief Used by UI container classes to determine their movement behavior when the container is resized.
98  /// @details These flags are not used if the container object is simply repositioned. Only when a new position
99  /// is needed after the container is resized. If rules for one axis isn't covered, the Unified position is used.
100  /// @n @n
101  /// If PF_Anchor_Prev_Offset, PF_Anchor_ParentSize, or PF_Anchor_SelfSize are not specified in the positioning
102  /// bitfield for a quad, an offset of 0 will be used on the specified edge.
104  {
105  PF_Unified_Pos = 0, ///< Does not anchor to any side, using only the provided unified dimensions.
106  PF_Anchor_Prev_Offset = 1, ///< Uses the offset of the old transform to determine the offset for the new transform, preserving absolute distance between updates.
107  PF_Anchor_ParentSize = 2, ///< Uses the parents updated size of as the offset for the new transform, and applies the Unified Dim of the appropriate axis to it.
108  PF_Anchor_SelfSize = 4, ///< Uses the its own updated size as the offset for the new transform, and applies the Unified Dim of the appropriate axis to it.
109  PF_Anchor_Top = 8, ///< Anchors to the top side of the quad.
110  PF_Anchor_Bottom = 16, ///< Anchors to the bottom side of the quad.
111  PF_Anchor_Left = 32, ///< Anchors to the left side of the quad.
112  PF_Anchor_Right = 64, ///< Anchors to the right side of the quad.
113 
114  PF_Anchor_TopLeft = (PF_Anchor_Top | PF_Anchor_Left), ///< Anchors to the top and left sides of the quad.
115  PF_Anchor_TopRight = (PF_Anchor_Top | PF_Anchor_Right), ///< Anchors to the top and right sides of the quad.
116  PF_Anchor_BottomLeft = (PF_Anchor_Bottom | PF_Anchor_Left), ///< Anchors to the bottom and left sides of the quad.
117  PF_Anchor_BottomRight = (PF_Anchor_Bottom | PF_Anchor_Right), ///< Anchors to the bottom and right sides of the quad.
118 
119  PF_Anchor_VerticalCenter = (PF_Anchor_Top | PF_Anchor_Bottom), ///< Centers along the Y axis of the quad.
120  PF_Anchor_HorizontalCenter = (PF_Anchor_Left | PF_Anchor_Right), ///< Centers along the X axis of the quad.
121 
122  PF_Anchor_Center = (PF_Anchor_TopLeft | PF_Anchor_BottomRight) ///< Centers within the quad.
123  };// */
124 
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  /// @brief This enum describes the type of RenderLayer this is for use in casting.
137  {
138  RLT_Line = 1, ///< Value representing a LineLayer.
139  RLT_MultiImage = 2, ///< Value representing a MultiImageLayer.
140  RLT_MultiLineText = 3, ///< Value representing a MultiLineTextLayer.
141  RLT_SingleImage = 4, ///< Value representing a SingleImageLayer.
142  RLT_SingleLineText = 5 ///< Value representing a SingleLineTextLayer.
143  //RLT_Video
144  //RLT_RenderTarget
145  };
146 
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  /// @brief Used by UI container classes to determine their resize behavior on a given axis when the container is resized.
159  {
160  SR_Unified_Dims = 0, ///< Resizing will use the provided unified dimensions with no further alterations. This is the default for most QuadRenderables.
161  SR_Match_Other_Axis = 1, ///< The calculated value for the perpendicular axis will be used as the final value for this axis.
162  SR_Match_Other_Axis_Unified = 2, ///< Blended Mode. This will do the same as "SR_Match_Other_Axis" and will also apply Unified Dim of the calculating axis to the result.
163  SR_Fill_Available = 4, ///< Unified dimensions are ignored and will instead us all available space.
164  SR_Size_For_Text = 8, ///< Sizes the container so all text in layers will be visible. Only valid for Vertical sizing(exception will be thrown).
165  SR_Fixed_Size = 16 ///< No resizing of any kind will take place.
166  };
167 
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_Horizontal,
173  Spn_Separate_Vertical,
174  Spn_Together_Left,
175  Spn_Together_Right
176  };
177 
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
Characters/New Lines originate from the left, and advance to the right.
Uses the offset of the old transform to determine the offset for the new transform, preserving absolute distance between updates.
Does not anchor to any side, using only the provided unified dimensions.
SpinnerStyle
Used by the spinner class to determine what styling should be used for the spinner.
Anchors to the bottom side of the quad.
Unified dimensions are ignored and will instead us all available space.
QuadCorner
Used by Sprites and Glyphs for tracking their placement on a TextureAtlas.
Centers along the Y axis of the quad.
Value representing a SingleLineTextLayer.
Sizes the container so all text in layers will be visible. Only valid for Vertical sizing(exception w...
OrderingPriority
Used by container widgets to determine which axis is considered primary for children/pages.
Anchors to the top and right sides of the quad.
ScrollbarStyle
Used by the scrollbar class to determine what styling should be used for the scrollbar.
TextOrdering
This enum describes the direction of advancing characters or lines along the X axis.
Blended Mode. This will do the same as "SR_Match_Other_Axis" and will also apply Unified Dim of the c...
Value representing a MultiLineTextLayer.
LinearAlignment
Used by various UI classes to determine the alignment of their child objects, such as text in text li...
The aspect ratio is locked. When multiple axes are resized the axis with less growth is used to deter...
Characters/New Lines originate from the right, and advance to the left.
The X axis is limited by the change to the Y axis. The Y axis can resize freely.
AspectRatioLock
Used by sizing behavior classes to determine how resizes that preserve aspect ratio should behave...
Resizing will use the provided unified dimensions with no further alterations. This is the default fo...
The calculated value for the perpendicular axis will be used as the final value for this axis...
Value representing a SingleImageLayer.
Anchors to the bottom and left sides of the quad.
Gradient
Used by various basic renderables for applying a gradient effect to a colour or texture on a quad...
Anchors to the left side of the quad.
The aspect ratio is locked. When multiple axes are resized the axis with more growth is used to deter...
Uses the its own updated size as the offset for the new transform, and applies the Unified Dim of the...
Centers within the quad.
RenderLayerType
This enum describes the type of RenderLayer this is for use in casting.
SizingRules
Used by UI container classes to determine their resize behavior on a given axis when the container is...
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
Value representing a LineLayer.
No resizing of any kind will take place.
Anchors to the bottom and right sides of the quad.
Uses the parents updated size of as the offset for the new transform, and applies the Unified Dim of ...
The aspect ratio is not locked and both dimensions can resize freely.
Anchors to the right side of the quad.
PositioningFlags
Used by UI container classes to determine their movement behavior when the container is resized...
Centers along the X axis of the quad.
Anchors to the top and left sides of the quad.
Border
Used by various basic renderables for border effects.
Anchors to the top side of the quad.
Value representing a MultiImageLayer.