navit
0.5.3-trunk
|
Go to the source code of this file.
Functions | |
int | gui_internal_menu_needs_resizing (struct gui_priv *this, struct widget *w, int wdisp, int hdisp) |
Utility function to check if a menu widget is adapted to the display size or needs resizing (if so, the widget dimensions will be set to match those of the display. More... | |
void | gui_internal_menu_destroy (struct gui_priv *this, struct widget *w) |
destroy a menu widget and perform the associated cleanup in the menu & submenu list More... | |
int | gui_internal_widget_reload_href (struct gui_priv *this, struct widget *w) |
Reload a menu from its anchor (href) More... | |
void | gui_internal_prune_menu (struct gui_priv *this, struct widget *w) |
Destroy (discard) all menu screens that have been placed after widget w and redraw the display, showing widget . More... | |
void | gui_internal_prune_menu_count (struct gui_priv *this, int count, int render) |
Destroy (discard) the last count menu screens. More... | |
void | gui_internal_menu_menu_resize (struct gui_priv *this, struct widget *w, void *data, int neww, int newh) |
Resize the box widget (and its children) corresponding to a menu. More... | |
struct widget * | gui_internal_menu (struct gui_priv *this, const char *label) |
Initializes a GUI menu screen. More... | |
struct menu_data * | gui_internal_menu_data (struct gui_priv *this) |
void | gui_internal_menu_reset_pack (struct gui_priv *this) |
void | gui_internal_menu_render (struct gui_priv *this) |
Renders a menu GUI on the display. More... | |
void | gui_internal_menu_resize (struct gui_priv *this, int w, int h) |
Resize the currently displayed menu. More... | |
struct widget * | gui_internal_top_bar (struct gui_priv *this) |
Create an GUI top bar (containing the history of GUI menus and submenus) More... | |
Initializes a GUI menu screen.
This method initializes the internal GUI's screen on which all other elements (such as HTML menus, dialogs or others) are displayed.
It sets up a view hierarchy, which includes a title bar and a client area to hold widgets defined by the caller.
this | The GUI instance |
label | The label to display in the top bar |
References _, widget::background, widget::bb, widget::bl, widget::br, widget::bt, menu_data::button_bar, dbg, widget::flags, flags_expand, flags_fill, widget::func, gravity_center, gravity_left_center, gravity_right_center, gui_internal_apply_config(), gui_internal_back(), gui_internal_box_new(), gui_internal_box_new_with_label(), gui_internal_button_label(), gui_internal_menu_menu_resize(), gui_internal_search_idle_end(), gui_internal_time_help(), gui_internal_top_bar(), gui_internal_widget_append(), gui_internal_widget_pack(), gui_internal_widget_reset_pack(), widget::h, lvl_info, widget::menu_data, widget::on_resize, orientation_horizontal, orientation_horizontal_vertical, orientation_vertical, widget::spx, widget::state, STATE_SENSITIVE, and widget::w.
Referenced by gui_internal_cmd2_about(), gui_internal_cmd2_locale(), gui_internal_cmd2_network_info(), gui_internal_cmd2_route_description(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_rules(), gui_internal_cmd2_setting_vehicle(), gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_bookmarks(), gui_internal_cmd_enter_coord(), gui_internal_cmd_formerdests(), gui_internal_cmd_log(), gui_internal_cmd_map_download(), gui_internal_cmd_map_download_do(), gui_internal_cmd_pois(), gui_internal_cmd_pois_filter(), gui_internal_cmd_position_do(), gui_internal_cmd_rename_bookmark(), gui_internal_cmd_show_nmea_data(), gui_internal_cmd_show_satellite_status(), gui_internal_cmd_view_attribute_details(), gui_internal_cmd_view_attributes(), gui_internal_html_text(), gui_internal_menu_vehicle_settings(), gui_internal_search(), and gui_internal_select_waypoint().
References widget::data, and widget::menu_data.
Referenced by gui_internal_button_label(), gui_internal_cmd_show_nmea_data(), gui_internal_cmd_show_satellite_status(), gui_internal_highlight_possible_keys(), gui_internal_html_text(), gui_internal_keyboard_do(), gui_internal_keyboard_show_native(), gui_internal_keyboard_to_lower_case(), gui_internal_keyboard_to_upper_case(), gui_internal_keyboard_topbox_resize(), gui_internal_keypress_do(), gui_internal_refresh_callback_called(), gui_internal_search(), gui_internal_search_changed(), and gui_internal_set_refresh_callback().
destroy a menu widget and perform the associated cleanup in the menu & submenu list
this | The GUI instance |
w | The menu widget to destroy |
References attr::callback, callback_destroy(), gui_internal_widget_destroy(), menu_data::href, widget::menu_data, object_func_lookup(), menu_data::refresh_callback, object_func::remove_attr, and attr::u.
Referenced by gui_internal_prune_menu_do(), and gui_internal_widget_reload_href().
void gui_internal_menu_menu_resize | ( | struct gui_priv * | this, |
struct widget * | w, | ||
void * | data, | ||
int | neww, | ||
int | newh | ||
) |
Resize the box widget (and its children) corresponding to a menu.
Menus are stored in a main box (topbox) that spawn the entire screen, thus, once the topbox has been resized, it will in turn resize its children, effectively resizing the whole menu display size
Note: once this function has been run, widget w
and its children have been resized, a call to gui_internal_box_render() needs to be done by the caller
this | The internal GUI instance |
w | A box widget corresponding to the menu widget |
data | Some data to pass to the box resize handler |
neww | The new width of the display |
newh | The new height of the display |
References padding::bottom, dbg, graphics_get_data(), gui_internal_box_resize(), widget::h, padding::left, lvl_warning, widget::p, padding::right, padding::top, widget::type, widget::w, widget_box, point::x, and point::y.
Referenced by gui_internal_menu().
int gui_internal_menu_needs_resizing | ( | struct gui_priv * | this, |
struct widget * | w, | ||
int | wdisp, | ||
int | hdisp | ||
) |
Utility function to check if a menu widget is adapted to the display size or needs resizing (if so, the widget dimensions will be set to match those of the display.
this | The GUI instance |
w | The menu widget (top widget that should spawn over the entire display) |
wdisp | The width of the display to check the widget against |
hdisp | The width of the display to check the widget against |
References widget::h, and widget::w.
Referenced by gui_internal_resize().
void gui_internal_menu_render | ( | struct gui_priv * | this | ) |
Renders a menu GUI on the display.
this | The internal GUI instance |
References widget::data, gui_internal_say(), gui_internal_widget_pack(), and gui_internal_widget_render().
Referenced by gui_internal_cmd2_about(), gui_internal_cmd2_locale(), gui_internal_cmd2_network_info(), gui_internal_cmd2_route_description(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_rules(), gui_internal_cmd2_setting_vehicle(), gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_bookmarks(), gui_internal_cmd_enter_coord(), gui_internal_cmd_formerdests(), gui_internal_cmd_log(), gui_internal_cmd_map_download(), gui_internal_cmd_map_download_do(), gui_internal_cmd_pois(), gui_internal_cmd_pois_filter(), gui_internal_cmd_position_do(), gui_internal_cmd_rename_bookmark(), gui_internal_cmd_show_nmea_data(), gui_internal_cmd_show_satellite_status(), gui_internal_cmd_view_attribute_details(), gui_internal_cmd_view_attributes(), gui_internal_html_menu(), gui_internal_html_submit(), gui_internal_keyboard_do(), gui_internal_menu_vehicle_settings(), gui_internal_prune_menu_do(), gui_internal_resize(), gui_internal_route_update(), gui_internal_search(), gui_internal_select_waypoint(), gui_internal_table_button_next(), and gui_internal_table_button_prev().
void gui_internal_menu_reset_pack | ( | struct gui_priv * | this | ) |
References widget::data, and gui_internal_widget_reset_pack().
Referenced by gui_internal_keyboard_do().
void gui_internal_menu_resize | ( | struct gui_priv * | this, |
int | w, | ||
int | h | ||
) |
Resize the currently displayed menu.
this | The internal GUI instance |
w | The new width of the display |
h | the new height of the display |
References widget::data, dbg, gui_internal_apply_config(), lvl_debug, widget::on_resize, and widget::w.
Referenced by gui_internal_prune_menu_do(), and gui_internal_resize().
Destroy (discard) all menu screens that have been placed after widget w
and redraw the display, showing widget .
this | The internal GUI instance |
w | A widget corresponding to the last menu to keep, and to draw (all subsequent menus in the list will be destroyed). NULL if all menus should be destroyed. |
References gui_internal_prune_menu_do().
Referenced by gui_internal_cmd2_back_to_map(), gui_internal_cmd2_quit(), gui_internal_cmd_add_bookmark_do(), gui_internal_cmd_add_bookmark_folder_do(), gui_internal_cmd_copy_bookmark(), gui_internal_cmd_cut_bookmark(), gui_internal_cmd_delete_bookmark(), gui_internal_cmd_delete_bookmark_folder(), gui_internal_cmd_delete_waypoint(), gui_internal_cmd_insert_destination_do(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_log_do(), gui_internal_cmd_main_menu(), gui_internal_cmd_paste_bookmark(), gui_internal_cmd_rename_bookmark_clicked(), gui_internal_cmd_replace_bookmarks_from_waypoints(), gui_internal_cmd_results_map_clean(), gui_internal_cmd_return(), gui_internal_cmd_set_destination(), gui_internal_cmd_set_position(), gui_internal_cmd_view_on_map(), gui_internal_html_main_menu(), gui_internal_keypress(), and gui_internal_prepare_search_results_map().
void gui_internal_prune_menu_count | ( | struct gui_priv * | this, |
int | count, | ||
int | render | ||
) |
Destroy (discard) the last count
menu screens.
this | The internal GUI instance |
count | The number of menus to destroy at the tail of the menu/submenu stack (if <=0, no menu will be destroyed) |
render | whether we should render the new last menu in the stack (render!=0) or not (render==0) |
References widget::data, gui_internal_prune_menu_do(), and widget::w.
Referenced by gui_internal_back(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_set_active_profile(), gui_internal_html_load_href(), and gui_internal_search_country().
Create an GUI top bar (containing the history of GUI menus and submenus)
this | The internal GUI instance |
References _, widget::background, widget::bb, widget::bl, widget::br, widget::bt, widget::data, dbg, widget::flags, flags_expand, flags_fill, widget::foreground, widget::func, gravity_center, gravity_left_center, gravity_right_center, gui_internal_box_new(), gui_internal_button_new_with_callback(), gui_internal_cmd_main_menu(), gui_internal_cmd_return(), gui_internal_label_new(), gui_internal_label_new_abbrev(), gui_internal_top_bar_resize(), gui_internal_widget_append(), gui_internal_widget_destroy(), gui_internal_widget_pack(), image_new_s(), lvl_debug, widget::on_resize, orientation_horizontal, orientation_vertical, widget::speech, widget::spx, widget::state, STATE_SENSITIVE, widget::text, version, widget::w, and width.
Referenced by gui_internal_menu(), and gui_internal_top_bar_resize().
Reload a menu from its anchor (href)
this | The internal GUI context |
w | A widget corresponding to the menu to redraw (this widget should be an html menu, thus it should have a href) |
w
has no href, we will return 0 References gui_internal_html_load_href(), gui_internal_menu_destroy(), and gui_internal_widget_get_href().
Referenced by gui_internal_prune_menu_do(), and gui_internal_resize().