]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormGraphics.h
This file is part of LyX, the document processor.
[lyx.git] / src / frontends / xforms / FormGraphics.h
1 // -*- C++ -*-
2 /**
3  * \file FormGraphics.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Baruch Even
8  * \author Herbert Voss
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef FORMGRAPHICS_H
14 #define FORMGRAPHICS_H
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include "FormBase.h"
21 #include "RadioButtonGroup.h"
22
23 #include <boost/scoped_ptr.hpp>
24
25 #include <vector>
26
27 class ControlGraphics;
28 struct FD_graphics;
29 struct FD_graphics_file;
30 struct FD_graphics_bbox;
31 struct FD_graphics_extra;
32
33 /** This class provides an XForms implementation of the Graphics Dialog.
34  */
35 class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_graphics> > {
36 public:
37         ///
38         FormGraphics();
39 private:
40
41         /** Redraw the form (on receipt of a Signal indicating, for example,
42             that the xforms colours have been re-mapped). */
43         virtual void redraw();
44         /// Set the Params variable for the Controller.
45         virtual void apply();
46         /// Build the dialog.
47         virtual void build();
48         /// Update dialog before/whilst showing it.
49         virtual void update();
50         /// Update the BoundingBox info.
51         void updateBB(string const & filename, string const & bb_inset);
52         /// Filter the inputs on callback from xforms
53         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
54
55         /// Real GUI implementation.
56         boost::scoped_ptr<FD_graphics_file> file_;
57         ///
58         boost::scoped_ptr<FD_graphics_bbox> bbox_;
59         ///
60         boost::scoped_ptr<FD_graphics_extra> extra_;
61
62         /// Store the LaTeX names for the rotation origins.
63         std::vector<string> origins_;
64 };
65
66 #endif  // FORMGRAPHICS_H