A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Base template for the event class.
Definition Event.hpp:27
A definition of the fundamental behavior for controls, which are specialized views that notify your a...
Definition UIControl.hpp:30
static const UIFloatAppearanceProperty borderRadiusProperty
An appearance property that controls the control border radius.
Definition UIControl.hpp:344
void mouseExited(const UIMouseEvent &event) override
Informs the receiver that the cursor has exited a tracking rectangle.
ContentHorizontalAlignment
The horizontal alignment of content (text and textures) within a control.
Definition UIControl.hpp:149
@ Leading
Aligns the content horizontally from the leading edge of the control.
@ Center
Aligns the content horizontally in the center of the control.
@ Right
Aligns the content horizontally from the right of the control.
@ Left
Aligns the content horizontally from the left of the control (the default).
@ Trailing
Aligns the content horizontally from the trailing edge of the control.
bool isHighlighted() const noexcept
A Boolean value indicating whether the control draws a highlight.
static const UIFloatAppearanceProperty bottomRightBorderRadiusProperty
An appearance property that controls the control bottom-right border radius.
Definition UIControl.hpp:356
virtual void didChangeState(const State &oldState, const State &newState)
A internal method called whenever the internal control state changes.
Definition UIControl.hpp:295
void rightMouseUp(const UIMouseEvent &event) override
Informs the receiver that the user has released the right mouse button.
void mouseDown(const UIMouseEvent &event) override
Informs the receiver that the user has pressed the left mouse button.
void mouseEntered(const UIMouseEvent &event) override
Informs the receiver that the cursor has entered a tracking rectangle.
void setState(const State &state)
The state of the control, specified as a bit mask value.
UIControl()
Definition UIControl.hpp:219
void setContentVerticalAlignment(ContentVerticalAlignment contentVerticalAlignment)
The vertical alignment of content within the control's bounds.
void rightMouseDown(const UIMouseEvent &event) override
Informs the receiver that the user has pressed the right mouse button.
void keyDown(const UIKeyEvent &event) override
Informs the receiver that the user has pressed a key.
ContentVerticalAlignment getContentVerticalAlignment() const
The vertical alignment of content within the control's bounds.
Definition UIControl.hpp:281
const State & getState() const noexcept
The state of the control, specified as a bit mask value.
Definition UIControl.hpp:225
static const UIFloatAppearanceProperty topLeftBorderRadiusProperty
An appearance property that controls the control top-left border radius.
Definition UIControl.hpp:347
Event< void()> didLostFocus
A signal dispatched to a UIControl once it loses focus.
Definition UIControl.hpp:216
static const UIFloatAppearanceProperty controlSizeProperty
An appearance property that controls the control size.
Definition UIControl.hpp:341
void setSelected(bool selected)
A Boolean value indicating whether the control is in the selected state.
ContentHorizontalAlignment getContentHorizontalAlignment() const
The horizontal alignment of content within the control's bounds.
Definition UIControl.hpp:287
ContentVerticalAlignment
Constants for specifying the vertical alignment of content (text and textures) in a control.
Definition UIControl.hpp:131
@ Bottom
Aligns the content vertically at the bottom in the control.
@ Center
Aligns the content vertically in the center of the control.
@ Top
Aligns the content vertically at the top in the control (the default).
@ Fill
Aligns the content vertically to fill the content rectangle; textures may be stretched.
bool acceptsFirstResponder() const override
A Boolean value that indicates whether the responder accepts first responder status.
Event< void()> didGainFocus
A signal dispatched to a UIControl once it gains focus.
Definition UIControl.hpp:213
ContentHorizontalAlignment mContentHorizontalAlignment
The horizontal alignment of content within the control's bounds.
Definition UIControl.hpp:209
void setHighlighted(bool highlighted)
A Boolean value indicating whether the control draws a highlight.
UIControl(const UIRect &frame)
static const UIFloatAppearanceProperty bottomLeftBorderRadiusProperty
An appearance property that controls the control bottom-left border radius.
Definition UIControl.hpp:353
static const UIFloatAppearanceProperty topRightBorderRadiusProperty
An appearance property that controls the control top-right border radius.
Definition UIControl.hpp:350
void mouseUp(const UIMouseEvent &event) override
Informs the receiver that the user has released the left mouse button.
void mouseMoved(const UIMouseEvent &event) override
Informs the receiver that the mouse has moved.
bool isDisabled() const noexcept
A Boolean value indicating whether the control is in the enabled state.
Definition UIControl.hpp:244
void setEnabled(bool enabled)
A Boolean value indicating whether the control is in the enabled state.
virtual void confirmAction()
An internal method that can be overridden by control implementations that will be triggered once the ...
bool resignFirstResponder() override
Notifies the receiver that it's been asked to relinquish its status as first responder in its window.
bool isSelected() const noexcept
A Boolean value indicating whether the control is in the selected state.
bool isEnabled() const noexcept
A Boolean value indicating whether the control is in the enabled state.
Definition UIControl.hpp:241
State mState
The state of the control, specified as a bit mask value.
Definition UIControl.hpp:181
ContentVerticalAlignment mContentVerticalAlignment
The vertical alignment of content within the control's bounds.
Definition UIControl.hpp:195
virtual void cancelAction()
An internal method that can be overridden by control implementations that will be triggered once the ...
void setContentHorizontalAlignment(ContentHorizontalAlignment contentHorizontalAlignment)
The horizontal alignment of content within the control's bounds.
bool becomeFirstResponder() override
Notifies the receiver that it's about to become first responder in its window.
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
static const UIRect kDefaultFrame
A rectangle that represents the default frame set by a view without an explicit frame.
Definition UIView.hpp:296
Definition Application.hpp:19
Color UIColor
Definition UIUtility.hpp:187
constexpr Byte operator<<(const Byte arg, const _IntType shift) noexcept
Definition DataTypes.hpp:44
struct CeresEngine::GLState state
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A UI appearance property that returns a color.
Definition UIAppearance.hpp:30
Constants describing the state of a control.
Definition UIControl.hpp:38
static const State Highlighted
Highlighted state of a control.
Definition UIControl.hpp:108
UIColor operator()(const UIColor &baseColor) const noexcept
Applies a color transformation to the given baseColor such as that the returned color represents the ...
constexpr State operator+(const State &other) const noexcept
Definition UIControl.hpp:51
static const State Selected
Selected state of a control.
Definition UIControl.hpp:123
constexpr State & operator+=(const State &other) noexcept
Definition UIControl.hpp:52
UInt32 raw
The raw numeric value of the represented state.
Definition UIControl.hpp:41
static const State Normal
The normal, or default state of a control—that is, enabled but neither selected nor highlighted.
Definition UIControl.hpp:98
constexpr State()=default
Creates a new default state object.
constexpr State operator-(const State &other) const noexcept
Definition UIControl.hpp:57
constexpr State & operator-=(const State &other) noexcept
Definition UIControl.hpp:58
constexpr bool operator[](const State &other) const noexcept
Returns a Boolean value that indicates whether a given element is a member of the option set.
Definition UIControl.hpp:82
constexpr bool contains(const State &member) const noexcept
Returns a Boolean value that indicates whether a given element is a member of the option set.
Definition UIControl.hpp:79
constexpr bool operator!=(const State &other) const noexcept
Compares two states if they are not the same.
Definition UIControl.hpp:88
constexpr bool operator==(const State &other) const noexcept
Compares two states if they are the same.
Definition UIControl.hpp:85
static const State Disabled
Disabled state of a control.
Definition UIControl.hpp:116
static const State Focused
Focused state of a control.
Definition UIControl.hpp:126
constexpr State(const UInt32 raw)
Initialize the State object with a raw representation of the state.
Definition UIControl.hpp:48
Definition UIEvent.hpp:129
Definition UIEvent.hpp:173