]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GGraphics.h
Extracted from r14281
[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 "GtkLengthEntry.h"
18
19 #include "lyxlength.h"
20
21 #include <boost/scoped_ptr.hpp>
22 #include <vector>
23
24 namespace lyx {
25 namespace frontend {
26
27 class ControlGraphics;
28
29 /** This class provides a GTK+ implementation of the Graphics Dialog.
30  */
31 class GGraphics
32         : public GViewCB<ControlGraphics, GViewGladeB> {
33 public:
34         ///
35         GGraphics(Dialog &);
36 private:
37
38         /// Set the Params variable for the Controller.
39         virtual void apply();
40         /// Build the dialog.
41         virtual void doBuild();
42         /// Update dialog before/whilst showing it.
43         virtual void update();
44         /// Update the BoundingBox info.
45         void updateBB(std::string const & filename, std::string const & bb_inset);
46
47         void PopulateComboBox(Gtk::ComboBox * combo,
48                                   std::vector<std::string> const & strings);
49
50         bool updating_;
51
52         /// Store the LaTeX names for the rotation origins.
53         std::vector<std::string> origins_;
54
55         Gtk::TreeModelColumn<Glib::ustring> stringcol_;
56         Gtk::TreeModel::ColumnRecord cols_;
57
58         Gtk::Notebook * notebook_;
59
60         // File Page
61         Gtk::Entry * fileentry_;
62         Gtk::SpinButton * displayscalespin_;
63         Gtk::SpinButton * outputscalespin_;
64         Gtk::Button * browsebutton_;
65         Gtk::Button * editbutton_;
66         Gtk::ComboBox * displaycombo_;
67         GtkLengthEntry * widthlengthentry_;
68         GtkLengthEntry * heightlengthentry_;
69         Gtk::CheckButton * aspectcheck_;
70         Gtk::RadioButton * setscalingradio_;
71         Gtk::RadioButton * setsizeradio_;
72
73         // Bounding Box Page
74         Gtk::CheckButton * clipcheck_;
75         Gtk::SpinButton * righttopxspin_;
76         Gtk::SpinButton * righttopyspin_;
77         Gtk::SpinButton * leftbottomxspin_;
78         Gtk::SpinButton * leftbottomyspin_;
79         Gtk::ComboBox * bbunitscombo_;
80         Gtk::Button * bbfromfilebutton_;
81
82         // Extra Page
83         Gtk::SpinButton * anglespin_;
84         Gtk::ComboBox * origincombo_;
85         Gtk::CheckButton * subfigcheck_;
86         Gtk::Entry * subfigentry_;
87         Gtk::Entry * latexoptsentry_;
88         Gtk::CheckButton * draftcheck_;
89         Gtk::CheckButton * unzipcheck_;
90
91         void onSizingModeChange();
92         void onBrowseClicked();
93         void onBBChange();
94         void onBBFromFileClicked();
95         void onSubFigCheckToggled();
96         void onEditClicked();
97         void onInput();
98 };
99
100 } // namespace frontend
101 } // namespace lyx
102
103 #endif  // GGRAPHICS_H