#include <UIBaseComponent.h>
Inheritance diagram for Moteur3D::UIBaseComponent:
Public Member Functions | |
UIBaseComponent (UIBaseWindow *window) | |
Constructor. Needs the window that will embed the instance. | |
~UIBaseComponent () | |
Destructor. | |
virtual void | SetPosition (int x, int y) |
Sets the component's current position. 0,0 is the top-left corner of the window. | |
virtual void | SetSize (int x, int y) |
Sets the component's current size. | |
virtual int | GetWidth () |
Gets the component's current X size. | |
virtual int | GetHeight () |
Gets the component's current Y size. | |
virtual int | GetPositionX () |
Gets the component's current X position. | |
virtual int | GetPositionY () |
Gets the component's current Y position. | |
Protected Member Functions | |
virtual bool | IsMouseInbound (const MouseInformations *mouseInfo) |
checks if the mouse is above the component or not. You might want to change the algorithm if you want non-rectangular components. | |
virtual bool | WasMouseInbound (const MouseInformations *mouseInfo) |
checks if the mouse was above the component or not. You might want to change the algorithm if you want non-rectangular components. | |
virtual void | OnDisplay ()=0 |
Event called when the component needs to be displayed. Override it if you want custom graphics for your component (and you probably will). | |
virtual bool | OnMouseButton (const MouseInformations *mouseInfo, MouseButton button, bool buttonDown) |
This function is called when a mouse button is pressed or released inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component. | |
virtual bool | OnMouseMove (const MouseInformations *mouseInfo) |
This function is called when the mouse moves inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component. | |
void | SendMessage (UICMessage message, int infos) |
Sends a message to the embedding window. | |
Protected Attributes | |
int | m_PosX |
Component's position. 0,0 is the top-left corner of the window. | |
int | m_PosY |
int | m_Width |
Component's size. | |
int | m_Height |
UIBaseWindow * | m_Window |
Embedding window. | |
Friends | |
class | UIBaseWindow |
|
Constructor. Needs the window that will embed the instance.
|
|
Destructor.
|
|
Gets the component's current Y size.
|
|
Gets the component's current X position.
|
|
Gets the component's current Y position.
|
|
Gets the component's current X size.
|
|
checks if the mouse is above the component or not. You might want to change the algorithm if you want non-rectangular components.
|
|
Event called when the component needs to be displayed. Override it if you want custom graphics for your component (and you probably will).
Implemented in Moteur3D::UICButton, Moteur3D::UICCloseButton, and Moteur3D::UICLabel. |
|
This function is called when a mouse button is pressed or released inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.
Reimplemented in Moteur3D::UICButton. |
|
This function is called when the mouse moves inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. Each window will check, if the mouse is in its bounds, if it affects a component.
Reimplemented in Moteur3D::UICButton. |
|
Sends a message to the embedding window.
|
|
Sets the component's current position. 0,0 is the top-left corner of the window.
|
|
Sets the component's current size.
|
|
checks if the mouse was above the component or not. You might want to change the algorithm if you want non-rectangular components.
|
|
|
|
|
|
Component's position. 0,0 is the top-left corner of the window.
|
|
|
|
Component's size.
|
|
Embedding window.
|