NetSurf
Data Structures | Macros | Enumerations | Functions
toolbar.h File Reference

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"
Include dependency graph for toolbar.h:
This graph shows which files directly or indirectly include this file:

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 toolbarro_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 toolbarro_toolbar_parent_window_lookup (wimp_w w)
 Find the toolbar associated with a given RO window handle. More...
 
struct toolbarro_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...
 

Detailed Description

Window toolbars (interface).

Definition in file toolbar.h.

Macro Definition Documentation

◆ ro_toolbar_menu_buttons_tick

#define ro_toolbar_menu_buttons_tick (   toolbar)
Value:
ro_toolbar_get_editing(toolbar))
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.
Definition: toolbar.c:1745

Definition at line 85 of file toolbar.h.

◆ ro_toolbar_menu_edit_shade

#define ro_toolbar_menu_edit_shade (   toolbar)    ((toolbar) == NULL)

Definition at line 95 of file toolbar.h.

◆ ro_toolbar_menu_edit_tick

#define ro_toolbar_menu_edit_tick (   toolbar)    (ro_toolbar_get_editing(toolbar))

Definition at line 97 of file toolbar.h.

◆ ro_toolbar_menu_option_shade

#define ro_toolbar_menu_option_shade (   toolbar)     (((toolbar) == NULL) || ro_toolbar_get_editing(toolbar))

Definition at line 82 of file toolbar.h.

◆ ro_toolbar_menu_throbber_tick

#define ro_toolbar_menu_throbber_tick (   toolbar)     (ro_toolbar_get_display_throbber(toolbar))

Definition at line 92 of file toolbar.h.

◆ ro_toolbar_menu_url_tick

#define ro_toolbar_menu_url_tick (   toolbar)     (ro_toolbar_get_display_url(toolbar))

Definition at line 89 of file toolbar.h.

Enumeration Type Documentation

◆ toolbar_action_type

Widget action types that the toolbar can pass on to clients.

Enumerator
TOOLBAR_ACTION_NONE 
TOOLBAR_ACTION_BUTTON 
TOOLBAR_ACTION_URL 

Definition at line 43 of file toolbar.h.

◆ toolbar_flags

Enumerator
TOOLBAR_FLAGS_NONE 
TOOLBAR_FLAGS_DISPLAY 
TOOLBAR_FLAGS_EDIT 

Definition at line 33 of file toolbar.h.

Function Documentation

◆ ro_toolbar_add_buttons()

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.

Parameters
*toolbarThe toolbar to take the button bar.
buttons[]The button definitions.
*button_orderThe initial button order to use.
Returns
true if the action completed; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_add_throbber()

bool ro_toolbar_add_throbber ( struct toolbar toolbar)

Add a throbber to a toolbar.

Parameters
*toolbarThe toolbar to take the throbber.
Returns
true if the action completed; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_add_url()

bool ro_toolbar_add_url ( struct toolbar toolbar)

Add a URL bar to a toolbar.

Parameters
*toolbarThe toolbar to take the URL bar.
Returns
true if the action completed; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_attach()

bool ro_toolbar_attach ( struct toolbar toolbar,
wimp_w  parent 
)

Attach or re-attach a toolbar to its parent window.

Parameters
*toolbarThe toolbar to attach.
parentThe window to attach the toolbar to.
Returns
true if the operation succeeded; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_create()

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.

Parameters
*descriptorThe theme to apply, or NULL for the default.
parentThe window to attach the toolbar to, or NULL.
styleThe theme style to apply.
bar_flagsToolbar flags for the new bar.
*callbacksA client callback block, or NULL for none.
*client_dataA data pointer to pass to callbacks, or NULL.
*helpThe Help token prefix for interactive help.
Returns
The handle of the new bar, or NULL on failure.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_destroy()

void ro_toolbar_destroy ( struct toolbar toolbar)

Destroy a toolbar after use.

Parameters
*toolbarThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_full_height()

int ro_toolbar_full_height ( struct toolbar toolbar)

Return the full height that a toolbar could grow to, if space is available.

Parameters
*toolbarThe toolbar of interest.
Returns
The full toolbar height in OS units.

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().

Here is the caller graph for this function:

◆ ro_toolbar_get_display_buttons()

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.

Parameters
*toolbarthe toolbar of interest.
Returns
true if the toolbar exists and the button bar is shown; else false.

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().

Here is the caller graph for this function:

◆ ro_toolbar_get_display_throbber()

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.

Parameters
*toolbarthe toolbar of interest.
Returns
true if the toolbar exists and the throbber is shown; else false.

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().

Here is the caller graph for this function:

◆ ro_toolbar_get_display_url()

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.

Parameters
*toolbarthe toolbar of interest.
Returns
true if the toolbar exists and the URL bar is shown; else false.

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().

Here is the caller graph for this function:

◆ ro_toolbar_get_editing()

bool ro_toolbar_get_editing ( struct toolbar toolbar)

Return true or false depending on whether the given toolbar is currently being edited.

Parameters
*toolbarthe toolbar of interest.
Returns
true if the toolbar exists and is beng edited; else false.

Definition at line 1772 of file toolbar.c.

References toolbar::editing.

Referenced by ro_gui_dialog_open_top().

Here is the caller graph for this function:

◆ ro_toolbar_get_parent_window()

wimp_w ro_toolbar_get_parent_window ( struct toolbar toolbar)

Return the RO window handle of the parent window for a toolbar.

Parameters
*toolbarthe toolbar to look up.
Returns
the RO window handle of the parent.

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().

Here is the caller graph for this function:

◆ ro_toolbar_get_url()

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.

Parameters
*toolbarThe toolbar to look up the URL from.
Returns
pointer to the URL, or NULL.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_get_url_field_extent()

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.

Parameters
*toolbarThe toolbar to look up.
*extentReturn the coordinates.
Returns
true if successful; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_get_window()

wimp_w ro_toolbar_get_window ( struct toolbar toolbar)

Return the RO window handle of a toolbar.

Parameters
*toolbarthe toolbar to look up.
Returns
the RO window handle of the bar.

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().

Here is the caller graph for this function:

◆ ro_toolbar_height()

int ro_toolbar_height ( struct toolbar toolbar)

Return the current height of a toolbar, allowing for available window space.

Parameters
*toolbarThe toolbar of interest.
Returns
The current toolbar height in OS units.

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().

Here is the caller graph for this function:

◆ ro_toolbar_init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_page_info_change()

void ro_toolbar_page_info_change ( struct toolbar toolbar)

Update the page information indicator.

Parameters
toolbarthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_parent_window_lookup()

struct toolbar * ro_toolbar_parent_window_lookup ( wimp_w  w)

Find the toolbar associated with a given RO window handle.

Parameters
wthe window handle to look up.
Returns
the toolbar handle, or NULL if a match wasn't found.

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().

Here is the caller graph for this function:

◆ ro_toolbar_process()

bool ro_toolbar_process ( struct toolbar toolbar,
int  width,
bool  reformat 
)

Process a toolbar, updating its contents for a size or content change.

Parameters
*toolbarThe toolbar to update.
widthThe width to reformat to, or -1 to use parent.
reformattrue to force a widget reflow; else false.
Returns
true if the operation succeeded; 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_rebuild()

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.

Parameters
*toolbarThe toolbar to rebuild.
Returns
true if the action was successful; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_refresh()

void ro_toolbar_refresh ( struct toolbar toolbar)

Refresh a toolbar after it has been updated.

Parameters
toolbarthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_button_order()

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.

Parameters
*toolbarThe toolbar to change.
order[]The new button configuration.
Returns
true of the order was updated; else false.

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().

Here is the call graph for this function:

◆ ro_toolbar_set_button_shaded_state()

void ro_toolbar_set_button_shaded_state ( struct toolbar toolbar,
button_bar_action  action,
bool  shaded 
)

Set the shaded state of a toolbar button.

Parameters
*toolbarthe toolbar to update.
actionthe button action to update.
shadedtrue 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_content_favicon()

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.

Parameters
*toolbarThe toolbar to refresh.
*gThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_display_buttons()

void ro_toolbar_set_display_buttons ( struct toolbar toolbar,
bool  display 
)

Set the display button bar state for a toolbar.

Parameters
*toolbarthe toolbar to update.
displaytrue 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_display_throbber()

void ro_toolbar_set_display_throbber ( struct toolbar toolbar,
bool  display 
)

Set the display throbber state for a toolbar.

Parameters
*toolbarthe toolbar to update.
displaytrue 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_display_url()

void ro_toolbar_set_display_url ( struct toolbar toolbar,
bool  display 
)

Set the display URL bar state for a toolbar.

Parameters
*toolbarthe toolbar to update.
displaytrue 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_site_favicon()

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.

Parameters
*toolbarThe toolbar to refresh.
*hThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_set_url()

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.

Parameters
*toolbarthe toolbar to update.
*urlthe new url to insert.
is_utf8true if the string is in utf8 encoding; false if it is in local encoding.
set_carettrue 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_start_throbbing()

void ro_toolbar_start_throbbing ( struct toolbar toolbar)

Starts a toolbar throbber, if there is one active.

Parameters
*toolbarthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_stop_throbbing()

void ro_toolbar_stop_throbbing ( struct toolbar toolbar)

Stops a toolbar throbber, if there is one active.

Parameters
*toolbarthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_take_caret()

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.

Parameters
*toolbarThe toolbar to take the caret.
Returns
true if the caret was taken; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_theme_update()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_throb()

void ro_toolbar_throb ( struct toolbar toolbar)

Animate a toolbar throbber, if there is one active.

Parameters
*toolbarthe toolbar to throb.

Definition at line 1561 of file toolbar.c.

References ro_gui_throbber_animate(), and toolbar::throbber.

Referenced by ro_gui_throb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_toggle_edit()

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.

Parameters
*toolbarThe toolbar to be toggled.
Returns
true if the action was successful; false if the action failed and the toolbar was destroyed.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_update_all_buttons()

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().

Here is the call graph for this function:

◆ ro_toolbar_update_all_hotlists()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_update_client_data()

void ro_toolbar_update_client_data ( struct toolbar toolbar,
void *  client_data 
)

Change the client data associated with a toolbar's callbacks.

Parameters
*toolbarthe toolbar whose data is to be updated.
*client_datathe new client data, or NULL for none.

Definition at line 1378 of file toolbar.c.

References toolbar::client_data.

◆ ro_toolbar_update_hotlist()

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.

Parameters
*toolbarThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_update_urlsuggest()

void ro_toolbar_update_urlsuggest ( struct toolbar toolbar)

Update the state of the URL suggestion pop-up menu icon on a toolbar.

Parameters
*toolbarThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_toolbar_window_lookup()

struct toolbar * ro_toolbar_window_lookup ( wimp_w  w)

Find the toolbar using a given RO window handle for its pane.

Parameters
wthe window (pane) handle to look up.
Returns
the toolbar handle, or NULL if a match wasn't found.

Definition at line 1489 of file toolbar.c.

References toolbar::next, ro_toolbar_bars, and toolbar::toolbar_handle.

Referenced by ro_gui_toolbar_lookup().

Here is the caller graph for this function: