![]() |
Castor3D 0.16.0
Multiplatform 3D engine
|
#include <CtrlControl.hpp>
Fonctions membres publiques | |
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) |
![]() | |
NonClientEventHandler (castor::String const &name, bool catchMouseEvents) | |
Constructeur. | |
void | connectNC (MouseEventType event, NonClientMouseFunction function) |
Connecte un fonction à un évènement souris non client. | |
void | connectNC (KeyboardEventType event, NonClientKeyboardFunction function) |
Connecte un fonction à un évènement clavier non client. | |
void | connectNC (HandlerEventType event, NonClientHandlerFunction function) |
Connecte un fonction à un évènement gestionnaire non client. | |
![]() | |
void | pushEvent (MouseEvent const &event) |
Ajoute un évènement de souris à la file. | |
void | connect (MouseEventType event, ClientMouseFunction function) |
Connecte un fonction à un évènement souris. | |
bool | catchesMouseEvents () const |
void | setCatchesMouseEvents (bool value) |
void | pushEvent (KeyboardEvent const &event) |
Ajoute un évènement de clavier à la file. | |
void | connect (KeyboardEventType event, ClientKeyboardFunction function) |
Connecte un fonction à un évènement clavier. | |
bool | catchesTabKey () const |
bool | catchesReturnKey () const |
EventHandler (castor::String const &name, bool catchMouseEvents) | |
Constructeur. | |
virtual | ~EventHandler () noexcept |
Destructeur. | |
void | processEvents () |
Traite tous les évènement dans la file. | |
bool | isEnabled () const |
void | enable () |
void | disable () |
void | pushEvent (HandlerEvent const &event) |
Ajoute un évènement de gestionnaire à la file. | |
void | connect (HandlerEventType event, ClientHandlerFunction function) |
Connecte un fonction à un évènement gestionnaire. | |
![]() | |
NamedBaseT (T name) noexcept | |
Constructeur. | |
T const & | getName () const noexcept |
Récupère le nom. | |
void | rename (T name) noexcept |
Amis | |
class | ControlsManager |
class | ScrollableCtrl |
class | ProgressCtrl |
Getters | |
OnControlChanged | onChanged |
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. | |
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 |
Engine & | getEngine () const noexcept |
ControlStyle const & | getBaseStyle () const noexcept |
castor::Vector< ControlRPtr > const & | getChildren () const noexcept |
bool | hasScene () const noexcept |
Scene & | getScene () 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 () |
C3D_API Overlay & | getBackgroundOverlay () |
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) |
ControlStyle & | getBaseStyle () |
C3D_API castor3d::Control::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 ) |
Constructor.
[in] | type | The type. |
[in] | scene | The parent scene (nullptr for global). |
[in] | name | The control name. |
[in] | style | The control's style. |
[in] | parent | The parent control, if any. |
[in] | position | The position. |
[in] | size | The size. |
[in] | flags | The configuration flags |
[in] | visible | Initial visibility status. |
|
overridenoexcept |
|
protected |
Adds a child control.
|
inline |
Adds a flag.
Références m_flags.
|
inline |
Adds a flag.
Références m_flags.
|
protected |
Creates the control's overlays.
[in] | ctrlManager | The controls manager. |
|
protected |
Destroys the control's overlays.
C3D_API castor::Position castor3d::Control::getAbsolutePosition | ( | ) | const |
Retrieves the absolute control position.
|
inlineprotected |
|
inlinenoexcept |
Référencé par castor3d::PanelCtrl::getStyle(), castor3d::ProgressCtrl::getStyle(), castor3d::ButtonCtrl::getStyle(), castor3d::ComboBoxCtrl::getStyle(), castor3d::EditCtrl::getStyle(), castor3d::PanelCtrl::getStyle(), castor3d::ProgressCtrl::getStyle(), castor3d::ScrollBarCtrl::getStyle(), castor3d::SliderCtrl::getStyle(), castor3d::StaticCtrl::getStyle(), castor3d::ExpandablePanelCtrl::getStyle(), castor3d::FrameCtrl::getStyle(), et castor3d::ListBoxCtrl::getStyle().
C3D_API castor::Point4d const & castor3d::Control::getBorderInnerUV | ( | ) | const |
C3D_API castor::Point4d const & castor3d::Control::getBorderOuterUV | ( | ) | const |
C3D_API BorderPosition castor3d::Control::getBorderPosition | ( | ) | const |
|
inlinenoexcept |
Retrieves a control.
[in] | id | The control ID. |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Références m_flags.
Référencé par castor3d::ProgressCtrl::hasTitle(), isAlwaysOnTop(), castor3d::ProgressCtrl::isBottomToTop(), castor3d::ScrollBarCtrl::isHorizontal(), castor3d::ProgressCtrl::isLeftToRight(), isMovable(), castor3d::EditCtrl::isMultiLine(), isResizable(), castor3d::ProgressCtrl::isRightToLeft(), castor3d::ProgressCtrl::isTopToBottom(), et castor3d::ScrollBarCtrl::isVertical().
|
inlinenoexcept |
|
inlinenoexcept |
Références m_parent.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API castor::Point4d const & castor3d::Control::getUV | ( | ) | const |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Références castor::checkFlag(), castor3d::eAlwaysOnTop, et getFlags().
|
inline |
Retrieves the background invisibility status.
true
if the background is invisible, making the control not targetable (but it's children still are). C3D_API bool castor3d::Control::isBackgroundVisible | ( | ) | const |
C3D_API castor::Array< bool, 4u > castor3d::Control::isInResizeRange | ( | castor::Position const & | position | ) | const |
Checks if the position is on any border (N, W, S, E).
[in] | position | The position to check for. |
|
inlinenoexcept |
Références castor::checkFlag(), castor3d::eMovable, et getFlags().
|
inlinenoexcept |
Références castor::checkFlag(), castor3d::eResizable, et getFlags().
C3D_API bool castor3d::Control::isVisible | ( | ) | const |
Retrieves the visibility status.
|
protected |
Removes a child control.
|
inline |
Removes a flag.
Références m_flags.
|
inline |
Removes a flag.
Références m_flags.
|
protected |
Sets the background borders material.
[in] | value | The new value. |
|
protected |
Sets the background borders position.
[in] | value | The new value. |
|
protected |
Sets the background material.
[in] | value | The new value. |
|
protected |
Sets the background size.
[in] | value | The new value. |
C3D_API void castor3d::Control::setBorderInnerUV | ( | castor::Point4d const & | value | ) | const |
Sets the background borders inner UV.
[in] | value | The new value. |
C3D_API void castor3d::Control::setBorderOuterUV | ( | castor::Point4d const & | value | ) | const |
Sets the background borders outer UV.
[in] | value | The new value. |
C3D_API void castor3d::Control::setBorderSize | ( | castor::Point4ui const & | value | ) |
Sets the background borders size.
[in] | value | The new value. |
C3D_API void castor3d::Control::setCaption | ( | castor::U32String const & | caption | ) |
Sets the caption.
[in] | caption | The new value |
Référencé par castor3d::FrameCtrl::setHeaderCaption().
C3D_API void castor3d::Control::setPosition | ( | castor::Position const & | value | ) |
Sets the position.
[in] | value | The new value. |
C3D_API void castor3d::Control::setSize | ( | castor::Size const & | value | ) |
Sets the size.
[in] | value | The new value. |
C3D_API void castor3d::Control::setStyle | ( | ControlStyleRPtr | value | ) |
Sets the style
[in] | value | The new value |
C3D_API void castor3d::Control::setUV | ( | castor::Point4d const & | value | ) | const |
Sets the background centerUV.
[in] | value | The new value. |
C3D_API void castor3d::Control::setVisible | ( | bool | value | ) |
|
inline |
|
friend |
|
friend |
|
friend |
|
protected |
The background material.
|
protected |
The control flgas.
Référencé par addFlag(), addFlag(), getFlags(), removeFlag(), et removeFlag().
|
protected |
The foreground material.
|
protected |
The parent control, if any.
Référencé par getParent().
|
protected |
Référencé par getScene(), et hasScene().
OnControlChanged castor3d::Control::onChanged |
Signal called when position, size, borders or visibility are changed.