d0fdeb8cc24127690a411ca0282b4b016898bd3d
1 /** \file
2 * \brief Widget for specifying page size; part of Document Preferences dialog.
3 *
4 * Author:
5 * Ralf Stephan <ralf@ark.in-berlin.de>
6 *
7 * Copyright (C) 2005 Authors
8 *
9 * Released under GNU GPL. Read the file 'COPYING' for more information.
10 */
12 #ifndef INKSCAPE_UI_WIDGET_PAGE_SIZER__H
13 #define INKSCAPE_UI_WIDGET_PAGE_SIZER__H
15 #include <sigc++/sigc++.h>
16 #include <gtkmm/box.h>
17 #include "ui/widget/registry.h"
18 #include "ui/widget/registered-widget.h"
20 namespace Gtk {
21 class OptionMenu;
22 class RadioButton;
23 }
25 namespace Inkscape {
26 namespace UI {
27 namespace Widget {
29 /// Widget containing all widgets for specifying page size.
30 class PageSizer : public Gtk::VBox {
31 public:
32 PageSizer();
33 virtual ~PageSizer();
34 void init (Registry& reg);
35 void setDim (double w, double h, bool update = false);
36 bool _landscape;
38 protected:
39 void setDoc (double w, double h);
40 int find_paper_size (double w, double h) const;
41 void fire_fit_canvas_to_selection_or_drawing();
42 void on_portrait();
43 void on_landscape();
44 void on_value_changed();
46 RegisteredUnitMenu _rum;
47 RegisteredScalarUnit _rusw, _rush;
48 Gtk::OptionMenu *_omenu_size;
49 Gtk::RadioButton *_rb_port, *_rb_land;
50 sigc::connection _portrait_connection, _landscape_connection;
51 sigc::connection _changedw_connection, _changedh_connection;
52 Registry *_wr;
53 };
55 }}}
57 #endif /* INKSCAPE_UI_WIDGET_PAGE_SIZER__H */
59 /*
60 Local Variables:
61 mode:c++
62 c-file-style:"stroustrup"
63 c-file-offsets:((innamespace . 0)(inline-open . 0))
64 indent-tabs-mode:nil
65 fill-column:99
66 End:
67 */
68 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :