Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / ui / dialog / desktop-tracker.h
1 /**
2  * Glyph selector dialog.
3  */
5 /* Authors:
6  *   Jon A. Cruz
7  *
8  * Copyright (C) 2010 Jon A. Cruz
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
11 #ifndef SEEN_DIALOG_DESKTOP_TRACKER
12 #define SEEN_DIALOG_DESKTOP_TRACKER
14 #include <sigc++/connection.h>
15 #include <glib/gtypes.h>
17 typedef struct _GtkWidget GtkWidget;
18 class SPDesktop;
20 namespace Inkscape {
22 class Application;
24 namespace UI {
25 namespace Dialog {
27 class DesktopTracker
28 {
29 public:
30     DesktopTracker();
31     virtual ~DesktopTracker();
33     void connect(GtkWidget *widget);
34     void disconnect();
36     SPDesktop *getDesktop() const;
38     void setBase(SPDesktop *desktop);
39     SPDesktop *getBase() const;
41     sigc::connection connectDesktopChanged( const sigc::slot<void, SPDesktop*> & slot );
43 private:
44     static gboolean activateDesktopCB(Inkscape::Application *inkscape, SPDesktop *desktop, DesktopTracker *self );
45     static bool hierarchyChangeCB(GtkWidget *widget, GtkWidget* prev, DesktopTracker *self);
47     void handleHierarchyChange();
48     void setDesktop(SPDesktop *desktop);
50     SPDesktop *base;
51     SPDesktop *desktop;
52     GtkWidget *widget;
53     gulong hierID;
54     gulong inkID;
55     bool trackActive;
56     sigc::signal<void, SPDesktop*> desktopChangedSig;
57 };
59 } // namespace Dialog
60 } // namespace UI
61 } // namespace Inkscape
63 #endif // SEEN_DIALOG_DESKTOP_TRACKER
64 /*
65   Local Variables:
66   mode:c++
67   c-file-style:"stroustrup"
68   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
69   indent-tabs-mode:nil
70   fill-column:99
71   End:
72 */
73 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :