]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GGraphics.h
Change glob() API to accept a dir parameter.
[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         bool updating_;
49
50         /// Store the LaTeX names for the rotation origins.
51         std::vector<std::string> origins_;
52
53         Gtk::TreeModelColumn<Glib::ustring> stringcol_;
54         Gtk::TreeModel::ColumnRecord cols_;
55
56         Gtk::Notebook * notebook_;
57
58         // File Page
59         Gtk::Entry * fileentry_;
60         Gtk::SpinButton * displayscalespin_;
61         Gtk::SpinButton * outputscalespin_;
62         Gtk::Button * browsebutton_;
63         Gtk::Button * editbutton_;
64         Gtk::ComboBox * displaycombo_;
65         Gtk::SpinButton * widthspin_;
66         Gtk::SpinButton * heightspin_;
67         Gtk::CheckButton * aspectcheck_;
68         Gtk::ComboBox * widthunitscombo_;
69         Gtk::ComboBox * heightunitscombo_;
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