Maemomm Reference Documentation: hildonmm
Main Page   Namespaces   Book  

Hildon::PickerButton Class Reference
[WidgetsButtons]

A button that launches a Hildon::PickerDialog and displays the selected item. More...

Inheritance diagram for Hildon::PickerButton:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~PickerButton ()
HildonPickerButton * gobj ()
 Provides access to the underlying C GtkObject.
const HildonPickerButton * gobj () const
 Provides access to the underlying C GtkObject.
 PickerButton ()
 PickerButton (Gtk::Hildon::SizeType size, ButtonArrangement arrangement)
void set_selector (TouchSelector &selector)
 Sets selector as the Hildon::TouchSelector to be shown in the Hildon::PickerDialog that button brings up.
TouchSelectorget_selector ()
 Retrieves the Hildon::TouchSelector associated to button.
const TouchSelectorget_selector () const
 Retrieves the Hildon::TouchSelector associated to button.
void set_selected_row_number (int index)
 Sets the active item of the Hildon::TouchSelector associated to button to index.
void set_selected (const Gtk::TreeModel::iterator &iter)
 Sets the active item of the TouchSelector associated with the button.
void unselect ()
 Causes the TouchSelector associated with the button to have no selected item If the selector has several columns then only the first one is used.
int get_selected_row_number () const
 Returns: an integer which is the index of the currently active item, or -1 if there's no active item.
Gtk::TreeModel::iterator get_selected ()
 Returns the iterator of the currently active item, or an invalid iterator if there's no active item.
void set_done_button_text (const Glib::ustring &done_button_text)
 Sets a custom string to be used in the "done" button in Hildon::PickerDialog.
Glib::ustring get_done_button_text () const
 Gets the text used in the Hildon::PickerDialog that is launched by the Hildon::PickerButton.
void value_changed ()
 Emits a "Hildon::PickerButton::value-changed" signal to the given Hildon::PickerButton.
Glib::SignalProxy0< void > signal_value_changed ()

Related Functions

(Note that these are not member functions.)

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


Detailed Description

A button that launches a Hildon::PickerDialog and displays the selected item.

The PickerButton widget lets the user select a particular item from a list. Visually, it's a button with title and value labels that brings up a Hildon::PickerDialog. The user can then use this dialog to choose an item, which will be displayed in the value label of the button.

You should create your own Hildon::TouchSelector at convenience and set it to the Hildon::PickerButton with Hildon::PickerButton::set_selector(). For the common use cases of buttons to select date and time, you can use Hildon::DateButton and Hildon::TimeButton.

See also:
Hildon::TouchSelector, Hildon::PickerDialog

Constructor & Destructor Documentation

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

Hildon::PickerButton::PickerButton (  ) 

Hildon::PickerButton::PickerButton ( Gtk::Hildon::SizeType  size,
ButtonArrangement  arrangement 
) [explicit]


Member Function Documentation

HildonPickerButton* Hildon::PickerButton::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Hildon::Button.

Reimplemented in Hildon::DateButton, and Hildon::TimeButton.

const HildonPickerButton* Hildon::PickerButton::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Hildon::Button.

Reimplemented in Hildon::DateButton, and Hildon::TimeButton.

void Hildon::PickerButton::set_selector ( TouchSelector selector  ) 

Sets selector as the Hildon::TouchSelector to be shown in the Hildon::PickerDialog that button brings up.

{2,2}

Parameters:
selector A Hildon::TouchSelector.

TouchSelector* Hildon::PickerButton::get_selector (  ) 

Retrieves the Hildon::TouchSelector associated to button.

Returns:
A Hildon::TouchSelector
{2,2}.

Reimplemented in Hildon::DateButton, and Hildon::TimeButton.

const TouchSelector* Hildon::PickerButton::get_selector (  )  const

Retrieves the Hildon::TouchSelector associated to button.

Returns:
A Hildon::TouchSelector
{2,2}.

Reimplemented in Hildon::DateButton, and Hildon::TimeButton.

void Hildon::PickerButton::set_selected_row_number ( int  index  ) 

Sets the active item of the Hildon::TouchSelector associated to button to index.

If the selector has several columns, only the first one is used.

{2,2}

Parameters:
index The index of the item to select, or -1 to have no active item.

void Hildon::PickerButton::set_selected ( const Gtk::TreeModel::iterator iter  ) 

Sets the active item of the TouchSelector associated with the button.

If the selector has several columns then only the first one is used.

Parameters:
iter An iterator indicating the item to select.

void Hildon::PickerButton::unselect (  ) 

Causes the TouchSelector associated with the button to have no selected item If the selector has several columns then only the first one is used.

int Hildon::PickerButton::get_selected_row_number (  )  const

Returns: an integer which is the index of the currently active item, or -1 if there's no active item.

Returns:
An integer which is the index of the currently active item, or -1 if there's no active item.
{2,2}.

Gtk::TreeModel::iterator Hildon::PickerButton::get_selected (  ) 

Returns the iterator of the currently active item, or an invalid iterator if there's no active item.

If the selector has several columns then only the first one is used.

void Hildon::PickerButton::set_done_button_text ( const Glib::ustring done_button_text  ) 

Sets a custom string to be used in the "done" button in Hildon::PickerDialog.

If unset, the default HildonPickerButton::done-button-text property value will be used.

{2,2}

Parameters:
done_button_text A string.

Glib::ustring Hildon::PickerButton::get_done_button_text (  )  const

Gets the text used in the Hildon::PickerDialog that is launched by the Hildon::PickerButton.

{2,2}

Returns:
The custom string to be used.

void Hildon::PickerButton::value_changed (  ) 

Emits a "Hildon::PickerButton::value-changed" signal to the given Hildon::PickerButton.

{2,2}

Glib::SignalProxy0< void > Hildon::PickerButton::signal_value_changed (  ) 

Prototype:
void on_my_value_changed()


Friends And Related Function Documentation

Hildon::PickerButton * wrap ( HildonPickerButton *  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