#include <mgui/tooltip.h>
Classes | |
| struct | STYLE |
| ToolTip style. More... | |
Public Member Functions | |
| CTRL_TOOLTIP () | |
| virtual | ~CTRL_TOOLTIP () |
| void | AppendImage (SPATMOD::IMAGE::STAGE &image) |
| void | AppendImage (const MGD::DEVICE &device, bool bTakeOwnership=false) |
| void | AppendText (const MISTRING &text, const SPATMOD::IMAGE::STAGE_ARRAY *Images) |
| void | AppendText (const MISTRING &text) |
| void | Attach (Widget widget, bool DeleteOnCtrlDestroy=false) |
| void | Attach (MGUI::CTRL &ctrl, bool DeleteOnCtrlDestroy=false) |
| bool | CheckMotion (const XEvent &event, bool AutoHide=true) |
| bool | CheckMotion (int x, int y, bool AutoHide=true) |
| void | Clear () |
| void | Detach () |
| void | Disable () |
| void | Enable () |
| INT32 | GetDelay () |
| ERRVALUE | GetImages (SPATMOD::IMAGE::STAGE_ARRAY &Images, bool bTransferOwnership) |
| int | GetPixelDelta () const |
| int | GetPriority () const |
| const STYLE & | GetStyle () const |
| const MISTRING & | GetText () const |
| void | Hide () |
| bool | IsDisabled () const |
| bool | IsVisible () const |
| void | SetAlpha (int alpha) |
| void | SetDelay (INT32 delay) |
| void | SetDelegateOnShowRequest (DELEGATE_ONTOOLTIPREQUEST delegate) |
| void | SetImage (const MGD::DEVICE &imgdev, const MGD::DEVICE_BINARY *maskdev=0, const LPOINT2D *pos=0) |
| void | SetPixelDelta (int PixelDelta) |
| void | SetPriority (int priority) |
| void | SetStyle (const STYLE &style) |
| void | SetText (const MISTRING &text, const SPATMOD::IMAGE::STAGE_ARRAY *Images) |
| void | SetText (const MISTRING &text) |
| void | Show () |
Static Public Member Functions | |
| static CTRL_TOOLTIP * | FindAttached (Widget widget) |
| static void | HideAll () |
Private Member Functions | |
| virtual bool | v_HasDatatip () |
| virtual void | v_OnHide () |
| virtual void | v_OnShow () |
| virtual bool | v_OnShowRequest (int x, int y) |
| MGUI::CTRL_TOOLTIP::CTRL_TOOLTIP | ( | ) |
Constructor.
| virtual MGUI::CTRL_TOOLTIP::~CTRL_TOOLTIP | ( | ) | [virtual] |
Destructor.
| void MGUI::CTRL_TOOLTIP::AppendImage | ( | SPATMOD::IMAGE::STAGE & | image | ) |
Append an image to the tooltip.
| void MGUI::CTRL_TOOLTIP::AppendImage | ( | const MGD::DEVICE & | device, | |
| bool | bTakeOwnership = false | |||
| ) |
Append an image to the tooltip.
| void MGUI::CTRL_TOOLTIP::AppendText | ( | const MISTRING & | text, | |
| const SPATMOD::IMAGE::STAGE_ARRAY * | Images | |||
| ) |
Set text to show next time ToolTip is displayed.
Does not cause ToolTip to appear.
The Images array is used if the text contains {~IMG #}, where the # is a 0-based index into the Images array. Note, even if the Tool tip already has images embeded in it, the the {~IMG #} tags specified in the text parameter should be numbered starting at 0 relative to the Images array passed in. They will be adjusted if necessary.
| text | Text to show | |
| Images | Images inserted into text. |
| void MGUI::CTRL_TOOLTIP::AppendText | ( | const MISTRING & | text | ) |
Append text to the tooltip.
| void MGUI::CTRL_TOOLTIP::Attach | ( | Widget | widget, | |
| bool | DeleteOnCtrlDestroy = false | |||
| ) |
Attach instance to Widget (X only).
| widget | Widget to attach to | |
| DeleteOnCtrlDestroy | Delete ToolTip instance when associated control is destroyed |
| void MGUI::CTRL_TOOLTIP::Attach | ( | MGUI::CTRL & | ctrl, | |
| bool | DeleteOnCtrlDestroy = false | |||
| ) |
Attach instance to CTRL.
| ctrl | Control to attach, must have already been created | |
| DeleteOnCtrlDestroy | Delete ToolTip instance when associated control is destroyed |
| bool MGUI::CTRL_TOOLTIP::CheckMotion | ( | const XEvent & | event, | |
| bool | AutoHide = true | |||
| ) |
| bool MGUI::CTRL_TOOLTIP::CheckMotion | ( | int | x, | |
| int | y, | |||
| bool | AutoHide = true | |||
| ) |
| void MGUI::CTRL_TOOLTIP::Clear | ( | ) |
Clear the current contents.
Useful if you intend to Append to the tip.
| void MGUI::CTRL_TOOLTIP::Detach | ( | ) |
Detach instance from control.
| void MGUI::CTRL_TOOLTIP::Disable | ( | ) |
| void MGUI::CTRL_TOOLTIP::Enable | ( | ) |
Enable automatic ToolTip display mechanism.
| static CTRL_TOOLTIP* MGUI::CTRL_TOOLTIP::FindAttached | ( | Widget | widget | ) | [static] |
Find CTRL_TOOLTIP instance attached to Widget (X only).
| INT32 MGUI::CTRL_TOOLTIP::GetDelay | ( | ) |
Get delay for automatic ToolTip display.
| ERRVALUE MGUI::CTRL_TOOLTIP::GetImages | ( | SPATMOD::IMAGE::STAGE_ARRAY & | Images, | |
| bool | bTransferOwnership | |||
| ) |
Get the images (if any) from the tooltip.
The Images array is not cleared by this process. The CTRL_TOOLTIP's images will be appended to the Images array. If bTransferOwnership is true, then the images will be removed from the CTRL_TOOLTIP and the Images array will "own" them. If it's false, then it has to copy the images.
| int MGUI::CTRL_TOOLTIP::GetPixelDelta | ( | ) | const |
Get amount of movement for automatically hiding ToolTip.
| int MGUI::CTRL_TOOLTIP::GetPriority | ( | ) | const |
Get Priority for selecting amoung multiple ToolTips attached to same control.
| const STYLE& MGUI::CTRL_TOOLTIP::GetStyle | ( | ) | const |
Get current style settings.
| const MISTRING& MGUI::CTRL_TOOLTIP::GetText | ( | ) | const |
Get text to be displayed.
| void MGUI::CTRL_TOOLTIP::Hide | ( | ) |
Hide ToolTip if visible.
This is usually done automatically unless disabled.
| static void MGUI::CTRL_TOOLTIP::HideAll | ( | ) | [static] |
Hide all currently visible tooltips.
| bool MGUI::CTRL_TOOLTIP::IsDisabled | ( | ) | const |
Determine if automatic display mechanism is disabled.
Manual display via Show/Hide is always allowed.
| bool MGUI::CTRL_TOOLTIP::IsVisible | ( | ) | const |
Determine if ToolTip is presently visible.
| void MGUI::CTRL_TOOLTIP::SetAlpha | ( | int | alpha | ) |
Set the Alpha (opacity) of the tooltip window.
Note, this will only work under Windows, as it uses a feature unique to the MicroImages X Server. Alpha must be set before the tool tip is shown.
| alpha | 0 = transparent, 255 = opaque |
| void MGUI::CTRL_TOOLTIP::SetDelay | ( | INT32 | delay | ) |
Set delay for automatic ToolTip display.
| delay | ToolTip popup delay in milliseconds |
| void MGUI::CTRL_TOOLTIP::SetDelegateOnShowRequest | ( | DELEGATE_ONTOOLTIPREQUEST | delegate | ) |
Set delegate to call when requesting tooltip be shown.
Delegate is only called if v_OnShowRequest is not overridden.
| delegate | Delegate |
| void MGUI::CTRL_TOOLTIP::SetImage | ( | const MGD::DEVICE & | imgdev, | |
| const MGD::DEVICE_BINARY * | maskdev = 0, |
|||
| const LPOINT2D * | pos = 0 | |||
| ) |
Set image, optional mask and position for graphical ToolTip.
This does not actually display the ToolTip.
| imgdev | Device containing associated image | |
| maskdev | Optional device containing mask | |
| pos | Optional position relative to cursor |
| void MGUI::CTRL_TOOLTIP::SetPixelDelta | ( | int | PixelDelta | ) |
Set distance cursor must move to hide tooltip.
Note that if cursor moves outside attached control the tooltip will be hidden regardless of distance.
| PixelDelta | Movement distance in screen pixels |
| void MGUI::CTRL_TOOLTIP::SetPriority | ( | int | priority | ) |
Set priority if multiple CTRL_TOOLTIP instances are attached to the same control.
If multiple instances attached the one with the highest priority will be shown.
| priority | Priority to set |
| void MGUI::CTRL_TOOLTIP::SetStyle | ( | const STYLE & | style | ) |
Set style to use next time ToolTip text is shown.
| void MGUI::CTRL_TOOLTIP::SetText | ( | const MISTRING & | text, | |
| const SPATMOD::IMAGE::STAGE_ARRAY * | Images | |||
| ) |
Set text to show next time ToolTip is displayed.
Does not cause ToolTip to appear.
The Images array is used if the text contains {~IMG #}, where the # is a 0-based index into the Images array.
| text | Text to show | |
| Images | Images inserted into text. |
| void MGUI::CTRL_TOOLTIP::SetText | ( | const MISTRING & | text | ) |
Set text to show next time ToolTip is displayed.
Does not cause ToolTip to appear.
| text | Text to show |
| void MGUI::CTRL_TOOLTIP::Show | ( | ) |
Show the ToolTip.
This is usually done automatically unless disabled.
| virtual bool MGUI::CTRL_TOOLTIP::v_HasDatatip | ( | ) | [private, virtual] |
Override to set when datatip becomes available Used for making request in separate thread Default implementation returns 'true' unless no text or image is available.
| virtual void MGUI::CTRL_TOOLTIP::v_OnHide | ( | ) | [private, virtual] |
Called after ToolTip is hidden.
Generally used to send notifications about action. Default implementation does nothing.
| virtual void MGUI::CTRL_TOOLTIP::v_OnShow | ( | ) | [private, virtual] |
Called after ToolTip is shown.
Generally used to send notifications about action. Default implementation does nothing.
| virtual bool MGUI::CTRL_TOOLTIP::v_OnShowRequest | ( | int | x, | |
| int | y | |||
| ) | [private, virtual] |
Override to perform custom ToolTip creating.
When overriding, use SetText or SetImage to control what will be displayed.
1.6.1