navit
0.5.3-trunk
|
Go to the source code of this file.
Data Structures | |
struct | gui_config_settings |
A structure to store configuration values. More... | |
struct | route_data |
struct | gui_priv |
struct | gui_priv::html |
struct | gui_priv::gesture_elem |
struct | menu_data |
struct | heightline |
struct | diagram_point |
Functions | |
struct graphics_image * | image_new_xs (struct gui_priv *this, const char *name) |
Displays an image scaled to xs (extra small) size. More... | |
struct graphics_image * | image_new_s (struct gui_priv *this, const char *name) |
Displays an image scaled to s (small) size. More... | |
struct graphics_image * | image_new_l (struct gui_priv *this, const char *name) |
Displays an image scaled to l (large) size. More... | |
struct widget * | gui_internal_button_navit_attr_new (struct gui_priv *this, const char *text, enum flags flags, struct attr *on, struct attr *off) |
struct widget * | gui_internal_button_map_attr_new (struct gui_priv *this, const char *text, enum flags flags, struct map *map, struct attr *on, struct attr *off, int deflt) |
void | gui_internal_say (struct gui_priv *this, struct widget *w, int questionmark) |
void | gui_internal_back (struct gui_priv *this, struct widget *w, void *data) |
void | gui_internal_cmd_return (struct gui_priv *this, struct widget *wm, void *data) |
void | gui_internal_cmd_main_menu (struct gui_priv *this, struct widget *wm, void *data) |
struct widget * | gui_internal_time_help (struct gui_priv *this) |
void | gui_internal_apply_config (struct gui_priv *this) |
void | gui_internal_select_waypoint (struct gui_priv *this, const char *title, const char *hint, struct widget *wm_, void(*cmd)(struct gui_priv *priv, struct widget *widget, void *data), void *data) |
void | gui_internal_call_linked_on_finish (struct gui_priv *this, struct widget *wm, void *data) |
Generic notification function for Editable widgets to call Another widget notification function when Enter is pressed in editable field. The Editable widget should have data member pointing to the Another widget. More... | |
char * | removecase (char *s) |
Remove the case in a string. More... | |
void | gui_internal_cmd_position_do (struct gui_priv *this, struct pcoord *pc_in, struct coord_geo *g_in, struct widget *wm, const char *name, int flags) |
Displays the commands available for a location. More... | |
void | gui_internal_cmd_position (struct gui_priv *this, struct widget *wm, void *data) |
void | gui_internal_cmd_bookmarks (struct gui_priv *this, struct widget *wm, void *data) |
void | gui_internal_keypress_do (struct gui_priv *this, char *key) |
char * | gui_internal_cmd_match_expand (char *pattern, struct attr **in) |
int | gui_internal_set (char *remove, char *add) |
void | gui_internal_cmd_map_download (struct gui_priv *this, struct widget *wm, void *data) |
void | gui_internal_menu_vehicle_settings (struct gui_priv *this, struct vehicle *v, char *name) |
void | gui_internal_cmd_vehicle_settings (struct gui_priv *this, struct widget *wm, void *data) |
void | gui_internal_evaluate (struct gui_priv *this, const char *command) |
void | gui_internal_enter (struct gui_priv *this, int ignore) |
void | gui_internal_leave (struct gui_priv *this) |
void | gui_internal_set_click_coord (struct gui_priv *this, struct point *p) |
void | gui_internal_enter_setup (struct gui_priv *this) |
void | gui_internal_cmd_menu (struct gui_priv *this, int ignore, char *href) |
void | gui_internal_cmd_log_clicked (struct gui_priv *this, struct widget *widget, void *data) |
void | gui_internal_check_exit (struct gui_priv *this) |
void | gui_internal_cmd_enter_coord_clicked (struct gui_priv *this, struct widget *widget, void *data) |
int | line_intersection (struct coord *a1, struct coord *a2, struct coord *b1, struct coord *b2, struct coord *res) |
finds the intersection point of 2 lines More... | |
struct heightline * | item_get_heightline (struct item *item) |
void | gui_internal_route_update (struct gui_priv *this, struct navit *navit, struct vehicle *v) |
Called when the route is updated. More... | |
void | gui_internal_route_screen_free (struct gui_priv *this_, struct widget *w) |
Called when the route screen is closed (deallocated). More... | |
void | gui_internal_populate_route_table (struct gui_priv *this, struct navit *navit) |
Populates the route table with route information. More... | |
void | plugin_init (void) |
The plugin entry point. More... | |
void gui_internal_apply_config | ( | struct gui_priv * | this | ) |
Applies the configuration values to this based on the settings specified in the configuration file (this->config) and the most appropriate default profile based on screen resolution.
This function should be run after this->root is setup and could be rerun after the window is resized.
References config_profiles, dbg, gui_config_settings::font_size, graphics_font_new(), graphics_named_font_new(), gui_config_settings::icon_l, gui_config_settings::icon_s, gui_config_settings::icon_xs, LARGE_PROFILE, lvl_debug, lvl_info, MEDIUM_PROFILE, SMALL_PROFILE, and gui_config_settings::spacing.
Referenced by gui_internal_menu(), and gui_internal_menu_resize().
References gui_internal_prune_menu_count().
Referenced by gui_internal_cmd2_back(), gui_internal_cmd_pois_more(), gui_internal_keypress(), gui_internal_menu(), and gui_internal_search().
struct widget* gui_internal_button_map_attr_new | ( | struct gui_priv * | this, |
const char * | text, | ||
enum flags | flags, | ||
struct map * | map, | ||
struct attr * | on, | ||
struct attr * | off, | ||
int | deflt | ||
) |
References callback_cast, callback_new_attr_2, widget::cb, widget::deflt, widget::get_attr, gui_internal_button_attr_callback(), gui_internal_button_attr_pressed(), gui_internal_button_attr_update(), gui_internal_button_new_with_callback(), image_new_xs(), widget::instance, map_add_callback(), map_get_attr(), map_remove_callback(), map_set_attr(), widget::off, widget::on, widget::redraw, widget::remove_cb, widget::set_attr, widget::text, and attr::type.
Referenced by gui_internal_cmd2_setting_maps(), and gui_internal_cmd_map_download().
struct widget* gui_internal_button_navit_attr_new | ( | struct gui_priv * | this, |
const char * | text, | ||
enum flags | flags, | ||
struct attr * | on, | ||
struct attr * | off | ||
) |
References callback_cast, callback_new_attr_2, widget::cb, widget::get_attr, gui_internal_button_attr_callback(), gui_internal_button_attr_pressed(), gui_internal_button_attr_update(), gui_internal_button_new_with_callback(), image_new_xs(), widget::instance, navit_add_callback(), navit_get_attr(), navit_remove_callback(), navit_set_attr(), widget::off, widget::on, widget::remove_cb, widget::set_attr, widget::text, and attr::type.
Referenced by gui_internal_cmd2_setting_layout(), and gui_internal_cmd2_setting_rules().
Generic notification function for Editable widgets to call Another widget notification function when Enter is pressed in editable field. The Editable widget should have data member pointing to the Another widget.
References data, gui_internal_reason_keypress_finish, widget::reason, and widget::w.
Referenced by gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_enter_coord(), gui_internal_cmd_log(), and gui_internal_cmd_rename_bookmark().
void gui_internal_check_exit | ( | struct gui_priv * | this | ) |
References graphics_overlay_disable(), gui_internal_search_idle_end(), gui_internal_search_list_destroy(), navit_block(), navit_draw(), and navit_draw_displaylist().
Referenced by gui_internal_button(), gui_internal_cmd2_back(), gui_internal_cmd2_back_to_map(), gui_internal_cmd_bookmarks(), gui_internal_cmd_log_do(), and gui_internal_keypress().
The "Bookmarks" section of the OSD
References _, widget::background, attr::bookmarks, bookmarks_get_bookmark_count(), bookmarks_get_item(), bookmarks_get_projection(), bookmarks_item_cwd(), bookmarks_item_rewind(), bookmarks_move_down(), bookmarks_move_root(), bookmarks_move_up(), widget::c, c, widget::data, data, dbg, flags_expand, flags_fill, gravity_left, gravity_left_center, gravity_left_top, gravity_top_center, gui_internal_box_new(), gui_internal_button_new_with_callback(), gui_internal_check_exit(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_delete_bookmark_folder(), gui_internal_cmd_load_bookmarks_as_waypoints(), gui_internal_cmd_paste_bookmark(), gui_internal_cmd_position(), gui_internal_cmd_replace_bookmarks_from_waypoints(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_prune_menu_count(), gui_internal_widget_append(), gui_internal_widget_destroy(), gui_internal_widget_table_new(), gui_internal_widget_table_row_new(), image_new_xs(), item, item_attr_get(), item_coord_get(), lvl_info, item::map, map_convert_string_tmp(), widget::name, navit_get_attr(), navit_get_destination_count(), orientation_horizontal, orientation_vertical, widget::prefix, pcoord::pro, attr::str, widget::text, item::type, attr::u, widget::w, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd2_bookmarks().
void gui_internal_cmd_enter_coord_clicked | ( | struct gui_priv * | this, |
struct widget * | widget, | ||
void * | data | ||
) |
References widget::data, dbg, gui_internal_cmd_enter_coord_do(), and lvl_debug.
Referenced by gui_internal_cmd_enter_coord().
References widget::data, and gui_internal_cmd_log_do().
Referenced by gui_internal_cmd_log().
References gui_internal_html_main_menu(), gui_internal_prune_menu(), and widget::w.
Referenced by gui_internal_top_bar().
References _, bbox(), data, dbg, description(), flags_expand, flags_fill, gravity_left_center, gravity_top_center, gui_internal_box_new(), gui_internal_button_map_attr_new(), gui_internal_button_new_with_callback(), gui_internal_cmd_map_download_do(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_widget_append(), lvl_debug, widget::name, attr::num, orientation_horizontal, orientation_vertical, widget::prefix, size, widget::spy, attr::type, attr::u, and widget::w.
Referenced by gui_internal_cmd2_setting_maps().
char* gui_internal_cmd_match_expand | ( | char * | pattern, |
struct attr ** | in | ||
) |
References attr_to_text(), and p.
Referenced by gui_internal_cmd2_set().
void gui_internal_cmd_menu | ( | struct gui_priv * | this, |
int | ignore, | ||
char * | href | ||
) |
References dbg, gui_internal_enter(), gui_internal_enter_setup(), gui_internal_html_load_href(), gui_internal_html_main_menu(), and lvl_debug.
Referenced by gui_internal_button(), gui_internal_cmd_menu2(), and gui_internal_keypress().
References widget::c, widget::data, data, gui_internal_cmd_position_do(), gui_internal_cmd_set_destination(), gui_internal_search_house_number_in_street(), gui_internal_search_town_in_country(), widget::name, and widget::text.
Referenced by gui_internal_cmd2_waypoints(), gui_internal_cmd_bookmarks(), gui_internal_cmd_enter_coord_do(), gui_internal_cmd_formerdests(), gui_internal_cmd_pois_item(), gui_internal_create_resultlist_entry(), and gui_internal_populate_route_table().
void gui_internal_cmd_position_do | ( | struct gui_priv * | this, |
struct pcoord * | pc_in, | ||
struct coord_geo * | g_in, | ||
struct widget * | wm, | ||
const char * | name, | ||
int | flags | ||
) |
Displays the commands available for a location.
This displays the available commands for the given location in a dialog from which the user can choose an action. The location can be supplied either in projected coordinates via the
argument or in WGS84 coordinates (i.e. latitude and longitude in degrees) via the
argument. One of these must be supplied, the other should be
.
this | The GUI context |
pc_in | Projected coordinates of the position |
g_in | WGS84 coordinates of the position |
wm | The widget that points to this function as a callback |
name | The display name for the position |
flags | Flags specifying the operations available from the GUI |
References _, widget::c, c, widget::data, widget::data_free, dbg, display(), displaylist_get_clicked_list(), displaylist_get_selection(), flags_expand, flags_fill, g_free_func, graphics_displayitem_get_item(), graphics_displaylist_close(), graphics_displaylist_open(), gravity_left, gravity_left_center, gravity_left_top, gravity_top_center, gui_internal_box_new(), gui_internal_button_new(), gui_internal_button_new_with_callback(), gui_internal_cmd_add_bookmark2(), gui_internal_cmd_copy_bookmark(), gui_internal_cmd_cut_bookmark(), gui_internal_cmd_delete_bookmark(), gui_internal_cmd_delete_waypoint(), gui_internal_cmd_insert_destination(), gui_internal_cmd_paste_bookmark(), gui_internal_cmd_pois(), gui_internal_cmd_pois_item(), gui_internal_cmd_rename_bookmark(), gui_internal_cmd_results_map_clean(), gui_internal_cmd_results_to_map(), gui_internal_cmd_set_destination(), gui_internal_cmd_set_position(), gui_internal_cmd_view_attributes(), gui_internal_cmd_view_in_browser(), gui_internal_cmd_view_on_map(), gui_internal_label_new(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_search_house_number_in_street(), gui_internal_search_street_in_town(), gui_internal_widget_append(), gui_internal_widget_table_new(), gui_internal_widget_table_row_new(), item::id_hi, item::id_lo, image_new_xs(), widget::item, item, item_attr_get(), item_to_name(), lvl_info, item::map, map_convert_string_tmp(), map_rect_destroy(), map_rect_get_item_byid(), map_rect_new(), map_selection_destroy(), widget::name, name, navit_get_attr(), navit_get_destination_count(), navit_get_displaylist(), navit_get_trans(), orientation_horizontal, orientation_vertical, p, pcoord_format_degree_short(), item::priv_data, pcoord::pro, attr::projection, widget::selection_id, attr::str, attr::text, widget::text, transform_from_geo(), transform_point(), transform_to_geo(), item::type, attr::u, vehicle_get_attr(), widget::w, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd2_position(), and gui_internal_cmd_position().
References widget::data, and gui_internal_prune_menu().
Referenced by gui_internal_top_bar().
References widget::data, gui_internal_menu_vehicle_settings(), and widget::text.
Referenced by gui_internal_cmd2_setting_vehicle().
void gui_internal_enter | ( | struct gui_priv * | this, |
int | ignore | ||
) |
References graphics_overlay_disable(), and navit_block().
Referenced by gui_internal_cmd_log(), and gui_internal_cmd_menu().
void gui_internal_enter_setup | ( | struct gui_priv * | this | ) |
References gui_internal_set_position_coord().
Referenced by gui_internal_cmd_log(), and gui_internal_cmd_menu().
void gui_internal_evaluate | ( | struct gui_priv * | this, |
const char * | command | ||
) |
References command(), and command_evaluate().
Referenced by gui_internal_html_command(), gui_internal_html_submit(), and gui_internal_html_text().
void gui_internal_keypress_do | ( | struct gui_priv * | this, |
char * | key | ||
) |
References widget::data, dbg, widget::func, gui_internal_find_widget(), gui_internal_highlight(), gui_internal_keyboard_to_lower_case(), gui_internal_keyboard_to_upper_case(), gui_internal_menu_data(), gui_internal_reason_keypress, gui_internal_reason_keypress_finish, gui_internal_widget_render(), gui_internal_widget_table_top_row(), key, lvl_debug, lvl_info, NAVIT_KEY_BACKSPACE, NAVIT_KEY_RETURN, widget::reason, menu_data::search_list, widget::state, STATE_CLEAR, STATE_EDIT, widget::text, and widget::w.
Referenced by gui_internal_cmd_keypress(), and gui_internal_keypress().
void gui_internal_leave | ( | struct gui_priv * | this | ) |
References draw_mode_end, and graphics_draw_mode().
Referenced by gui_internal_cmd_log().
References _, callback_list_call_attr_2, cbl, flags_expand, flags_fill, gravity_left, gravity_left_center, gravity_top_center, gui_internal_add_vehicle_profile(), gui_internal_button_new_with_callback(), gui_internal_cmd_set_active_vehicle(), gui_internal_cmd_show_nmea_data(), gui_internal_cmd_show_satellite_status(), gui_internal_is_active_vehicle(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_widget_append(), gui_internal_widget_table_new(), gui_internal_widget_table_row_new(), image_new_xs(), name, navit_get_vehicleprofiles(), orientation_horizontal, orientation_vertical, profile, vehicle_get_attr(), and widget::w.
Referenced by gui_internal_cmd2_setting_vehicle(), gui_internal_cmd_set_active_profile(), and gui_internal_cmd_vehicle_settings().
Populates the route table with route information.
this | The gui context |
navit | The navit object |
References attr_format_default, attr_format_with_units, attr_to_text_ext(), c, label_data_offset::data, flags_fill, gravity_left, gui_internal_cmd_position(), gui_internal_label_new(), gui_internal_widget_append(), gui_internal_widget_table_clear(), gui_internal_widget_table_row_new(), gui_internal_widget_table_set_top_row(), gui_internal_widget_table_top_row(), item::id_hi, item::id_lo, widget::item, item, item_attr_get(), item_coord_get(), label, length, item::map, map_convert_string_tmp(), map_projection(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), navigation_get_map(), navit_get_attr(), navit_get_navigation(), orientation_horizontal, route_get_attr(), route_data::route_table, STATE_SENSITIVE, attr::str, attr::u, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd2_route_description(), and gui_internal_route_update().
Called when the route screen is closed (deallocated).
The main purpose of this function is to remove the widgets from references route_data because those widgets are about to be freed.
References gui_priv::route_data, route_data::route_showing, and route_data::route_table.
Referenced by gui_internal_cmd2_route_description().
Called when the route is updated.
References draw_mode_begin, draw_mode_end, graphics_draw_mode(), gui_internal_menu_render(), gui_internal_populate_route_table(), and route_data::route_showing.
Referenced by gui_internal_cmd2_route_description().
References widget::name, navit_say(), widget::speech, and widget::text.
Referenced by gui_internal_keynav_highlight_next(), gui_internal_menu_render(), and gui_internal_prune_menu_do().
void gui_internal_select_waypoint | ( | struct gui_priv * | this, |
const char * | title, | ||
const char * | hint, | ||
struct widget * | wm_, | ||
void(*)(struct gui_priv *priv, struct widget *widget, void *data) | cmd, | ||
void * | data | ||
) |
References _, widget::c, c, data, widget::datai, flags_expand, flags_fill, gravity_left, gravity_left_center, gravity_left_top, gravity_top_center, gui_internal_box_new(), gui_internal_button_new_with_callback(), gui_internal_label_new(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_widget_append(), gui_internal_widget_table_new(), gui_internal_widget_table_row_new(), image_new_xs(), widget::item, item, item_attr_get(), item_coord_get(), item::map, map_convert_string_tmp(), map_projection(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), navit_get_destination_count(), navit_get_route(), orientation_horizontal, orientation_vertical, pcoord::pro, route_get_map(), attr::str, attr::text, item::type, attr::u, widget::w, pcoord::x, and pcoord::y.
Referenced by gui_internal_cmd2_waypoints(), and gui_internal_cmd_insert_destination().
int gui_internal_set | ( | char * | remove, |
char * | add | ||
) |
References dbg, gui_internal_match(), lvl_debug, navit_get_user_data_directory(), and size.
Referenced by gui_internal_cmd2_set().
References attr_dup(), attr_free(), c, attr::coord_geo, dbg, lvl_debug, navit_get_trans(), p, transform_get_projection(), transform_reverse(), transform_to_geo(), attr::type, attr::u, pcoord::x, and pcoord::y.
Referenced by gui_internal_button(), gui_internal_cmd_log(), and gui_internal_keypress().
References _, widget::bb, widget::bl, widget::br, widget::bt, flags_fill, gravity_center, gravity_right_center, gravity_right_top, gui_internal_box_new(), gui_internal_button_new_with_callback(), gui_internal_label_new(), gui_internal_widget_append(), image_new_l(), orientation_horizontal, orientation_vertical, widget::spx, and widget::w.
Referenced by gui_internal_menu().
struct graphics_image* image_new_l | ( | struct gui_priv * | this, |
const char * | name | ||
) |
Displays an image scaled to l (large) size.
this | Our gui context |
name | image name |
References image_new_scaled(), and name.
Referenced by gui_internal_time_help(), and html_image().
struct graphics_image* image_new_s | ( | struct gui_priv * | this, |
const char * | name | ||
) |
Displays an image scaled to s (small) size.
this | Our gui context |
name | image name |
References image_new_scaled(), and name.
Referenced by gui_internal_cmd_pois_selector(), gui_internal_top_bar(), and html_image().
struct graphics_image* image_new_xs | ( | struct gui_priv * | this, |
const char * | name | ||
) |
Displays an image scaled to xs (extra small) size.
This image size can be too small to click it on some devices.
this | Our gui context |
name | image name |
References image_new_scaled(), and name.
Referenced by gui_internal_add_vehicle_profile(), gui_internal_button_attr_update(), gui_internal_button_map_attr_new(), gui_internal_button_navit_attr_new(), gui_internal_cmd2_about(), gui_internal_cmd2_setting_maps(), 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_pois_filter(), gui_internal_cmd_pois_item(), gui_internal_cmd_position_do(), gui_internal_cmd_rename_bookmark(), gui_internal_cmd_view_attribute_details(), gui_internal_create_resultlist_entry(), gui_internal_menu_vehicle_settings(), gui_internal_poi_icon(), gui_internal_scroll_buttons_init(), gui_internal_search(), gui_internal_select_waypoint(), and html_image().
struct heightline* item_get_heightline | ( | struct item * | item | ) |
References heightline::bbox, heightline::c, street_data::c, coord_rect_extend(), heightline::count, street_data::count, heightline::height, height, item_attr_get(), coord_rect::lu, coord_rect::rl, attr::str, street_data_free(), street_get_data(), and attr::u.
Referenced by gui_internal_cmd2_route_height_profile().
int line_intersection | ( | struct coord * | a1, |
struct coord * | a2, | ||
struct coord * | b1, | ||
struct coord * | b2, | ||
struct coord * | res | ||
) |
finds the intersection point of 2 lines
coord | a1, a2, b1, b2 : coords of the start and end of the first and the second line |
coord | res, will become the coords of the intersection if found |
References dbg, lvl_info, coord::x, and coord::y.
Referenced by gui_internal_cmd2_route_height_profile().
char* removecase | ( | char * | s | ) |
Remove the case in a string.
s | The input utf-8 string |
References linguistics_casefold().
Referenced by gui_internal_cmd_pois_item_selected(), gui_internal_poi_param_set_filter(), and gui_internal_search_cmp().