~ubuntu-branches/debian/squeeze/inkscape/squeeze

« back to all changes in this revision

Viewing changes to src/ui/view/edit-widget-interface.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

Show diffs side-by-side

added added

removed removed

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