slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 成员函数 | Private 属性 | 所有成员列表
z8::ui::ButtonNode类 参考

#include <ButtonNode.h>

类 z8::ui::ButtonNode 继承关系图:
Inheritance graph
[图例]
z8::ui::ButtonNode 的协作图:
Collaboration graph
[图例]

Public 成员函数

 ButtonNode ()
 
bool ConsumeClicked ()
 
const charTypeName () const override
 
EventReply OnKeyDown (KeyArgs args) override
 
EventReply OnMouseDown (MouseMovArgs args) override
 
EventReply OnMouseUp (MouseMovArgs args) override
 
void OnPointerCaptureLost () override
 
bool SetProperty (const std::string &name, const std::string &value) override
 
void SetEnabled (bool enabled)
 
void SetText (const std::string &text)
 
- Public 成员函数 继承自 z8::ui::RectNode
 RectNode ()
 
const charTypeName () const override
 
- Public 成员函数 继承自 z8::ui::DrawNode
 DrawNode (std::unique_ptr< UIObject > O)
 
 ~DrawNode () override
 
bool SetProperty (const std::string &name, const std::string &value) override
 
bool SetColor (const DirectX::XMFLOAT4 &color) const
 
bool SetBorder (const DirectX::XMFLOAT4 &color, float width) const
 
bool SetCornerRadius (float radius) const
 
void Synchronize () override
 
- Public 成员函数 继承自 z8::ui::BehaviorNode
 ~BehaviorNode () override
 
EventReply DispatchMouseDown (const MouseMovArgs &args)
 
bool DispatchMouseMove (const MouseMovArgs &args)
 
bool DispatchMouseDrag (const MouseMovArgs &args)
 
bool DispatchMouseUp (const MouseMovArgs &args)
 
bool DispatchMouseWheel (MouseWheelArgs args)
 
MouseCursor QueryMouseCursor (const MouseMovArgs &args) const
 
void DispatchAfterLayout () override
 
void DispatchBeforeLayout (float width, float height) const
 
void DispatchDragStarted (const MouseMovArgs &args) const
 
void DispatchDragCompleted (const MouseMovArgs &args) const
 
void CancelPointerCapture ()
 
IBehaviorAddBehavior (std::unique_ptr< IBehavior > behavior)
 
bool RemoveBehavior (IBehavior *behavior)
 
void SetHovered (bool hovered)
 
void SetPressed (bool pressed)
 
void SetFocused (bool focused)
 
template<typename T , typename... Args>
TAddBehavior (Args &&...args)
 
template<typename T >
TGetBehavior ()
 
template<typename T >
const TGetBehavior () const
 
- Public 成员函数 继承自 z8::ui::BaseNode
 BaseNode ()
 
 ~BaseNode () override
 
 BaseNode (const BaseNode &)=delete
 
BaseNodeoperator= (const BaseNode &)=delete
 
virtual bool RoutesToScene () const
 
virtual BaseNodeContentHost ()
 
bool Contains (float x, float y) const
 
bool Contains (MouseMovArgs args) const
 
virtual BaseNodeAddChild (std::unique_ptr< BaseNode > child)
 
void RemoveChildrenFrom (size_t first)
 
virtual void OnAfterLayout ()
 
- Public 成员函数 继承自 z8::ui::IProperty
virtual ~IProperty ()=default
 
- Public 成员函数 继承自 z8::EventTarget
virtual ~EventTarget ()=default
 
virtual EventReply OnMouseMove (MouseMovArgs)
 
virtual EventReply OnMouseDrag (MouseMovArgs)
 
virtual EventReply OnMouseWheel (MouseWheelArgs)
 
virtual EventReply OnKeyUp (KeyArgs)
 
virtual EventReply OnTextInput (wchar_t)
 
virtual MouseCursor GetMouseCursor (MouseMovArgs) const
 

Public 属性

TextNodeLabelNode = nullptr
 
bool Enabled = true
 
std::function< void()> Clicked
 
- Public 属性 继承自 z8::ui::DrawNode
std::unique_ptr< UIObjectUO
 
bool OccludesEarlierText = false
 
- Public 属性 继承自 z8::ui::BehaviorNode
bool HitTestVisible = false
 
bool Hovered = false
 
bool Pressed = false
 
bool Focusable = false
 
bool Focused = false
 
std::vector< std::unique_ptr< IBehavior > > Behaviors
 
IBehaviorCapturedBehavior = nullptr
 
- Public 属性 继承自 z8::ui::BaseNode
std::string Key
 
LayoutStyle Style
 
LayoutBox Computed
 
BaseNodeParent = nullptr
 
std::vector< std::unique_ptr< BaseNode > > Children
 
float Left = 0.0f
 
float Top = 0.0f
 
float Width = 0.0f
 
float Height = 0.0f
 
float ChildOffsetX = 0.0f
 
float ChildOffsetY = 0.0f
 
bool ClipChildren = false
 
bool Visible = true
 
bool EffectiveVisible = true
 
bool LayoutManaged = false
 
ClipRect VisibleClip = {-100000.0f, -100000.0f, 100000.0f, 100000.0f}
 

Protected 成员函数

void Activate ()
 
void OnVisualStateChanged () override
 
- Protected 成员函数 继承自 z8::ui::BehaviorNode
void ReleaseBehaviors ()
 

Private 属性

bool Armed = false
 
bool ClickPending = false
 

详细描述

紧凑按钮控件;拥有标签、主题状态和一次完整点击手势。

构造及析构函数说明

◆ ButtonNode()

ButtonNode::ButtonNode ( )
函数调用图:

成员函数说明

◆ Activate()

void ButtonNode::Activate ( )
protected
这是这个函数的调用关系图:

◆ ConsumeClicked()

bool ButtonNode::ConsumeClicked ( )

◆ OnKeyDown()

EventReply ButtonNode::OnKeyDown ( KeyArgs args)
overridevirtual

重载 z8::EventTarget .

函数调用图:

◆ OnMouseDown()

EventReply ButtonNode::OnMouseDown ( MouseMovArgs args)
overridevirtual

重载 z8::EventTarget .

函数调用图:

◆ OnMouseUp()

EventReply ButtonNode::OnMouseUp ( MouseMovArgs args)
overridevirtual

重载 z8::EventTarget .

函数调用图:

◆ OnPointerCaptureLost()

void z8::ui::ButtonNode::OnPointerCaptureLost ( )
inlineoverridevirtual

重载 z8::EventTarget .

◆ OnVisualStateChanged()

void ButtonNode::OnVisualStateChanged ( )
overrideprotectedvirtual

派生控件在状态变化时只重算主题色,不得改变布局或真实命中区域。

重载 z8::ui::BehaviorNode .

函数调用图:
这是这个函数的调用关系图:

◆ SetEnabled()

void ButtonNode::SetEnabled ( bool enabled)
函数调用图:
这是这个函数的调用关系图:

◆ SetProperty()

bool ButtonNode::SetProperty ( const std::string & name,
const std::string & value )
overridevirtual

重载 z8::ui::BehaviorNode .

函数调用图:

◆ SetText()

void ButtonNode::SetText ( const std::string & text)
这是这个函数的调用关系图:

◆ TypeName()

const char * z8::ui::ButtonNode::TypeName ( ) const
inlineoverridevirtual

重载 z8::ui::BaseNode .

类成员变量说明

◆ Armed

bool z8::ui::ButtonNode::Armed = false
private

◆ Clicked

std::function<void()> z8::ui::ButtonNode::Clicked

◆ ClickPending

bool z8::ui::ButtonNode::ClickPending = false
private

◆ Enabled

bool z8::ui::ButtonNode::Enabled = true

◆ LabelNode

TextNode* z8::ui::ButtonNode::LabelNode = nullptr

该类的文档由以下文件生成: