navit  0.5.3-trunk
gui_internal_priv.h File Reference

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_imageimage_new_xs (struct gui_priv *this, const char *name)
 Displays an image scaled to xs (extra small) size. More...
 
struct graphics_imageimage_new_s (struct gui_priv *this, const char *name)
 Displays an image scaled to s (small) size. More...
 
struct graphics_imageimage_new_l (struct gui_priv *this, const char *name)
 Displays an image scaled to l (large) size. More...
 
struct widgetgui_internal_button_navit_attr_new (struct gui_priv *this, const char *text, enum flags flags, struct attr *on, struct attr *off)
 
struct widgetgui_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 widgetgui_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 heightlineitem_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...
 

Function Documentation

◆ gui_internal_apply_config()

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.

Author
Steve Singer ssing.nosp@m.er_p.nosp@m.g@sym.nosp@m.pati.nosp@m.co.ca (09/2008)

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

◆ gui_internal_back()

void gui_internal_back ( struct gui_priv this,
struct widget w,
void *  data 
)

◆ gui_internal_button_map_attr_new()

◆ gui_internal_button_navit_attr_new()

◆ gui_internal_call_linked_on_finish()

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.

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

◆ gui_internal_check_exit()

◆ gui_internal_cmd_bookmarks()

◆ gui_internal_cmd_enter_coord_clicked()

void gui_internal_cmd_enter_coord_clicked ( struct gui_priv this,
struct widget widget,
void *  data 
)

◆ gui_internal_cmd_log_clicked()

void gui_internal_cmd_log_clicked ( struct gui_priv this,
struct widget widget,
void *  data 
)

◆ gui_internal_cmd_main_menu()

void gui_internal_cmd_main_menu ( struct gui_priv this,
struct widget wm,
void *  data 
)

◆ gui_internal_cmd_map_download()

◆ gui_internal_cmd_match_expand()

char* gui_internal_cmd_match_expand ( char *  pattern,
struct attr **  in 
)

References attr_to_text(), and p.

Referenced by gui_internal_cmd2_set().

◆ gui_internal_cmd_menu()

void gui_internal_cmd_menu ( struct gui_priv this,
int  ignore,
char *  href 
)

◆ gui_internal_cmd_position()

◆ gui_internal_cmd_position_do()

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

pc_in

argument or in WGS84 coordinates (i.e. latitude and longitude in degrees) via the

g_in

argument. One of these must be supplied, the other should be

NULL

.

Parameters
thisThe GUI context
pc_inProjected coordinates of the position
g_inWGS84 coordinates of the position
wmThe widget that points to this function as a callback
nameThe display name for the position
flagsFlags 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().

◆ gui_internal_cmd_return()

void gui_internal_cmd_return ( struct gui_priv this,
struct widget wm,
void *  data 
)

◆ gui_internal_cmd_vehicle_settings()

void gui_internal_cmd_vehicle_settings ( struct gui_priv this,
struct widget wm,
void *  data 
)

◆ gui_internal_enter()

void gui_internal_enter ( struct gui_priv this,
int  ignore 
)

◆ gui_internal_enter_setup()

void gui_internal_enter_setup ( struct gui_priv this)

◆ gui_internal_evaluate()

void gui_internal_evaluate ( struct gui_priv this,
const char *  command 
)

◆ gui_internal_keypress_do()

◆ gui_internal_leave()

void gui_internal_leave ( struct gui_priv this)

◆ gui_internal_menu_vehicle_settings()

◆ gui_internal_populate_route_table()

◆ gui_internal_route_screen_free()

void gui_internal_route_screen_free ( struct gui_priv this_,
struct widget w 
)

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

◆ gui_internal_route_update()

void gui_internal_route_update ( struct gui_priv this,
struct navit navit,
struct vehicle v 
)

◆ gui_internal_say()

void gui_internal_say ( struct gui_priv this,
struct widget w,
int  questionmark 
)

◆ gui_internal_select_waypoint()

◆ gui_internal_set()

int gui_internal_set ( char *  remove,
char *  add 
)

◆ gui_internal_set_click_coord()

◆ gui_internal_time_help()

◆ image_new_l()

struct graphics_image* image_new_l ( struct gui_priv this,
const char *  name 
)

Displays an image scaled to l (large) size.

Parameters
thisOur gui context
nameimage name
Returns
image_struct Ptr to scaled image struct or NULL if not scaled or found

References image_new_scaled(), and name.

Referenced by gui_internal_time_help(), and html_image().

◆ image_new_s()

struct graphics_image* image_new_s ( struct gui_priv this,
const char *  name 
)

Displays an image scaled to s (small) size.

Parameters
thisOur gui context
nameimage name
Returns
image_struct Ptr to scaled image struct or NULL if not scaled or found

References image_new_scaled(), and name.

Referenced by gui_internal_cmd_pois_selector(), gui_internal_top_bar(), and html_image().

◆ image_new_xs()

◆ item_get_heightline()

◆ line_intersection()

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

Parameters
coorda1, a2, b1, b2 : coords of the start and end of the first and the second line
coordres, will become the coords of the intersection if found
Returns
: TRUE if intersection found, otherwise FALSE

References dbg, lvl_info, coord::x, and coord::y.

Referenced by gui_internal_cmd2_route_height_profile().

◆ removecase()

char* removecase ( char *  s)

Remove the case in a string.

Warning
Result should be g_free()d after use.
Parameters
sThe input utf-8 string
Returns
An equivalent string prepared for case insensitive search

References linguistics_casefold().

Referenced by gui_internal_cmd_pois_item_selected(), gui_internal_poi_param_set_filter(), and gui_internal_search_cmp().