Code

Line-end fixups
[inkscape.git] / src / display / canvas-temporary-item.h
1 #ifndef INKSCAPE_CANVAS_TEMPORARY_ITEM_H
2 #define INKSCAPE_CANVAS_TEMPORARY_ITEM_H
4 /** \file
5  * Provides a class to put a canvasitem temporarily on-canvas.
6  *
7  * Authors:
8  *   Johan Engelen
9  *
10  * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #include "display/display-forward.h"
17 #include <sigc++/sigc++.h>
19 namespace Inkscape {
20 namespace Display {
22 class TemporaryItem  {
23 public:
24     TemporaryItem(SPCanvasItem *item, guint lifetime);
25     virtual ~TemporaryItem();
27     sigc::signal<void, TemporaryItem *> signal_timeout;
29 protected:
30     friend class TemporaryItemList;
32     SPCanvasItem * canvasitem;   /** The item we are holding on to */
33     guint timeout_id;     /** ID by which glib knows the timeout event */
35     static gboolean _timeout(gpointer data); ///< callback for when lifetime expired
37 private:
38     TemporaryItem(const TemporaryItem&);
39     TemporaryItem& operator=(const TemporaryItem&);
40 };
42 } //namespace Display
43 } //namespace Inkscape
45 #endif
47 /*
48   Local Variables:
49   mode:c++
50   c-file-style:"stroustrup"
51   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52   indent-tabs-mode:nil
53   fill-column:99
54   End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :