]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormGraphics.h
211665bcce959ae6953fe2eaf324c308d8c78c51
[features.git] / src / frontends / xforms / FormGraphics.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000-2001 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \file FormGraphics.h
12  * \author Baruch Even, baruch.even@writeme.com
13  * \author Herbert Voss, voss@lyx.org
14  */
15
16 #ifndef FORMGRAPHICS_H
17 #define FORMGRAPHICS_H
18
19 #include <boost/smart_ptr.hpp>
20
21 #ifdef __GNUG__
22 #pragma interface
23 #endif 
24
25 #include "FormBase.h"
26 #include "RadioButtonGroup.h"
27
28 class ControlGraphics;
29 struct FD_form_graphics;
30 struct FD_form_file;
31 struct FD_form_size;
32 struct FD_form_special;
33
34 /** This class provides an XForms implementation of the Graphics Dialog.
35  */
36 class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_form_graphics> > {
37 public:
38         ///
39         FormGraphics(ControlGraphics &);
40
41 private:
42
43         /** Redraw the form (on receipt of a Signal indicating, for example,
44             that the xforms colours have been re-mapped). */
45         virtual void redraw();
46         /// Set the Params variable for the Controller.
47         virtual void apply();
48         /// Build the dialog.
49         virtual void build();
50         /// Update dialog before/whilst showing it.
51         virtual void update();
52         /// Filter the inputs on callback from xforms
53         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
54         /// 
55         void help();
56
57         /// Verify that the input is correct. If not disable ok/apply buttons.
58         ButtonPolicy::SMInput checkInput();
59
60         /// Fdesign generated method
61         FD_form_graphics * build_graphics();
62         ///
63         FD_form_file * build_file();
64         ///
65         FD_form_size * build_size();
66         ///
67         FD_form_special * build_special();
68
69         /// Real GUI implementation.
70         boost::scoped_ptr<FD_form_file> file_;
71         ///
72         boost::scoped_ptr<FD_form_size> size_;
73         ///
74         boost::scoped_ptr<FD_form_special> special_;
75 };
76
77 #endif  // FORMGRAPHICS_H