1.149 <GtkPopoverBin>

Class: <GtkPopoverBin>

It derives from <GtkWidget>.

A single child container with a popover.

You should use <GtkPopoverBin> whenever you need to present a <GtkPopover> to the user.

Actions

<GtkPopoverBin> defines the menu.popup action, which can be activated to present the popover to the user.

CSS nodes

<GtkPopoverBin> has a single CSS node with the name popoverbin.

Properties

Property: popover-bin:child self

The child widget of the popover bin.

Its value is a <GtkWidget>, or #f.

Set it with (set! (popover-bin:child self) value).

Property: popover-bin:handle-input self

Whether the popover bin will handle input to trigger the popup.

Its value is a boolean.

Set it with (set! (popover-bin:handle-input self) value).

Property: popover-bin:menu-model self

The <GMenuModel> from which the popup will be created.

See popover-bin:set-menu-model for the interaction with the popover-bin:popover property.

Its value is a <GMenuModel>, or #f.

Set it with (set! (popover-bin:menu-model self) value).

Property: popover-bin:popover self

The <GtkPopover> that will be popped up when calling popover-bin:popup.

Its value is a <GtkPopover>, or #f.

Set it with (set! (popover-bin:popover self) value).

Procedures

Method: popover-bin:get-child self ⇒ %return
Method: get-child self ⇒ %return

Retrieves the child widget of the popover bin.

self

Passed: a <GtkPopoverBin>.

a popover bin

%return

Returned: a <GtkWidget>, or #f.

the child widget

Method: popover-bin:get-handle-input? self ⇒ %return
Method: get-handle-input? self ⇒ %return
self

Passed: a <GtkPopoverBin>.

%return

Returned: a boolean.

Method: popover-bin:get-menu-model self ⇒ %return
Method: get-menu-model self ⇒ %return

Retrieves the menu model set using popover-bin:set-menu-model.

self

Passed: a <GtkPopoverBin>.

a popover bin

%return

Returned: a <GMenuModel>, or #f.

the menu model for the popover

Method: popover-bin:get-popover self ⇒ %return
Method: get-popover self ⇒ %return

Retrieves the <GtkPopover> set using popover-bin:set-popover.

self

Passed: a <GtkPopoverBin>.

a popover bin

%return

Returned: a <GtkPopover>, or #f.

a popover widget

Procedure: popover-bin:new ⇒ %return

Creates a new popover bin widget.

%return

Returned: a <GtkWidget>.

the newly created popover bin

Method: popover-bin:popdown self
Method: popdown self

Hides the popover from the user.

See: popover-bin:popup

self

Passed: a <GtkPopoverBin>.

a popover bin

Method: popover-bin:popup self
Method: popup self

Presents the popover to the user.

Use popover-bin:set-popover or popover-bin:set-menu-model to define the popover.

See: popover-bin:popdown

self

Passed: a <GtkPopoverBin>.

a popover bin

Method: popover-bin:set-child self [child]
Method: set-child self [child]

Sets the child of the popover bin.

self

Passed: a <GtkPopoverBin>.

a popover bin

child

Passed, or left out: a <GtkWidget>, or #f.

the child of the popover bin

Method: popover-bin:set-handle-input self handle-input
Method: set-handle-input self handle-input

Enables or disables input handling.

If enabled, the popover bin will pop up the popover on right-click or long press, as expected for a context menu.

self

Passed: a <GtkPopoverBin>.

a popover bin

handle-input

Passed: a boolean.

whether to handle input

Method: popover-bin:set-menu-model self [model]
Method: set-menu-model self [model]

Sets the menu model used to create the popover that will be presented when calling popover-bin:popup.

If model is NULL, the popover will be unset.

A <GtkPopover> will be created from the menu model with popover-menu:new-from-model. Actions will be connected as documented for this function.

If popover-bin:popover is already set, it will be dissociated from the popover bin, and the property is set to NULL.

See: popover-bin:set-popover

self

Passed: a <GtkPopoverBin>.

a popover bin

model

Passed, or left out: a <GMenuModel>, or #f.

a menu model

Method: popover-bin:set-popover self [popover]
Method: set-popover self [popover]

Sets the <GtkPopover> that will be presented when calling popover-bin:popup.

If popover is NULL, the popover will be unset.

If popover-bin:menu-model is set before calling this function, then the menu model property will be unset.

See: popover-bin:set-menu-model

self

Passed: a <GtkPopoverBin>.

a popover bin

popover

Passed, or left out: a <GtkPopover>, or #f.

a <GtkPopover>