~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/document-undo.h

  • Committer: JazzyNico
  • Date: 2011-08-29 20:25:30 UTC
  • Revision ID: nicoduf@yahoo.fr-20110829202530-6deuoz11q90usldv
Code refactoring and merging with trunk (revision 10599).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SEEN_SP_DOCUMENT_UNDO_H
 
2
#define SEEN_SP_DOCUMENT_UNDO_H
 
3
 
 
4
typedef struct _GtkObject GtkObject;
 
5
 
 
6
namespace Inkscape {
 
7
 
 
8
class DocumentUndo
 
9
{
 
10
public:
 
11
 
 
12
    /**
 
13
     * Set undo sensitivity.
 
14
     *
 
15
     * \note
 
16
     *   Since undo sensitivity needs to be nested, setting undo sensitivity
 
17
     *   should be done like this:
 
18
     *\verbatim
 
19
     bool saved = DocumentUndo::getUndoSensitive(document);
 
20
     DocumentUndo::setUndoSensitive(document, false);
 
21
     ... do stuff ...
 
22
     DocumentUndo::setUndoSensitive(document, saved);  \endverbatim
 
23
    */
 
24
    static void setUndoSensitive(SPDocument *doc, bool sensitive);
 
25
 
 
26
    static bool getUndoSensitive(SPDocument const *document);
 
27
 
 
28
    static void clearUndo(SPDocument *document);
 
29
 
 
30
    static void clearRedo(SPDocument *document);
 
31
 
 
32
    static void done(SPDocument *document, unsigned int event_type, Glib::ustring const &event_description);
 
33
 
 
34
    static void maybeDone(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring const &event_description);
 
35
 
 
36
    static void resetKey(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
 
37
 
 
38
    static void cancel(SPDocument *document);
 
39
 
 
40
    static gboolean undo(SPDocument *document);
 
41
 
 
42
    static gboolean redo(SPDocument *document);
 
43
};
 
44
 
 
45
} // namespace Inkscape
 
46
 
 
47
#endif // SEEN_SP_DOCUMENT_UNDO_H
 
48
 
 
49
/*
 
50
  Local Variables:
 
51
  mode:c++
 
52
  c-file-style:"stroustrup"
 
53
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
54
  indent-tabs-mode:nil
 
55
  fill-column:99
 
56
  End:
 
57
*/
 
58
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :