Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::UI::Widget::PopoverBin Class Reference

Holds a single child widget while allowing a single popover to be displayed over it. More...

#include <popover-bin.h>

Inheritance diagram for Inkscape::UI::Widget::PopoverBin:
Inkscape::UI::Widget::SelectedStyle

Public Member Functions

 PopoverBin ()
 
void setChild (Gtk::Widget *child)
 
void setPopover (Gtk::Popover *popover)
 

Private Member Functions

void _replace (Gtk::Widget *&holder, Gtk::Widget *widget)
 

Private Attributes

Gtk::Widget * _child = nullptr
 
Gtk::Widget * _popover = nullptr
 

Detailed Description

Holds a single child widget while allowing a single popover to be displayed over it.

Setting another popover displaces (unparents) the old one. If it is managed, this typically also causes it to be deleted.

Thus, a useful pattern to deal with popovers that are constructed on-the-fly is to create it using Gtk::make_managed(), then attach it using setPopover().

Definition at line 18 of file popover-bin.h.

Constructor & Destructor Documentation

◆ PopoverBin()

Inkscape::UI::Widget::PopoverBin::PopoverBin ( )

Definition at line 9 of file popover-bin.cpp.

References Inkscape::UI::containerize().

Member Function Documentation

◆ _replace()

void Inkscape::UI::Widget::PopoverBin::_replace ( Gtk::Widget *&  holder,
Gtk::Widget *  widget 
)
private

Definition at line 16 of file popover-bin.cpp.

Referenced by setChild(), and setPopover().

◆ setChild()

◆ setPopover()

Member Data Documentation

◆ _child

Gtk::Widget* Inkscape::UI::Widget::PopoverBin::_child = nullptr
private

Definition at line 29 of file popover-bin.h.

Referenced by setChild().

◆ _popover

Gtk::Widget* Inkscape::UI::Widget::PopoverBin::_popover = nullptr
private

Definition at line 30 of file popover-bin.h.

Referenced by setPopover().


The documentation for this class was generated from the following files: