]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GGraphics.h
gtk graphics dialog
[lyx.git] / src / frontends / gtk / GGraphics.h
1 // -*- C++ -*-
2 /**
3  * \file GGraphics.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Spray
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GGRAPHICS_H
13 #define GGRAPHICS_H
14
15 #include "GViewBase.h"
16
17 #include "lyxlength.h"
18
19 #include <boost/scoped_ptr.hpp>
20 #include <vector>
21
22 namespace lyx {
23 namespace frontend {
24
25 class ControlGraphics;
26
27 /** This class provides a GTK+ implementation of the Graphics Dialog.
28  */
29 class GGraphics
30         : public GViewCB<ControlGraphics, GViewGladeB> {
31 public:
32         ///
33         GGraphics(Dialog &);
34 private:
35
36         /// Set the Params variable for the Controller.
37         virtual void apply();
38         /// Build the dialog.
39         virtual void doBuild();
40         /// Update dialog before/whilst showing it.
41         virtual void update();
42         /// Update the BoundingBox info.
43         void updateBB(std::string const & filename, std::string const & bb_inset);
44
45         void PopulateComboBox(Gtk::ComboBox * combo,
46                                   std::vector<std::string> const & strings);
47
48         void updateComboFromLength(Gtk::ComboBox * combo,
49                              LyXLength const & len);
50
51         bool updating_;
52
53         /// Store the LaTeX names for the rotation origins.
54         std::vector<std::string> origins_;
55
56         Gtk::TreeModelColumn<Glib::ustring> stringcol_;
57         Gtk::TreeModel::ColumnRecord cols_;
58
59         Gtk::Notebook * notebook_;
60
61         // File Page
62         Gtk::Entry * fileentry_;
63         Gtk::SpinButton * displayscalespin_;
64         Gtk::SpinButton * outputscalespin_;
65         Gtk::Button * browsebutton_;
66         Gtk::Button * editbutton_;
67         Gtk::ComboBox * displaycombo_;
68         Gtk::SpinButton * widthspin_;
69         Gtk::SpinButton * heightspin_;
70         Gtk::CheckButton * aspectcheck_;
71         Gtk::ComboBox * widthunitscombo_;
72         Gtk::ComboBox * heightunitscombo_;
73         Gtk::RadioButton * setscalingradio_;
74         Gtk::RadioButton * setsizeradio_;
75
76         // Bounding Box Page
77         Gtk::CheckButton * clipcheck_;
78         Gtk::SpinButton * righttopxspin_;
79         Gtk::SpinButton * righttopyspin_;
80         Gtk::SpinButton * leftbottomxspin_;
81         Gtk::SpinButton * leftbottomyspin_;
82         Gtk::ComboBox * bbunitscombo_;
83         Gtk::Button * bbfromfilebutton_;
84
85         // Extra Page
86         Gtk::SpinButton * anglespin_;
87         Gtk::ComboBox * origincombo_;
88         Gtk::CheckButton * subfigcheck_;
89         Gtk::Entry * subfigentry_;
90         Gtk::Entry * latexoptsentry_;
91         Gtk::CheckButton * draftcheck_;
92         Gtk::CheckButton * unzipcheck_;
93
94         void onSizingModeChange();
95         void onBrowseClicked();
96         void onBBChange();
97         void onBBFromFileClicked();
98         void onSubFigCheckToggled();
99         void onEditClicked();
100         void onInput();
101 };
102
103 } // namespace frontend
104 } // namespace lyx
105
106 #endif  // GGRAPHICS_H