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
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly/**
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly * \brief This class implements the functionality of the window layout, menus,
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly * and signals.
a117fec44ca101d02a635021dea473c2bd341fb5Jenny Han Donnelly *
a117fec44ca101d02a635021dea473c2bd341fb5Jenny Han Donnelly * Authors:
a117fec44ca101d02a635021dea473c2bd341fb5Jenny Han Donnelly * Bryce W. Harrington <bryce@bryceharrington.org>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly * Derek P. Moore <derekm@hackunix.org>
8392a541bf432ed8d6e1985b6306b83dc898768dJenny Han Donnelly * Ralf Stephan <ralf@ark.in-berlin.de>
8392a541bf432ed8d6e1985b6306b83dc898768dJenny Han Donnelly *
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly * Copyright (C) 2004 Bryce Harrington
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly *
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly * Released under GNU GPL. Read the file 'COPYING' for more information.
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly */
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#ifndef INKSCAPE_UI_VIEW_EDIT_WIDGET_H
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#define INKSCAPE_UI_VIEW_EDIT_WIDGET_H
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/box.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/table.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/entry.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/scrollbar.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/actiongroup.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/uimanager.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include <gtkmm/togglebutton.h>
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/dialog/dialog-manager.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/view/edit-widget-interface.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/widget/selected-style.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/widget/ruler.h"
f8494fde09db5d39ecd4b7ddb7bec33231a8baa5Jenny Han Donnelly#include "ui/widget/toolbox.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/widget/svg-canvas.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "ui/widget/zoom-status.h"
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly#include "widgets/layer-selector.h"
d5c500d4fbd5a733124f1baee5671f3fbc35a245Allen Rabinovich
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellystruct SPDesktop;
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellystruct SPDocument;
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellystruct SPNamedView;
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnelly
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellynamespace Inkscape {
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellynamespace UI {
aad83354a51620a64a2453eaf7b0e8460523a137Jenny Han Donnellynamespace 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 :