|
Sleeping Wombat GUI
0.100
swGUI
|
Logic of host window for managing child controls. More...
#include <HostLogic.h>
Public Member Functions | |
| HostLogic (HostWindow *hostWindow) | |
| ~HostLogic ()=default | |
| void | RemoveControl (UIElement *control) |
| void | RegisterControlName (UIElement *control, const std::string &name) |
| const std::string & | GetControlName (UIElement *control) |
| Size | GetMemorySize () |
GUI system interaction | |
| void | LostFocus () |
| void | GotFocus () |
| void | OnResized (uint16 newWidth, uint16 newHeight) |
| void | OnMaximized () |
| void | OnMinimized () |
Input handling | |
| void | HandleKeyInput (const input::DeviceEvent &event, input::Device *device) |
| void | HandleCharInput (const input::DeviceEvent &event, input::Device *device) |
| void | HandleMouseButtonInput (const input::DeviceEvent &event, input::Device *device) |
| void | HandleMouseWheelInput (const input::DeviceEvent &event, input::Device *device) |
| void | HandleMouseMoveInput (const input::DeviceEvent &event, input::Device *device) |
Private Member Functions | |
| UIElement * | HitTesting () |
Private Attributes | |
| std::vector< UIElement * > | m_controlsTree |
| Top level controls. This vector holds entire tree. More... | |
| std::vector< UIElement * > | m_mousePath |
| Controls hierarchy that have mouse over in this frame. More... | |
| std::vector< UIElement * > | m_keyboardFocus |
| Path of controls that have keyboard focus and all events are directed to them. More... | |
| UIElement * | m_mouseCapture |
| Element that captured mouse. Can be nullptr. More... | |
| std::vector< UIElement * > | m_invalidated |
| Controls which needs to be redrawn in this frame. More... | |
Controls info | |
| std::map< UIElement *, std::string > | m_controlsNames |
Friends | |
| class | HostLogicTester |
Logic of host window for managing child controls.
|
explicit |
|
default |
| const std::string & sw::gui::HostLogic::GetControlName | ( | UIElement * | control | ) |
| Size sw::gui::HostLogic::GetMemorySize | ( | ) |
| void sw::gui::HostLogic::GotFocus | ( | ) |
| void sw::gui::HostLogic::HandleCharInput | ( | const input::DeviceEvent & | event, |
| input::Device * | device | ||
| ) |
| void sw::gui::HostLogic::HandleKeyInput | ( | const input::DeviceEvent & | event, |
| input::Device * | device | ||
| ) |
| void sw::gui::HostLogic::HandleMouseButtonInput | ( | const input::DeviceEvent & | event, |
| input::Device * | device | ||
| ) |
| void sw::gui::HostLogic::HandleMouseMoveInput | ( | const input::DeviceEvent & | event, |
| input::Device * | device | ||
| ) |
| void sw::gui::HostLogic::HandleMouseWheelInput | ( | const input::DeviceEvent & | event, |
| input::Device * | device | ||
| ) |
|
private |
| void sw::gui::HostLogic::LostFocus | ( | ) |
| void sw::gui::HostLogic::OnMaximized | ( | ) |
| void sw::gui::HostLogic::OnMinimized | ( | ) |
| void sw::gui::HostLogic::RegisterControlName | ( | UIElement * | control, |
| const std::string & | name | ||
| ) |
| void sw::gui::HostLogic::RemoveControl | ( | UIElement * | control | ) |
|
friend |
|
private |
Map containing windows names. Most controls don't have name, so it's better to store them separatly, to lower memory consumption.
|
private |
Top level controls. This vector holds entire tree.
|
private |
Controls which needs to be redrawn in this frame.
|
private |
Path of controls that have keyboard focus and all events are directed to them.
|
private |
Element that captured mouse. Can be nullptr.
|
private |
Controls hierarchy that have mouse over in this frame.
1.8.9.1