Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::DocumentUndo::ScopedInsensitive Class Reference

RAII-style mechanism for creating a temporary undo-insensitive context. More...

#include <document-undo.h>

Public Member Functions

 ScopedInsensitive (SPDocument *doc)
 
 ~ScopedInsensitive ()
 

Private Attributes

SPDocumentm_doc
 
bool m_saved
 

Detailed Description

RAII-style mechanism for creating a temporary undo-insensitive context.

 {
     DocumentUndo::ScopedInsensitive tmp(document);
     ... do stuff ...
     // "tmp" goes out of scope here and automatically restores undo-sensitivity
 } 

Definition at line 74 of file document-undo.h.

Constructor & Destructor Documentation

◆ ScopedInsensitive()

Inkscape::DocumentUndo::ScopedInsensitive::ScopedInsensitive ( SPDocument doc)
inline

◆ ~ScopedInsensitive()

Inkscape::DocumentUndo::ScopedInsensitive::~ScopedInsensitive ( )
inline

Definition at line 85 of file document-undo.h.

References m_doc, m_saved, and Inkscape::DocumentUndo::setUndoSensitive().

Member Data Documentation

◆ m_doc

SPDocument* Inkscape::DocumentUndo::ScopedInsensitive::m_doc
private

Definition at line 75 of file document-undo.h.

Referenced by ~ScopedInsensitive().

◆ m_saved

bool Inkscape::DocumentUndo::ScopedInsensitive::m_saved
private

Definition at line 76 of file document-undo.h.

Referenced by ScopedInsensitive(), and ~ScopedInsensitive().


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