diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/ui/widget/page-sizer.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/ui/widget/page-sizer.h')
| -rw-r--r-- | src/ui/widget/page-sizer.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h new file mode 100644 index 000000000..e17628c76 --- /dev/null +++ b/src/ui/widget/page-sizer.h @@ -0,0 +1,67 @@ +/** \file + * \brief Widget for specifying page size; part of Document Preferences dialog. + * + * Author: + * Ralf Stephan <ralf@ark.in-berlin.de> + * + * Copyright (C) 2005 Authors + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#ifndef INKSCAPE_UI_WIDGET_PAGE_SIZER__H +#define INKSCAPE_UI_WIDGET_PAGE_SIZER__H + +#include <sigc++/sigc++.h> +#include <gtkmm/box.h> +#include "ui/widget/registry.h" +#include "ui/widget/registered-widget.h" + +namespace Gtk { + class OptionMenu; + class RadioButton; +} + +namespace Inkscape { + namespace UI { + namespace Widget { + +/// Widget containing all widgets for specifying page size. +class PageSizer : public Gtk::VBox { +public: + PageSizer(); + virtual ~PageSizer(); + void init (Registry& reg); + void setDim (double w, double h, bool update = false); + bool _landscape; + +protected: + void setDoc (double w, double h); + int find_paper_size (double w, double h) const; + void on_portrait(); + void on_landscape(); + void on_value_changed(); + + RegisteredUnitMenu _rum; + RegisteredScalarUnit _rusw, _rush; + Gtk::OptionMenu *_omenu_size; + Gtk::RadioButton *_rb_port, *_rb_land; + sigc::connection _portrait_connection, _landscape_connection; + sigc::connection _changedw_connection, _changedh_connection; + Registry *_wr; +}; + +}}} + +#endif /* INKSCAPE_UI_WIDGET_PAGE_SIZER__H */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
