navit
0.5.3-trunk
|
Go to the source code of this file.
Enumerations | |
enum | vkbd_mode { VKBD_LATIN_UPPER = 0 , VKBD_LATIN_LOWER = 8 , VKBD_NUMERIC = 16 , VKBD_UMLAUT_UPPER = 24 , VKBD_UMLAUT_LOWER = 32 , VKBD_CYRILLIC_UPPER = 40 , VKBD_CYRILLIC_LOWER = 48 , VKBD_DEGREE = 56 , VKBD_GREEK_UPPER = 64 , VKBD_GREEK_LOWER = 72 , VKBD_FLAG_2 = 2 , VKBD_MASK_7 = 7 , VKBD_FLAG_1024 = 1024 , VKBD_LAYOUT_MASK = ~7 } |
Functions | |
struct widget * | gui_internal_keyboard_do (struct gui_priv *this, struct widget *wkbdb, int mode) |
Creates a new keyboard widget or switches the layout of an existing widget. More... | |
struct widget * | gui_internal_keyboard (struct gui_priv *this, int mode) |
Creates a keyboard widget. More... | |
struct widget * | gui_internal_keyboard_show_native (struct gui_priv *this, struct widget *w, int mode, char *lang) |
Shows the platform's native on-screen keyboard or other input method. More... | |
int | gui_internal_keyboard_init_mode (char *lang) |
Returns the default keyboard mode for a country. More... | |
void | gui_internal_keyboard_to_upper_case (struct gui_priv *this) |
Switch keyboard mode to uppercase if it's in lowercase mode and. More... | |
void | gui_internal_keyboard_to_lower_case (struct gui_priv *this) |
Switch keyboard mode to lowercase if it's in uppercase mode and. More... | |
enum vkbd_mode |
Modes for the on-screen keyboard
Creates a keyboard widget.
This function creates a widget to display the internal GUI keyboard.
The
argument specifies the type of keyboard which should initially be displayed. Refer to vkbd_mode for a list of possible modes and their meaning.
this | The internal GUI instance |
mode | The mode for the keyboard |
Creates a new keyboard widget or switches the layout of an existing widget.
This is an internal helper function that is not normally called directly. To create a new keyboard widget, GUI widgets should call gui_internal_keyboard(struct gui_priv *, struct widget *, int).
this | The internal GUI instance |
wkbdb | The existing keyboard widget whose layout is to be switched, or NULL
|
mode | The new keyboard mode, see gui_internal_keyboard(struct gui_priv *, struct widget *, int) for a description of possible values |
References widget::background, widget::bb, widget::bl, widget::br, widget::bt, scroll_buttons::button_box_hide, widget::cols, widget::data, widget::datai, flags_fill, gui_internal_keyb_mode::font, widget::func, gravity_center, gui_internal_box_new(), gui_internal_highlight(), gui_internal_keyb_modes, gui_internal_keyboard_change(), gui_internal_keyboard_key(), gui_internal_keyboard_key_data(), gui_internal_keyboard_topbox_resize(), gui_internal_label_font_new(), gui_internal_label_new(), gui_internal_menu_data(), gui_internal_menu_render(), gui_internal_menu_reset_pack(), gui_internal_widget_append(), gui_internal_widget_children_destroy(), gui_internal_widget_pack(), gui_internal_widget_render(), gui_internal_widget_reset_pack(), widget::h, menu_data::keyboard, menu_data::keyboard_mode, widget::on_resize, orientation_horizontal, orientation_horizontal_vertical, widget::p, table_data::scroll_buttons, menu_data::search_list, widget::spx, widget::spy, widget::state, STATE_SENSITIVE, widget::text, gui_internal_keyb_mode::title, widget::type, VKBD_CYRILLIC_LOWER, VKBD_CYRILLIC_UPPER, VKBD_DEGREE, VKBD_FLAG_1024, VKBD_GREEK_LOWER, VKBD_GREEK_UPPER, VKBD_LATIN_LOWER, VKBD_LATIN_UPPER, VKBD_LAYOUT_MASK, VKBD_MASK_7, VKBD_NUMERIC, VKBD_UMLAUT_LOWER, VKBD_UMLAUT_UPPER, widget::w, widget_table, and point::y.
Referenced by gui_internal_keyboard(), gui_internal_keyboard_change(), gui_internal_keyboard_to_lower_case(), gui_internal_keyboard_to_upper_case(), and gui_internal_keyboard_topbox_resize().
int gui_internal_keyboard_init_mode | ( | char * | lang | ) |
Returns the default keyboard mode for a country.
The return value can be passed to gui_internal_keyboard(struct gui_priv *, int) and related functions.
lang | The two-letter country code |
References VKBD_CYRILLIC_UPPER, VKBD_GREEK_UPPER, and VKBD_LATIN_UPPER.
Referenced by gui_internal_cmd_add_bookmark2(), gui_internal_cmd_add_bookmark_folder2(), gui_internal_cmd_log(), gui_internal_cmd_pois_filter(), gui_internal_cmd_rename_bookmark(), gui_internal_html_menu(), and gui_internal_search().
struct widget* gui_internal_keyboard_show_native | ( | struct gui_priv * | this, |
struct widget * | w, | ||
int | mode, | ||
char * | lang | ||
) |
Shows the platform's native on-screen keyboard or other input method.
This method is a wrapper around the corresponding method of the graphics plugin, which takes care of all platform-specific details. In particular, it is up to the graphics plugin to determine how to handle the request: it may show its on-screen keyboard or another input method (such as stroke recognition). It may choose to simply ignore the request, which will typically occur when a hardware keyboard (or other hardware input) is available.
The platform's native input method may obstruct parts of Navit's UI. To prevent parts of the UI from becoming unreachable, this method will insert an empty box widget in the appropriate size at the appropriate position, provided the graphics plugin reports the correct values. Otherwise a zero-size widget is inserted. If the graphics driver decides not to display an on-screen input method, no widget will be created and the return value will be
.
The widget's
function, to be called when the widget is destroyed, will be used to hide the platform keyboard when it is no longer needed.
this | The internal GUI instance |
w | The parent of the widget requiring text input |
mode | The requested keyboard mode |
lang | The language for text input, used to select a keyboard layout |
void gui_internal_keyboard_to_lower_case | ( | struct gui_priv * | this | ) |
Switch keyboard mode to lowercase if it's in uppercase mode and.
is set.
Called on each alphanumeric input.
this | The internal GUI instance |
References gui_internal_keyboard_do(), gui_internal_menu_data(), menu_data::keyboard, menu_data::keyboard_mode, VKBD_CYRILLIC_LOWER, VKBD_CYRILLIC_UPPER, VKBD_FLAG_2, VKBD_GREEK_LOWER, VKBD_GREEK_UPPER, VKBD_LATIN_LOWER, VKBD_LATIN_UPPER, VKBD_UMLAUT_LOWER, and VKBD_UMLAUT_UPPER.
Referenced by gui_internal_keypress_do().
void gui_internal_keyboard_to_upper_case | ( | struct gui_priv * | this | ) |
Switch keyboard mode to uppercase if it's in lowercase mode and.
is set.
Called when there's no input left in the input field.
this | The internal GUI instance |
References gui_internal_keyboard_do(), gui_internal_menu_data(), menu_data::keyboard, menu_data::keyboard_mode, VKBD_CYRILLIC_LOWER, VKBD_CYRILLIC_UPPER, VKBD_FLAG_2, VKBD_GREEK_LOWER, VKBD_GREEK_UPPER, VKBD_LATIN_LOWER, VKBD_LATIN_UPPER, VKBD_UMLAUT_LOWER, and VKBD_UMLAUT_UPPER.
Referenced by gui_internal_keypress_do().