Code

Gtkmm-ified the desktop window object, and modified the file dialogs so that they...
[inkscape.git] / src / ui / view / edit-widget-interface.h
1 /**
2  * \file
3  *
4  * Abstract base class for all EditWidget implementations.
5  *
6  * Authors:
7  *     Ralf Stephan <ralf@ark.in-berlin.de> 
8  *     John Bintz <jcoswell@coswellproductions.org>
9  *
10  * Copyright (C) 2006 John Bintz
11  * Copyright (C) 2005 Ralf Stephan
12  *
13  * Released under GNU GPL.  Read the file 'COPYING' for more information.
14  */
16 #ifndef INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
17 #define INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
19 #include "libnr/nr-point.h"
20 #include "message.h"
22 #include <gtkmm/window.h>
24 namespace Inkscape {
25 namespace UI {
26 namespace View {
28 struct EditWidgetInterface
29 {
30     EditWidgetInterface() {}
31     virtual ~EditWidgetInterface() {}
33     /// Returns pointer to window UI object as void*
34     virtual Gtk::Window *getWindow() = 0;
35     
36     /// Set the widget's title
37     virtual void setTitle (gchar const*) = 0;
38     
39     /// Show all parts of widget the user wants to see.
40     virtual void layout() = 0;
41     
42     /// Present widget to user
43     virtual void present() = 0;
44     
45     /// Returns geometry of widget
46     virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) = 0;
47     
48     /// Change the widget's size
49     virtual void setSize (gint w, gint h) = 0;
50     
51     /// Move widget to specified position
52     virtual void setPosition (NR::Point p) = 0;
53     
54     /// Transientize widget
55     virtual void setTransient (void*, int) = 0;
56     
57     /// Return mouse position in widget
58     virtual NR::Point getPointer() = 0;
59     
60     /// Make widget iconified
61     virtual void setIconified() = 0;
62     
63     /// Make widget maximized on screen
64     virtual void setMaximized() = 0;
65     
66     /// Make widget fill screen and show it if possible.
67     virtual void setFullscreen() = 0;
68     
69     /// Shuts down the desktop object for the view being closed.  It checks
70     /// to see if the document has been edited, and if so prompts the user
71     /// to save, discard, or cancel.  Returns TRUE if the shutdown operation
72     /// is cancelled or if the save is cancelled or fails, FALSE otherwise.
73     virtual bool shutdown() = 0;
74     
75     /// Destroy and delete widget.
76     virtual void destroy() = 0;
77     
78     
79     /// Queue a redraw request with the canvas
80     virtual void requestCanvasUpdate() = 0;
81     
82     /// Force a redraw of the canvas
83     virtual void requestCanvasUpdateAndWait() = 0;
84     
85     /// Enable interaction on this desktop
86     virtual void enableInteraction() = 0;
87     
88     /// Disable interaction on this desktop
89     virtual void disableInteraction() = 0;
90     
91     /// Update the "active desktop" indicator
92     virtual void activateDesktop() = 0;
93     
94     /// Update the "inactive desktop" indicator
95     virtual void deactivateDesktop() = 0;
96     
97     /// Set rulers to position
98     virtual void viewSetPosition (NR::Point p) = 0;
99     
100     /// Update rulers from current values
101     virtual void updateRulers() = 0;
102     
103     /// Update scrollbars from current values
104     virtual void updateScrollbars (double scale) = 0;
105     
106     /// Toggle rulers on/off and set preference value accordingly
107     virtual void toggleRulers() = 0;
108     
109     /// Toggle scrollbars on/off and set preference value accordingly
110     virtual void toggleScrollbars() = 0;
111     
112     /// Temporarily block signals and update zoom display
113     virtual void updateZoom() = 0;
114     
115     /// The zoom display will get the keyboard focus.
116     virtual void letZoomGrabFocus() = 0;
117     
118     /// In auxiliary toolbox, set focus to widget having specific id
119     virtual void setToolboxFocusTo (const gchar *) = 0;
120     
121     /// In auxiliary toolbox, set value of adjustment with specific id
122     virtual void setToolboxAdjustmentValue (const gchar *, double) = 0;
123     
124     /// In auxiliary toolbox, return true if specific togglebutton is active
125     virtual bool isToolboxButtonActive (gchar const*) = 0;
126     
127     /// Set the coordinate display
128     virtual void setCoordinateStatus (NR::Point p) = 0;
129     
130     /// Message widget will get no content
131     virtual void setMessage (Inkscape::MessageType type, gchar const* msg) = 0;
132     
133     /// Open yes/no dialog with warning text and confirmation question.
134     virtual bool warnDialog (gchar*) = 0;
135 };
137 } // namespace View
138 } // namespace UI
139 } // namespace Inkscape
141 #endif // INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
143 /*
144   Local Variables:
145   mode:c++
146   c-file-style:"stroustrup"
147   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
148   indent-tabs-mode:nil
149   fill-column:99
150   End:
151 */
152 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :