Cross Reference: /inkscape/src/ui/view/edit-widget.h
edit-widget.h revision 33ac04c1d2903b1c2340cb55f2f6067003b80f4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/**
* \brief This class implements the functionality of the window layout, menus,
* and signals.
*
* Authors:
* Bryce W. Harrington <bryce@bryceharrington.org>
* Derek P. Moore <derekm@hackunix.org>
* Ralf Stephan <ralf@ark.in-berlin.de>
*
* Copyright (C) 2004 Bryce Harrington
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_UI_VIEW_EDIT_WIDGET_H
#define INKSCAPE_UI_VIEW_EDIT_WIDGET_H
#include <gtkmm/box.h>
#include <gtkmm/table.h>
#include <gtkmm/entry.h>
#include <gtkmm/scrollbar.h>
#include <gtkmm/actiongroup.h>
#include <gtkmm/uimanager.h>
#include <gtkmm/togglebutton.h>
#include "ui/dialog/dialog-manager.h"
#include "ui/view/edit-widget-interface.h"
#include "ui/widget/selected-style.h"
#include "ui/widget/ruler.h"
#include "ui/widget/toolbox.h"
#include "ui/widget/svg-canvas.h"
#include "ui/widget/zoom-status.h"
#include "widgets/layer-selector.h"
struct SPDesktop;
struct SPDocument;
struct SPNamedView;
namespace Inkscape {
namespace UI {
namespace View {
class EditWidget : public Gtk::Window,
public EditWidgetInterface {
public:
EditWidget (SPDocument*);
~EditWidget();
// Initialization
void initActions();
void initUIManager();
void initLayout();
void initEdit (SPDocument*);
void destroyEdit();
// Actions
void onActionFileNew();
void onActionFileOpen();
void onActionFilePrint();
void onActionFileQuit();
void onToolbarItem();
void onSelectTool();
void onNodeTool();
// Menus
void onMenuItem();
void onDialogAbout();
void onDialogAlignAndDistribute();
void onDialogInkscapePreferences();
void onDialogDialog();
void onDialogDocumentProperties();
void onDialogExport();
void onDialogExtensionEditor();
void onDialogFillAndStroke();
void onDialogFind();
void onDialogLayerEditor();
void onDialogMessages();
void onDialogObjectProperties();
void onDialogTextProperties();
void onDialogTransform();
void onDialogTransformation();
void onDialogTrace();
void onDialogXmlEditor();
// Whiteboard (Inkboard)
#ifdef WITH_INKBOARD
void onDialogWhiteboardConnect();
void onDialogWhiteboardShareWithUser();
void onDialogWhiteboardShareWithChat();
void onDialogOpenSessionFile();
void onDumpXMLTracker();
#endif
void onUriChanged();
// from EditWidgetInterface
virtual void *getWindow();
virtual void setTitle (gchar const*);
virtual void layout();
virtual void present();
virtual void getGeometry (gint &x, gint &y, gint &w, gint &h);
virtual void setSize (gint w, gint h);
virtual void setPosition (NR::Point p);
virtual void setTransient (void*, int);
virtual NR::Point getPointer();
virtual void setFullscreen();
virtual bool shutdown();
virtual void destroy();
virtual void requestCanvasUpdate();
virtual void activateDesktop();
virtual void deactivateDesktop();
virtual void viewSetPosition (NR::Point p);
virtual void updateRulers();
virtual void updateScrollbars (double scale);
virtual void toggleRulers();
virtual void toggleScrollbars();
virtual void updateZoom();
virtual void letZoomGrabFocus();
virtual void setToolboxFocusTo (const gchar *);
virtual void setToolboxAdjustmentValue (const gchar *, double);
virtual bool isToolboxButtonActive (gchar const*);
virtual void setCoordinateStatus (NR::Point p);
virtual void setMessage (Inkscape::MessageType type, gchar const* msg);
virtual bool warnDialog (gchar*);
protected:
void _namedview_modified(SPObject *namedview, guint);
Gtk::Tooltips _tooltips;
// Child widgets:
Gtk::Table _main_window_table;
Gtk::VBox _toolbars_vbox;
Gtk::HBox _sub_window_hbox;
Gtk::Table _viewport_table;
UI::Widget::Toolbox *_tool_ctrl;
Gtk::Toolbar *_select_ctrl;
Gtk::Toolbar *_uri_ctrl;
Gtk::Label _uri_label;
Gtk::Entry _uri_entry;
Gtk::Toolbar *_node_ctrl;
UI::Widget::HRuler _top_ruler;
UI::Widget::VRuler _left_ruler;
Gtk::HScrollbar _bottom_scrollbar;
Gtk::VScrollbar _right_scrollbar;
Gtk::ToggleButton _sticky_zoom;
UI::Widget::SVGCanvas _svg_canvas;
Gtk::HBox _statusbar;
UI::Widget::SelectedStyle _selected_style_status;
UI::Widget::ZoomStatus _zoom_status;
Inkscape::Widgets::LayerSelector _layer_selector;
Gtk::EventBox _coord_eventbox;
Gtk::Table _coord_status;
Gtk::Label _coord_status_x, _coord_status_y;
Gtk::Label _select_status;
SPDesktop* _desktop;
SPNamedView* _namedview;
double _dt2r;
Glib::RefPtr<Gtk::ActionGroup> _act_grp;
Glib::RefPtr<Gtk::UIManager> _ui_mgr;
UI::Dialog::DialogManager _dlg_mgr;
void initMenuActions();
void initToolbarActions();
void initAccelMap();
void initMenuBar();
void initCommandsBar();
void initToolControlsBar();
void initUriBar();
void initToolsBar();
void initBottomScrollbar();
void initRightScrollbar();
void initLeftRuler();
void initTopRuler();
void initStickyZoom();
void initStatusbar();
virtual bool on_key_press_event (GdkEventKey*);
virtual bool on_delete_event (GdkEventAny*);
virtual bool on_focus_in_event (GdkEventFocus*);
private:
bool onEntryFocusIn (GdkEventFocus*);
bool onEntryFocusOut (GdkEventFocus*);
void onWindowSizeAllocate (Gtk::Allocation&);
void onWindowRealize();
void onAdjValueChanged();
bool _update_s_f, _update_a_f;
sigc::connection _namedview_modified_connection;
};
} // namespace View
} // namespace UI
} // namespace Inkscape
#endif // INKSCAPE_UI_VIEW_EDIT_WIDGET_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :