Maemomm Reference Documentation: hildonmm |
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_ARRANGEMENT_HORIZONTAL) | |
Button (Gtk::Hildon::SizeType size, ButtonArrangement arrangement, const Glib::ustring &title, const Glib::ustring &value=Glib::ustring()) | |
Button (const Glib::ustring &title, const Glib::ustring &value=Glib::ustring(), Gtk::Hildon::SizeType size=Gtk::Hildon::SIZE_AUTO, ButtonArrangement arrangement=BUTTON_ARRANGEMENT_HORIZONTAL) | |
Creates a Button with two labels: title and 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::Widget * | get_image () |
Gets the widget that is currenty set as the image of button, previously set with set_image(). | |
const Gtk::Widget * | get_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::Button * | wrap (HildonButton *object, bool take_copy=false) |
A Glib::wrap() method for this object. |
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 = BUTTON_ARRANGEMENT_HORIZONTAL | |||
) | [explicit] |
Hildon::Button::Button | ( | Gtk::Hildon::SizeType | size, | |
ButtonArrangement | arrangement, | |||
const Glib::ustring & | title, | |||
const Glib::ustring & | value = Glib::ustring() | |||
) | [explicit] |
Hildon::Button::Button | ( | const Glib::ustring & | title, | |
const Glib::ustring & | value = Glib::ustring() , |
|||
Gtk::Hildon::SizeType | size = Gtk::Hildon::SIZE_AUTO , |
|||
ButtonArrangement | arrangement = BUTTON_ARRANGEMENT_HORIZONTAL | |||
) | [explicit] |
Creates a Button with two labels: title and value.
The second label is optional.See also set_title() and set_value().
title | Title of the button (main label). | |
value | Value of the button (secondary label). | |
size | Flags to set the size of the button. | |
arrangement | How the labels should be arranged. |
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.
{2,2}
title | A new main label (title) for the Hildon::Button. |
void Hildon::Button::unset_title | ( | ) |
Glib::ustring Hildon::Button::get_title | ( | ) | const |
Fetches the text from the main label (title) of the Hildon::Button.
{2,2}
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.
{2,2}
value | A new value (subtitle) for the Hildon::Button. |
void Hildon::Button::unset_value | ( | ) |
Glib::ustring Hildon::Button::get_value | ( | ) | const |
Fetches the text from the secondary label (value) of the Hildon::Button.
{2,2}
void Hildon::Button::set_text | ( | const Glib::ustring & | title, | |
const Glib::ustring & | value | |||
) |
Convenience function to change both labels of a Hildon::Button.
{2,2}
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.
{2,2}
image | A widget to set as the button image. |
Reimplemented from Gtk::Button.
void Hildon::Button::unset_image | ( | ) |
Gtk::Widget* Hildon::Button::get_image | ( | ) |
Gets the widget that is currenty set as the image of button, previously set with set_image().
0
in case there is no imageReimplemented 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().
0
in case there is no imageReimplemented 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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
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.
{2,2}
style | A Hildon::ButtonStyle for button. |
ButtonStyle Hildon::Button::get_button_style | ( | ) | const |
Hildon::Button * wrap | ( | HildonButton * | 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. |