Maeomm Reference Documentation: hildonmm
Main Page   Namespaces   Book  

Hildon::Button Class Reference

Inheritance diagram for Hildon::Button:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Button ()
HildonButton* gobj ()
 Provides access to the underlying C GtkObject.
const HildonButton* gobj () const
 Provides access to the underlying C GtkObject.
 Button ()
 Button (Gtk::Hildon::SizeType size, ButtonArrangement arrangement)
 Button (Gtk::Hildon::SizeType size, ButtonArrangement arrangement, const Glib::ustring& title, const Glib::ustring& value)
void set_title (const Glib::ustring& title)
 Sets the main label (title) of the Hildon::Button to title.
void unset_title ()
 Remove the title from the Button.
Glib::ustring get_title () const
 Fetches the text from the main label (title) of the Hildon::Button.
void set_value (const Glib::ustring& value)
 Sets the value (subtitle) of the Hildon::Button to value.
void unset_value ()
 Remove the value (subtitle) from the Button.
Glib::ustring get_value () const
 Fetches the text from the secondary label (value) of the Hildon::Button.
void set_text (const Glib::ustring& title, const Glib::ustring& value)
 Convenience function to change both labels of a Hildon::Button.
void set_image (Gtk::Widget& image)
 Sets the image of button to the given widget.
void unset_image ()
 Remove the image from the Button.
Gtk::Widgetget_image ()
 Gets the widget that is currenty set as the image of button, previously set with set_image().
const Gtk::Widgetget_image () const
 Gets the widget that is currenty set as the image of button, previously set with set_image().
void set_image_position (Gtk::PositionType position)
 Sets the position of the image inside button.
void set_alignment (float xalign, float yalign, float xscale, float yscale)
 Sets the alignment of the contents of the widget.
void set_title_alignment (float xalign, float yalign)
 Sets the alignment of the title label.
void set_value_alignment (float xalign, float yalign)
 Sets the alignment of the value label.
void set_image_alignment (float xalign, float yalign)
 Sets the alignment of the image.
void add_title_size_group (const Glib::RefPtr<Gtk::SizeGroup>& size_group)
 Adds the title label of button to size_group.
void add_value_size_group (const Glib::RefPtr<Gtk::SizeGroup>& size_group)
 Adds the value label of button to size_group.
void add_image_size_group (const Glib::RefPtr<Gtk::SizeGroup>& size_group)
 Adds the Hildon::Button image to size_group.
void add_size_groups (const Glib::RefPtr<Gtk::SizeGroup>& title_size_group, const Glib::RefPtr<Gtk::SizeGroup>& value_size_group, const Glib::RefPtr<Gtk::SizeGroup>& image_size_group)
 Convenience function to add title, value and image to size groups.
void set_button_style (ButtonStyle style)
 Sets the style of button to style.
ButtonStyle get_button_style () const
 Gets the visual style of the button.

Related Functions

(Note that these are not member functions.)

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


Constructor & Destructor Documentation

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

Reimplemented from Gtk::Button.

Hildon::Button::Button (  ) 

Reimplemented from Gtk::Button.

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

Hildon::Button::Button ( Gtk::Hildon::SizeType  size,
ButtonArrangement  arrangement,
const Glib::ustring title,
const Glib::ustring value 
) [explicit]


Member Function Documentation

HildonButton* Hildon::Button::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Button.

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

const HildonButton* Hildon::Button::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Button.

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

void Hildon::Button::set_title ( const Glib::ustring title  ) 

Sets the main label (title) of the Hildon::Button to title.

This will clear any previously set title.

If title is set to an empty string, the title label will be hidden and the value label will be realigned.

Parameters:
title A new main label (title) for the Hildon::Button.

void Hildon::Button::unset_title (  ) 

Remove the title from the Button.

See also:
set_title().

Glib::ustring Hildon::Button::get_title (  )  const

Fetches the text from the main label (title) of the Hildon::Button.

Returns:
The text of the title label.

void Hildon::Button::set_value ( const Glib::ustring value  ) 

Sets the value (subtitle) of the Hildon::Button to value.

This will clear any previously set value.

If value is set to an empty string, the value label will be hidden and the title label will be realigned.

Parameters:
value A new value (subtitle) for the Hildon::Button.

void Hildon::Button::unset_value (  ) 

Remove the value (subtitle) from the Button.

See also:
set_value().

Glib::ustring Hildon::Button::get_value (  )  const

Fetches the text from the secondary label (value) of the Hildon::Button.

Returns:
The text of the value label.

void Hildon::Button::set_text ( const Glib::ustring title,
const Glib::ustring value 
)

Convenience function to change both labels of a Hildon::Button.

Parameters:
title New text for the button title (main label).
value New text for the button value (secondary label).

void Hildon::Button::set_image ( Gtk::Widget image  ) 

Sets the image of button to the given widget.

The previous image (if any) will be removed.

Parameters:
image A widget to set as the button image.

Reimplemented from Gtk::Button.

void Hildon::Button::unset_image (  ) 

Remove the image from the Button.

See also:
set_image().

Gtk::Widget* Hildon::Button::get_image (  ) 

Gets the widget that is currenty set as the image of button, previously set with set_image().

Returns:
A Gtk::Widget or 0 in case there is no image
.

Reimplemented from Gtk::Button.

const Gtk::Widget* Hildon::Button::get_image (  )  const

Gets the widget that is currenty set as the image of button, previously set with set_image().

Returns:
A Gtk::Widget or 0 in case there is no image
.

Reimplemented from Gtk::Button.

void Hildon::Button::set_image_position ( Gtk::PositionType  position  ) 

Sets the position of the image inside button.

Only Gtk::POS_LEFT and Gtk::POS_RIGHT are currently supported.

Parameters:
position The position of the image (Gtk::POS_LEFT or Gtk::POS_RIGHT).

Reimplemented from Gtk::Button.

void Hildon::Button::set_alignment ( float  xalign,
float  yalign,
float  xscale,
float  yscale 
)

Sets the alignment of the contents of the widget.

If you don't need to change xscale or yscale you can just use gtk_button_set_alignment() instead.

Note that for this method to work properly the, child widget of the Hildon::Button must be a Gtk::Alignment. That is what is used by default, so this function will work unless you add a custom widget to the Hildon::Button.

Parameters:
xalign The horizontal alignment of the contents, from 0 (left) to 1 (right).
yalign The vertical alignment of the contents, from 0 (top) to 1 (bottom).
xscale The amount that the child widget expands horizontally to fill up unused space, from 0 to 1.
yscale The amount that the child widget expands vertically to fill up unused space, from 0 to 1.

void Hildon::Button::set_title_alignment ( float  xalign,
float  yalign 
)

Sets the alignment of the title label.

See also set_alignment() to set the alignment of the whole contents of the button.

Parameters:
xalign The horizontal alignment of the title label, from 0 (left) to 1 (right).
yalign The vertical alignment of the title label, from 0 (top) to 1 (bottom).

void Hildon::Button::set_value_alignment ( float  xalign,
float  yalign 
)

Sets the alignment of the value label.

See also set_alignment() to set the alignment of the whole contents of the button.

Parameters:
xalign The horizontal alignment of the value label, from 0 (left) to 1 (right).
yalign The vertical alignment of the value label, from 0 (top) to 1 (bottom).

void Hildon::Button::set_image_alignment ( float  xalign,
float  yalign 
)

Sets the alignment of the image.

See also set_alignment() to set the alignment of the whole contents of the button.

Parameters:
xalign The horizontal alignment of the image, from 0 (left) to 1 (right).
yalign The vertical alignment of the image, from 0 (top) to 1 (bottom).

void Hildon::Button::add_title_size_group ( const Glib::RefPtr< Gtk::SizeGroup > &  size_group  ) 

Adds the title label of button to size_group.

Parameters:
size_group A Gtk::SizeGroup for the button title (main label).

void Hildon::Button::add_value_size_group ( const Glib::RefPtr< Gtk::SizeGroup > &  size_group  ) 

Adds the value label of button to size_group.

Parameters:
size_group A Gtk::SizeGroup for the button value (secondary label).

void Hildon::Button::add_image_size_group ( const Glib::RefPtr< Gtk::SizeGroup > &  size_group  ) 

Adds the Hildon::Button image to size_group.

You must add an image using set_image() before calling this function.

Parameters:
size_group A Gtk::SizeGroup for the button image.

void Hildon::Button::add_size_groups ( const Glib::RefPtr< Gtk::SizeGroup > &  title_size_group,
const Glib::RefPtr< Gtk::SizeGroup > &  value_size_group,
const Glib::RefPtr< Gtk::SizeGroup > &  image_size_group 
)

Convenience function to add title, value and image to size groups.

A Gtk::SizeGroup of "0" will be ignored.

Parameters:
title_size_group A Gtk::SizeGroup for the button title (main label), or 0.
value_size_group A Gtk::SizeGroup group for the button value (secondary label), or 0.
image_size_group A Gtk::SizeGroup group for the button image, or 0.

void Hildon::Button::set_button_style ( ButtonStyle  style  ) 

Sets the style of button to style.

This changes the visual appearance of the button (colors, font sizes) according to the particular style chosen, but the general layout is not altered.

Use Hildon::BUTTON_STYLE_NORMAL to make it look like a normal Hildon::Button, or Hildon::BUTTON_STYLE_PICKER to make it look like a Hildon::PickerButton.

Parameters:
style A Hildon::ButtonStyle for button.

ButtonStyle Hildon::Button::get_button_style (  )  const

Gets the visual style of the button.

Returns:
A Hildon::ButtonStyle
.


Friends And Related Function Documentation

Hildon::Button* wrap ( HildonButton *  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