Rose
Constants.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <array>
11 
12 namespace rose {
13 
14 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
15  static constexpr uint32_t rmask = 0xff000000;
16  static constexpr uint32_t rshift = 24U;
17  static constexpr uint32_t gmask = 0x00ff0000;
18  static constexpr uint32_t gshift = 16U;
19  static constexpr uint32_t bmask = 0x0000ff00;
20  static constexpr uint32_t bshift = 8U;
21  static constexpr uint32_t amask = 0x000000ff;
22  static constexpr uint32_t ashift = 0U;
23  static constexpr uint32_t cmask = rmask | gmask | bmask;
24 #else
25  static constexpr uint32_t rmask = 0x000000ffu;
26  static constexpr uint32_t rshift = 0U;
27  static constexpr uint32_t gmask = 0x0000ff00u;
28  static constexpr uint32_t gshift = 8U;
29  static constexpr uint32_t bmask = 0x00ff0000u;
30  static constexpr uint32_t bshift = 16U;
31  static constexpr uint32_t amask = 0xff000000u;
32  static constexpr uint32_t ashift = 24U;
33  static constexpr uint32_t cmask = rmask | gmask | bmask;
34 #endif
35 
45  enum class DataType : int {
46  Unset, Char, Int, Real, String,
47  };
48 
53  enum SignalTokenValues : uint32_t {
62  };
63 
74  };
75 
80  enum ButtonSetState : bool {
81  ButtonOff = false,
82  ButtonOn = true,
83  };
84 
89  enum ButtonType {
97  };
98 
99  static constexpr std::array<std::string_view,4> ActionButtonLabel {
100  "OK",
101  "Cancel",
102  "Save",
103  "Close",
104  };
105 
110  enum CacheError : uint32_t {
116  };
117 
122  enum class CascadeButtonType {
123  Unset,
124  CascadeDown,
125  CascadeRight,
126  };
127 
128  enum class Gradient {
129  None,
130  DarkToLight,
131  LightToDark,
132  GreenToRed,
133  RedToGreen,
136  };
137 
142  enum Modality {
146  };
147 
152  enum class Manip {
153  Parent,
154  };
155 
160  enum class Orientation {
161  Unset,
162  Horizontal,
163  Vertical,
164  Both,
165  };
166 
171  enum RoseImageId : size_t {
190  IconLevelUp,
201  ScaleNeedleUp,
202  ScaleNeedleDown,
203  ScaleNeedleLeft,
204  ScaleNeedleRight,
205  IconTarget,
206  IconTargetRed,
207  IconTargetGreen,
208  IconTargetYellow,
225  };
226 
235  template<typename EnumClassType>
236  inline bool unset(EnumClassType value) { return value == EnumClassType::Unset; }
237 
242  enum UseBorder {
243  None,
244  BevelOut,
245  BevelIn,
246  NotchOut,
247  NotchIn,
248  };
249 
254  enum class HorizontalAlignment {
255  Unset,
256  Center,
257  Left,
258  Right,
259  };
260 
265  enum class VerticalAlignment {
266  Unset,
267  Center,
268  Top,
269  Bottom,
270  };
271 
277  Unset,
278  Center,
279  Left,
280  Right,
281  };
282 
284  Unset,
285  Center,
286  Top,
287  Bottom,
288  Baseline,
289  };
290 
295  enum class BorderStyle {
296  Unset,
297  None,
298  Bevel,
299  BevelIn,
300  Notch,
301  TabTop,
302  TabLeft,
303  TabPage,
304  };
305 
310  enum class CornerStyle {
311  Unset,
312  Square,
313  Round,
314  };
315 
320  enum class DrawBackground {
321  Unset,
322  None,
323  Widget,
324  };
330  enum WidgetSize {
333  };
334 
336 }
bool unset(EnumClassType value)
Determine if an enumerated value is unset.
Definition: Constants.h:236
Two Dots.
Definition: Constants.h:192
Sheet of square corners beveled in.
Definition: Constants.h:220
CascadeButtonType
The type of CascadeButton.
Definition: Constants.h:122
Invalid image ID.
Definition: Constants.h:172
Carriage Return.
Definition: Constants.h:189
Offset for additional errors.
Definition: Constants.h:115
Closed Lock Icon.
Definition: Constants.h:178
A normal push button.
Definition: Constants.h:90
Return the parent of the Widget.
Center for the round corners in red hue.
Definition: Constants.h:215
DataType
Encode expected data types.
Definition: Constants.h:45
The widget can vary in size.
Definition: Constants.h:331
WidgetSize
An enumeration to encode how a widget size should be dealt with by a managing container.
Definition: Constants.h:330
Not modal, but interactions outside the container cause it to close.
Definition: Constants.h:144
Up facing Triangle.
Definition: Constants.h:185
Provide information.
Definition: Constants.h:175
A Tab widget button.
Definition: Constants.h:95
RoseImageId
Identifiers for Textures created by the Rose object and available from the Rose ImageRepository.
Definition: Constants.h:171
No error.
Definition: Constants.h:111
Modality
The Modality of a transient Window, a Popup or derivative.
Definition: Constants.h:142
A toggle button.
Definition: Constants.h:93
CacheError
Error values return by the cache.
Definition: Constants.h:110
ExitDialog Ok ActionButton.
Definition: Constants.h:58
Not set to a valid value.
Three Dots.
Definition: Constants.h:193
Center for the square corners in theme invert color.
Definition: Constants.h:224
LabelVerticalAlignment
Definition: Constants.h:283
Down facing Triangle.
Definition: Constants.h:186
ActionButtonType
Types of Dialog action buttons.
Definition: Constants.h:69
Sheet of square corners notched out.
Definition: Constants.h:221
Post the associated menu below.
The value that can be used for the first SignalToken of a user application.
Definition: Constants.h:61
A notched border that looks like a trench surrounding the frame.
Definition: Frame.h:28
Bold Up Arrow.
Definition: Constants.h:179
Alert the user to an error, unusual or unexpected occurrence.
Definition: Constants.h:177
Right Arrow.
Definition: Constants.h:182
A normal button with a check badge.
Definition: Constants.h:92
CornerStyle
Types of corners supported.
Definition: Types.h:63
Center for the round corners in yellow hue.
Definition: Constants.h:218
UseBorder
The type of border to draw.
Definition: Frame.h:23
Modal, no interactions outsie the container are allowed while it is open.
Definition: Constants.h:145
Center for the square corners in theme base color.
Definition: Constants.h:223
TabButton border, tabs on top.
Keyboard.
Definition: Constants.h:194
Red at LowerBound, Green at UpperBound.
Sheet of round corners notched out.
Definition: Constants.h:211
Right facing Triangle.
Definition: Constants.h:184
Sheet of round corners beveled in.
Definition: Constants.h:210
Sphere with encircling lines.
Definition: Constants.h:196
Close the dialog.
Definition: Constants.h:57
Compass.
Definition: Constants.h:199
Manip
Widget manipulators without arguments.
Definition: Constants.h:152
Black at LowerBound, White at UpperBound.
Globe.
Definition: Constants.h:195
Sheet of round corners beveled out.
Definition: Constants.h:209
POI Icon.
Definition: Constants.h:198
Provide help.
Definition: Constants.h:174
Center for the round corners in theme invert color.
Definition: Constants.h:214
HorizontalAlignment
Horizontal alignment values.
Definition: Constants.h:254
Sheet of round corners notched in.
Definition: Constants.h:212
VerticalAlignment
Vertical alignment values.
Definition: Constants.h:265
Both axis – for Elastic.
Center the aligned content horizontally.
Sheet of square corners beveled out.
Definition: Constants.h:219
ButtonSetState
A type alias for bool to set the button state.
Definition: Constants.h:80
Save changes made.
Definition: Constants.h:73
Green at LowerBound, through Yellow, to Red at UpperBound.
A beveled border that gives the illusion the frame stands up from the display.
Definition: Frame.h:25
Save data entered in the dialog.
Definition: Constants.h:55
Cache item not found.
Definition: Constants.h:112
Back.
Definition: Constants.h:188
LabelHorizontalAlignment
Label text horizontal alignment.
Definition: Constants.h:276
RadioBehavior state is undetermined.
Definition: Constants.h:60
ButtonType
The button type.
Definition: PointerInteractions.h:21
Allign the text with a common baseline.
A radio button.
Definition: Constants.h:94
Button off.
Definition: Constants.h:81
SignalTokenValues
These are the signal tokens used by built-in Widgets that transmit Signals with SignalTokens.
Definition: Constants.h:53
A Cascade Button, treated as a NormalButton.
Definition: Constants.h:96
A normal button with a cancel badge.
Definition: Constants.h:91
Center for the round corners in theme base color.
Definition: Constants.h:213
Orientation
Possible values for Widget orientation.
Definition: Types.h:41
A notched border that looks like a ridge surrounding the frame.
Definition: Frame.h:27
Camera.
Definition: Constants.h:200
A beveled out border.
TabButton border, tabs on left.
Button on.
Definition: Constants.h:82
Forward to end.
Definition: Constants.h:187
Rocket ship.
Definition: Constants.h:197
Gradient
Definition: Constants.h:128
General Dialog Ok Action Button.
Definition: Constants.h:54
Left facing Triangle.
Definition: Constants.h:183
Sheet of square corners notched in.
Definition: Constants.h:222
Cancel the action, close a window, answer no, etc.
Definition: Constants.h:173
The widget is fixed in size.
Definition: Constants.h:332
Cancel the action described in the dialog.
Definition: Constants.h:71
Could not write to cache store.
Definition: Constants.h:113
Left Arrow.
Definition: Constants.h:181
Approve the action, answer yes, etc.
Definition: Constants.h:176
ExitDialog Cancel ActionButton.
Definition: Constants.h:59
Draw the background.
Acknowledge the message or authorize the action described in the dialog.
Definition: Constants.h:70
Close the dialog.
Definition: Constants.h:72
Center for the round corners in green hue.
Definition: Constants.h:216
ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Wid...
Definition: CelestialOverlay.cpp:13
BorderStyle
The types of border supported.
Definition: Types.h:50
DrawBackground
Determine if the Widget should draw its own background, if supported.
Definition: Constants.h:320
Could not read from cache store.
Definition: Constants.h:114
Center for the round corners in blue hue.
Definition: Constants.h:217
Post the associated menu to the right.
Up Chevron Big.
Definition: Constants.h:180
One Dot.
Definition: Constants.h:191
Green at LowerBound, Red at UpperBound.
General Dialog Cancel Action Button.
Definition: Constants.h:56
White at LowerBound, Black at UpperBound.
Red at LowerBound, through Yellow, to Green at UpperBound.
A notch border.
A beveled in border.
Not modal, interactions with elements outside the container are allowed.
Definition: Constants.h:143