水平滑动条 更多...
#include <Slider.h>
类 GFt::Widget::HSlider 继承关系图:Public 成员函数 | |
| HSlider (const iRect &rect, Block *parent=nullptr, int zIndex=0) | |
| 构造函数 | |
| ~HSlider () override=default | |
| Color & | backgroundColor () |
| const Color & | backgroundColor () const |
| Color & | foregroundColor () |
| const Color & | foregroundColor () const |
| float | getValue () const |
| 获取当前值 | |
| Color & | handleColor () |
| const Color & | handleColor () const |
| int & | handleRadius () |
| int | handleRadius () const |
| int & | handleThickness () |
| int | handleThickness () const |
| bool | isReverse () const |
| bool | isShowDiff () const |
| void | setRange (float minValue, float maxValue, float step=1.0f) |
| 设置范围 | |
| void | setReverse (bool reverse) |
| void | setShowDiff (bool showDiff) |
| void | setValue (float value) |
| 设置当前值 | |
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< float > | onValueChanged |
| 当值发生更改时发出此信号 | |
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 |
| Color & GFt::Widget::HSlider::backgroundColor | ( | ) |
| const Color & GFt::Widget::HSlider::backgroundColor | ( | ) | const |
| Color & GFt::Widget::HSlider::foregroundColor | ( | ) |
| const Color & GFt::Widget::HSlider::foregroundColor | ( | ) | const |
| float GFt::Widget::HSlider::getValue | ( | ) | const |
获取当前值
| Color & GFt::Widget::HSlider::handleColor | ( | ) |
| const Color & GFt::Widget::HSlider::handleColor | ( | ) | const |
| int & GFt::Widget::HSlider::handleRadius | ( | ) |
| int GFt::Widget::HSlider::handleRadius | ( | ) | const |
| int & GFt::Widget::HSlider::handleThickness | ( | ) |
| int GFt::Widget::HSlider::handleThickness | ( | ) | const |
| bool GFt::Widget::HSlider::isReverse | ( | ) | const |
| bool GFt::Widget::HSlider::isShowDiff | ( | ) | const |
|
overrideprotectedvirtual |
此函数用于绘制内容
| g | 绘图设备对象 |
此函数会在每一帧绘制时被调用, 用于绘制内容
重载 GFt::Block .
|
overrideprotectedvirtual |
此函数用于处理鼠标按钮按下事件
此函数存在默认行为:当此对象被点击时捕获焦点
| event | 鼠标按钮按下事件 |
重载 GFt::Block .
| void GFt::Widget::HSlider::setRange | ( | float | minValue, |
| float | maxValue, | ||
| float | step = 1.0f ) |
设置范围
| minValue | 最小值 |
| maxValue | 最大值 |
| step | 步长 |
| void GFt::Widget::HSlider::setReverse | ( | bool | reverse | ) |
| void GFt::Widget::HSlider::setShowDiff | ( | bool | showDiff | ) |
| void GFt::Widget::HSlider::setValue | ( | float | value | ) |
设置当前值
| value | 值 |
| Signal<float> GFt::Widget::HSlider::onValueChanged |
当值发生更改时发出此信号