NetSurf
|
Go to the source code of this file.
Data Structures | |
struct | ns_menu_entry |
struct | ns_menu |
Functions | |
void | ro_gui_menu_init (void) |
Create menu structures. More... | |
void | ro_gui_menu_create (wimp_menu *menu, int x, int y, wimp_w w) |
Display a menu. More... | |
void | ro_gui_menu_destroy (void) |
Forcibly close any menu or transient dialogue box that is currently open. More... | |
void | ro_gui_popup_menu (wimp_menu *menu, wimp_w w, wimp_i i) |
Display a pop-up menu next to the specified icon. More... | |
void | ro_gui_menu_window_changed (wimp_w from, wimp_w to) |
Allow the current menu window to change, if the window is deleted and recreated while a menu is active on an Adjust-click. More... | |
void | ro_gui_menu_selection (wimp_selection *selection) |
Handle menu selection. More... | |
void | ro_gui_menu_warning (wimp_message_menu_warning *warning) |
Handle Message_MenuWarning. More... | |
void | ro_gui_menu_message_deleted (wimp_message_menus_deleted *deleted) |
Handle Message_MenusDeleted, removing our current record of an open menu if it matches the deleted menu handle. More... | |
void | ro_gui_menu_refresh (wimp_menu *menu) |
Update the current menu by sending it a Menu Prepare event through wimp_event and then reopening it if the contents has changed. More... | |
void | ro_gui_menu_init_structure (wimp_menu *menu, int entries) |
Initialise the basic state of a menu structure so all entries are indirected text with no flags, no submenu. More... | |
const char * | ro_gui_menu_find_menu_entry_key (wimp_menu *menu, const char *translated) |
Finds the key associated with a menu entry translation. More... | |
wimp_menu * | ro_gui_menu_define_menu (const struct ns_menu *menu) |
Creates a wimp_menu and adds it to the list to handle actions for. More... | |
void | ro_gui_menu_set_entry_shaded (wimp_menu *menu, menu_action action, bool shaded) |
Sets an action within a menu as having a specific ticked status. More... | |
void | ro_gui_menu_set_entry_ticked (wimp_menu *menu, menu_action action, bool ticked) |
Sets an action within a menu as having a specific ticked status. More... | |
Variables | |
wimp_menu * | image_quality_menu |
The available menus. More... | |
wimp_menu * | proxy_type_menu |
wimp_menu * | languages_menu |
wimp_menu * | current_menu |
The current menu being worked with (may not be open) More... | |
enum menu_action |
void ro_gui_menu_create | ( | wimp_menu * | menu, |
int | x, | ||
int | y, | ||
wimp_w | w | ||
) |
Display a menu.
*menu | Pointer to the menu to be displayed. |
x | The x position. |
y | The y position. |
w | The window that the menu belongs to. |
Definition at line 211 of file menus.c.
References current_menu, current_menu_icon, current_menu_open, current_menu_window, menu_definition::menu, NSLOG, ro_gui_menu_closed(), ro_gui_menu_find_menu(), ro_gui_menu_translate(), and ro_warn_user().
Referenced by gui_window_create_form_select_menu(), ro_gui_menu_selection(), ro_gui_popup_menu(), and ro_gui_wimp_event_process_window_menu_click().
wimp_menu * ro_gui_menu_define_menu | ( | const struct ns_menu * | menu | ) |
Creates a wimp_menu and adds it to the list to handle actions for.
menu | The data to create the menu with |
Definition at line 510 of file menus.c.
References die(), menu_definition::menu, menu_definition::next, ro_gui_menu_define_menu_add(), ro_gui_menu_definitions, and ro_gui_menu_translate().
Referenced by ro_cookie_init(), ro_global_history_init(), ro_gui_iconbar_initialise(), ro_gui_menu_init(), ro_gui_window_initialise(), ro_hotlist_init(), and ro_toolbar_init().
void ro_gui_menu_destroy | ( | void | ) |
Forcibly close any menu or transient dialogue box that is currently open.
Definition at line 288 of file menus.c.
References current_menu, NSLOG, ro_gui_menu_closed(), and ro_warn_user().
Referenced by gui_window_create_form_select_menu(), gui_window_destroy(), ro_gui_wimp_event_keypress(), ro_gui_wimp_event_mouse_click(), ro_gui_wimp_event_ok_click(), ro_gui_window_prepare_form_select_menu(), and ro_print_cleanup().
const char * ro_gui_menu_find_menu_entry_key | ( | wimp_menu * | menu, |
const char * | translated | ||
) |
Finds the key associated with a menu entry translation.
menu | the menu to search |
translated | the translated text |
Definition at line 735 of file menus.c.
References menu_definition::entries, menu_definition_entry::entry_key, menu_definition::menu, menu_definition_entry::menu_entry, menu_definition_entry::next, and ro_gui_menu_find_menu().
Referenced by ro_gui_options_language_ok().
void ro_gui_menu_init | ( | void | ) |
Create menu structures.
Definition at line 116 of file menus.c.
References image_quality_menu, languages_menu, NO_ACTION, proxy_type_menu, ro_gui_menu_define_menu(), and ro_gui_url_suggest_init().
Referenced by gui_init().
void ro_gui_menu_init_structure | ( | wimp_menu * | menu, |
int | entries | ||
) |
Initialise the basic state of a menu structure so all entries are indirected text with no flags, no submenu.
Definition at line 682 of file menus.c.
References DEFAULT_FLAGS.
Referenced by ro_gui_menu_define_menu_add(), ro_gui_options_fonts_init_menu(), ro_gui_search_init(), ro_gui_window_prepare_form_select_menu(), and wimp_MENU().
void ro_gui_menu_message_deleted | ( | wimp_message_menus_deleted * | deleted | ) |
Handle Message_MenusDeleted, removing our current record of an open menu if it matches the deleted menu handle.
*deleted | The message block. |
Definition at line 442 of file menus.c.
References current_menu, and ro_gui_menu_closed().
Referenced by ro_gui_user_message().
void ro_gui_menu_refresh | ( | wimp_menu * | menu | ) |
Update the current menu by sending it a Menu Prepare event through wimp_event and then reopening it if the contents has changed.
*menu | The menu to refresh: if 0, the current menu will be refreshed regardless, otherwise it will be refreshed only if it matches the supplied handle. |
Definition at line 475 of file menus.c.
References current_menu, current_menu_icon, current_menu_open, current_menu_window, NSLOG, ro_gui_menu_get_checksum(), ro_gui_wimp_event_prepare_menu(), and ro_warn_user().
Referenced by gui_window_new_content(), gui_window_start_throbber(), and gui_window_stop_throbber().
void ro_gui_menu_selection | ( | wimp_selection * | selection | ) |
Handle menu selection.
Definition at line 326 of file menus.c.
References current_menu, current_menu_icon, current_menu_window, menu_definition::entries, NSLOG, ro_gui_menu_closed(), ro_gui_menu_create(), ro_gui_menu_find_action(), ro_gui_wimp_event_menu_selection(), and ro_warn_user().
Referenced by ro_gui_handle_event().
void ro_gui_menu_set_entry_shaded | ( | wimp_menu * | menu, |
menu_action | action, | ||
bool | shaded | ||
) |
Sets an action within a menu as having a specific ticked status.
menu | the menu containing the action |
action | the action to tick/untick |
shaded | whether to set the item as shaded |
Definition at line 804 of file menus.c.
References menu_definition_entry::action, menu_definition::entries, menu_definition::menu, menu_definition_entry::menu_entry, menu_definition_entry::next, and ro_gui_menu_find_menu().
Referenced by cookie_menu_prepare(), global_history_menu_prepare(), hotlist_menu_prepare(), ro_gui_window_menu_prepare(), and ro_toolbar_menu_prepare().
void ro_gui_menu_set_entry_ticked | ( | wimp_menu * | menu, |
menu_action | action, | ||
bool | ticked | ||
) |
Sets an action within a menu as having a specific ticked status.
menu | the menu containing the action |
action | the action to tick/untick |
ticked | whether to set the item as ticked |
Definition at line 831 of file menus.c.
References menu_definition_entry::action, menu_definition_entry::menu_entry, and ro_gui_menu_find_entry().
Referenced by cookie_menu_prepare(), global_history_menu_prepare(), hotlist_menu_prepare(), ro_gui_window_menu_prepare(), and ro_toolbar_menu_prepare().
void ro_gui_menu_warning | ( | wimp_message_menu_warning * | warning | ) |
Handle Message_MenuWarning.
Definition at line 381 of file menus.c.
References current_menu, current_menu_icon, current_menu_window, menu_definition::entries, IS_MENU, NSLOG, ro_gui_menu_find_action(), ro_gui_wimp_event_register_submenu(), ro_gui_wimp_event_submenu_warning(), ro_gui_wimp_update_window_furniture(), and ro_warn_user().
Referenced by ro_gui_user_message().
void ro_gui_menu_window_changed | ( | wimp_w | from, |
wimp_w | to | ||
) |
Allow the current menu window to change, if the window is deleted and recreated while a menu is active on an Adjust-click.
from | The original window handle. |
to | The new replacement window handle. |
Definition at line 314 of file menus.c.
References current_menu_window, from, and to.
Referenced by ro_gui_wimp_event_transfer().
void ro_gui_popup_menu | ( | wimp_menu * | menu, |
wimp_w | w, | ||
wimp_i | i | ||
) |
Display a pop-up menu next to the specified icon.
menu | menu to open |
w | window handle |
i | icon handle |
Definition at line 251 of file menus.c.
References current_menu_icon, menu_definition::menu, NSLOG, ro_gui_menu_create(), and ro_warn_user().
Referenced by ro_gui_wimp_event_mouse_click().
|
extern |
The current menu being worked with (may not be open)
Definition at line 96 of file menus.c.
Referenced by ro_gui_interactive_help_request(), ro_gui_menu_closed(), ro_gui_menu_create(), ro_gui_menu_destroy(), ro_gui_menu_get_checksum(), ro_gui_menu_message_deleted(), ro_gui_menu_refresh(), ro_gui_menu_selection(), ro_gui_menu_warning(), and ro_gui_wimp_event_mouse_click().
|
extern |
The available menus.
Definition at line 104 of file menus.c.
Referenced by ro_gui_menu_init(), ro_gui_options_image_click(), ro_gui_options_image_initialise(), and ro_gui_options_image_read().