Maeomm Reference Documentation: hildon-libsmm
Main Page   Namespaces   Book  

Hildon::TelephoneEditor Class Reference
[Widgets]

Inheritance diagram for Hildon::TelephoneEditor:

Inheritance graph
[legend]
List of all members.

Detailed Description

Hildon::TelephoneEditor is single-line editor which allows the user to enter a telephone number.

There are two modes to choose from: coerce or free format.

Coerce format has three fields which are placed horizontally. The fields are: country code, area code and number. When nothing is entered in the fields, assisting text is displayed. Tapping on the field highlights the field and allows users to input numbers.

The widget is used where a user should enter a phone number. Free format should be used wherever possible as it enables the user to enter the phone number in whatever format he likes. Free format also supports DTMF strings as a part of the phone number. The format cannot be changed at runtime.


Public Member Functions

Glib::ustring get_area () const
 Get text in the area field in coarse format.
Glib::ustring get_country () const
 Get text in the country field in coarse format.
Glib::ustring get_number () const
 Get text in the number field in all formats.
bool get_show_border () const
 Get the visibility status of the border around the widget.
bool get_show_plus () const
 Get the visibility status of the plus sign in front of coerce format's country field.
const HildonTelephoneEditor* gobj () const
 Provides access to the underlying C GtkObject.
HildonTelephoneEditor* gobj ()
 Provides access to the underlying C GtkObject.
void set_area (const Glib::ustring& area)
 Set text in the area field in coarse format.
void set_country (const Glib::ustring& country)
 Set text in the country field in coarse format.
void set_editable (bool country=true, bool area=true, bool number=true)
 Specify wheter the fields in coerse format are editable or not.
void set_number (const Glib::ustring& number)
 Set text in the number field in all formats.
void set_show_border (bool show=true)
 Show or hide the border around the widget.
void set_show_plus (bool show=true)
 Show or hide the plus sign in front of coerce format's country field.
void set_widths (guint country, guint area, guint number)
 Set widths of the fields in coecse format.
 TelephoneEditor (TelephoneEditorFormat format, const Glib::ustring& country, const Glib::ustring& area, const Glib::ustring& number)
 TelephoneEditor (TelephoneEditorFormat format)
virtual ~TelephoneEditor ()

Related Functions

(Note that these are not member functions.)

Hildon::TelephoneEditorwrap (HildonTelephoneEditor* object, bool take_copy=false)


Constructor & Destructor Documentation

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

Hildon::TelephoneEditor::TelephoneEditor ( TelephoneEditorFormat  format  )  [explicit]
 

Hildon::TelephoneEditor::TelephoneEditor ( TelephoneEditorFormat  format,
const Glib::ustring country,
const Glib::ustring area,
const Glib::ustring number
[explicit]
 


Member Function Documentation

Glib::ustring Hildon::TelephoneEditor::get_area (  )  const
 

Get text in the area field in coarse format.

This function must not be called if in free mode or in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode.

Returns:
The text in the area field.

Glib::ustring Hildon::TelephoneEditor::get_country (  )  const
 

Get text in the country field in coarse format.

This function must not be called if in free mode.

Returns:
Pointer to the text in the country field.

Glib::ustring Hildon::TelephoneEditor::get_number (  )  const
 

Get text in the number field in all formats.

In free mode, this functions returns the whole phone number. In coarce mode, it returns only the number field. This function must not be called if the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY modes.

Returns:
Pointer to text in the number field.

bool Hildon::TelephoneEditor::get_show_border (  )  const
 

Get the visibility status of the border around the widget.

Returns:
bool.

bool Hildon::TelephoneEditor::get_show_plus (  )  const
 

Get the visibility status of the plus sign in front of coerce format's country field.

Returns:
bool.

const HildonTelephoneEditor* Hildon::TelephoneEditor::gobj (  )  const [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

HildonTelephoneEditor* Hildon::TelephoneEditor::gobj (  )  [inline]
 

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Container.

void Hildon::TelephoneEditor::set_area ( const Glib::ustring area  ) 
 

Set text in the area field in coarse format.

This function must not be called if in free mode or in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode.

Parameters:
area Text to be set in area field.

void Hildon::TelephoneEditor::set_country ( const Glib::ustring country  ) 
 

Set text in the country field in coarse format.

This function must not be called if in free mode.

Parameters:
country Text to be set in country field.

void Hildon::TelephoneEditor::set_editable ( bool  country = true,
bool  area = true,
bool  number = true
 

Specify wheter the fields in coerse format are editable or not.

This function is ignored if the editor is in free mode. The number or area and number parameters are ignored if the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY formats, respectively.

Parameters:
country Set the editable status of the country field in coarce format.
area Set the editable status of the area field in coarce format.
number Set the editable status of the number field in coarce format.

void Hildon::TelephoneEditor::set_number ( const Glib::ustring number  ) 
 

Set text in the number field in all formats.

In free mode this functions sets the whole phone number. In coerce mode, it sets only the number field. This function must not be called if the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERSE_AREA or HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY modes.

Parameters:
number Text to be set to number field.

void Hildon::TelephoneEditor::set_show_border ( bool  show = true  ) 
 

Show or hide the border around the widget.

Parameters:
show Show the border.

void Hildon::TelephoneEditor::set_show_plus ( bool  show = true  ) 
 

Show or hide the plus sign in front of coerce format's country field.

Parameters:
show Show the plus sign.

void Hildon::TelephoneEditor::set_widths ( guint  country,
guint  area,
guint  number
 

Set widths of the fields in coecse format.

Country and area parameters are ignored, if the editor is in free mode. The number or area and number parameters are ignored if the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode, respectively.

Parameters:
country Width (characters) of the country field in coarce mode.
area Width (characters) of the area field in coarce mode.
number Width (characters) of the number field in coarce mode.


Friends And Related Function Documentation

Hildon::TelephoneEditor* wrap ( HildonTelephoneEditor*  object,
bool  take_copy = false
[related]
 

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 hildon-libsmm by Doxygen 1.4.2 © 1997-2001