]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCharacter.h
Changes needed to activate Character dialog buttons when any field is not
[lyx.git] / src / frontends / xforms / FormCharacter.h
1 /** 
2  * \file FormCharacter.h
3  * Copyright 2001 The LyX Team.
4  * See the file COPYING.
5  * 
6  * \author Edwin Leuven, leuven@fee.uva.nl
7  * \author Angus Leeming, a.leeming@.ac.uk
8  */
9
10 #ifndef FORM_CHARACTER_H
11 #define FORM_CHARACTER_H
12
13 #include <boost/smart_ptr.hpp>
14
15 #ifdef __GNUG_
16 #pragma interface
17 #endif
18
19 #include "FormBase.h"
20 #include "lyxfont.h"          // for LyXFont enums
21 #include "ControlCharacter.h" // for ControlCharacter enum
22 #include "LColor.h"           // for LColor enum
23 #include "character.h"        // for FONT_STATE enum
24
25 class Combox;
26 struct FD_form_character;
27
28 /** 
29  * This class provides an XForms implementation of the Character Dialog.
30  * The character dialog allows users to change the character settings
31  * in their documents.
32  */
33 class FormCharacter
34         : public FormCB<ControlCharacter, FormDB<FD_form_character> > {
35 public:
36         ///
37         FormCharacter(ControlCharacter &);
38 private:
39
40         /// Apply from dialog
41         virtual void apply();
42    
43         /// Build the dialog
44         virtual void build();
45    
46         /// Update the dialog.
47         virtual void update();
48
49         /// Filter the inputs on callback from xforms
50         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
51
52         /** Callback method (used only to activate Apply button when
53             combox is changed */
54         static void ComboInputCB(int, void *, Combox *);
55
56         /// Fdesign generated method
57         FD_form_character * build_character();
58         
59         ///
60         boost::scoped_ptr<Combox> combo_language2_;
61         ///
62         std::vector<LyXFont::FONT_FAMILY>  family_;
63         ///
64         std::vector<LyXFont::FONT_SERIES>  series_;
65         ///
66         std::vector<LyXFont::FONT_SHAPE>   shape_;
67         ///
68         std::vector<LyXFont::FONT_SIZE>    size_;
69         ///
70         std::vector<character::FONT_STATE> bar_;
71         ///
72         std::vector<LColor::color>         color_;
73 };
74
75 #endif