marco 1.29.1
Window manager
Loading...
Searching...
No Matches
fixedtip.h File Reference
View source

Marco fixed tooltip routine. More...

This graph shows which files directly or indirectly include this file:

Functions

void meta_fixed_tip_show (int root_x, int root_y, const char *markup_text)
 Displays a tooltip.
 
void meta_fixed_tip_hide (void)
 Removes the tooltip that was created by meta_fixed_tip_show().
 

Detailed Description

Marco fixed tooltip routine.

Sometimes we want to display a small floating rectangle with helpful text near the pointer. For example, if the user holds the mouse over the maximise button, we can display a tooltip saying "Maximize". The text is localised, of course.

This file contains the functions to create and delete these tooltips.

Todo:
Since we now consider MetaDisplay a singleton, there can be only one tooltip per display; this might quite simply live in display.c. Alternatively, it could move to frames.c, which is the only place this business is called anyway.
Todo:
Apparently some UI needs changing (check bugzilla)

Function Documentation

◆ meta_fixed_tip_hide()

void meta_fixed_tip_hide ( void  )

Removes the tooltip that was created by meta_fixed_tip_show().

If there is no tooltip currently visible, this is a no-op.

References NULL, and tip.

Referenced by clear_tip().

◆ meta_fixed_tip_show()

void meta_fixed_tip_show ( int  root_x,
int  root_y,
const char *  markup_text 
)

Displays a tooltip.

There can be only one across the entire system. This function behaves identically whether or not a tooltip is already displayed, but if it is the window will be reused rather than destroyed and recreated.

Parameters
screen_numberThe number of the screen.
root_xThe X coordinate where the tooltip should appear
root_yThe Y coordinate where the tooltip should appear
markup_textText to display in the tooltip; can contain markup

References draw_handler(), FALSE, label, META_UI_DIRECTION_RTL, meta_ui_get_direction(), NULL, screen, tip, and TRUE.

Referenced by show_tip_now().

Here is the call graph for this function: