navit
0.5.3-trunk
|
#include <glib.h>
#include "color.h"
#include "coord.h"
#include "point.h"
#include "callback.h"
#include "graphics.h"
#include "debug.h"
#include "navit_nls.h"
#include "gui_internal.h"
#include "gui_internal_widget.h"
#include "gui_internal_priv.h"
#include "gui_internal_menu.h"
Functions | |
static void | gui_internal_scroll_buttons_init (struct gui_priv *this, struct widget *widget, struct scroll_buttons *sb) |
void | gui_internal_box_pack (struct gui_priv *this, struct widget *w) |
Computes the size and location for a box widget. More... | |
static void | gui_internal_widget_transfer_content (struct gui_priv *this, struct widget *first, struct widget *second, int move_only) |
Transfer the content of one widget into another one (and optionally vice-versa) More... | |
void | gui_internal_widget_swap (struct gui_priv *this, struct widget *first, struct widget *second) |
Swap two widgets. More... | |
void | gui_internal_widget_move (struct gui_priv *this, struct widget *dst, struct widget *src) |
Move the content of one widget into another one (the src widget is then deallocated and should be be used anymore) More... | |
static void | gui_internal_background_render (struct gui_priv *this, struct widget *w) |
struct widget * | gui_internal_label_font_new (struct gui_priv *this, const char *text, int font) |
struct widget * | gui_internal_label_new (struct gui_priv *this, const char *text) |
struct widget * | gui_internal_label_new_abbrev (struct gui_priv *this, const char *text, int maxwidth) |
struct widget * | gui_internal_image_new (struct gui_priv *this, struct graphics_image *image) |
static void | gui_internal_image_render (struct gui_priv *this, struct widget *w) |
Renders an image or icon, preparing it for drawing on the display. More... | |
static void | gui_internal_label_render (struct gui_priv *this, struct widget *w) |
Renders a label, preparing it for drawing on the display. More... | |
struct widget * | gui_internal_text_font_new (struct gui_priv *this, const char *text, int font, enum flags flags) |
Creates a text box. More... | |
struct widget * | gui_internal_text_new (struct gui_priv *this, const char *text, enum flags flags) |
struct widget * | gui_internal_button_font_new_with_callback (struct gui_priv *this, const char *text, int font, struct graphics_image *image, enum flags flags, void(*func)(struct gui_priv *priv, struct widget *widget, void *data), void *data) |
struct widget * | gui_internal_button_new_with_callback (struct gui_priv *this, const char *text, struct graphics_image *image, enum flags flags, void(*func)(struct gui_priv *priv, struct widget *widget, void *data), void *data) |
struct widget * | gui_internal_button_new (struct gui_priv *this, const char *text, struct graphics_image *image, enum flags flags) |
struct widget * | gui_internal_find_widget (struct widget *wi, struct point *p, int flags) |
void | gui_internal_highlight_do (struct gui_priv *this, struct widget *found) |
void | gui_internal_highlight (struct gui_priv *this) |
struct widget * | gui_internal_box_new_with_label (struct gui_priv *this, enum flags flags, const char *label) |
struct widget * | gui_internal_box_new (struct gui_priv *this, enum flags flags) |
static void | gui_internal_box_render (struct gui_priv *this, struct widget *w) |
Renders a box widget, preparing it for drawing on the display. More... | |
void | gui_internal_box_resize (struct gui_priv *this, struct widget *w, void *data, int wnew, int hnew) |
Resize a box widget. More... | |
void | gui_internal_widget_reset_pack (struct gui_priv *this, struct widget *w) |
void | gui_internal_widget_append (struct widget *parent, struct widget *child) |
Adds a child widget to a parent widget, making it the last child. More... | |
void | gui_internal_widget_prepend (struct widget *parent, struct widget *child) |
Adds a child widget to a parent widget, making it the first child. More... | |
void | gui_internal_widget_insert_sorted (struct widget *parent, struct widget *child, GCompareFunc func) |
Adds a child widget to a parent widget. More... | |
void | gui_internal_widget_children_destroy (struct gui_priv *this, struct widget *w) |
Destroys all child widgets. More... | |
void | gui_internal_widget_destroy (struct gui_priv *this, struct widget *w) |
Destroys a widget. More... | |
void | gui_internal_widget_render (struct gui_priv *this, struct widget *w) |
Renders widgets, preparing it for drawing on the display. More... | |
void | gui_internal_widget_pack (struct gui_priv *this, struct widget *w) |
struct widget * | gui_internal_button_label (struct gui_priv *this, const char *label, int mode) |
struct widget * | gui_internal_widget_table_new (struct gui_priv *this, enum flags flags, int buttons) |
Creates a new table widget. More... | |
void | gui_internal_widget_table_clear (struct gui_priv *this, struct widget *table) |
Clears all the rows from the table. More... | |
GList * | gui_internal_widget_table_next_row (GList *row) |
Moves GList pointer to the next table row, skipping other table children (button box, for example). More... | |
GList * | gui_internal_widget_table_prev_row (GList *row) |
Moves GList pointer to the previous table row, skipping other table children (button box, for example). More... | |
GList * | gui_internal_widget_table_first_row (GList *row) |
Moves GList pointer to the first table row, skipping other table children (button box, for example). More... | |
GList * | gui_internal_widget_table_top_row (struct gui_priv *this, struct widget *table) |
Gets GList pointer to the table row drawn on the top of the screen. More... | |
GList * | gui_internal_widget_table_set_top_row (struct gui_priv *this, struct widget *table, struct widget *row) |
Sets internal top row pointer of the table to point to a given row widget. More... | |
struct widget * | gui_internal_widget_table_row_new (struct gui_priv *this, enum flags flags) |
Creates a new table_row widget. More... | |
static GList * | gui_internal_compute_table_dimensions (struct gui_priv *this, struct widget *w) |
Computes the column dimensions for the table. More... | |
static void | g_free_helper (void *data, void *user_data) |
void | gui_internal_table_pack (struct gui_priv *this, struct widget *w) |
Computes the height and width for the table. More... | |
void | gui_internal_table_hide_rows (struct table_data *table_data) |
Invalidates coordinates for previously rendered table widget rows. More... | |
void | gui_internal_table_render (struct gui_priv *this, struct widget *w) |
Renders a table widget, preparing it for drawing on the display. More... | |
void | gui_internal_table_button_next (struct gui_priv *this, struct widget *wm, void *data) |
Handles the 'next page' table event. More... | |
void | gui_internal_table_button_prev (struct gui_priv *this, struct widget *wm, void *data) |
Handles the 'previous page' table event. More... | |
void | gui_internal_table_data_free (void *p) |
Deallocates a table_data structure. More... | |
|
static |
References data.
Referenced by gui_internal_table_pack(), and gui_internal_table_render().
References widget::background, graphics_draw_rectangle(), widget::h, widget::p, widget::state, STATE_HIGHLIGHTED, and widget::w.
Referenced by gui_internal_box_render(), gui_internal_image_render(), and gui_internal_label_render().
References gui_internal_box_new_with_label().
Referenced by gui_internal_button_font_new_with_callback(), gui_internal_button_label(), 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_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_pois_selector(), 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_create_resultlist_entry(), gui_internal_html_start(), gui_internal_html_text(), gui_internal_keyboard_do(), gui_internal_keyboard_show_native(), gui_internal_menu(), gui_internal_scroll_buttons_init(), gui_internal_search(), gui_internal_select_waypoint(), gui_internal_text_font_new(), gui_internal_time_help(), and gui_internal_top_bar().
struct widget* gui_internal_box_new_with_label | ( | struct gui_priv * | this, |
enum flags flags flags | , | ||
const char * | label | ||
) |
References widget::flags, gui_internal_box_resize(), label, widget::on_resize, widget::text, widget::type, and widget_box.
Referenced by gui_internal_box_new(), gui_internal_cmd_view_on_map(), and gui_internal_menu().
Computes the size and location for a box widget.
this | The internal GUI instance |
w | The widget to pack |
References widget::cols, widget::data, dbg, widget::flags, flags_expand, flags_fill, flags_scrolly, gravity_bottom, gravity_left, gravity_right, gravity_top, gravity_xcenter, gravity_ycenter, gui_internal_scroll_buttons_init(), gui_internal_widget_pack(), widget::h, height, lvl_debug, lvl_error, orientation, orientation_horizontal, orientation_horizontal_vertical, orientation_vertical, widget::p, widget::w, width, point::x, and point::y.
Referenced by gui_internal_widget_pack().
Renders a box widget, preparing it for drawing on the display.
this | The internal GUI instance |
w | The box widget to render |
References widget::border, scroll_buttons::button_box, widget::children, widget::data, dbg, debug_level_get(), widget::foreground, graphics_draw_lines(), graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), gui_internal_background_render(), gui_internal_widget_render(), widget::h, lvl_debug, widget::p, widget::scroll_buttons, widget::w, point::x, and point::y.
Referenced by gui_internal_widget_render().
void gui_internal_box_resize | ( | struct gui_priv * | this, |
struct widget * | w, | ||
void * | data, | ||
int | wnew, | ||
int | hnew | ||
) |
Resize a box widget.
this | The internal GUI instance |
w | The widget to resize |
wnew | The new width of the widget |
hnew | THe new height of the widget |
References widget::data, gui_internal_widget_pack(), widget::h, widget::on_resize, orientation, orientation_horizontal, orientation_horizontal_vertical, orientation_vertical, and widget::w.
Referenced by gui_internal_box_new_with_label(), and gui_internal_menu_menu_resize().
struct widget* gui_internal_button_font_new_with_callback | ( | struct gui_priv * | this, |
const char * | text, | ||
int | font, | ||
struct graphics_image * | image, | ||
enum flags flags flags | , | ||
void(*)(struct gui_priv *priv, struct widget *widget, void *data) | func, | ||
void * | data | ||
) |
References widget::data, data, flags_swap, widget::func, gravity_center, gui_internal_box_new(), gui_internal_image_new(), gui_internal_text_font_new(), gui_internal_widget_append(), orientation_vertical, widget::speech, widget::state, STATE_SENSITIVE, and widget::text.
Referenced by gui_internal_button_new_with_callback(), and gui_internal_keyboard_key_data().
References widget::bb, widget::bl, widget::border, widget::br, widget::bt, menu_data::button_bar, widget::foreground, gravity_right_center, gui_internal_box_new(), gui_internal_label_new(), gui_internal_menu_data(), gui_internal_widget_append(), gui_internal_widget_prepend(), label, and orientation_vertical.
Referenced by gui_internal_menu().
struct widget* gui_internal_button_new | ( | struct gui_priv * | this, |
const char * | text, | ||
struct graphics_image * | image, | ||
enum flags flags flags | |||
) |
References gui_internal_button_new_with_callback(), and widget::text.
Referenced by gui_internal_cmd_position_do(), and gui_internal_cmd_view_attributes().
struct widget* gui_internal_button_new_with_callback | ( | struct gui_priv * | this, |
const char * | text, | ||
struct graphics_image * | image, | ||
enum flags flags flags | , | ||
void(*)(struct gui_priv *priv, struct widget *widget, void *data) | func, | ||
void * | data | ||
) |
References data, widget::func, gui_internal_button_font_new_with_callback(), and widget::text.
Referenced by gui_internal_add_vehicle_profile(), gui_internal_button_map_attr_new(), gui_internal_button_navit_attr_new(), gui_internal_button_new(), gui_internal_cmd2_setting_maps(), gui_internal_cmd2_setting_vehicle(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_map_download(), gui_internal_cmd_pois_item(), gui_internal_cmd_pois_selector(), gui_internal_cmd_position_do(), gui_internal_cmd_view_attribute_details(), gui_internal_cmd_view_attributes(), gui_internal_create_resultlist_entry(), gui_internal_menu_vehicle_settings(), gui_internal_scroll_buttons_init(), gui_internal_select_waypoint(), gui_internal_time_help(), and gui_internal_top_bar().
|
static |
Computes the column dimensions for the table.
this | The internal GUI instance |
w | The table widget to compute dimensions for. |
This function examines all of the rows and columns for the table w and returns a list (GList) of table_column_desc elements that describe each column of the table.
The caller is responsible for freeing the returned list.
References scroll_buttons::button_box, widget::children, widget::data, gui_internal_widget_pack(), widget::h, table_column_desc::height, height, table_data::scroll_buttons, widget::w, table_column_desc::width, and width.
Referenced by gui_internal_table_pack(), and gui_internal_table_render().
References widget::children, widget::data, widget::h, widget::p, p, widget::state, widget::w, point::x, and point::y.
Referenced by gui_internal_highlight(), gui_internal_keypress_do(), and gui_internal_search_idle().
void gui_internal_highlight | ( | struct gui_priv * | this | ) |
References widget::data, dbg, draw_mode_begin, draw_mode_end, graphics_draw_mode(), gui_internal_widget_render(), widget::h, lvl_debug, widget::p, STATE_HIGHLIGHTED, widget::w, point::x, and point::y.
Referenced by gui_internal_highlight(), gui_internal_highlight_possible_keys(), gui_internal_html_submit(), and gui_internal_keynav_highlight_next().
struct widget* gui_internal_image_new | ( | struct gui_priv * | this, |
struct graphics_image * | image | ||
) |
References widget::h, graphics_image::height, widget::img, widget::type, widget::w, widget_image, and graphics_image::width.
Referenced by gui_internal_button_font_new_with_callback(), gui_internal_cmd2_about(), gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_enter_coord(), gui_internal_cmd_log(), gui_internal_cmd_pois_filter(), gui_internal_cmd_rename_bookmark(), gui_internal_create_resultlist_entry(), gui_internal_search(), and html_image().
Renders an image or icon, preparing it for drawing on the display.
this | The internal GUI instance |
w | The widget to render |
References graphics_draw_image(), gui_internal_background_render(), widget::h, graphics_image::hot, widget::img, widget::p, widget::w, point::x, and point::y.
Referenced by gui_internal_widget_render().
References widget::flags, widget::font_idx, widget::foreground, graphics_get_text_bbox(), gravity_center, widget::h, p, widget::text, widget::text_background, widget::texth, widget::textw, widget::type, widget::w, and widget_label.
Referenced by gui_internal_create_resultlist_entry(), gui_internal_keyboard_do(), gui_internal_label_new(), and gui_internal_text_font_new().
References gui_internal_label_font_new(), and widget::text.
Referenced by gui_internal_button_label(), gui_internal_cmd2_about(), gui_internal_cmd2_locale(), gui_internal_cmd2_network_info(), gui_internal_cmd2_route_height_profile(), gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_enter_coord(), gui_internal_cmd_log(), gui_internal_cmd_pois(), gui_internal_cmd_pois_filter(), gui_internal_cmd_position_do(), gui_internal_cmd_rename_bookmark(), gui_internal_cmd_show_satellite_status(), gui_internal_create_resultlist_entry(), gui_internal_html_start(), gui_internal_keyboard_do(), gui_internal_label_new_abbrev(), gui_internal_populate_route_table(), gui_internal_search(), gui_internal_select_waypoint(), gui_internal_time_help(), and gui_internal_top_bar().
struct widget* gui_internal_label_new_abbrev | ( | struct gui_priv * | this, |
const char * | text, | ||
int | maxwidth | ||
) |
References gui_internal_label_new(), gui_internal_widget_destroy(), p, widget::text, and widget::w.
Referenced by gui_internal_top_bar().
Renders a label, preparing it for drawing on the display.
this | The internal GUI instance |
w | The widget to render |
References widget::flags, widget::flags2, widget::font_idx, widget::foreground, graphics_draw_rectangle(), graphics_draw_text(), gravity_right, gui_internal_background_render(), widget::h, widget::p, widget::state, STATE_EDIT, widget::text, widget::text_background, widget::textw, widget::w, point::x, and point::y.
Referenced by gui_internal_widget_render().
|
static |
References _, widget::background, widget::bl, scroll_buttons::button_box, flags_swap, gravity_center, gui_internal_box_new(), gui_internal_button_new_with_callback(), gui_internal_table_button_next(), gui_internal_table_button_prev(), gui_internal_widget_append(), gui_internal_widget_pack(), image_new_xs(), scroll_buttons::next_button, orientation_horizontal, scroll_buttons::prev_button, widget::state, STATE_INVISIBLE, and STATE_SENSITIVE.
Referenced by gui_internal_box_pack(), and gui_internal_widget_table_new().
Handles the 'next page' table event.
A callback function that is invoked when the 'next page' button is pressed to advance the contents of a table widget.
this | The graphics context. |
wm | The button widget that was pressed. |
data |
References table_data::bottom_row, widget::data, data, gui_internal_menu_render(), gui_internal_table_hide_rows(), widget::state, STATE_HIGHLIGHTED, table_data::top_row, widget::type, and widget_table.
Referenced by gui_internal_cmd_pois(), gui_internal_gesture_do(), and gui_internal_scroll_buttons_init().
Handles the 'previous page' table event.
A callback function that is invoked when the 'previous page' button is pressed to go back in the contents of a table widget.
this | The graphics context. |
wm | The button widget that was pressed. |
References scroll_buttons::button_box, widget::data, data, gui_internal_menu_render(), gui_internal_table_hide_rows(), widget::h, widget::p, table_data::scroll_buttons, widget::state, STATE_HIGHLIGHTED, table_data::top_row, widget::type, widget::w, widget_table, and point::y.
Referenced by gui_internal_gesture_do(), and gui_internal_scroll_buttons_init().
void gui_internal_table_data_free | ( | void * | p | ) |
Deallocates a table_data structure.
p | The table_data structure |
References p.
Referenced by gui_internal_widget_table_new().
void gui_internal_table_hide_rows | ( | struct table_data * | table_data | ) |
Invalidates coordinates for previously rendered table widget rows.
table_data | Data from the table object. |
References table_data::bottom_row, widget::data, widget::h, widget::p, table_data::top_row, widget::type, widget::w, widget_table_row, point::x, and point::y.
Referenced by gui_internal_motion_cb(), gui_internal_table_button_next(), gui_internal_table_button_prev(), and gui_internal_table_render().
Computes the height and width for the table.
The height and width are computed to display all cells in the table at the requested height/width.
this | The graphics context |
w | The widget to pack. |
References scroll_buttons::button_box, widget::c, widget::children, widget::data, g_free_helper(), gui_internal_compute_table_dimensions(), gui_internal_widget_pack(), widget::h, table_column_desc::height, height, table_data::scroll_buttons, widget::w, table_column_desc::width, width, pcoord::x, and pcoord::y.
Referenced by gui_internal_widget_pack().
Renders a table widget, preparing it for drawing on the display.
this | The internal GUI instance |
w | The widget to render |
References table_data::bottom_row, scroll_buttons::button_box, scroll_buttons::button_box_hide, widget::children, widget::data, dbg, dbg_assert, debug_level_get(), g_free_helper(), graphics_draw_lines(), graphics_gc_new(), graphics_gc_set_foreground(), graphics_gc_set_linewidth(), gui_internal_compute_table_dimensions(), gui_internal_table_hide_rows(), gui_internal_widget_pack(), gui_internal_widget_render(), widget::h, lvl_debug, scroll_buttons::next_button, widget::p, scroll_buttons::prev_button, table_data::scroll_buttons, widget::state, STATE_INVISIBLE, STATE_OFFSCREEN, STATE_SENSITIVE, table_data::top_row, widget::w, point::x, and point::y.
Referenced by gui_internal_widget_render().
struct widget* gui_internal_text_font_new | ( | struct gui_priv * | this, |
const char * | text, | ||
int | font, | ||
enum flags flags flags | |||
) |
Creates a text box.
A text box is a widget that renders a text string containing newlines. The string will be broken up into label widgets at each newline with a vertical layout.
this | The internal GUI instance |
text | The text to be displayed in the text box |
font | The font to use for the text |
flags |
References gui_internal_box_new(), gui_internal_label_font_new(), gui_internal_widget_append(), gui_internal_widget_pack(), and widget::text.
Referenced by gui_internal_button_font_new_with_callback(), gui_internal_html_text(), and gui_internal_text_new().
struct widget* gui_internal_text_new | ( | struct gui_priv * | this, |
const char * | text, | ||
enum flags flags flags | |||
) |
References gui_internal_text_font_new(), and widget::text.
Referenced by gui_internal_cmd_enter_coord(), gui_internal_cmd_formerdests(), gui_internal_cmd_show_nmea_data(), and gui_internal_html_text().
Adds a child widget to a parent widget, making it the last child.
parent | The parent widget |
child | The child widget |
References widget::background, and widget::parent.
Referenced by gui_internal_add_vehicle_profile(), gui_internal_button_font_new_with_callback(), gui_internal_button_label(), 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_pois_selector(), 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_cmd_view_on_map(), gui_internal_create_resultlist_entry(), gui_internal_html_end(), gui_internal_html_menu(), gui_internal_html_text(), gui_internal_keyboard_do(), gui_internal_keyboard_key_data(), gui_internal_keyboard_show_native(), gui_internal_menu(), gui_internal_menu_vehicle_settings(), gui_internal_populate_route_table(), gui_internal_scroll_buttons_init(), gui_internal_search(), gui_internal_search_idle(), gui_internal_select_waypoint(), gui_internal_text_font_new(), gui_internal_time_help(), gui_internal_top_bar(), and gui_internal_widget_table_new().
Destroys all child widgets.
This function is recursive, destroying all widgets in the child hierarchy of
.
this | The internal GUI instance |
w | The widget whose children are to be destroyed |
References widget::data, gui_internal_widget_destroy(), and widget::w.
Referenced by gui_internal_keyboard_do(), and gui_internal_widget_destroy().
Destroys a widget.
This function also takes care of recursively destroying the entire child widget hierarchy of
prior to destroying
itself.
this | The internal GUI instance |
w | The widget to destroy |
References graphics_image_free(), gui_internal_widget_children_destroy(), and widget::w.
Referenced by gui_internal_cmd_bookmarks(), gui_internal_cmd_view_on_map(), gui_internal_label_new_abbrev(), gui_internal_menu_destroy(), gui_internal_top_bar(), gui_internal_widget_children_destroy(), gui_internal_widget_table_clear(), and gui_internal_widget_transfer_content().
void gui_internal_widget_insert_sorted | ( | struct widget * | parent, |
struct widget * | child, | ||
GCompareFunc | func | ||
) |
Adds a child widget to a parent widget.
Placement of the child widget among its siblings depends on the comparison function
.
parent | The parent widget |
child | The child widget |
func | The comparison function |
References widget::background, widget::func, and widget::parent.
Referenced by gui_internal_search_idle().
Move the content of one widget into another one (the src
widget is then deallocated and should be be used anymore)
this | The internal GUI instance | |
[in,out] | dst | The destination widget |
[in,out] | src | The source widget |
References gui_internal_widget_transfer_content().
Referenced by gui_internal_top_bar_resize().
References gui_internal_box_pack(), gui_internal_table_pack(), widget::w, widget_box, and widget_table.
Referenced by gui_internal_box_pack(), gui_internal_box_resize(), gui_internal_cmd_pois_selector(), gui_internal_compute_table_dimensions(), gui_internal_keyboard_do(), gui_internal_menu(), gui_internal_menu_render(), gui_internal_scroll_buttons_init(), gui_internal_search_idle(), gui_internal_table_pack(), gui_internal_table_render(), gui_internal_text_font_new(), and gui_internal_top_bar().
Adds a child widget to a parent widget, making it the first child.
parent | The parent widget |
child | The child widget |
References widget::background, and widget::parent.
Referenced by gui_internal_button_label(), gui_internal_cmd_formerdests(), and gui_internal_cmd_pois().
Renders widgets, preparing it for drawing on the display.
The appropriate render function will be called, depending on the type of widget
this | The internal GUI instance |
w | The widget to render |
References gui_internal_box_render(), gui_internal_image_render(), gui_internal_label_render(), gui_internal_table_render(), STATE_INVISIBLE, widget::w, widget_box, widget_image, widget_label, and widget_table.
Referenced by gui_internal_box_render(), gui_internal_button_attr_callback(), gui_internal_highlight(), gui_internal_highlight_do(), gui_internal_highlight_possible_keys(), gui_internal_keyboard_do(), gui_internal_keypress_do(), gui_internal_menu_render(), gui_internal_motion_cb(), gui_internal_search_changed(), gui_internal_search_idle(), and gui_internal_table_render().
References widget::data, and widget::w.
Referenced by gui_internal_keyboard_do(), gui_internal_menu(), and gui_internal_menu_reset_pack().
void gui_internal_widget_swap | ( | struct gui_priv * | this, |
struct widget * | first, | ||
struct widget * | second | ||
) |
Swap two widgets.
this | The internal GUI instance | |
[in,out] | first | The first widget |
[in,out] | second | The second widget |
References gui_internal_widget_transfer_content().
Clears all the rows from the table.
This function removes all rows from a table. New rows can later be added to the table.
this | The internal GUI instance |
table | The table widget |
References table_data::bottom_row, scroll_buttons::button_box, widget::children, widget::data, gui_internal_widget_destroy(), table_data::scroll_buttons, and table_data::top_row.
Referenced by gui_internal_populate_route_table(), and gui_internal_search_changed().
Moves GList pointer to the first table row, skipping other table children (button box, for example).
row | GList pointer into the children list |
References gui_internal_widget_table_next_row(), and widget_table_row.
Referenced by gui_internal_widget_table_set_top_row(), and gui_internal_widget_table_top_row().
struct widget* gui_internal_widget_table_new | ( | struct gui_priv * | this, |
enum flags flags flags | , | ||
int | buttons | ||
) |
Creates a new table widget.
Creates and returns a new table widget. This function will setup next/previous buttons as children.
this | The graphics context. |
flags | widget sizing flags. |
References widget::background, widget::data, data, widget::data_free, widget::flags, gui_internal_scroll_buttons_init(), gui_internal_table_data_free(), gui_internal_widget_append(), widget::state, STATE_SCROLLABLE, widget::type, and widget_table.
Referenced by gui_internal_cmd2_route_description(), gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_pois(), gui_internal_cmd_position_do(), gui_internal_cmd_show_satellite_status(), gui_internal_cmd_view_on_map(), gui_internal_menu_vehicle_settings(), gui_internal_search(), and gui_internal_select_waypoint().
Moves GList pointer to the next table row, skipping other table children (button box, for example).
row | GList pointer into the children list |
References widget_table_row.
Referenced by gui_internal_motion_cb(), and gui_internal_widget_table_first_row().
Moves GList pointer to the previous table row, skipping other table children (button box, for example).
row | GList pointer into the children list |
References widget_table_row.
Referenced by gui_internal_motion_cb().
Creates a new table_row widget.
this | The graphics context |
flags | Sizing flags for the row |
References widget::flags, widget::type, and widget_table_row.
Referenced by gui_internal_cmd2_setting_layout(), gui_internal_cmd2_setting_maps(), gui_internal_cmd_bookmarks(), gui_internal_cmd_formerdests(), gui_internal_cmd_pois(), gui_internal_cmd_position_do(), gui_internal_cmd_show_satellite_status(), gui_internal_cmd_view_on_map(), gui_internal_menu_vehicle_settings(), gui_internal_populate_route_table(), gui_internal_search_idle(), and gui_internal_select_waypoint().
GList* gui_internal_widget_table_set_top_row | ( | struct gui_priv * | this, |
struct widget * | table, | ||
struct widget * | row | ||
) |
Sets internal top row pointer of the table to point to a given row widget.
References widget::children, widget::data, gui_internal_widget_table_first_row(), table_data::top_row, widget::type, and widget_table.
Referenced by gui_internal_populate_route_table().
Gets GList pointer to the table row drawn on the top of the screen.
References widget::data, gui_internal_widget_table_first_row(), table_data::top_row, widget::type, and widget_table.
Referenced by gui_internal_keypress_do(), and gui_internal_populate_route_table().
|
static |
Transfer the content of one widget into another one (and optionally vice-versa)
this | The internal GUI instance | |
[in,out] | first | The first widget |
[in,out] | second | The second widget |
move_only | If non nul, transfer only the second widget into the first widget. The second widget is then deallocated and should be be used anymore (this is a move operation) |
References dbg, gui_internal_widget_destroy(), and lvl_error.
Referenced by gui_internal_widget_move(), and gui_internal_widget_swap().