Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Widget::Stack Class Reference

Like Gtk::Stack, but for holding a stack of Inkscape canvases. More...

#include <stack.h>

Inheritance diagram for Inkscape::UI::Widget::Stack:

Public Member Functions

 Stack ()
 
void add (Gtk::Widget &widget)
 
void remove (Gtk::Widget &widget)
 
void setActive (Gtk::Widget *widget)
 

Protected Member Functions

void snapshot_vfunc (Glib::RefPtr< Gtk::Snapshot > const &snapshot) override
 

Private Attributes

Gtk::Widget * _active = nullptr
 

Detailed Description

Like Gtk::Stack, but for holding a stack of Inkscape canvases.

The main difference is that widgets retain their previous allocation on becoming hidden, i.e. their width/height aren't set to zero.

This is needed to suport generating previews for background tabs.

Definition at line 15 of file stack.h.

Constructor & Destructor Documentation

◆ Stack()

Inkscape::UI::Widget::Stack::Stack ( )

Definition at line 9 of file stack.cpp.

References Inkscape::UI::containerize().

Member Function Documentation

◆ add()

void Inkscape::UI::Widget::Stack::add ( Gtk::Widget &  widget)

Definition at line 16 of file stack.cpp.

Referenced by Inkscape::UI::Widget::CanvasGrid::addTab().

◆ remove()

void Inkscape::UI::Widget::Stack::remove ( Gtk::Widget &  widget)

Definition at line 22 of file stack.cpp.

References _active.

Referenced by Inkscape::UI::Widget::CanvasGrid::removeTab().

◆ setActive()

void Inkscape::UI::Widget::Stack::setActive ( Gtk::Widget *  widget)

Definition at line 30 of file stack.cpp.

References _active.

Referenced by Inkscape::UI::Widget::CanvasGrid::switchTab().

◆ snapshot_vfunc()

void Inkscape::UI::Widget::Stack::snapshot_vfunc ( Glib::RefPtr< Gtk::Snapshot > const &  snapshot)
overrideprotected

Definition at line 49 of file stack.cpp.

References _active.

Member Data Documentation

◆ _active

Gtk::Widget* Inkscape::UI::Widget::Stack::_active = nullptr
private

Definition at line 28 of file stack.h.

Referenced by remove(), setActive(), and snapshot_vfunc().


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