NetSurf
|
Window toolbars (interface). More...
#include <stdbool.h>
#include "riscos/theme.h"
#include "riscos/gui/button_bar.h"
#include "riscos/gui/throbber.h"
#include "riscos/gui/url_bar.h"
Go to the source code of this file.
Data Structures | |
union | toolbar_action |
Union to hold the different widget action data that can be passed from widget via toolbar to client. More... | |
struct | toolbar_callbacks |
Macros | |
#define | ro_toolbar_menu_option_shade(toolbar) (((toolbar) == NULL) || ro_toolbar_get_editing(toolbar)) |
#define | ro_toolbar_menu_buttons_tick(toolbar) |
#define | ro_toolbar_menu_url_tick(toolbar) (ro_toolbar_get_display_url(toolbar)) |
#define | ro_toolbar_menu_throbber_tick(toolbar) (ro_toolbar_get_display_throbber(toolbar)) |
#define | ro_toolbar_menu_edit_shade(toolbar) ((toolbar) == NULL) |
#define | ro_toolbar_menu_edit_tick(toolbar) (ro_toolbar_get_editing(toolbar)) |
Enumerations | |
enum | toolbar_flags { TOOLBAR_FLAGS_NONE = 0x00 , TOOLBAR_FLAGS_DISPLAY = 0x01 , TOOLBAR_FLAGS_EDIT = 0x02 } |
enum | toolbar_action_type { TOOLBAR_ACTION_NONE = 0 , TOOLBAR_ACTION_BUTTON , TOOLBAR_ACTION_URL } |
Widget action types that the toolbar can pass on to clients. More... | |
Functions | |
void | ro_toolbar_init (void) |
Initialise the RISC OS toolbar widget. More... | |
struct toolbar * | ro_toolbar_create (struct theme_descriptor *descriptor, wimp_w parent, theme_style style, toolbar_flags bar_flags, const struct toolbar_callbacks *callbacks, void *client_data, const char *help) |
Create a new toolbar, ready to have widgets added and to be attached to a window. More... | |
bool | ro_toolbar_add_buttons (struct toolbar *toolbar, const struct button_bar_buttons buttons[], char *button_order) |
Add a button bar to a toolbar, and configure the buttons. More... | |
bool | ro_toolbar_add_throbber (struct toolbar *toolbar) |
Add a throbber to a toolbar. More... | |
bool | ro_toolbar_add_url (struct toolbar *toolbar) |
Add a URL bar to a toolbar. More... | |
bool | ro_toolbar_rebuild (struct toolbar *toolbar) |
(Re-)build a toolbar to use the specified (or current) theme. More... | |
bool | ro_toolbar_attach (struct toolbar *toolbar, wimp_w parent) |
Attach or re-attach a toolbar to its parent window. More... | |
bool | ro_toolbar_process (struct toolbar *toolbar, int width, bool reformat) |
Process a toolbar, updating its contents for a size or content change. More... | |
void | ro_toolbar_destroy (struct toolbar *toolbar) |
Destroy a toolbar after use. More... | |
void | ro_toolbar_update_client_data (struct toolbar *toolbar, void *client_data) |
Change the client data associated with a toolbar's callbacks. More... | |
void | ro_toolbar_update_all_buttons (void) |
Force the update of all toolbars buttons to reflect the current state. More... | |
void | ro_toolbar_refresh (struct toolbar *toolbar) |
Refresh a toolbar after it has been updated. More... | |
void | ro_toolbar_theme_update (void) |
Force the update of all toolbars to reflect the application of a new theme. More... | |
struct toolbar * | ro_toolbar_parent_window_lookup (wimp_w w) |
Find the toolbar associated with a given RO window handle. More... | |
struct toolbar * | ro_toolbar_window_lookup (wimp_w w) |
Find the toolbar using a given RO window handle for its pane. More... | |
wimp_w | ro_toolbar_get_parent_window (struct toolbar *toolbar) |
Return the RO window handle of the parent window for a toolbar. More... | |
wimp_w | ro_toolbar_get_window (struct toolbar *toolbar) |
Return the RO window handle of a toolbar. More... | |
int | ro_toolbar_height (struct toolbar *toolbar) |
Return the current height of a toolbar, allowing for available window space. More... | |
int | ro_toolbar_full_height (struct toolbar *toolbar) |
Return the full height that a toolbar could grow to, if space is available. More... | |
void | ro_toolbar_start_throbbing (struct toolbar *toolbar) |
Starts a toolbar throbber, if there is one active. More... | |
void | ro_toolbar_stop_throbbing (struct toolbar *toolbar) |
Stops a toolbar throbber, if there is one active. More... | |
void | ro_toolbar_throb (struct toolbar *toolbar) |
Animate a toolbar throbber, if there is one active. More... | |
bool | ro_toolbar_set_button_order (struct toolbar *toolbar, char order[]) |
Change the arrangement of buttons and spacers on a button bar within a toolbar. More... | |
void | ro_toolbar_set_button_shaded_state (struct toolbar *toolbar, button_bar_action action, bool shaded) |
Set the shaded state of a toolbar button. More... | |
bool | ro_toolbar_take_caret (struct toolbar *toolbar) |
Give a toolbar input focus, placing the caret into the URL bar if one is present. More... | |
void | ro_toolbar_set_url (struct toolbar *toolbar, const char *url, bool is_utf8, bool set_caret) |
Set the content of a toolbar's URL field. More... | |
const char * | ro_toolbar_get_url (struct toolbar *toolbar) |
Return a pointer to the URL contained in a browser toolbar. More... | |
void | ro_toolbar_update_all_hotlists (void) |
Update the state of the URL Bar hotlist icons in all open toolbars. More... | |
void | ro_toolbar_update_hotlist (struct toolbar *toolbar) |
Update the state of a toolbar's URL Bar hotlist icon to reflect any changes to the URL or the hotlist contents. More... | |
bool | ro_toolbar_get_url_field_extent (struct toolbar *toolbar, os_box *extent) |
Return the current work area coordinates of the URL and favicon field's bounding box. More... | |
void | ro_toolbar_set_site_favicon (struct toolbar *toolbar, struct hlcache_handle *h) |
Update the favicon in a browser window toolbar to the supplied content, or revert to using filetype-based icons. More... | |
void | ro_toolbar_set_content_favicon (struct toolbar *toolbar, struct gui_window *g) |
Update the favicon in a browser window toolbar to reflect the RISC OS filetype of the content within the supplied window. More... | |
void | ro_toolbar_update_urlsuggest (struct toolbar *toolbar) |
Update the state of the URL suggestion pop-up menu icon on a toolbar. More... | |
void | ro_toolbar_set_display_buttons (struct toolbar *toolbar, bool display) |
Set the display button bar state for a toolbar. More... | |
void | ro_toolbar_set_display_url (struct toolbar *toolbar, bool display) |
Set the display URL bar state for a toolbar. More... | |
void | ro_toolbar_set_display_throbber (struct toolbar *toolbar, bool display) |
Set the display throbber state for a toolbar. More... | |
bool | ro_toolbar_get_display_buttons (struct toolbar *toolbar) |
Return true or false depending on whether the given toolbar is set to display the button bar. More... | |
bool | ro_toolbar_get_display_url (struct toolbar *toolbar) |
Return true or false depending on whether the given toolbar is set to display the URL bar. More... | |
bool | ro_toolbar_get_display_throbber (struct toolbar *toolbar) |
Return true or false depending on whether the given toolbar is set to display the throbber. More... | |
bool | ro_toolbar_get_editing (struct toolbar *toolbar) |
Return true or false depending on whether the given toolbar is currently being edited. More... | |
bool | ro_toolbar_toggle_edit (struct toolbar *toolbar) |
Toggle toolbar edit mode on the given toolbar. More... | |
void | ro_toolbar_page_info_change (struct toolbar *toolbar) |
Update the page information indicator. More... | |
Window toolbars (interface).
Definition in file toolbar.h.
#define ro_toolbar_menu_buttons_tick | ( | toolbar | ) |
#define ro_toolbar_menu_edit_tick | ( | toolbar | ) | (ro_toolbar_get_editing(toolbar)) |
#define ro_toolbar_menu_option_shade | ( | toolbar | ) | (((toolbar) == NULL) || ro_toolbar_get_editing(toolbar)) |
#define ro_toolbar_menu_throbber_tick | ( | toolbar | ) | (ro_toolbar_get_display_throbber(toolbar)) |
#define ro_toolbar_menu_url_tick | ( | toolbar | ) | (ro_toolbar_get_display_url(toolbar)) |
enum toolbar_action_type |
enum toolbar_flags |
bool ro_toolbar_add_buttons | ( | struct toolbar * | toolbar, |
const struct button_bar_buttons | buttons[], | ||
char * | button_order | ||
) |
Add a button bar to a toolbar, and configure the buttons.
*toolbar | The toolbar to take the button bar. |
buttons[] | The button definitions. |
*button_order | The initial button order to use. |
Definition at line 273 of file toolbar.c.
References toolbar::buttons, toolbar::buttons_display, toolbar::editing, toolbar::editor, ro_gui_button_bar_arrange_buttons(), ro_gui_button_bar_create(), ro_gui_button_bar_hide(), ro_gui_button_bar_link_editor(), ro_toolbar_update_current_widgets(), and toolbar::theme.
Referenced by gui_window_create(), ro_corewindow_init(), and ro_gui_options_theme_load().
bool ro_toolbar_add_throbber | ( | struct toolbar * | toolbar | ) |
Add a throbber to a toolbar.
*toolbar | The toolbar to take the throbber. |
Definition at line 308 of file toolbar.c.
References ro_gui_throbber_create(), toolbar::theme, toolbar::throbber, and toolbar::throbber_display.
Referenced by gui_window_create(), and ro_gui_options_theme_load().
bool ro_toolbar_add_url | ( | struct toolbar * | toolbar | ) |
Add a URL bar to a toolbar.
*toolbar | The toolbar to take the URL bar. |
Definition at line 327 of file toolbar.c.
References ro_gui_url_bar_create(), toolbar::theme, toolbar::url, and toolbar::url_display.
Referenced by gui_window_create(), and ro_gui_options_theme_load().
bool ro_toolbar_attach | ( | struct toolbar * | toolbar, |
wimp_w | parent | ||
) |
Attach or re-attach a toolbar to its parent window.
*toolbar | The toolbar to attach. |
parent | The window to attach the toolbar to. |
Definition at line 524 of file toolbar.c.
References toolbar::current_height, NSLOG, parent, toolbar::parent_handle, PTR_WIMP_OPEN, ro_warn_user(), and toolbar::toolbar_handle.
Referenced by ro_toolbar_process(), and ro_toolbar_rebuild().
struct toolbar * ro_toolbar_create | ( | struct theme_descriptor * | descriptor, |
wimp_w | parent, | ||
theme_style | style, | ||
toolbar_flags | bar_flags, | ||
const struct toolbar_callbacks * | callbacks, | ||
void * | client_data, | ||
const char * | help | ||
) |
Create a new toolbar, ready to have widgets added and to be attached to a window.
If a parent window is supplied, then the toolbar module will handle the window attachments; if NULL, it is up to the client to sort this out for itself.
*descriptor | The theme to apply, or NULL for the default. |
parent | The window to attach the toolbar to, or NULL. |
style | The theme style to apply. |
bar_flags | Toolbar flags for the new bar. |
*callbacks | A client callback block, or NULL for none. |
*client_data | A data pointer to pass to callbacks, or NULL. |
*help | The Help token prefix for interactive help. |
Definition at line 219 of file toolbar.c.
References toolbar::buttons, toolbar::buttons_display, callbacks, toolbar::callbacks, toolbar::client_data, toolbar::editing, toolbar::editor, toolbar::editor_div1, toolbar::flags, toolbar::help_prefix, toolbar::next, NSLOG, parent, toolbar::parent_handle, ro_toolbar_bars, ro_warn_user(), toolbar::style, toolbar::theme, toolbar::throbber, toolbar::throbber_display, toolbar::url, and toolbar::url_display.
Referenced by gui_window_create(), ro_corewindow_init(), and ro_gui_options_theme_load().
void ro_toolbar_destroy | ( | struct toolbar * | toolbar | ) |
Destroy a toolbar after use.
*toolbar | The toolbar to destroy. |
Definition at line 947 of file toolbar.c.
References toolbar::buttons, toolbar::editor, toolbar::next, NSLOG, ro_gui_button_bar_destroy(), ro_gui_throbber_destroy(), ro_gui_url_bar_destroy(), ro_gui_wimp_event_finalise(), ro_toolbar_bars, toolbar::throbber, toolbar::toolbar_handle, and toolbar::url.
Referenced by gui_window_destroy(), ro_gui_options_theme_free(), ro_toolbar_theme_update(), and ro_toolbar_toggle_edit().
int ro_toolbar_full_height | ( | struct toolbar * | toolbar | ) |
Return the full height that a toolbar could grow to, if space is available.
*toolbar | The toolbar of interest. |
Definition at line 1527 of file toolbar.c.
References toolbar::full_height.
Referenced by gui_window_get_scroll(), gui_window_scroll_start(), gui_window_set_extent(), gui_window_set_scroll(), ro_cw_get_window_dimensions(), ro_gui_window_open(), and ro_gui_window_scroll_action().
bool ro_toolbar_get_display_buttons | ( | struct toolbar * | toolbar | ) |
Return true or false depending on whether the given toolbar is set to display the button bar.
*toolbar | the toolbar of interest. |
Definition at line 1745 of file toolbar.c.
References toolbar::buttons, and toolbar::buttons_display.
Referenced by cookie_menu_select(), global_history_menu_select(), hotlist_menu_select(), ro_gui_window_clone_options(), ro_gui_window_default_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
bool ro_toolbar_get_display_throbber | ( | struct toolbar * | toolbar | ) |
Return true or false depending on whether the given toolbar is set to display the throbber.
*toolbar | the toolbar of interest. |
Definition at line 1763 of file toolbar.c.
References toolbar::throbber, and toolbar::throbber_display.
Referenced by ro_gui_window_clone_options(), ro_gui_window_default_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
bool ro_toolbar_get_display_url | ( | struct toolbar * | toolbar | ) |
Return true or false depending on whether the given toolbar is set to display the URL bar.
*toolbar | the toolbar of interest. |
Definition at line 1754 of file toolbar.c.
References toolbar::url, and toolbar::url_display.
Referenced by ro_gui_url_complete_keypress(), ro_gui_url_complete_resize(), ro_gui_url_complete_start(), ro_gui_window_clone_options(), ro_gui_window_default_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
bool ro_toolbar_get_editing | ( | struct toolbar * | toolbar | ) |
Return true or false depending on whether the given toolbar is currently being edited.
*toolbar | the toolbar of interest. |
Definition at line 1772 of file toolbar.c.
References toolbar::editing.
Referenced by ro_gui_dialog_open_top().
wimp_w ro_toolbar_get_parent_window | ( | struct toolbar * | toolbar | ) |
Return the RO window handle of the parent window for a toolbar.
*toolbar | the toolbar to look up. |
Definition at line 1503 of file toolbar.c.
References toolbar::parent_handle.
Referenced by ro_gui_toolbar_lookup(), ro_gui_url_complete_keypress(), and ro_gui_url_complete_start().
const char * ro_toolbar_get_url | ( | struct toolbar * | toolbar | ) |
Return a pointer to the URL contained in a browser toolbar.
If the toolbar doesn't have a URL field, then NULL is returned instead.
*toolbar | The toolbar to look up the URL from. |
Definition at line 1619 of file toolbar.c.
References ro_gui_url_bar_get_url(), and toolbar::url.
Referenced by ro_gui_url_complete_click(), ro_gui_url_complete_keypress(), ro_gui_url_complete_start(), and ro_gui_window_handle_local_keypress().
bool ro_toolbar_get_url_field_extent | ( | struct toolbar * | toolbar, |
os_box * | extent | ||
) |
Return the current work area coordinates of the URL and favicon field's bounding box.
*toolbar | The toolbar to look up. |
*extent | Return the coordinates. |
Definition at line 1656 of file toolbar.c.
References ro_gui_url_bar_get_url_extent(), and toolbar::url.
Referenced by ro_gui_url_complete_resize().
wimp_w ro_toolbar_get_window | ( | struct toolbar * | toolbar | ) |
Return the RO window handle of a toolbar.
*toolbar | the toolbar to look up. |
Definition at line 1511 of file toolbar.c.
References toolbar::toolbar_handle.
Referenced by ro_gui_options_theme_load(), and ro_gui_url_complete_resize().
int ro_toolbar_height | ( | struct toolbar * | toolbar | ) |
Return the current height of a toolbar, allowing for available window space.
*toolbar | The toolbar of interest. |
Definition at line 1519 of file toolbar.c.
References toolbar::current_height.
Referenced by cw_tb_size(), gui_window_update_extent(), ro_corewindow_init(), ro_cw_drag_start(), ro_gui_dialog_open_top(), and ro_gui_options_theme_load().
void ro_toolbar_init | ( | void | ) |
Initialise the RISC OS toolbar widget.
Definition at line 199 of file toolbar.c.
References NO_ACTION, ro_gui_menu_define_menu(), TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, toolbar_menu, and TOOLBAR_THROBBER.
Referenced by gui_init().
void ro_toolbar_page_info_change | ( | struct toolbar * | toolbar | ) |
Update the page information indicator.
toolbar | the toolbar to update the page info in. |
Definition at line 1551 of file toolbar.c.
References ro_gui_url_bar_page_info_change(), and toolbar::url.
Referenced by gui_window_page_info_change().
struct toolbar * ro_toolbar_parent_window_lookup | ( | wimp_w | w | ) |
Find the toolbar associated with a given RO window handle.
w | the window handle to look up. |
Definition at line 1475 of file toolbar.c.
References toolbar::next, toolbar::parent_handle, and ro_toolbar_bars.
Referenced by ro_gui_window_scroll_action().
bool ro_toolbar_process | ( | struct toolbar * | toolbar, |
int | width, | ||
bool | reformat | ||
) |
Process a toolbar, updating its contents for a size or content change.
*toolbar | The toolbar to update. |
width | The width to reformat to, or -1 to use parent. |
reformat | true to force a widget reflow; else false. |
Definition at line 588 of file toolbar.c.
References toolbar::clip_height, toolbar::clip_width, toolbar::current_height, toolbar::current_width, toolbar::full_height, NSLOG, toolbar::parent_handle, ro_toolbar_attach(), ro_toolbar_reformat_widgets(), ro_warn_user(), TOOLBAR_DEFAULT_WIDTH, toolbar::toolbar_handle, and width.
Referenced by ro_gui_options_theme_load(), ro_gui_window_clone_options(), ro_gui_window_open(), ro_toolbar_rebuild(), ro_toolbar_refresh(), and ro_toolbar_set_button_order().
bool ro_toolbar_rebuild | ( | struct toolbar * | toolbar | ) |
(Re-)build a toolbar to use the specified (or current) theme.
If false is returned, the toolbar may not be complete and should be deleted.
*toolbar | The toolbar to rebuild. |
Definition at line 346 of file toolbar.c.
References toolbar::buttons, toolbar::editing, toolbar::editor, toolbar::editor_div1, toolbar::flags, toolbar::help_prefix, NSLOG, toolbar::parent_handle, ro_gui_button_bar_destroy(), ro_gui_button_bar_rebuild(), ro_gui_theme_get_sprites(), ro_gui_theme_get_style_element(), ro_gui_theme_get_throbber_data(), ro_gui_throbber_destroy(), ro_gui_throbber_rebuild(), ro_gui_url_bar_destroy(), ro_gui_url_bar_rebuild(), ro_gui_wimp_event_register_help_suffix(), ro_gui_wimp_event_register_keypress(), ro_gui_wimp_event_register_menu(), ro_gui_wimp_event_register_menu_prepare(), ro_gui_wimp_event_register_menu_selection(), ro_gui_wimp_event_register_menu_warning(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_redraw_window(), ro_gui_wimp_event_set_help_prefix(), ro_gui_wimp_event_set_user_data(), ro_gui_wimp_event_transfer(), ro_toolbar_attach(), ro_toolbar_click(), ro_toolbar_get_help_suffix(), ro_toolbar_keypress(), ro_toolbar_line_validation, ro_toolbar_menu_prepare(), ro_toolbar_menu_select(), ro_toolbar_menu_warning(), ro_toolbar_null_string, ro_toolbar_process(), ro_toolbar_redraw(), ro_toolbar_refresh_widget_dimensions(), ro_toolbar_update_buttons(), ro_toolbar_window, ro_warn_user(), toolbar::style, toolbar::theme, THEME_ELEMENT_BACKGROUND, toolbar::throbber, toolbar::throbber_right, TOOLBAR_FLAGS_DISPLAY, toolbar::toolbar_handle, toolbar_menu, and toolbar::url.
Referenced by gui_window_create(), ro_corewindow_init(), ro_gui_options_theme_load(), ro_toolbar_theme_update(), and ro_toolbar_toggle_edit().
void ro_toolbar_refresh | ( | struct toolbar * | toolbar | ) |
Refresh a toolbar after it has been updated.
toolbar | the toolbar to update |
Definition at line 1417 of file toolbar.c.
References toolbar::callbacks, toolbar_callbacks::change_size, toolbar::client_data, toolbar::current_height, toolbar::current_width, ro_toolbar_process(), and toolbar::toolbar_handle.
Referenced by ro_toolbar_set_display_buttons(), ro_toolbar_set_display_throbber(), ro_toolbar_set_display_url(), ro_toolbar_toggle_edit(), and ro_toolbar_update_current_widgets().
bool ro_toolbar_set_button_order | ( | struct toolbar * | toolbar, |
char | order[] | ||
) |
Change the arrangement of buttons and spacers on a button bar within a toolbar.
*toolbar | The toolbar to change. |
order[] | The new button configuration. |
Definition at line 1570 of file toolbar.c.
References toolbar::buttons, ro_gui_button_bar_arrange_buttons(), ro_toolbar_process(), and ro_toolbar_refresh_widget_dimensions().
void ro_toolbar_set_button_shaded_state | ( | struct toolbar * | toolbar, |
button_bar_action | action, | ||
bool | shaded | ||
) |
Set the shaded state of a toolbar button.
*toolbar | the toolbar to update. |
action | the button action to update. |
shaded | true if the button should be shaded; else false. |
Definition at line 1586 of file toolbar.c.
References toolbar::buttons, and ro_gui_button_bar_shade_button().
Referenced by cookie_toolbar_update(), global_history_toolbar_update(), hotlist_toolbar_update(), and ro_gui_window_update_toolbar_buttons().
void ro_toolbar_set_content_favicon | ( | struct toolbar * | toolbar, |
struct gui_window * | g | ||
) |
Update the favicon in a browser window toolbar to reflect the RISC OS filetype of the content within the supplied window.
If the toolbar currently has a site favicon set, then this call will be ignored.
*toolbar | The toolbar to refresh. |
*g | The gui window to set content favicon for. |
Definition at line 1680 of file toolbar.c.
References ro_gui_url_bar_set_content_favicon(), and toolbar::url.
Referenced by gui_window_new_content().
void ro_toolbar_set_display_buttons | ( | struct toolbar * | toolbar, |
bool | display | ||
) |
Set the display button bar state for a toolbar.
*toolbar | the toolbar to update. |
display | true to display the button bar; else false. |
Definition at line 1703 of file toolbar.c.
References toolbar::buttons, toolbar::buttons_display, ro_gui_button_bar_hide(), ro_toolbar_refresh(), and ro_toolbar_refresh_widget_dimensions().
Referenced by cookie_menu_select(), global_history_menu_select(), hotlist_menu_select(), ro_gui_window_clone_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
void ro_toolbar_set_display_throbber | ( | struct toolbar * | toolbar, |
bool | display | ||
) |
Set the display throbber state for a toolbar.
*toolbar | the toolbar to update. |
display | true to display the throbber; else false. |
Definition at line 1731 of file toolbar.c.
References ro_gui_throbber_hide(), ro_toolbar_refresh(), ro_toolbar_refresh_widget_dimensions(), toolbar::throbber, and toolbar::throbber_display.
Referenced by ro_gui_window_clone_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
void ro_toolbar_set_display_url | ( | struct toolbar * | toolbar, |
bool | display | ||
) |
Set the display URL bar state for a toolbar.
*toolbar | the toolbar to update. |
display | true to display the URL bar; else false. |
Definition at line 1717 of file toolbar.c.
References ro_gui_url_bar_hide(), ro_toolbar_refresh(), ro_toolbar_refresh_widget_dimensions(), toolbar::url, and toolbar::url_display.
Referenced by ro_gui_window_clone_options(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
void ro_toolbar_set_site_favicon | ( | struct toolbar * | toolbar, |
struct hlcache_handle * | h | ||
) |
Update the favicon in a browser window toolbar to the supplied content, or revert to using filetype-based icons.
*toolbar | The toolbar to refresh. |
*h | The new favicon to use, or NULL for none. |
Definition at line 1669 of file toolbar.c.
References ro_gui_url_bar_set_site_favicon(), and toolbar::url.
Referenced by gui_window_set_icon().
void ro_toolbar_set_url | ( | struct toolbar * | toolbar, |
const char * | url, | ||
bool | is_utf8, | ||
bool | set_caret | ||
) |
Set the content of a toolbar's URL field.
*toolbar | the toolbar to update. |
*url | the new url to insert. |
is_utf8 | true if the string is in utf8 encoding; false if it is in local encoding. |
set_caret | true if the caret should be placed in the field; else false. |
Definition at line 1609 of file toolbar.c.
References ro_gui_url_bar_set_url(), and toolbar::url.
Referenced by ro_gui_url_complete_click(), ro_gui_url_complete_keypress(), ro_gui_window_handle_local_keypress(), and ro_gui_window_set_url().
void ro_toolbar_start_throbbing | ( | struct toolbar * | toolbar | ) |
Starts a toolbar throbber, if there is one active.
*toolbar | the toolbar to start throbbing. |
Definition at line 1535 of file toolbar.c.
References ro_gui_throbber_animate(), and toolbar::throbber.
Referenced by gui_window_start_throbber().
void ro_toolbar_stop_throbbing | ( | struct toolbar * | toolbar | ) |
Stops a toolbar throbber, if there is one active.
*toolbar | the toolbar to stop throbbing. |
Definition at line 1543 of file toolbar.c.
References ro_gui_throbber_stop(), and toolbar::throbber.
Referenced by gui_window_stop_throbber().
bool ro_toolbar_take_caret | ( | struct toolbar * | toolbar | ) |
Give a toolbar input focus, placing the caret into the URL bar if one is present.
Currently a toolbar can only accept focus if it has a URL bar.
*toolbar | The toolbar to take the caret. |
Definition at line 1598 of file toolbar.c.
References ro_gui_url_bar_take_caret(), toolbar::url, and toolbar::url_display.
Referenced by gui_window_create(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
void ro_toolbar_theme_update | ( | void | ) |
Force the update of all toolbars to reflect the application of a new theme.
Definition at line 1435 of file toolbar.c.
References toolbar::callbacks, toolbar::client_data, toolbar::next, ro_toolbar_bars, ro_toolbar_destroy(), ro_toolbar_rebuild(), toolbar::theme, and toolbar_callbacks::theme_update.
Referenced by ro_gui_theme_apply().
void ro_toolbar_throb | ( | struct toolbar * | toolbar | ) |
Animate a toolbar throbber, if there is one active.
*toolbar | the toolbar to throb. |
Definition at line 1561 of file toolbar.c.
References ro_gui_throbber_animate(), and toolbar::throbber.
Referenced by ro_gui_throb().
bool ro_toolbar_toggle_edit | ( | struct toolbar * | toolbar | ) |
Toggle toolbar edit mode on the given toolbar.
Only a button bar can be edited, so edit mode can only be toggled if there's an editor button bar defined.
*toolbar | The toolbar to be toggled. |
Definition at line 1780 of file toolbar.c.
References toolbar::buttons, toolbar::buttons_display, toolbar::callbacks, toolbar::client_data, toolbar::editing, toolbar::editor, ro_gui_button_bar_get_config(), ro_gui_button_bar_hide(), ro_toolbar_destroy(), ro_toolbar_rebuild(), ro_toolbar_refresh(), and toolbar_callbacks::save_buttons.
Referenced by cookie_menu_select(), global_history_menu_select(), hotlist_menu_select(), ro_gui_dialog_open_top(), ro_gui_window_menu_select(), and ro_toolbar_menu_select().
void ro_toolbar_update_all_buttons | ( | void | ) |
Force the update of all toolbars buttons to reflect the current state.
Definition at line 1387 of file toolbar.c.
References toolbar::next, ro_toolbar_bars, and ro_toolbar_update_buttons().
void ro_toolbar_update_all_hotlists | ( | void | ) |
Update the state of the URL Bar hotlist icons in all open toolbars.
Definition at line 1630 of file toolbar.c.
References toolbar::next, ro_toolbar_bars, and ro_toolbar_update_hotlist().
Referenced by hotlist_menu_select(), hotlist_toolbar_click(), ro_gui_hotlist_remove_confirmed(), and ro_gui_hotlist_remove_page().
void ro_toolbar_update_client_data | ( | struct toolbar * | toolbar, |
void * | client_data | ||
) |
Change the client data associated with a toolbar's callbacks.
*toolbar | the toolbar whose data is to be updated. |
*client_data | the new client data, or NULL for none. |
Definition at line 1378 of file toolbar.c.
References toolbar::client_data.
void ro_toolbar_update_hotlist | ( | struct toolbar * | toolbar | ) |
Update the state of a toolbar's URL Bar hotlist icon to reflect any changes to the URL or the hotlist contents.
*toolbar | The toolbar to update. |
Definition at line 1645 of file toolbar.c.
References ro_gui_url_bar_update_hotlist(), and toolbar::url.
Referenced by ro_gui_window_action_add_bookmark(), and ro_toolbar_update_all_hotlists().
void ro_toolbar_update_urlsuggest | ( | struct toolbar * | toolbar | ) |
Update the state of the URL suggestion pop-up menu icon on a toolbar.
*toolbar | The toolbar to update. |
Definition at line 1692 of file toolbar.c.
References ro_gui_url_bar_update_urlsuggest(), and toolbar::url.
Referenced by ro_gui_window_update_toolbar_buttons().
struct toolbar * ro_toolbar_window_lookup | ( | wimp_w | w | ) |
Find the toolbar using a given RO window handle for its pane.
w | the window (pane) handle to look up. |
Definition at line 1489 of file toolbar.c.
References toolbar::next, ro_toolbar_bars, and toolbar::toolbar_handle.
Referenced by ro_gui_toolbar_lookup().