## BudgiePopover

BudgiePopover — Budgie Panel GTK+ Popover Widget

## Functions

GtkWidget * | budgie_popover_new ()
void | budgie_popover_set_position_policy ()
BudgiePopoverPositionPolicy | budgie_popover_get_position_policy ()

## Properties

BudgiePopoverPositionPolicy | position-policy | Read / Write
GtkWidget * | relative-to | Read / Write

## Signals

void | closed | Action

## Types and Values

struct | BudgiePopoverClass
enum | BudgiePopoverPositionPolicy

## Object Hierarchy

        GEnum
        ╰── BudgiePopoverPositionPolicy
        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── BudgiePopover

## Description

The BudgiePopover is a specialised top level window with a tail pointer, providing a decorative approach to panel windows. These windows point at the source of an event, such as a button, and allow rich user interfaces to be built with a focus on Budgie Panel usage.

The BudgiePopover should be used in conjunction with the BudgiePopoverManager. Simply add your content to the popover, and ensure that you call “show_all” to display the contents.

Your popover may be dismissed from screen in response to an event, such as the user pressing the button again, or automatically, as the user clicked outside of the window, or even because the BudgiePopoverManager switched to a new active popover. You may connect to the “closed” signal to check for this event.

## Functions

### budgie_popover_new ()

    GtkWidget *
    budgie_popover_new (GtkWidget *relative_to);

Construct a new BudgiePopover object

#### Parameters

relative_to | The widget to show the popover for |

#### Returns

A newly created BudgiePopover.

[transfer full]

### budgie_popover_set_position_policy ()

    void
    budgie_popover_set_position_policy (BudgiePopover *popover,
                                        BudgiePopoverPositionPolicy policy);

Set the positioning policy employed by the popover

#### Parameters

policy | New policy to set. | [type BudgiePopoverPositionPolicy]

### budgie_popover_get_position_policy ()

    BudgiePopoverPositionPolicy
    budgie_popover_get_position_policy (BudgiePopover *popover);

Retrieve the currently active positioning policy for this popover

#### Returns

The BudgiePopoverPositionPolicy currently in use

## Types and Values

### struct BudgiePopoverClass

    struct BudgiePopoverClass {
    	GtkWindowClass parent_class;

    	/* Marked for gtk-doc syntax */
    	void (*closed)(BudgiePopover* popover);

    	gpointer padding[12];
    };

#### Members

`closed` () | Virtual closed signal |
gpointer `padding`[12]; |  |

### enum BudgiePopoverPositionPolicy

The BudgiePopoverPositionPolicy determines how the BudgiePopover will be placed on screen. The default policy (AUTOMATIC) will try to place the popover at a sensible location relative to the parent widget, and point the tail accordingly.

The TOPLEVEL_HINT policy is designed for use with panels + docks, where the top level window owning the relative-to widget sets a CSS class on itself in accordance with the screen edge, i.e. top, left, bottom, right.

#### Members

BUDGIE_POPOVER_POSITION_AUTOMATIC | Determine location based on the screen estate |
BUDGIE_POPOVER_POSITION_TOPLEVEL_HINT | Use hints on widgets parent window |

## Property Details

### The `“position-policy”` property

      “position-policy”          BudgiePopoverPositionPolicy

Control the behavior used to place the popover on screen.

Owner: BudgiePopover

Flags: Read / Write

Default value: BUDGIE_POPOVER_POSITION_AUTOMATIC

### The `“relative-to”` property

      “relative-to”              GtkWidget *

Set the relative widget.

Owner: BudgiePopover

Flags: Read / Write

## Signal Details

### The `“closed”` signal

    void
    user_function (BudgiePopover *popover,
                   gpointer       user_data)

This signal is emitted when the popover has been dismissed, whether it was deliberately from the user's perspective, or implicitly through a toggling action, such as being rolled past in a BudgiePopoverManager set of popovers.

#### Parameters

popover | The popover that has been closed |
user_data | user data set when the signal handler was connected. |

Flags: Action