Code

fix leak and potential crash by disconnecting on delete
[inkscape.git] / src / selection-describer.h
1 /*
2  * Inkscape::SelectionDescriber - shows messages describing selection
3  *
4  * Authors:
5  *   MenTaLguY <mental@rydia.net>
6  *
7  * Copyright (C) 2004 MenTaLguY
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifndef SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H
13 #define SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H
15 #include <sigc++/sigc++.h>
16 #include "message-context.h"
18 namespace Inkscape { class Selection; }
20 namespace Inkscape {
22 class MessageStack;
24 class SelectionDescriber : public sigc::trackable {
25 public:
26     SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack);
27     ~SelectionDescriber();
29 private:
30     void _updateMessageFromSelection(Inkscape::Selection *selection);
32     sigc::connection *_selection_changed_connection;
34     MessageContext _context;
35 };
37 }
39 #endif
40 /*
41   Local Variables:
42   mode:c++
43   c-file-style:"stroustrup"
44   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45   indent-tabs-mode:nil
46   fill-column:99
47   End:
48 */
49 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :