MxToolbar

MxToolbar — A toolbar widget

Functions

Properties

gboolean has-close-button Read / Write

Signals

Types and Values

struct MxToolbar
struct MxToolbarClass

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBin
                    ╰── MxToolbar

Implemented Interfaces

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

Description

An MxToolbar is an area that contains items at the top of an MxWindow. It can optionally include a close button that will close the window.

Functions

mx_toolbar_new ()

ClutterActor *
mx_toolbar_new (void);

Create a new MxToolbar. This is not normally necessary if using MxWindow, where mx_window_get_toolbar should be used to retrieve the toolbar instead.

Returns

A newly allocated MxToolbar


mx_toolbar_set_has_close_button ()

void
mx_toolbar_set_has_close_button (MxToolbar *toolbar,
                                 gboolean has_close_button);

Set the “has-close-button” property

Parameters

toolbar

A MxToolbar

 

has_close_button

TRUE if a close button should be displayed

 

mx_toolbar_get_has_close_button ()

gboolean
mx_toolbar_get_has_close_button (MxToolbar *toolbar);

Get the value of the “has-close-button” property.

Parameters

toolbar

A MxToolbar

 

Returns

the current value of the "hast-close-button" property.

Types and Values

struct MxToolbar

struct MxToolbar;

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


struct MxToolbarClass

struct MxToolbarClass {
  MxBinClass parent_class;

  /* signals */
  gboolean (*close_button_clicked) (MxToolbar *toolbar);

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

Property Details

The “has-close-button” property

  “has-close-button”         gboolean

Whether to show a close button on the toolbar.

Flags: Read / Write

Default value: TRUE

Signal Details

The “close-button-clicked” signal

gboolean
user_function (MxToolbar *Returns,
               gpointer   user_data)

Emitted when the close button of the toolbar is clicked.

Normally, the parent stage will be closed when the close button is clicked. Return TRUE from this handler to prevent the stage from being destroyed.

Parameters

user_data

user data set when the signal handler was connected.

 

Returns

TRUE to prevent the parent stage being destroyed.

Flags: Run Last