Crazy Eddie's GUI System
0.8.4
|
Base class for Tooltip widgets. More...
Public Member Functions | |
Tooltip (const String &type, const String &name) | |
Constructor for the Tooltip base class constructor. | |
~Tooltip (void) | |
Destructor for the Tooltip base class. | |
void | setTargetWindow (Window *wnd) |
Sets the target window for the tooltip. This used internally to manage tooltips, you should not have to call this yourself. | |
const Window * | getTargetWindow () |
return the current target window for this Tooltip. | |
void | resetTimer (void) |
Resets the timer on the tooltip when in the Active / Inactive states. This is used internally to control the tooltip, it is not normally necessary to call this method yourself. | |
float | getHoverTime (void) const |
Return the number of seconds the mouse should hover stationary over the target window before the tooltip gets activated. | |
void | setDisplayTime (float seconds) |
Set the number of seconds the tooltip should be displayed for before it automatically de-activates itself. 0 indicates that the tooltip should never timesout and auto-deactivate. | |
void | setHoverTime (float seconds) |
Set the number of seconds the mouse should hover stationary over the target window before the tooltip gets activated. | |
float | getDisplayTime (void) const |
Return the number of seconds the tooltip should be displayed for before it automatically de-activates itself. 0 indicates that the tooltip never timesout and auto-deactivates. | |
void | positionSelf (void) |
Causes the tooltip to position itself appropriately. | |
void | sizeSelf (void) |
Causes the tooltip to resize itself appropriately. | |
Sizef | getTextSize () const |
Return the size of the area that will be occupied by the tooltip text, given any current formatting options. | |
virtual Sizef | getTextSize_impl () const |
Return the size of the area that will be occupied by the tooltip text, given any current formatting options. | |
Static Public Attributes | |
static const String | WidgetTypeName |
Window factory name. | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | EventHoverTimeChanged |
static const String | EventDisplayTimeChanged |
static const String | EventFadeTimeChanged |
static const String | EventTooltipActive |
static const String | EventTooltipInactive |
static const String | EventTooltipTransition |
Protected Member Functions | |
void | doActiveState (float elapsed) |
void | doInactiveState (float elapsed) |
void | switchToInactiveState (void) |
void | switchToActiveState (void) |
virtual bool | validateWindowRenderer (const WindowRenderer *renderer) const |
Function used in checking if a WindowRenderer is valid for this window. | |
virtual void | onHoverTimeChanged (WindowEventArgs &e) |
Event trigger method called when the hover timeout gets changed. | |
virtual void | onDisplayTimeChanged (WindowEventArgs &e) |
Event trigger method called when the display timeout gets changed. | |
virtual void | onTooltipActive (WindowEventArgs &e) |
Event trigger method called just before the tooltip becomes active. | |
virtual void | onTooltipInactive (WindowEventArgs &e) |
Event trigger method called just after the tooltip is deactivated. | |
virtual void | onTooltipTransition (WindowEventArgs &e) |
Event trigger method called just after the tooltip changed target window but remained active. | |
void | updateSelf (float elapsed) |
Perform actual update processing for this Window. | |
void | onHidden (WindowEventArgs &e) |
Handler called when the window is hidden. | |
void | onMouseEnters (MouseEventArgs &e) |
Handler called when the mouse cursor has entered this window's area and is actually over some part of this windows surface and not, for instance over a child window - even though technically in those cases the mouse is also within this Window's area, the handler will not be called. | |
void | onTextChanged (WindowEventArgs &e) |
Handler called when the window's text is changed. | |
Protected Attributes | |
bool | d_active |
true if the tooltip is active | |
float | d_elapsed |
Used to track state change timings. | |
const Window * | d_target |
Current target Window for this Tooltip. | |
float | d_hoverTime |
tool-tip hover time (seconds mouse must stay stationary before tip shows). | |
float | d_displayTime |
tool-tip display time (seconds that tip is showsn for). | |
float | d_fadeTime |
bool | d_inPositionSelf |
are in positionSelf function? (to avoid infinite recursion issues) |
Base class for Tooltip widgets.
The Tooltip class shows a simple pop-up window around the mouse position with some text information. The tool-tip fades in when the user hovers with the mouse over a window which has tool-tip text set, and then fades out after some pre-set time.
float CEGUI::Tooltip::getDisplayTime | ( | void | ) | const |
Return the number of seconds the tooltip should be displayed for before it automatically de-activates itself. 0 indicates that the tooltip never timesout and auto-deactivates.
float CEGUI::Tooltip::getHoverTime | ( | void | ) | const |
Return the number of seconds the mouse should hover stationary over the target window before the tooltip gets activated.
const Window* CEGUI::Tooltip::getTargetWindow | ( | ) |
Sizef CEGUI::Tooltip::getTextSize | ( | ) | const |
Return the size of the area that will be occupied by the tooltip text, given any current formatting options.
virtual Sizef CEGUI::Tooltip::getTextSize_impl | ( | ) | const [virtual] |
Return the size of the area that will be occupied by the tooltip text, given any current formatting options.
virtual void CEGUI::Tooltip::onDisplayTimeChanged | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Event trigger method called when the display timeout gets changed.
e | WindowEventArgs object. |
void CEGUI::Tooltip::onHidden | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when the window is hidden.
e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'. |
Reimplemented from CEGUI::Window.
virtual void CEGUI::Tooltip::onHoverTimeChanged | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Event trigger method called when the hover timeout gets changed.
e | WindowEventArgs object. |
void CEGUI::Tooltip::onMouseEnters | ( | MouseEventArgs & | e | ) | [protected, virtual] |
Handler called when the mouse cursor has entered this window's area and is actually over some part of this windows surface and not, for instance over a child window - even though technically in those cases the mouse is also within this Window's area, the handler will not be called.
e | MouseEventArgs object. All fields are valid. |
Reimplemented from CEGUI::Window.
void CEGUI::Tooltip::onTextChanged | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when the window's text is changed.
e | WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'. |
Reimplemented from CEGUI::Window.
virtual void CEGUI::Tooltip::onTooltipActive | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Event trigger method called just before the tooltip becomes active.
e | WindowEventArgs object. |
virtual void CEGUI::Tooltip::onTooltipInactive | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Event trigger method called just after the tooltip is deactivated.
e | WindowEventArgs object. |
virtual void CEGUI::Tooltip::onTooltipTransition | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Event trigger method called just after the tooltip changed target window but remained active.
e | WindowEventArgs object. |
void CEGUI::Tooltip::positionSelf | ( | void | ) |
Causes the tooltip to position itself appropriately.
void CEGUI::Tooltip::resetTimer | ( | void | ) |
Resets the timer on the tooltip when in the Active / Inactive states. This is used internally to control the tooltip, it is not normally necessary to call this method yourself.
void CEGUI::Tooltip::setDisplayTime | ( | float | seconds | ) |
Set the number of seconds the tooltip should be displayed for before it automatically de-activates itself. 0 indicates that the tooltip should never timesout and auto-deactivate.
seconds | float value representing a number of seconds. |
void CEGUI::Tooltip::setHoverTime | ( | float | seconds | ) |
Set the number of seconds the mouse should hover stationary over the target window before the tooltip gets activated.
seconds | float value representing a number of seconds. |
void CEGUI::Tooltip::setTargetWindow | ( | Window * | wnd | ) |
Sets the target window for the tooltip. This used internally to manage tooltips, you should not have to call this yourself.
wnd | Window object that the tooltip should be associated with (for now). |
void CEGUI::Tooltip::sizeSelf | ( | void | ) |
Causes the tooltip to resize itself appropriately.
void CEGUI::Tooltip::updateSelf | ( | float | elapsed | ) | [protected, virtual] |
Perform actual update processing for this Window.
elapsed | float value indicating the number of seconds elapsed since the last update call. |
Reimplemented from CEGUI::Window.
virtual bool CEGUI::Tooltip::validateWindowRenderer | ( | const WindowRenderer * | renderer | ) | const [protected, virtual] |
Function used in checking if a WindowRenderer is valid for this window.
renderer | Window renderer that will be checked (it can be null!) |
Reimplemented from CEGUI::Window.
float CEGUI::Tooltip::d_fadeTime [protected] |
tool-tip fade time (seconds it takes for tip to fade in and/or out).
const String CEGUI::Tooltip::EventDisplayTimeChanged [static] |
Event fired when the display timeout for the tool tip gets changed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip whose display timeout has been changed.
const String CEGUI::Tooltip::EventFadeTimeChanged [static] |
Event fired when the fade timeout for the tooltip gets changed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip whose fade timeout has been changed.
const String CEGUI::Tooltip::EventHoverTimeChanged [static] |
Event fired when the hover timeout for the tool tip gets changed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip whose hover timeout has been changed.
const String CEGUI::Tooltip::EventTooltipActive [static] |
Event fired when the tooltip is about to get activated. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip that is about to become active.
const String CEGUI::Tooltip::EventTooltipInactive [static] |
Event fired when the tooltip has been deactivated. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip that has become inactive.
const String CEGUI::Tooltip::EventTooltipTransition [static] |
Event fired when the tooltip changes target window but stays active. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the Tooltip that has transitioned.