## MxToolbar MxToolbar — A toolbar widget |

## Synopsis

    struct              MxToolbar;
    struct              MxToolbarClass;
    ClutterActor *      mx_toolbar_new                      (void);
    void                mx_toolbar_set_has_close_button     (MxToolbar *toolbar,
                                                             gboolean has_close_button);
    gboolean            mx_toolbar_get_has_close_button     (MxToolbar *toolbar);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----MxWidget
                         +----MxBin
                               +----MxToolbar

## Implemented Interfaces

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

## Properties

      "has-close-button"         gboolean              : Read / Write

## Signals

      "close-button-clicked"                           : Run Last

## 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.

## Details

### 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);
    };

### 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

`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.

`toolbar` : | A MxToolbar
Returns : | the current value of the "hast-close-button" property.

## Property Details

### The `"has-close-button"` property

      "has-close-button"         gboolean              : Read / Write

Whether to show a close button on the toolbar.

Default value: TRUE

## Signal Details

### The `"close-button-clicked"` signal

    gboolean            user_function                      (MxToolbar *Returns,
                                                            gpointer   user_data)      : Run Last

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.

`user_data` : | user data set when the signal handler was connected.
Returns : | TRUE to prevent the parent stage being destroyed.