NetSurf
|
Throbber (interface). More...
Go to the source code of this file.
Functions | |
struct throbber * | ro_gui_throbber_create (struct theme_descriptor *theme) |
Create a new throbber widget. More... | |
bool | ro_gui_throbber_rebuild (struct throbber *throbber, struct theme_descriptor *theme, theme_style style, wimp_w window, bool shaded) |
Place a throbber into a toolbar window and initialise any theme-specific settings. More... | |
void | ro_gui_throbber_destroy (struct throbber *throbber) |
Destroy a throbber widget. More... | |
bool | ro_gui_throbber_get_dims (struct throbber *throbber, int *width, int *height) |
Return the MINIMUM dimensions required by the throbber, in RO units, allowing for the current theme. More... | |
bool | ro_gui_throbber_set_extent (struct throbber *throbber, int x0, int y0, int x1, int y1) |
Set or update the dimensions to be used by the throbber in RO units. More... | |
bool | ro_gui_throbber_hide (struct throbber *throbber, bool hide) |
Show or hide a throbber. More... | |
bool | ro_gui_throbber_help_suffix (struct throbber *throbber, wimp_i i, os_coord *screenpos, wimp_window_state *state, wimp_mouse_state buttons, const char **suffix) |
Translate mouse data into an interactive help message for the throbber. More... | |
bool | ro_gui_throbber_animate (struct throbber *throbber) |
Start or update the amimation of a throbber. More... | |
bool | ro_gui_throbber_stop (struct throbber *throbber) |
Stop the amimation of a throbber. More... | |
Throbber (interface).
Definition in file throbber.h.
bool ro_gui_throbber_animate | ( | struct throbber * | throbber | ) |
Start or update the amimation of a throbber.
*throbber | The throbber to amimate. |
Definition at line 363 of file throbber.c.
References throbber::current_frame, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, max, throbber::max_frame, min, ro_gui_force_redraw_icon(), ro_gui_set_icon_string(), throbber::sprite_name, THROBBER_ANIMATE_INTERVAL, THROBBER_SPRITE_NAME_LENGTH, and throbber::window.
Referenced by ro_toolbar_start_throbbing(), and ro_toolbar_throb().
struct throbber * ro_gui_throbber_create | ( | struct theme_descriptor * | theme | ) |
Create a new throbber widget.
*theme | The theme to apply (or NULL for the default). |
Definition at line 77 of file throbber.c.
References throbber::current_frame, throbber::extent, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, throbber::max_frame, NSLOG, ro_gui_theme_get_sprites(), ro_gui_theme_get_throbber_data(), throbber::shaded, throbber::sprites, throbber::theme, throbber, throbber::window, throbber::x_min, and throbber::y_min.
Referenced by ro_toolbar_add_throbber().
void ro_gui_throbber_destroy | ( | struct throbber * | throbber | ) |
Destroy a throbber widget.
*throbber | The throbber to destroy. |
Definition at line 154 of file throbber.c.
Referenced by ro_toolbar_destroy(), and ro_toolbar_rebuild().
bool ro_gui_throbber_get_dims | ( | struct throbber * | throbber, |
int * | width, | ||
int * | height | ||
) |
Return the MINIMUM dimensions required by the throbber, in RO units, allowing for the current theme.
*throbber | The throbber of interest. |
*width | Return the required width. |
*height | Return the required height. |
Definition at line 165 of file throbber.c.
References height, width, throbber::x_min, and throbber::y_min.
Referenced by ro_toolbar_refresh_widget_dimensions().
bool ro_gui_throbber_help_suffix | ( | struct throbber * | throbber, |
wimp_i | i, | ||
os_coord * | screenpos, | ||
wimp_window_state * | state, | ||
wimp_mouse_state | buttons, | ||
const char ** | suffix | ||
) |
Translate mouse data into an interactive help message for the throbber.
throbber | The throbber to process. |
i | The wimp icon under the pointer. |
screenpos | The screen position. |
state | The toolbar window state. |
buttons | The mouse button state. |
suffix | Return a help token suffix, or "" for none. |
Definition at line 328 of file throbber.c.
References throbber::extent, throbber::hidden, and throbber::icon.
Referenced by ro_toolbar_get_help_suffix().
bool ro_gui_throbber_hide | ( | struct throbber * | throbber, |
bool | hide | ||
) |
Show or hide a throbber.
*throbber | The throbber to hide. |
hide | true to hide the throbber; false to show it. |
Definition at line 315 of file throbber.c.
References throbber::hidden, and ro_gui_throbber_icon_update().
Referenced by ro_toolbar_set_display_throbber().
bool ro_gui_throbber_rebuild | ( | struct throbber * | throbber, |
struct theme_descriptor * | theme, | ||
theme_style | style, | ||
wimp_w | window, | ||
bool | shaded | ||
) |
Place a throbber into a toolbar window and initialise any theme-specific settings.
Any previous incarnation of the throbber will be forgotten: this is for use when a new toolbar is being created, or when a toolbar has been deleted and rebuilt following a theme change.
*throbber | The throbber to rebuild. |
*theme | The theme to apply (or NULL for current). |
style | The theme style to apply. |
window | The window that the throbber is in. |
shaded | true if the bar should be throbber; else false. |
Definition at line 124 of file throbber.c.
References throbber::force_redraw, throbber::icon, throbber::max_frame, ro_gui_theme_get_sprites(), ro_gui_theme_get_throbber_data(), ro_gui_throbber_icon_update(), throbber::shaded, throbber::sprite_name, throbber::sprites, throbber::theme, throbber::window, throbber::x_min, and throbber::y_min.
Referenced by ro_toolbar_rebuild().
bool ro_gui_throbber_set_extent | ( | struct throbber * | throbber, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1 | ||
) |
Set or update the dimensions to be used by the throbber in RO units.
If these are greater than the minimum required, the throbber will fill the extended space; if less, the call will fail.
throbber | The throbber to update. |
x0 | top left of bounding box x coordinate |
y0 | top left of bounding box y coordinate |
x1 | bottom right of bounding box x coordinate |
y1 | bottom right of bounding box y coordinate |
Definition at line 186 of file throbber.c.
References throbber::extent, throbber::icon, ro_gui_throbber_icon_resize(), throbber::window, throbber::x_min, and throbber::y_min.
Referenced by ro_toolbar_reformat_widgets().
bool ro_gui_throbber_stop | ( | struct throbber * | throbber | ) |
Stop the amimation of a throbber.
*throbber | The throbber to amimate. |
Definition at line 403 of file throbber.c.
References throbber::current_frame, throbber::force_redraw, throbber::hidden, throbber::icon, throbber::last_update, ro_gui_force_redraw_icon(), ro_gui_set_icon_string(), throbber::sprite_name, THROBBER_SPRITE_NAME_LENGTH, and throbber::window.
Referenced by ro_toolbar_stop_throbbing().