复选框 更多...
#include <CheckBox.h>
类 GFt::Widget::CheckBox 继承关系图:Public 成员函数 | |
| CheckBox (const iRect &rect, Block *parent=nullptr, int zIndex=0) | |
| 构造函数 | |
| ~CheckBox () override | |
| 析构函数 | |
| BrushSet & | hoverBrush () |
| 样式信息函数 | |
| const BrushSet & | hoverBrush () const |
| 样式信息函数 | |
| Font & | hoverFont () |
| 样式信息函数 | |
| const Font & | hoverFont () const |
| 样式信息函数 | |
| bool | isChecked () const |
| 获取复选框的选中状态 | |
| BrushSet & | normalBrush () |
| 样式信息函数 | |
| const BrushSet & | normalBrush () const |
| 样式信息函数 | |
| Font & | normalFont () |
| 样式信息函数 | |
| const Font & | normalFont () const |
| 样式信息函数 | |
| BrushSet & | selectedBrush () |
| 样式信息函数 | |
| const BrushSet & | selectedBrush () const |
| 样式信息函数 | |
| Font & | selectedFont () |
| 样式信息函数 | |
| const Font & | selectedFont () const |
| 样式信息函数 | |
| void | setChecked (bool checked) |
| 设置复选框的选中状态 | |
| std::wstring & | text () |
| 样式信息函数 | |
| const std::wstring & | text () const |
| 样式信息函数 | |
Public 成员函数 继承自 GFt::Block | |
| Block (const iRect &rect, Block *parent=nullptr, int zIndex=0) | |
| 构造函数 | |
| virtual | ~Block () |
| iPoint | absolutePosition () const |
| 计算相对于屏幕的绝对坐标 | |
| void | addChild (Block *child) |
| 添加子对象 | |
| Block * | getParent () const |
| 获取父对象 | |
| int | getZIndex () const |
| 获取层级 | |
| void | hide () |
| 隐藏块对象 | |
| bool | isHide () const |
| 获取块当前是否被隐藏 | |
| iPoint | relativePosFrom (Block *block) const |
| 计算相对于指定对象的相对坐标 | |
| void | removeChild (Block *child) |
| 移除子对象 | |
| void | setParent (Block *parent) |
| 设置父对象 | |
| void | setZIndex (int zIndex) |
| 设置层级 | |
| void | show () |
| 显示块对象 | |
Public 成员函数 继承自 GFt::GraphInterface | |
| GraphInterface (iRect rect) | |
| 构造函数 | |
| virtual | ~GraphInterface () |
| const iRect & | rect () const |
| void | setHeight (int height) |
| void | setPosition (const iPoint &pos) |
| void | setRect (const iRect &rect) |
| void | setSize (const iSize &size) |
| void | setWidth (int width) |
| void | setX (int x) |
| void | setY (int y) |
Public 属性 | |
| Signal< bool > | onCheckChanged |
| 复选框选中状态改变时触发 | |
| Signal< void > | onChecked |
| 复选框被选中时触发 | |
| Signal< void > | onUnchecked |
| 复选框被取消选中时触发 | |
Public 属性 继承自 GFt::Block | |
| Signal< Block * > | FocusOff |
| 当该对象失去焦点时触发该信号 | |
| Signal< Block * > | FocusOn |
| 当该对象获得焦点时触发该信号 | |
| Signal< Block * > | HoverOff |
| 当鼠标移开该对象时之上时触发该信号 | |
| Signal< Block * > | HoverOn |
| 当鼠标悬停该对象时之上时触发该信号 | |
| Signal< bool > | ViewChanged |
| 当该对象显示状态变化时触发该信号 | |
Public 属性 继承自 GFt::GraphInterface | |
| Signal< const iPoint & > | onPositionChanged |
| Signal< const iSize & > | onSizeChanged |
Protected 成员函数 | |
| void | onDraw (Graphics &g) override |
| 此函数用于绘制内容 | |
| void | onMouseButtonPress (MouseButtonPressEvent *e) override |
| 此函数用于处理鼠标按钮按下事件 | |
Protected 成员函数 继承自 GFt::Block | |
| void | onKeyPress (KeyPressEvent *event) override |
| 此函数用于处理键盘按键按下事件 | |
| void | onKeyRelease (KeyReleaseEvent *event) override |
| 此函数用于处理键盘按键释放事件 | |
| void | onMouseButtonRelease (MouseButtonReleaseEvent *event) override |
| 此函数用于处理鼠标按钮释放事件 | |
| void | onMouseMove (MouseMoveEvent *event) override |
| 此函数用于处理鼠标移动事件 | |
| void | onMouseWheel (MouseWheelEvent *event) override |
| 此函数用于处理鼠标滚轮事件 | |
| void | onTextInput (TextInputEvent *event) override |
| 此函数用于处理文本输入事件 | |
Protected 成员函数 继承自 GFt::GraphInterface | |
Protected 成员函数 继承自 GFt::MouseButtonPressEventMonitor | |
Protected 成员函数 继承自 GFt::MouseButtonReleaseEventMonitor | |
Protected 成员函数 继承自 GFt::MouseMoveEventMonitor | |
Protected 成员函数 继承自 GFt::MouseWheelEventMonitor | |
Protected 成员函数 继承自 GFt::KeyPressEventMonitor | |
Protected 成员函数 继承自 GFt::KeyReleaseEventMonitor | |
Protected 成员函数 继承自 GFt::TextInputEventMonitor | |
复选框
构造函数
| rect | 复选框的矩形区域 |
| parent | 父级块 |
| zIndex | 层级 |
|
overridedefault |
析构函数
| BrushSet & GFt::Widget::CheckBox::hoverBrush | ( | ) |
样式信息函数
| const BrushSet & GFt::Widget::CheckBox::hoverBrush | ( | ) | const |
样式信息函数
| Font & GFt::Widget::CheckBox::hoverFont | ( | ) |
样式信息函数
| const Font & GFt::Widget::CheckBox::hoverFont | ( | ) | const |
样式信息函数
| bool GFt::Widget::CheckBox::isChecked | ( | ) | const |
获取复选框的选中状态
| BrushSet & GFt::Widget::CheckBox::normalBrush | ( | ) |
样式信息函数
| const BrushSet & GFt::Widget::CheckBox::normalBrush | ( | ) | const |
样式信息函数
| Font & GFt::Widget::CheckBox::normalFont | ( | ) |
样式信息函数
| const Font & GFt::Widget::CheckBox::normalFont | ( | ) | const |
样式信息函数
|
overrideprotectedvirtual |
此函数用于绘制内容
| g | 绘图设备对象 |
此函数会在每一帧绘制时被调用, 用于绘制内容
重载 GFt::Block .
|
overrideprotectedvirtual |
此函数用于处理鼠标按钮按下事件
此函数存在默认行为:当此对象被点击时捕获焦点
| event | 鼠标按钮按下事件 |
重载 GFt::Block .
| BrushSet & GFt::Widget::CheckBox::selectedBrush | ( | ) |
样式信息函数
| const BrushSet & GFt::Widget::CheckBox::selectedBrush | ( | ) | const |
样式信息函数
| Font & GFt::Widget::CheckBox::selectedFont | ( | ) |
样式信息函数
| const Font & GFt::Widget::CheckBox::selectedFont | ( | ) | const |
样式信息函数
| void GFt::Widget::CheckBox::setChecked | ( | bool | checked | ) |
设置复选框的选中状态
| checked | 选中状态 |
| std::wstring & GFt::Widget::CheckBox::text | ( | ) |
样式信息函数
| const std::wstring & GFt::Widget::CheckBox::text | ( | ) | const |
样式信息函数
| Signal<bool> GFt::Widget::CheckBox::onCheckChanged |
复选框选中状态改变时触发
| Signal<void> GFt::Widget::CheckBox::onChecked |
复选框被选中时触发
| Signal<void> GFt::Widget::CheckBox::onUnchecked |
复选框被取消选中时触发