MxActionButton

MxActionButton

Synopsis

                    MxActionButton;
ClutterActor *      mx_action_button_new                (MxAction *action);
void                mx_action_button_set_action         (MxActionButton *button,
                                                         MxAction *action);
MxAction *          mx_action_button_get_action         (MxActionButton *button);
void                mx_action_button_set_icon_position  (MxActionButton *button,
                                                         MxPosition position);
MxPosition          mx_action_button_get_icon_position  (MxActionButton *button);
void                mx_action_button_set_icon_visible   (MxActionButton *button,
                                                         gboolean visible);
gboolean            mx_action_button_get_icon_visible   (MxActionButton *button);
void                mx_action_button_set_text_visible   (MxActionButton *button,
                                                         gboolean visible);
gboolean            mx_action_button_get_text_visible   (MxActionButton *button);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
                     +----MxBin
                           +----MxButton
                                 +----MxActionButton

Implemented Interfaces

MxActionButton implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, ClutterContainer and MxFocusable.

Properties

  "action"                   MxAction*             : Read / Write
  "icon-position"            MxPosition            : Read / Write
  "icon-visible"             gboolean              : Read / Write
  "text-visible"             gboolean              : Read / Write

Description

Details

MxActionButton

typedef struct _MxActionButton MxActionButton;

The contents of this structure are private and should only be accessed through the public API.


mx_action_button_new ()

ClutterActor *      mx_action_button_new                (MxAction *action);

Creates a new MxActionButton that activates action when clicked.

action :

A MxAction

Returns :

A newly created MxActionButton that should be unreffed when finished with.

mx_action_button_set_action ()

void                mx_action_button_set_action         (MxActionButton *button,
                                                         MxAction *action);

Sets action as the action for button. Button will take its label and icon from action.

button :

A MxButton

action :

A MxAction

mx_action_button_get_action ()

MxAction *          mx_action_button_get_action         (MxActionButton *button);

Retrieves the MxAction associated with button.

button :

A MxActionButton

Returns :

A MxAction

mx_action_button_set_icon_position ()

void                mx_action_button_set_icon_position  (MxActionButton *button,
                                                         MxPosition position);

Sets the icon position, relative to the text on the button.

button :

A MxActionButton

position :

A MxPosition

mx_action_button_get_icon_position ()

MxPosition          mx_action_button_get_icon_position  (MxActionButton *button);

Retrieves the icon's relative position to the text.

button :

A MxActionButton

Returns :

A MxPosition

mx_action_button_set_icon_visible ()

void                mx_action_button_set_icon_visible   (MxActionButton *button,
                                                         gboolean visible);

Sets the visibility of the icon associated with the button's action.

button :

A MxActionButton

visible :

TRUE if the icon should be visible

mx_action_button_get_icon_visible ()

gboolean            mx_action_button_get_icon_visible   (MxActionButton *button);

Retrieves the visibility of the icon associated with the button's action.

button :

A MxActionButton

Returns :

TRUE if the icon is visible, FALSE otherwise

mx_action_button_set_text_visible ()

void                mx_action_button_set_text_visible   (MxActionButton *button,
                                                         gboolean visible);

Sets the visibility of the text associated with the button's action.

button :

A MxActionButton

visible :

TRUE if the text should be visible

mx_action_button_get_text_visible ()

gboolean            mx_action_button_get_text_visible   (MxActionButton *button);

Retrieves the visibility of the text associated with the button's action.

button :

A MxActionButton

Returns :

TRUE if the text is visible, FALSE otherwise

Property Details

The "action" property

  "action"                   MxAction*             : Read / Write

Associated action.


The "icon-position" property

  "icon-position"            MxPosition            : Read / Write

The position of the icon, relative to the text.

Default value: MX_POSITION_LEFT


The "icon-visible" property

  "icon-visible"             gboolean              : Read / Write

Whether to show the icon.

Default value: TRUE


The "text-visible" property

  "text-visible"             gboolean              : Read / Write

Whether to show the text.

Default value: TRUE