Maeomm Reference Documentation: hildonsmm
Main Page   Namespaces   Book  

Hildon::TouchSelector Class Reference

Inheritance diagram for Hildon::TouchSelector:

Inheritance graph
[legend]

List of all members.


Detailed Description

A selector widget with several columns.

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 individually 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 use the simpler TouchSelectorText class.

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.

Public Types

typedef TouchSelectorColumn Column
typedef TouchSelectorSelectionMode SelectionMode

Public Member Functions

Glib::RefPtr<TouchSelectorColumnappend_column (const Glib::RefPtr<Gtk::TreeModel>& model, Gtk::CellRenderer& cell_renderer)
template<class ColumnType>
Glib::RefPtr<TouchSelectorColumnappend_text_column (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModelColumn<ColumnType>& model_column, bool center=false)
Glib::RefPtr<TouchSelectorColumnappend_text_column (const Glib::RefPtr<Gtk::TreeModel>& model, bool center=false)
void center_on_selected ()
Gtk::TreeModel::iterator get_active (int column=0) const
 Gets an iterator that points to the current active item, if it exists.
int get_active_row_number (int column=0) const
Glib::RefPtr< const
TouchSelectorColumn
get_column (int column) const
Glib::RefPtr<TouchSelectorColumnget_column (int column)
TouchSelectorSelectionMode get_column_selection_mode () const
Glib::ustring get_current_text () const
Glib::RefPtr< const
Gtk::TreeModel
get_model (int column) const
Glib::RefPtr<Gtk::TreeModelget_model (int column)
int get_num_columns () const
Gtk::TreeModel::iterator get_selected (int column)
Gtk::TreeSelection::ListHandle_Path get_selected_rows (int column) const
const HildonTouchSelector* gobj () const
 Provides access to the underlying C GtkObject.
HildonTouchSelector* gobj ()
 Provides access to the underlying C GtkObject.
bool has_multiple_selection () const
bool remove_column (int column)
void select_iter (int column, const Gtk::TreeModel::iterator& iter, bool scroll_to)
void set_active (int column, const Gtk::TreeModel::iterator& iter)
void set_active (int column, int index)
void set_column_selection_mode (TouchSelectorSelectionMode mode)
void set_model (int column, const Glib::RefPtr<Gtk::TreeModel>& model)
void set_print_func (const sigc::slot<Glib::ustring>& func)
Glib::SignalProxy1<void, int> signal_changed ()
Glib::SignalProxy0<void> signal_columns_changed ()
 TouchSelector ()
void unselect_all (int column)
void unselect_iter (int column, const Gtk::TreeModel::iterator& iter)
void unset_active (int column)
 Causes no item to be active.
void unset_print_func ()
virtual ~TouchSelector ()

Related Functions

(Note that these are not member functions.)

Hildon::TouchSelectorwrap (HildonTouchSelector* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Member Typedef Documentation


Constructor & Destructor Documentation

virtual Hildon::TouchSelector::~TouchSelector (  )  [virtual]

Hildon::TouchSelector::TouchSelector (  ) 


Member Function Documentation

Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::append_column ( const Glib::RefPtr< Gtk::TreeModel > &  model,
Gtk::CellRenderer cell_renderer 
)

template <class ColumnType>
Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::append_text_column ( const Glib::RefPtr< Gtk::TreeModel > &  model,
const Gtk::TreeModelColumn< ColumnType > &  model_column,
bool  center = false 
) [inline]

Glib::RefPtr<TouchSelectorColumn> Hildon::TouchSelector::append_text_column ( const Glib::RefPtr< Gtk::TreeModel > &  model,
bool  center = false 
)

Referenced by append_text_column().

void Hildon::TouchSelector::center_on_selected (  ) 

Gtk::TreeModel::iterator Hildon::TouchSelector::get_active ( int  column = 0  )  const

Gets an iterator that points to the current active item, if it exists.

Returns:
The iterator.

int Hildon::TouchSelector::get_active_row_number ( int  column = 0  )  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

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,
const Gtk::TreeModel::iterator iter 
)

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

Prototype:
void on_my_changed(int column)

Glib::SignalProxy0< void > Hildon::TouchSelector::signal_columns_changed (  ) 

Prototype:
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_active ( int  column  ) 

Causes no item to be active.

See also set_active().

void Hildon::TouchSelector::unset_print_func (  ) 


Friends And Related Function Documentation

Hildon::TouchSelector* wrap ( HildonTouchSelector *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
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.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:

Generated for hildonmm by Doxygen 1.5.6 © 1997-2001