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