Maeomm Reference Documentation: hildonsmm |
Hildon::TouchSelector is a selector widget, that allows users to select items from one to many predefined lists. It is very similar to Gtk::ComboBox, but with several individual pannable columns.
Normally, you would use Hildon::TouchSelector together with a Hildon::PickerDialog activated from a button. For the most common cases, you should use Hildon::PickerButton.
The composition of each column in the selector is represented by a Gtk::TreeModel. To add a new column to a Hildon::TouchSelector, use Hildon::TouchSelector::append_column(). If you want to add a text-only column, without special attributes, use Hildon::TouchSelector::append_text_column().
It is highly recommended that you use only one column Hildon::TouchSelectors. If you only need a text only, one column selector, you can create it with Hildon::TouchSelector::append_text_column() and populate with Hildon::TouchSelector::append_text(), Hildon::TouchSelector::prepend_text(), and Hildon::TouchSelector::insert_text().
If you need a selector widget that also accepts user inputs, you can use Hildon::TouchSelectorEntry.
The current selection has a string representation. In the most common cases, each column model will contain a text column. You can configure which column in particular using Hildon::TouchSelectorColumn::property_text_column().
You can get this string representation using Hildon::TouchSelector::get_current_text(). You can configure how the selection is printed with Hildon::TouchSelector::set_print_func(), that sets the current hildon touch selector print function. The widget has a default print function, that uses the Hildon::TouchSelectorColumn::property_text_column() on each Hildon::TouchSelectorColumn to compose the final representation.
If you create the selector using Hildon_touch_selector_new_text() you don't need to take care of this property, as the model is created internally. If you create the selector using hildon_touch_selector_new(), you need to specify properly the property for your custom model in order to get a non-empty string representation, or define your custom print function.
virtual Hildon::TouchSelector::~TouchSelector | ( | ) | [virtual] |
Hildon::TouchSelector::TouchSelector | ( | ) |
Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::append_column | ( | const Glib::RefPtr< Gtk::TreeModel > & | model, | |
Gtk::CellRenderer & | cell_renderer | |||
) |
void Hildon::TouchSelector::append_text | ( | const Glib::ustring & | text | ) |
Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::append_text_column | ( | const Glib::RefPtr< Gtk::TreeModel > & | model, | |
bool | center = false | |||
) |
void Hildon::TouchSelector::center_on_selected | ( | ) |
int Hildon::TouchSelector::get_active | ( | int | column | ) | const |
Glib::RefPtr<const TouchSelectorColumn> Hildon::TouchSelector::get_column | ( | int | column | ) | const |
Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::get_column | ( | int | column | ) |
TouchSelectorSelectionMode Hildon::TouchSelector::get_column_selection_mode | ( | ) | const |
Glib::ustring Hildon::TouchSelector::get_current_text | ( | ) | const |
Glib::RefPtr<const Gtk::TreeModel> Hildon::TouchSelector::get_model | ( | int | column | ) | const |
Glib::RefPtr<Gtk::TreeModel> Hildon::TouchSelector::get_model | ( | int | column | ) |
int Hildon::TouchSelector::get_num_columns | ( | ) | const |
Gtk::TreeModel::iterator Hildon::TouchSelector::get_selected | ( | int | column | ) |
Gtk::TreeSelection::ListHandle_Path Hildon::TouchSelector::get_selected_rows | ( | int | column | ) | const |
const HildonTouchSelector* Hildon::TouchSelector::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::VBox.
Reimplemented in Hildon::DateSelector, Hildon::TimeSelector, and Hildon::TouchSelectorEntry.
HildonTouchSelector* Hildon::TouchSelector::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::VBox.
Reimplemented in Hildon::DateSelector, Hildon::TimeSelector, and Hildon::TouchSelectorEntry.
bool Hildon::TouchSelector::has_multiple_selection | ( | ) | const |
void Hildon::TouchSelector::insert_text | ( | int | position, | |
const Glib::ustring & | text | |||
) |
void Hildon::TouchSelector::prepend_text | ( | const Glib::ustring & | text | ) |
bool Hildon::TouchSelector::remove_column | ( | int | column | ) |
void Hildon::TouchSelector::select_iter | ( | int | column, | |
const Gtk::TreeModel::iterator & | iter, | |||
bool | scroll_to | |||
) |
void Hildon::TouchSelector::set_active | ( | int | column, | |
int | index | |||
) |
void Hildon::TouchSelector::set_column_selection_mode | ( | TouchSelectorSelectionMode | mode | ) |
void Hildon::TouchSelector::set_model | ( | int | column, | |
const Glib::RefPtr< Gtk::TreeModel > & | model | |||
) |
void Hildon::TouchSelector::set_print_func | ( | const sigc::slot< Glib::ustring > & | func | ) |
Glib::SignalProxy1< void,int > Hildon::TouchSelector::signal_changed | ( | ) |
void on_my_changed(int column)
Glib::SignalProxy0< void > Hildon::TouchSelector::signal_columns_changed | ( | ) |
void on_my_columns_changed()
void Hildon::TouchSelector::unselect_all | ( | int | column | ) |
void Hildon::TouchSelector::unselect_iter | ( | int | column, | |
const Gtk::TreeModel::iterator & | iter | |||
) |
void Hildon::TouchSelector::unset_print_func | ( | ) |
Hildon::TouchSelector* wrap | ( | HildonTouchSelector * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |