Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectBases/IGUIObject.h
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | protected: | ||||
* be called by user. | * be called by user. | ||||
* These functions' security are a lot | * These functions' security are a lot | ||||
* what constitutes the GUI's | * what constitutes the GUI's | ||||
*/ | */ | ||||
//-------------------------------------------------------- | //-------------------------------------------------------- | ||||
//@{ | //@{ | ||||
public: | public: | ||||
/** | |||||
* Called on every GUI tick unless the object or one of its parent is hidden/ghost. | |||||
*/ | |||||
virtual void Tick() {}; | |||||
/** | /** | ||||
* This function is called with different messages | * This function is called with different messages | ||||
* for instance when the mouse enters the object. | * for instance when the mouse enters the object. | ||||
* | * | ||||
* @param Message GUI Message | * @param Message GUI Message | ||||
*/ | */ | ||||
virtual void HandleMessage(SGUIMessage& UNUSED(Message)) {} | virtual void HandleMessage(SGUIMessage& UNUSED(Message)) {} | ||||
Show All 19 Lines | |||||
protected: | protected: | ||||
/** | /** | ||||
* Draws the object. | * Draws the object. | ||||
*/ | */ | ||||
virtual void Draw() = 0; | virtual void Draw() = 0; | ||||
/** | /** | ||||
* Some objects need to handle the SDL_Event_ manually. | * Some objects need to be able to pre-emptively process SDL_Event_. | ||||
* | |||||
* Only the object with focus will have this function called. | |||||
* | |||||
* Returns either IN_PASS or IN_HANDLED. If IN_HANDLED, then | |||||
* the event won't be passed on and processed by other handlers. | |||||
*/ | |||||
virtual InReaction PreemptEvent(const SDL_Event_* UNUSED(ev)) { return IN_PASS; } | |||||
/** | |||||
* Some objects need to handle the text-related SDL_Event_ manually. | |||||
* For instance the input box. | * For instance the input box. | ||||
* | * | ||||
* Only the object with focus will have this function called. | * Only the object with focus will have this function called. | ||||
* | * | ||||
* Returns either IN_PASS or IN_HANDLED. If IN_HANDLED, then | * Returns either IN_PASS or IN_HANDLED. If IN_HANDLED, then | ||||
* the key won't be passed on and processed by other handlers. | * the key won't be passed on and processed by other handlers. | ||||
* This is used for keys that the GUI uses. | * This is used for keys that the GUI uses. | ||||
*/ | */ | ||||
virtual InReaction ManuallyHandleEvent(const SDL_Event_* UNUSED(ev)) { return IN_PASS; } | virtual InReaction ManuallyHandleKeys(const SDL_Event_* UNUSED(ev)) { return IN_PASS; } | ||||
/** | /** | ||||
* Loads a style. | * Loads a style. | ||||
*/ | */ | ||||
void LoadStyle(const CStr& StyleName); | void LoadStyle(const CStr& StyleName); | ||||
/** | /** | ||||
* Returns not the Z value, but the actual buffered Z value, i.e. if it's | * Returns not the Z value, but the actual buffered Z value, i.e. if it's | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator