Code

remove screen pixel toggle for now, add always-snap widget for all
[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  *
9  * Copyright (C) 2005 Ralf Stephan
10  *
11  * Released under GNU GPL.  Read the file 'COPYING' for more information.
12  */
14 #ifndef INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
15 #define INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
17 #include "gdk/gdktypes.h"
18 #include "libnr/nr-point.h"
19 #include "message.h"
21 namespace Inkscape {
22 namespace UI {
23 namespace View {
25 struct EditWidgetInterface
26 {
27     EditWidgetInterface() {}
28     virtual ~EditWidgetInterface() {}
30     /// Returns pointer to window UI object as void*
31     virtual void *getWindow() = 0;
32     
33     /// Set the widget's title
34     virtual void setTitle (gchar const*) = 0;
35     
36     /// Show all parts of widget the user wants to see.
37     virtual void layout() = 0;
38     
39     /// Present widget to user
40     virtual void present() = 0;
41     
42     /// Returns geometry of widget
43     virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) = 0;
44     
45     /// Change the widget's size
46     virtual void setSize (gint w, gint h) = 0;
47     
48     /// Move widget to specified position
49     virtual void setPosition (NR::Point p) = 0;
50     
51     /// Transientize widget
52     virtual void setTransient (void*, int) = 0;
53     
54     /// Return mouse position in widget
55     virtual NR::Point getPointer() = 0;
56     
57     /// Make widget fill screen and show it if possible.
58     virtual void setFullscreen() = 0;
59     
60     /// Shuts down the desktop object for the view being closed.  It checks
61     /// to see if the document has been edited, and if so prompts the user
62     /// to save, discard, or cancel.  Returns TRUE if the shutdown operation
63     /// is cancelled or if the save is cancelled or fails, FALSE otherwise.
64     virtual bool shutdown() = 0;
65     
66     /// Destroy and delete widget.
67     virtual void destroy() = 0;
68     
69     
70     /// Queue a redraw request with the canvas
71     virtual void requestCanvasUpdate() = 0;
72     
73     /// Update the "active desktop" indicator
74     virtual void activateDesktop() = 0;
75     
76     /// Update the "inactive desktop" indicator
77     virtual void deactivateDesktop() = 0;
78     
79     /// Set rulers to position
80     virtual void viewSetPosition (NR::Point p) = 0;
81     
82     /// Update rulers from current values
83     virtual void updateRulers() = 0;
84     
85     /// Update scrollbars from current values
86     virtual void updateScrollbars (double scale) = 0;
87     
88     /// Toggle rulers on/off and set preference value accordingly
89     virtual void toggleRulers() = 0;
90     
91     /// Toggle scrollbars on/off and set preference value accordingly
92     virtual void toggleScrollbars() = 0;
93     
94     /// Temporarily block signals and update zoom display
95     virtual void updateZoom() = 0;
96     
97     /// The zoom display will get the keyboard focus.
98     virtual void letZoomGrabFocus() = 0;
99     
100     /// In auxiliary toolbox, set focus to widget having specific id
101     virtual void setToolboxFocusTo (const gchar *) = 0;
102     
103     /// In auxiliary toolbox, set value of adjustment with specific id
104     virtual void setToolboxAdjustmentValue (const gchar *, double) = 0;
105     
106     /// In auxiliary toolbox, return true if specific togglebutton is active
107     virtual bool isToolboxButtonActive (gchar const*) = 0;
108     
109     /// Set the coordinate display
110     virtual void setCoordinateStatus (NR::Point p) = 0;
111     
112     /// Message widget will get no content
113     virtual void setMessage (Inkscape::MessageType type, gchar const* msg) = 0;
114     
115     /// Open yes/no dialog with warning text and confirmation question.
116     virtual bool warnDialog (gchar*) = 0;
117 };
119 } // namespace View
120 } // namespace UI
121 } // namespace Inkscape
123 #endif // INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H
125 /*
126   Local Variables:
127   mode:c++
128   c-file-style:"stroustrup"
129   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
130   indent-tabs-mode:nil
131   fill-column:99
132   End:
133 */
134 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :