GraceFt v2.3
开源图形引擎 EGE(Easy Graphics Engine) 的高层封装库
 
载入中...
搜索中...
未找到
GFt::Widget::MainWindow类 参考

主窗口 更多...

#include <MainWindow.h>

+ 类 GFt::Widget::MainWindow 继承关系图:

Public 成员函数

 MainWindow (const std::wstring &title, const iRect &rect)
 
virtual ~MainWindow ()
 
bool isMaximized () const
 
void setTitle (const std::wstring &title)
 设置标题
 
- Public 成员函数 继承自 GFt::Block
 Block (const iRect &rect, Block *parent=nullptr, int zIndex=0)
 构造函数
 
virtual ~Block ()
 
iPoint absolutePosition () const
 计算相对于屏幕的绝对坐标
 
void addChild (Block *child)
 添加子对象
 
BlockgetParent () 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 iRectrect () 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 属性 继承自 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 成员函数 继承自 GFt::Block
void onDraw (Graphics &g) override
 此函数用于绘制内容
 
void onKeyPress (KeyPressEvent *event) override
 此函数用于处理键盘按键按下事件
 
void onKeyRelease (KeyReleaseEvent *event) override
 此函数用于处理键盘按键释放事件
 
void onMouseButtonPress (MouseButtonPressEvent *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

详细描述

主窗口

此类作为模板实现,构建一个非WIN32的包含标题栏、最大化、最小化、关闭按钮、内容区域的窗口

构造及析构函数说明

◆ MainWindow()

GFt::Widget::MainWindow::MainWindow ( const std::wstring & title,
const iRect & rect )

◆ ~MainWindow()

GFt::Widget::MainWindow::~MainWindow ( )
virtual

成员函数说明

◆ isMaximized()

bool GFt::Widget::MainWindow::isMaximized ( ) const

◆ setTitle()

void GFt::Widget::MainWindow::setTitle ( const std::wstring & title)

设置标题

参数
title标题