NetSurf
Data Structures | Macros | Functions | Variables
toolbar.c File Reference

Window toolbars (implementation). More...

#include <alloca.h>
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "oslib/dragasprite.h"
#include "oslib/os.h"
#include "oslib/osgbpb.h"
#include "oslib/osfile.h"
#include "oslib/osfind.h"
#include "oslib/osspriteop.h"
#include "oslib/wimpspriteop.h"
#include "oslib/squash.h"
#include "oslib/wimp.h"
#include "oslib/wimpextend.h"
#include "utils/log.h"
#include "utils/nsoption.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
#include "riscos/gui.h"
#include "riscos/gui/button_bar.h"
#include "riscos/gui/throbber.h"
#include "riscos/gui/url_bar.h"
#include "riscos/hotlist.h"
#include "riscos/menus.h"
#include "riscos/save.h"
#include "riscos/theme.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "riscos/window.h"
Include dependency graph for toolbar.c:

Go to the source code of this file.

Data Structures

struct  toolbar
 

Macros

#define TOOLBAR_WIDGET_GUTTER   8
 
#define TOOLBAR_DEFAULT_WIDTH   16384
 
#define TOOLBAR_ROW_TOP   0
 
#define TOOLBAR_ROW_DIV1   1
 
#define TOOLBAR_ROW_EDIT   2
 
#define TOOLBAR_MAX_ROWS   3
 

Functions

static void ro_toolbar_update_current_widgets (struct toolbar *toolbar)
 Update the widgets currently on view in a toolbar. More...
 
static void ro_toolbar_refresh_widget_dimensions (struct toolbar *toolbar)
 Get the minimum dimenstions required by the toolbar widgets after these have changed. More...
 
static void ro_toolbar_reformat_widgets (struct toolbar *toolbar)
 Reformat (reflow) the widgets into the toolbar, based on the toolbar size and the previously calculated widget dimensions. More...
 
static void ro_toolbar_redraw (wimp_draw *redraw)
 Handle redraw request events for a toolbar workarea. More...
 
static bool ro_toolbar_click (wimp_pointer *pointer)
 Process clicks on a toolbar, passing details on to clients where necessary. More...
 
static bool ro_toolbar_keypress (wimp_key *key)
 Process keypresses in a toolbar, passing details on to clients where necessary. More...
 
static bool ro_toolbar_menu_prepare (wimp_w w, wimp_i i, wimp_menu *menu, wimp_pointer *pointer)
 Prepare the toolbar menu for (re-)opening. More...
 
static void ro_toolbar_menu_warning (wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
 Handle submenu warnings for the toolbar menu. More...
 
static bool ro_toolbar_menu_select (wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
 Handle selections from the toolbar menu. More...
 
static const char * ro_toolbar_get_help_suffix (wimp_w w, wimp_i i, os_coord *pos, wimp_mouse_state buttons)
 Translate the contents of a message_HELP_REQUEST into a suffix for a NetSurf message token. More...
 
static void ro_toolbar_update_buttons (struct toolbar *toolbar)
 Update the state of a toolbar's buttons. More...
 
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_page_info_change (struct toolbar *toolbar)
 Update the page information indicator. 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...
 

Variables

static struct toolbarro_toolbar_bars = NULL
 The list of defined toolbars. More...
 
wimp_menu * toolbar_menu
 The Toolber Menu. More...
 
static wimp_window ro_toolbar_window
 
static char ro_toolbar_null_string [] = ""
 
static char ro_toolbar_line_validation [] = "R2"
 

Detailed Description

Window toolbars (implementation).

Definition in file toolbar.c.

Macro Definition Documentation

◆ TOOLBAR_DEFAULT_WIDTH

#define TOOLBAR_DEFAULT_WIDTH   16384

Definition at line 64 of file toolbar.c.

◆ TOOLBAR_MAX_ROWS

#define TOOLBAR_MAX_ROWS   3

Definition at line 72 of file toolbar.c.

◆ TOOLBAR_ROW_DIV1

#define TOOLBAR_ROW_DIV1   1

Definition at line 70 of file toolbar.c.

◆ TOOLBAR_ROW_EDIT

#define TOOLBAR_ROW_EDIT   2

Definition at line 71 of file toolbar.c.

◆ TOOLBAR_ROW_TOP

#define TOOLBAR_ROW_TOP   0

Definition at line 69 of file toolbar.c.

◆ TOOLBAR_WIDGET_GUTTER

#define TOOLBAR_WIDGET_GUTTER   8

Definition at line 63 of file toolbar.c.

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

bool ro_toolbar_click ( wimp_pointer *  pointer)
static

Process clicks on a toolbar, passing details on to clients where necessary.

Parameters
*pointerThe wimp mouse click event.
Returns
True if the event was handled; else false.

Definition at line 1049 of file toolbar.c.

References toolbar_action::button, toolbar::buttons, toolbar::buttons_display, toolbar::callbacks, toolbar::client_data, toolbar::editing, toolbar::editor, NSLOG, ro_gui_button_bar_click(), ro_gui_url_bar_click(), ro_gui_url_bar_test_for_text_field_click(), ro_gui_url_complete_close(), ro_gui_url_complete_start(), ro_gui_wimp_event_get_user_data(), ro_warn_user(), TOOLBAR_ACTION_BUTTON, TOOLBAR_ACTION_URL, TOOLBAR_BUTTON_NONE, toolbar::toolbar_handle, TOOLBAR_URL_NONE, toolbar::url, toolbar_action::url, toolbar::url_display, and toolbar_callbacks::user_action.

Referenced by 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_help_suffix()

const char * ro_toolbar_get_help_suffix ( wimp_w  w,
wimp_i  i,
os_coord *  pos,
wimp_mouse_state  buttons 
)
static

Translate the contents of a message_HELP_REQUEST into a suffix for a NetSurf message token.

The help system will then add this to whatever prefix the current toolbar has registered with WimpEvent.

Parameters
wThe window handle under the mouse.
iThe icon handle under the mouse.
*posThe mouse position.
buttonsThe mouse button state.
Returns
The required help token suffix.

Definition at line 1333 of file toolbar.c.

References toolbar::buttons, toolbar::buttons_display, NSLOG, ro_gui_button_bar_help_suffix(), ro_gui_throbber_help_suffix(), ro_gui_url_bar_help_suffix(), ro_gui_wimp_event_get_user_data(), ro_warn_user(), toolbar::throbber, toolbar::throbber_display, toolbar::toolbar_handle, toolbar::url, and toolbar::url_display.

Referenced by ro_toolbar_rebuild().

Here is the call graph for this function:
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_keypress()

bool ro_toolbar_keypress ( wimp_key *  key)
static

Process keypresses in a toolbar, passing details on to clients where necessary.

Parameters
*keyThe wimp key press event.
Returns
True if the event was handled; else false.

Definition at line 1146 of file toolbar.c.

References toolbar::callbacks, toolbar::client_data, toolbar_callbacks::key_press, ro_gui_url_bar_test_for_text_field_keypress(), ro_gui_url_complete_keypress(), ro_gui_wimp_event_get_user_data(), toolbar::url, and toolbar::url_display.

Referenced by ro_toolbar_rebuild().

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

◆ ro_toolbar_menu_prepare()

bool ro_toolbar_menu_prepare ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_pointer *  pointer 
)
static

Prepare the toolbar menu for (re-)opening.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
*menuThe menu about to be opened.
*pointerPointer to the relevant wimp event block, or NULL for an Adjust click.
Returns
true if the event was handled; else false.

Definition at line 1189 of file toolbar.c.

References toolbar::buttons, ro_gui_menu_set_entry_shaded(), ro_gui_menu_set_entry_ticked(), ro_gui_url_bar_menu_prepare(), ro_gui_wimp_event_get_user_data(), ro_toolbar_menu_buttons_tick, ro_toolbar_menu_edit_shade, ro_toolbar_menu_edit_tick, ro_toolbar_menu_option_shade, ro_toolbar_menu_throbber_tick, ro_toolbar_menu_url_tick, toolbar::throbber, TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, toolbar_menu, TOOLBAR_THROBBER, and toolbar::url.

Referenced by ro_toolbar_rebuild().

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

◆ ro_toolbar_menu_select()

bool ro_toolbar_menu_select ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle selections from the toolbar menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
*menuThe menu from which the selection was made.
*selectionThe wimp menu selection data.
actionThe selected menu action.
Returns
true if action accepted; else false.

Definition at line 1274 of file toolbar.c.

References ro_gui_url_bar_menu_select(), ro_gui_wimp_event_get_user_data(), ro_toolbar_get_display_buttons(), ro_toolbar_get_display_throbber(), ro_toolbar_get_display_url(), ro_toolbar_set_display_buttons(), ro_toolbar_set_display_throbber(), ro_toolbar_set_display_url(), ro_toolbar_take_caret(), ro_toolbar_toggle_edit(), TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, toolbar_menu, TOOLBAR_THROBBER, and toolbar::url.

Referenced by ro_toolbar_rebuild().

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

◆ ro_toolbar_menu_warning()

void ro_toolbar_menu_warning ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle submenu warnings for the toolbar menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
*menuThe menu to which the warning applies.
*selectionThe wimp menu selection data.
actionThe selected menu action.

Definition at line 1256 of file toolbar.c.

Referenced by ro_toolbar_rebuild().

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

void ro_toolbar_redraw ( wimp_draw *  redraw)
static

Handle redraw request events for a toolbar workarea.

Parameters
*redrawThe redraw block for the event.

Definition at line 1001 of file toolbar.c.

References toolbar::buttons, toolbar::buttons_display, toolbar::editing, toolbar::editor, NSLOG, ro_gui_button_bar_redraw(), ro_gui_url_bar_redraw(), ro_gui_wimp_event_get_user_data(), ro_plot_origin_x, ro_plot_origin_y, ro_warn_user(), toolbar::url, and toolbar::url_display.

Referenced by ro_toolbar_rebuild().

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

◆ ro_toolbar_reformat_widgets()

void ro_toolbar_reformat_widgets ( struct toolbar toolbar)
static

Reformat (reflow) the widgets into the toolbar, based on the toolbar size and the previously calculated widget dimensions.

Parameters
*toolbarThe toolbar to reformat.

Definition at line 859 of file toolbar.c.

References toolbar::buttons, toolbar::buttons_display, toolbar::buttons_size, toolbar::clip_width, toolbar::editing, toolbar::editor, toolbar::editor_div1, toolbar::editor_size, ro_gui_button_bar_set_extent(), ro_gui_throbber_set_extent(), ro_gui_url_bar_set_extent(), toolbar::row_y0, toolbar::row_y1, toolbar::throbber, toolbar::throbber_display, toolbar::throbber_right, toolbar::throbber_size, toolbar::toolbar_handle, TOOLBAR_ROW_DIV1, TOOLBAR_ROW_EDIT, TOOLBAR_ROW_TOP, TOOLBAR_WIDGET_GUTTER, toolbar::url, toolbar::url_display, and toolbar::url_size.

Referenced by ro_toolbar_process(), and ro_toolbar_update_current_widgets().

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

void ro_toolbar_refresh_widget_dimensions ( struct toolbar toolbar)
static

Get the minimum dimenstions required by the toolbar widgets after these have changed.

The minimum dimensions are assumed not to change unless we change theme (ie. we rebuild the bar) or we knowingly alter a widget (eg. we add or remove button-bar buttons).

Parameters
*toolbarThe toolbar to refresh.

Definition at line 724 of file toolbar.c.

References toolbar::buttons, toolbar::buttons_display, toolbar::buttons_size, toolbar::editing, toolbar::editor, toolbar::editor_size, toolbar::full_height, toolbar::full_width, height, ro_gui_button_bar_get_dims(), ro_gui_throbber_get_dims(), ro_gui_url_bar_get_dims(), toolbar::row_y0, toolbar::row_y1, toolbar::throbber, toolbar::throbber_display, toolbar::throbber_size, TOOLBAR_ROW_DIV1, TOOLBAR_ROW_EDIT, TOOLBAR_ROW_TOP, TOOLBAR_WIDGET_GUTTER, toolbar::url, toolbar::url_display, toolbar::url_size, and width.

Referenced by ro_toolbar_rebuild(), ro_toolbar_set_button_order(), ro_toolbar_set_display_buttons(), ro_toolbar_set_display_throbber(), ro_toolbar_set_display_url(), 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_buttons()

void ro_toolbar_update_buttons ( struct toolbar toolbar)
static

Update the state of a toolbar's buttons.

Parameters
toolbarthe toolbar to update

Definition at line 1406 of file toolbar.c.

References toolbar::callbacks, toolbar::client_data, and toolbar_callbacks::update_buttons.

Referenced by ro_toolbar_rebuild(), and ro_toolbar_update_all_buttons().

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

void ro_toolbar_update_current_widgets ( struct toolbar toolbar)
static

Update the widgets currently on view in a toolbar.

This can be used generally, but is primarily offered to widgets as a way for them to force an update.

Parameters
*toolbarThe toolbar to update.

Definition at line 695 of file toolbar.c.

References toolbar::full_height, ro_toolbar_reformat_widgets(), ro_toolbar_refresh(), and ro_toolbar_refresh_widget_dimensions().

Referenced by ro_toolbar_add_buttons().

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

◆ 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:

Variable Documentation

◆ ro_toolbar_bars

struct toolbar* ro_toolbar_bars = NULL
static

◆ ro_toolbar_line_validation

char ro_toolbar_line_validation[] = "R2"
static

Definition at line 172 of file toolbar.c.

Referenced by ro_toolbar_rebuild().

◆ ro_toolbar_null_string

char ro_toolbar_null_string[] = ""
static

Definition at line 171 of file toolbar.c.

Referenced by ro_toolbar_rebuild().

◆ ro_toolbar_window

wimp_window ro_toolbar_window
static
Initial value:
= {
{0, 0, 1, 1},
0,
0,
wimp_TOP,
wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_MOVEABLE | wimp_WINDOW_NO_BOUNDS |
wimp_WINDOW_FURNITURE_WINDOW |
wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT,
wimp_COLOUR_BLACK,
wimp_COLOUR_LIGHT_GREY,
wimp_COLOUR_LIGHT_GREY,
wimp_COLOUR_VERY_LIGHT_GREY,
wimp_COLOUR_DARK_GREY,
wimp_COLOUR_MID_LIGHT_GREY,
wimp_COLOUR_CREAM,
wimp_WINDOW_NEVER3D | 0x16u ,
{0, 0, TOOLBAR_DEFAULT_WIDTH, 16384},
0,
wimp_BUTTON_DOUBLE_CLICK_DRAG << wimp_ICON_BUTTON_TYPE_SHIFT,
wimpspriteop_AREA,
1,
1,
{""},
0,
{ }
}
#define TOOLBAR_DEFAULT_WIDTH
Definition: toolbar.c:64

Definition at line 144 of file toolbar.c.

Referenced by ro_toolbar_rebuild().

◆ toolbar_menu

wimp_menu* toolbar_menu

The Toolber Menu.

Definition at line 138 of file toolbar.c.

Referenced by ro_toolbar_init(), ro_toolbar_menu_prepare(), ro_toolbar_menu_select(), and ro_toolbar_rebuild().