## XfcePanelWindow

XfcePanelWindow — A toplevel borderless window with optional move handles.

## Synopsis

    #include <libxfce4panel/libxfce4panel.h>

                        XfcePanelWindow;
    void                (*XfcePanelWindowMoveFunc)          (GtkWidget *widget,
                                                             gpointer data,
                                                             gint *x,
                                                             gint *y);
    void                (*XfcePanelWindowResizeFunc)        (GtkWidget *widget,
                                                             gpointer data,
                                                             GtkAllocation *previous,
                                                             GtkAllocation *allocation,
                                                             gint *x,
                                                             gint *y);
    GtkWidget*          xfce_panel_window_new               (void);
    void                xfce_panel_window_set_orientation   (XfcePanelWindow *window,
                                                             GtkOrientation orientation);
    GtkOrientation      xfce_panel_window_get_orientation   (XfcePanelWindow *window);
    void                xfce_panel_window_set_handle_style  (XfcePanelWindow *window,
                                                             XfceHandleStyle handle_style);
    XfceHandleStyle     xfce_panel_window_get_handle_style  (XfcePanelWindow *window);
    void                xfce_panel_window_set_show_border   (XfcePanelWindow *window,
                                                             gboolean top_border,
                                                             gboolean bottom_border,
                                                             gboolean left_border,
                                                             gboolean right_border);
    void                xfce_panel_window_get_show_border   (XfcePanelWindow *window,
                                                             gboolean *top_border,
                                                             gboolean *bottom_border,
                                                             gboolean *left_border,
                                                             gboolean *right_border);
    void                xfce_panel_window_set_resize_function
                                                            (XfcePanelWindow *window,
                                                             XfcePanelWindowResizeFunc function,
                                                             gpointer data);
    void                xfce_panel_window_set_move_function (XfcePanelWindow *window,
                                                             XfcePanelWindowMoveFunc function,
                                                             gpointer data);
    void                xfce_panel_window_set_movable       (XfcePanelWindow *window,
                                                             gboolean movable);
    gboolean            xfce_panel_window_get_movable       (XfcePanelWindow *window);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkWindow
                                           +----XfcePanelWindow

## Implemented Interfaces

XfcePanelWindow implements AtkImplementorIface and GtkBuildable.

## Properties

      "handle-style"             XfceHandleStyle       : Read / Write
      "orientation"              GtkOrientation        : Read / Write

## Signals

      "move"                                           : Run Last
      "move-end"                                       : Run Last
      "move-start"                                     : Run Last
      "orientation-changed"                            : Run First

## Description

A widget derived from GtkWindow that implements a toplevel window for panels. It optionally can have one or two move handles.

## Details

### XfcePanelWindow

    typedef struct _XfcePanelWindow XfcePanelWindow;

The XfcePanelWindow struct contains private data only, and should be accessed using the functions below.

### XfcePanelWindowMoveFunc ()

    void                (*XfcePanelWindowMoveFunc)          (GtkWidget *widget,
                                                             gpointer data,
                                                             gint *x,
                                                             gint *y);

Callback function that can be used to restrict manual movement of the XfcePanelWindow. The function should modify `x` and `y` to set the new position.

`widget` : | The XfcePanelWindow widget
`data` : | user data supplied with the function
`x` : | location of the new x coordinate
`y` : | location of the new y coordinate

### XfcePanelWindowResizeFunc ()

    void                (*XfcePanelWindowResizeFunc)        (GtkWidget *widget,
                                                             gpointer data,
                                                             GtkAllocation *previous,
                                                             GtkAllocation *allocation,
                                                             gint *x,
                                                             gint *y);

Callback function that can be used to adjust the position of the XfcePanelWindow when its size changes. The function should modify `x` and `y` to set the new position.

`widget` : | The XfcePanelWindow widget
`data` : | user data supplied with the function
`previous` : | Old GtkAllocation
`allocation` : | New GtkAllocation
`x` : | location of the new x coordinate
`y` : | location of the new y coordinate

### xfce_panel_window_new ()

    GtkWidget*          xfce_panel_window_new               (void);

Create new panel window.

Returns : | New GtkWidget

### xfce_panel_window_set_orientation ()

    void                xfce_panel_window_set_orientation   (XfcePanelWindow *window,
                                                             GtkOrientation orientation);

Set orientation for panel window.

`window` : | XfcePanelWindow
`orientation` : | new GtkOrientation

### xfce_panel_window_get_orientation ()

    GtkOrientation      xfce_panel_window_get_orientation   (XfcePanelWindow *window);

Get orientation of panel window.

`window` : | XfcePanelWindow
Returns : | GtkOrientation of `window`

### xfce_panel_window_set_handle_style ()

    void                xfce_panel_window_set_handle_style  (XfcePanelWindow *window,
                                                             XfceHandleStyle handle_style);

Set handle style for panel window.

`window` : | XfcePanelWindow
`handle_style` : | new XfceHandleStyle

### xfce_panel_window_get_handle_style ()

    XfceHandleStyle     xfce_panel_window_get_handle_style  (XfcePanelWindow *window);

Get handle style of panel window.

`window` : | XfcePanelWindow
Returns : | XfceHandleStyle of `window`

### xfce_panel_window_set_show_border ()

    void                xfce_panel_window_set_show_border   (XfcePanelWindow *window,
                                                             gboolean top_border,
                                                             gboolean bottom_border,
                                                             gboolean left_border,
                                                             gboolean right_border);

Set border visibility for the panel window.

`window` : | XfcePanelWindow
`top_border` : | show top border
`bottom_border` : | show bottom border
`left_border` : | show left border
`right_border` : | show right border

### xfce_panel_window_get_show_border ()

    void                xfce_panel_window_get_show_border   (XfcePanelWindow *window,
                                                             gboolean *top_border,
                                                             gboolean *bottom_border,
                                                             gboolean *left_border,
                                                             gboolean *right_border);

Get visibility of panel window borders.

`window` : | XfcePanelWindow
`top_border` : | location for top border or `NULL`
`bottom_border` : | location for bottom border or `NULL`
`left_border` : | location for left border or `NULL`
`right_border` : | location for right border or `NULL`

### xfce_panel_window_set_resize_function ()

    void                xfce_panel_window_set_resize_function
                                                            (XfcePanelWindow *window,
                                                             XfcePanelWindowResizeFunc function,
                                                             gpointer data);

Set a function to modify resize behaviour of the panel window.

`window` : | XfcePanelWindow
`function` : | XfcePanelWindowResizeFunc
`data` : | user data

### xfce_panel_window_set_move_function ()

    void                xfce_panel_window_set_move_function (XfcePanelWindow *window,
                                                             XfcePanelWindowMoveFunc function,
                                                             gpointer data);

Set a function to modify move behaviour of the panel window.

`window` : | XfcePanelWindow
`function` : | XfcePanelWindowMoveFunc
`data` : | user data

### xfce_panel_window_set_movable ()

    void                xfce_panel_window_set_movable       (XfcePanelWindow *window,
                                                             gboolean movable);

Set if the panel window can be moved by the user.

`window` : | XfcePanelWindow
`movable` : | `TRUE` or `FALSE`.

### xfce_panel_window_get_movable ()

    gboolean            xfce_panel_window_get_movable       (XfcePanelWindow *window);

Check if the panel window can be moved by the user. By default this is `TRUE`.

`window` : | XfcePanelWindow
Returns : | `TRUE` if the user is allowed to move `window`, `FALSE` if not.

## Property Details

### The `"handle-style"` property

      "handle-style"             XfceHandleStyle       : Read / Write

The XfceHandleStyle to use when drawing handles.

Default value: XFCE_HANDLE_STYLE_BOTH

### The `"orientation"` property

      "orientation"              GtkOrientation        : Read / Write

The orientation of the window. This the determines the way the handles are drawn.

Default value: GTK_ORIENTATION_HORIZONTAL

## Signal Details

### The `"move"` signal

    void                user_function                      (XfcePanelWindow *window,
                                                            gint             x,
                                                            gint             y,
                                                            gpointer         user_data)      : Run Last

Emitted when the user moves the XfcePanelWindow to a new position with coordinates (`x`, `y`).

`window` : | the XfcePanelWindow which emitted the signal
`x` : | x coordinate of the new position
`y` : | y coordinate of the new position
`user_data` : | user data set when the signal handler was connected.

### The `"move-end"` signal

    void                user_function                      (XfcePanelWindow *window,
                                                            gint             x,
                                                            gint             y,
                                                            gpointer         user_data)      : Run Last

Emitted when the user stops dragging the XfcePanelWindow. The latest position has coordinates (`x`, `y`).

`window` : | the XfcePanelWindow which emitted the signal
`x` : | x coordinate of the new positions
`y` : | y coordinate of the new position
`user_data` : | user data set when the signal handler was connected.

### The `"move-start"` signal

    void                user_function                      (XfcePanelWindow *window,
                                                            gpointer         user_data)      : Run Last

Emitted when the user starts to drag the XfcePanelWindow.

`window` : | the XfcePanelWindow which emitted the signal
`user_data` : | user data set when the signal handler was connected.

### The `"orientation-changed"` signal

    void                user_function                      (XfcePanelWindow *window,
                                                            GtkOrientation   orientation,
                                                            gpointer         user_data)        : Run First

Emitted when the orientation of the XfcePanelWindow changes.

`window` : | the object which emitted the signal
`orientation` : | the new GtkOrientation of the window
`user_data` : | user data set when the signal handler was connected.