Code

Menu item to toggle CMS adjustment on and off
[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"
21 #include <gtkmm/window.h>
23 namespace Inkscape { namespace UI { namespace Widget { class Dock; } } }
25 namespace Inkscape {
26 namespace UI {
27 namespace View {
29 struct EditWidgetInterface
30 {
31     EditWidgetInterface() {}
32     virtual ~EditWidgetInterface() {}
34     /// Returns pointer to window UI object as void*
35     virtual Gtk::Window *getWindow() = 0;
37     /// Set the widget's title
38     virtual void setTitle (gchar const*) = 0;
40     /// Show all parts of widget the user wants to see.
41     virtual void layout() = 0;
43     /// Present widget to user
44     virtual void present() = 0;
46     /// Returns geometry of widget
47     virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) = 0;
49     /// Change the widget's size
50     virtual void setSize (gint w, gint h) = 0;
52     /// Move widget to specified position
53     virtual void setPosition (NR::Point p) = 0;
55     /// Transientize widget
56     virtual void setTransient (void*, int) = 0;
58     /// Return mouse position in widget
59     virtual NR::Point getPointer() = 0;
61     /// Make widget iconified
62     virtual void setIconified() = 0;
64     /// Make widget maximized on screen
65     virtual void setMaximized() = 0;
67     /// Make widget fill screen and show it if possible.
68     virtual void setFullscreen() = 0;
70     /// Shuts down the desktop object for the view being closed.  It checks
71     /// to see if the document has been edited, and if so prompts the user
72     /// to save, discard, or cancel.  Returns TRUE if the shutdown operation
73     /// is cancelled or if the save is cancelled or fails, FALSE otherwise.
74     virtual bool shutdown() = 0;
76     /// Destroy and delete widget.
77     virtual void destroy() = 0;
80     /// Queue a redraw request with the canvas
81     virtual void requestCanvasUpdate() = 0;
83     /// Force a redraw of the canvas
84     virtual void requestCanvasUpdateAndWait() = 0;
86     /// Enable interaction on this desktop
87     virtual void enableInteraction() = 0;
89     /// Disable interaction on this desktop
90     virtual void disableInteraction() = 0;
92     /// Update the "active desktop" indicator
93     virtual void activateDesktop() = 0;
95     /// Update the "inactive desktop" indicator
96     virtual void deactivateDesktop() = 0;
98     /// Set rulers to position
99     virtual void viewSetPosition (NR::Point p) = 0;
101     /// Update rulers from current values
102     virtual void updateRulers() = 0;
104     /// Update scrollbars from current values
105     virtual void updateScrollbars (double scale) = 0;
107     /// Toggle rulers on/off and set preference value accordingly
108     virtual void toggleRulers() = 0;
110     /// Toggle scrollbars on/off and set preference value accordingly
111     virtual void toggleScrollbars() = 0;
113     /// Toggle CMS on/off and set preference value accordingly
114     virtual void toggleColorProfAdjust() = 0;
116     /// Temporarily block signals and update zoom display
117     virtual void updateZoom() = 0;
119     /// The zoom display will get the keyboard focus.
120     virtual void letZoomGrabFocus() = 0;
122     /// In auxiliary toolbox, set focus to widget having specific id
123     virtual void setToolboxFocusTo (const gchar *) = 0;
125     /// In auxiliary toolbox, set value of adjustment with specific id
126     virtual void setToolboxAdjustmentValue (const gchar *, double) = 0;
128     /// In auxiliary toolbox, select one of the "select one" options (usually radio toggles)
129     virtual void setToolboxSelectOneValue (const gchar *, gint) = 0;
131     /// In auxiliary toolbox, return true if specific togglebutton is active
132     virtual bool isToolboxButtonActive (gchar const*) = 0;
134     /// Set the coordinate display
135     virtual void setCoordinateStatus (NR::Point p) = 0;
137     /// Message widget will get no content
138     virtual void setMessage (Inkscape::MessageType type, gchar const* msg) = 0;
140     /// Open yes/no dialog with warning text and confirmation question.
141     virtual bool warnDialog (gchar*) = 0;
143     virtual Inkscape::UI::Widget::Dock* getDock () = 0;
144 };
146 } // namespace View
147 } // namespace UI
148 } // namespace Inkscape
150 #endif // INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
152 /*
153   Local Variables:
154   mode:c++
155   c-file-style:"stroustrup"
156   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
157   indent-tabs-mode:nil
158   fill-column:99
159   End:
160 */
161 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :