Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Static Public Attributes | List of all members
castor3d::FrameCtrl Class Reference

#include <CtrlFrame.hpp>

Inheritance diagram for castor3d::FrameCtrl:
Inheritance graph
[legend]
Collaboration diagram for castor3d::FrameCtrl:
Collaboration graph
[legend]

Public Member Functions

C3D_API FrameCtrl (SceneRPtr scene, castor::String const &name, FrameStyle *style, ControlRPtr parent)
 
C3D_API FrameCtrl (SceneRPtr scene, castor::String const &name, FrameStyle *style, ControlRPtr parent, castor::Position const &position, castor::Size const &size, uint32_t headerHeight, ControlFlagType flags=0, bool visible=true)
 
C3D_API ~FrameCtrl () noexcept override
 
FrameStyle const & getStyle () const noexcept
 
castor::U32String const & getHeaderCaption () const noexcept
 
HAlign getHeaderHAlign () const noexcept
 
VAlign getHeaderVAlign () const noexcept
 
castor::Size const & getMinSize () const noexcept
 
void setMinSize (castor::Size const &size) noexcept
 
void setHeaderCaption (castor::U32String const &v) noexcept
 
void setHeaderHAlign (HAlign v) noexcept
 
void setHeaderVAlign (VAlign v) noexcept
 
auto getContent () const noexcept
 
- Public Member Functions inherited from castor3d::Control
C3D_API Control (ControlType type, SceneRPtr scene, castor::String const &name, ControlStyleRPtr style, ControlRPtr parent, castor::Position const &position, castor::Size const &size, ControlFlagType flags=0, bool visible=true)
 
C3D_API ~Control () noexcept override
 
C3D_API void setStyle (ControlStyleRPtr value)
 
C3D_API void setPosition (castor::Position const &value)
 
C3D_API void setSize (castor::Size const &value)
 
C3D_API void setUV (castor::Point4d const &value) const
 
C3D_API void setBorderSize (castor::Point4ui const &value)
 
C3D_API void setBorderInnerUV (castor::Point4d const &value) const
 
C3D_API void setBorderOuterUV (castor::Point4d const &value) const
 
C3D_API void setCaption (castor::U32String const &caption)
 
C3D_API void setVisible (bool value)
 
C3D_API castor::Position getAbsolutePosition () const
 
C3D_API bool isVisible () const
 
C3D_API bool isBackgroundInvisible () const
 
C3D_API ControlRPtr getChildControl (ControlID id) const
 
C3D_API castor::Array< bool, 4u > isInResizeRange (castor::Position const &position) const
 
template<ControlFlagTypeT FlagTypeT>
void addFlag (FlagTypeT flag)
 
template<ControlFlagTypeT FlagTypeT>
void addFlag (castor::FlagCombination< FlagTypeT > flag)
 
template<ControlFlagTypeT FlagTypeT>
void removeFlag (FlagTypeT flag)
 
template<ControlFlagTypeT FlagTypeT>
void removeFlag (castor::FlagCombination< FlagTypeT > flag)
 
C3D_API castor::Point4d const & getBorderInnerUV () const
 
C3D_API castor::Point4d const & getBorderOuterUV () const
 
C3D_API BorderPosition getBorderPosition () const
 
C3D_API castor::Point4d const & getUV () const
 
C3D_API bool isBackgroundVisible () const
 
ControlID getId () const noexcept
 
ControlType getType () const noexcept
 
uint64_t getFlags () const noexcept
 
castor::Position const & getPosition () const noexcept
 
castor::Size const & getSize () const noexcept
 
ControlRPtr getParent () const noexcept
 
castor::Point4ui const & getBorderSize () const noexcept
 
ControlsManagerRPtr getControlsManager () const noexcept
 
MouseCursor getCursor () const noexcept
 
EnginegetEngine () const noexcept
 
ControlStyle const & getBaseStyle () const noexcept
 
castor::Vector< ControlRPtr > const & getChildren () const noexcept
 
bool hasScene () const noexcept
 
ScenegetScene () const noexcept
 
uint32_t getResizeBorderSize () const noexcept
 
castor::Point4ui const & getClientRect () const noexcept
 
castor::Position getClientOffset () const
 
castor::Size getClientSize () const
 
bool isAlwaysOnTop () const noexcept
 
bool isMovable () const noexcept
 
bool isResizable () const noexcept
 
void show ()
 
void hide ()
 
- Public Member Functions inherited from castor3d::NonClientEventHandler< Control >
 NonClientEventHandler (castor::String const &name, bool catchMouseEvents)
 Constructor.
 
void connectNC (MouseEventType event, NonClientMouseFunction function)
 Connects a function to a non client mouse event.
 
void connectNC (KeyboardEventType event, NonClientKeyboardFunction function)
 Connects a function to a non client keyboard event.
 
void connectNC (HandlerEventType event, NonClientHandlerFunction function)
 Connects a function to a non client handler event.
 
- Public Member Functions inherited from castor3d::EventHandler
void pushEvent (MouseEvent const &event)
 Adds a mouse event to the events queue.
 
void connect (MouseEventType event, ClientMouseFunction function)
 Connects a function to a mouse event.
 
bool catchesMouseEvents () const
 Tells if the control catches mouse events.
 
void setCatchesMouseEvents (bool value)
 Sets if the control can catch mouse events.
 
void pushEvent (KeyboardEvent const &event)
 Adds a keyboard event to the events queue.
 
void connect (KeyboardEventType event, ClientKeyboardFunction function)
 Connects a function to a keyboard event.
 
bool catchesTabKey () const
 Tells if the control catches 'tab' key.
 
bool catchesReturnKey () const
 Tells if the control catches 'return' key.
 
 EventHandler (castor::String const &name, bool catchMouseEvents)
 Constructor.
 
virtual ~EventHandler () noexcept
 Destructor.
 
void processEvents ()
 Processes all queued events.
 
bool isEnabled () const
 
void enable ()
 Sets if the control is enabled.
 
void disable ()
 Sets if the control is disabled.
 
void pushEvent (HandlerEvent const &event)
 Adds a handler event to the events queue.
 
void connect (HandlerEventType event, ClientHandlerFunction function)
 Connects a function to a handler event.
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Static Public Attributes

static C3D_API ControlType constexpr Type { ControlType::eFrame }
 

Additional Inherited Members

- Public Types inherited from castor3d::NonClientEventHandler< Control >
using DerivedPtr
 
using ClientMouseFunction
 
using ClientKeyboardFunction
 
using ClientHandlerFunction
 
using NonClientMouseFunction
 
using NonClientKeyboardFunction
 
using NonClientHandlerFunction
 
using OnNonClientMouseEvent
 
using OnNonClientKeyboardEvent
 
using OnNonClientHandlerEvent
 
using OnNonClientMouseEventConnection
 
using OnNonClientKeyboardEventConnection
 
using OnNonClientHandlerEventConnection
 
- Public Types inherited from castor3d::EventHandler
using ClientMouseFunction = castor::Function< void( MouseEvent const & ) >
 
using ClientKeyboardFunction = castor::Function< void( KeyboardEvent const & ) >
 
using ClientHandlerFunction = castor::Function< void( HandlerEvent const & ) >
 
using EnableFunction = castor::Function< void( bool ) >
 
using OnClientMouseEvent = castor::SignalT< ClientMouseFunction >
 
using OnClientKeyboardEvent = castor::SignalT< ClientKeyboardFunction >
 
using OnClientHandlerEvent = castor::SignalT< ClientHandlerFunction >
 
using OnEnable = castor::SignalT< EnableFunction >
 
using OnClientMouseEventConnection = OnClientMouseEvent::connection
 
using OnClientKeyboardEventConnection = OnClientKeyboardEvent::connection
 
using OnClientHandlerEventConnection = OnClientHandlerEvent::connection
 
using OnEnableConnection = OnEnable::connection
 
- Public Attributes inherited from castor3d::Control
OnControlChanged onChanged
 
- Public Attributes inherited from castor3d::EventHandler
OnEnable onEnable
 
- Protected Types inherited from castor3d::NonClientEventHandler< Control >
using EventHandlerFunction
 
using EventQueue
 
- Protected Types inherited from castor3d::EventHandler
using EventHandlerFunction = castor::Function< void() >
 
using EventQueue = castor::Deque< castor::Pair< UserInputEventSPtr, EventHandlerFunction > >
 
- Protected Member Functions inherited from castor3d::Control
C3D_API OverlaygetBackgroundOverlay ()
 
C3D_API void setBackgroundMaterial (MaterialObs value) const
 
C3D_API void setBackgroundSize (castor::Size const &value) const
 
C3D_API void setBackgroundBorderPosition (BorderPosition value) const
 
C3D_API void setBackgroundBorderMaterial (MaterialObs value) const
 
C3D_API void create (ControlsManager &ctrlManager)
 
C3D_API void destroy ()
 
C3D_API void addChild (ControlRPtr control)
 
C3D_API void removeChild (ControlRPtr control)
 
ControlStylegetBaseStyle ()
 
- Protected Member Functions inherited from castor3d::EventHandler
void processMouseEvent (MouseEventSPtr event)
 Mouse event processing function.
 
void processKeyboardEvent (KeyboardEventSPtr event)
 Keyboard event processing function.
 
void processHandlerEvent (HandlerEventSPtr event)
 Handler event processing function.
 
- Protected Attributes inherited from castor3d::Control
SceneRPtr m_scene {}
 
ControlRPtr m_parent {}
 The parent control, if any.
 
MaterialObs m_backgroundMaterial {}
 The background material.
 
MaterialObs m_foregroundMaterial {}
 The foreground material.
 
ControlFlagType m_flags {}
 The control flgas.
 
- Protected Attributes inherited from castor3d::NonClientEventHandler< Control >
castor::Array< OnNonClientMouseEvent, size_t(MouseEventType::eCount) > m_ncMouseSlots
 
castor::Array< castor::Vector< OnNonClientMouseEventConnection >, size_t(MouseEventType::eCount) > m_ncMouseSlotsConnections
 
castor::Array< OnNonClientKeyboardEvent, size_t(KeyboardEventType::eCount) > m_ncKeyboardSlots
 
castor::Array< castor::Vector< OnNonClientKeyboardEventConnection >, size_t(KeyboardEventType::eCount) > m_ncKeyboardSlotsConnections
 
castor::Array< OnNonClientHandlerEvent, size_t(HandlerEventType::eCount) > m_ncHandlerSlots
 
castor::Array< castor::Vector< OnNonClientHandlerEventConnection >, size_t(HandlerEventType::eCount) > m_ncHandlerSlotsConnections
 
- Protected Attributes inherited from castor3d::EventHandler
castor::Array< OnClientMouseEvent, size_t(MouseEventType::eCount) > m_mouseSlots
 
castor::Array< castor::Vector< OnClientMouseEventConnection >, size_t(MouseEventType::eCount) > m_mouseSlotsConnections
 
castor::Array< OnClientKeyboardEvent, size_t(KeyboardEventType::eCount) > m_keyboardSlots
 
castor::Array< castor::Vector< OnClientKeyboardEventConnection >, size_t(KeyboardEventType::eCount) > m_keyboardSlotsConnections
 
castor::Array< OnClientHandlerEvent, size_t(HandlerEventType::eCount) > m_handlerSlots
 
castor::Array< castor::Vector< OnClientHandlerEventConnection >, size_t(HandlerEventType::eCount) > m_handlerSlotsConnections
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Constructor & Destructor Documentation

◆ FrameCtrl() [1/2]

C3D_API castor3d::FrameCtrl::FrameCtrl ( SceneRPtr scene,
castor::String const & name,
FrameStyle * style,
ControlRPtr parent )

Constructor

Parameters
[in]sceneThe parent scene (nullptr for global).
[in]nameThe control name.
[in]styleThe control style.
[in]parentThe parent control, if any.

◆ FrameCtrl() [2/2]

C3D_API castor3d::FrameCtrl::FrameCtrl ( SceneRPtr scene,
castor::String const & name,
FrameStyle * style,
ControlRPtr parent,
castor::Position const & position,
castor::Size const & size,
uint32_t headerHeight,
ControlFlagType flags = 0,
bool visible = true )

Constructor

Parameters
[in]sceneThe parent scene (nullptr for global).
[in]nameThe control name.
[in]styleThe control style.
[in]parentThe parent control, if any.
[in]positionThe position.
[in]sizeThe size.
[in]headerHeightThe header height.
[in]flagsThe configuration flags.
[in]visibleInitial visibility status.

◆ ~FrameCtrl()

C3D_API castor3d::FrameCtrl::~FrameCtrl ( )
overridenoexcept

Member Function Documentation

◆ getContent()

auto castor3d::FrameCtrl::getContent ( ) const
inlinenoexcept

◆ getHeaderCaption()

castor::U32String const & castor3d::FrameCtrl::getHeaderCaption ( ) const
inlinenoexcept

◆ getHeaderHAlign()

HAlign castor3d::FrameCtrl::getHeaderHAlign ( ) const
inlinenoexcept

◆ getHeaderVAlign()

VAlign castor3d::FrameCtrl::getHeaderVAlign ( ) const
inlinenoexcept

◆ getMinSize()

castor::Size const & castor3d::FrameCtrl::getMinSize ( ) const
inlinenoexcept

◆ getStyle()

FrameStyle const & castor3d::FrameCtrl::getStyle ( ) const
inlinenoexcept
Returns
The frame style.

References castor3d::Control::getBaseStyle().

Here is the call graph for this function:

◆ setHeaderCaption()

void castor3d::FrameCtrl::setHeaderCaption ( castor::U32String const & v)
inlinenoexcept

References castor3d::Control::setCaption().

Here is the call graph for this function:

◆ setHeaderHAlign()

void castor3d::FrameCtrl::setHeaderHAlign ( HAlign v)
inlinenoexcept

◆ setHeaderVAlign()

void castor3d::FrameCtrl::setHeaderVAlign ( VAlign v)
inlinenoexcept

◆ setMinSize()

void castor3d::FrameCtrl::setMinSize ( castor::Size const & size)
inlinenoexcept

Member Data Documentation

◆ Type

C3D_API ControlType constexpr castor3d::FrameCtrl::Type { ControlType::eFrame }
staticconstexpr

The documentation for this class was generated from the following file: