HildonTouchSelectorEntry

HildonTouchSelectorEntry — A selector widget with one column and a text entry

Synopsis


#include <hildon/hildon.h>

                    HildonTouchSelectorEntry;
GtkWidget*          hildon_touch_selector_entry_new     (void);
GtkWidget*          hildon_touch_selector_entry_new_text
                                                        (void);
void                hildon_touch_selector_entry_set_text_column
                                                        (HildonTouchSelectorEntry *selector,
                                                         gint text_column);
gint                hildon_touch_selector_entry_get_text_column
                                                        (HildonTouchSelectorEntry *selector);
void                hildon_touch_selector_entry_set_input_mode
                                                        (HildonTouchSelectorEntry *selector,
                                                         HildonGtkInputMode input_mode);
HildonGtkInputMode  hildon_touch_selector_entry_get_input_mode
                                                        (HildonTouchSelectorEntry *selector);
HildonEntry*        hildon_touch_selector_entry_get_entry
                                                        (HildonTouchSelectorEntry *selector);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----HildonTouchSelector
                                             +----HildonTouchSelectorEntry

Implemented Interfaces

HildonTouchSelectorEntry implements AtkImplementorIface and GtkBuildable.

Properties

  "smart-match"              gboolean              : Read / Write / Construct
  "text-column"              gint                  : Read / Write

Description

HildonTouchSelectorEntry is a selector widget with a text entry, similar in behaviour to GtkComboBoxEntry, that allows user to select an item from a predefined list or to enter a different one in a HildonEntry. Items can also be searched and selected by typing in the entry. For more specific use cases, the HildonEntry can be accessed directly with hildon_touch_selector_get_entry().

The main difference between the GtkTreeModel used by HildonTouchSelector and HildonTouchSelectorEntry, is that the latter must always include a text column. You should set it with hildon_touch_selector_entry_set_text_column().

Normally, you would use HildonTouchSelectorEntry together with a HildonPickerDialog activated from a button. For the most common cases, you should use HildonPickerButton.

If you only need a text only, one column selector, you can create it with hildon_touch_selector_entry_new_text() and populate it with hildon_touch_selector_append_text(), hildon_touch_selector_prepend_text(), and hildon_touch_selector_insert_text().

Details

HildonTouchSelectorEntry

typedef struct _HildonTouchSelectorEntry HildonTouchSelectorEntry;


hildon_touch_selector_entry_new ()

GtkWidget*          hildon_touch_selector_entry_new     (void);

Creates a HildonTouchSelectorEntry

Returns : A new HildonTouchSelectorEntry

Since 2.2


hildon_touch_selector_entry_new_text ()

GtkWidget*          hildon_touch_selector_entry_new_text
                                                        (void);

Creates a HildonTouchSelectorEntry with a single text column that can be populated conveniently through hildon_touch_selector_append_text(), hildon_touch_selector_prepend_text(), hildon_touch_selector_insert_text().

Returns : A new HildonTouchSelectorEntry

Since 2.2


hildon_touch_selector_entry_set_text_column ()

void                hildon_touch_selector_entry_set_text_column
                                                        (HildonTouchSelectorEntry *selector,
                                                         gint text_column);

Sets the model column which touch selector box should use to get strings from to be text_column.

selector : A HildonTouchSelectorEntry
text_column : A column in model to get the strings from

Since 2.2


hildon_touch_selector_entry_get_text_column ()

gint                hildon_touch_selector_entry_get_text_column
                                                        (HildonTouchSelectorEntry *selector);

Gets the text column that selector is using as a text column.

selector : A HildonTouchSelectorEntry
Returns : the number of the column used as a text column.

Since 2.2


hildon_touch_selector_entry_set_input_mode ()

void                hildon_touch_selector_entry_set_input_mode
                                                        (HildonTouchSelectorEntry *selector,
                                                         HildonGtkInputMode input_mode);

Sets the input mode to be used in the GtkEntry in selector. See hildon_gtk_entry_set_input_mode() for details.

It must be noted that not all input modes are available for the entry in selector. In particular, HILDON_GTK_INPUT_MODE_MULTILINE, HILDON_GTK_INPUT_MODE_INVISIBLE, HILDON_GTK_INPUT_MODE_DICTIONARY are disabled, since these are irrelevant for HildonTouchSelectorEntry.

selector : a HildonTouchSelectorEntry
input_mode : HildonGtkInputMode mask

Since 2.2


hildon_touch_selector_entry_get_input_mode ()

HildonGtkInputMode  hildon_touch_selector_entry_get_input_mode
                                                        (HildonTouchSelectorEntry *selector);

Gets the input mode used in the GtkEntry in selector. See hildon_gtk_entry_get_input_mode() for details.

selector : a HildonTouchSelectorEntry
Returns : a mask of HildonGtkInputMode

Since 2.2


hildon_touch_selector_entry_get_entry ()

HildonEntry*        hildon_touch_selector_entry_get_entry
                                                        (HildonTouchSelectorEntry *selector);

Provides access to the HildonEntry in selector. Use to programmatically change the contents in entry or modify its behavior.

selector : a HildonTouchSelectorEntry.
Returns : a HildonEntry.

Since 2.2

Property Details

The "smart-match" property

  "smart-match"              gboolean              : Read / Write / Construct

Whether the widget should suggest an element if an approximate match is found.

By default, HildonTouchSelectorEntry replaces automatically the content of the entry if you find an exact case match while you are writing. But if this property is set to TRUE, the widget will suggest an element by selecting it if an approximate (e.g. case-insensitive) match is found.

Default value: TRUE

Since 2.2.12


The "text-column" property

  "text-column"              gint                  : Read / Write

A column in the data source model to get the strings from.

This property is deprecated. Use HildonTouchSelectorColumn:text-column instead. Use hildon_touch_selector_entry_set_text_column() and hildon_touch_selector_entry_get_text_column() to manage it.

Allowed values: >= -1

Default value: -1

Since 2.2

See Also

HildonTouchSelector, HildonPickerButton