]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCharacter.h
Implementation of controller-view split for FormCharacter.
[lyx.git] / src / frontends / xforms / FormCharacter.h
1 // -*- C++ -*-
2 /** 
3  * \file FormCharacter.h
4  * Copyright 2001 The LyX Team.
5  * See the file COPYING.
6  * 
7  * \author Edwin Leuven, leuven@fee.uva.nl
8  * \author Angus Leeming, a.leeming@.ac.uk
9  */
10
11 #ifndef FORM_CHARACTER_H
12 #define FORM_CHARACTER_H
13
14 #include <boost/smart_ptr.hpp>
15
16 #ifdef __GNUG_
17 #pragma interface
18 #endif
19
20 #include "FormBase.h"
21 #include "lyxfont.h"          // for LyXFont enums
22 #include "ControlCharacter.h" // for ControlCharacter enum
23 #include "LColor.h"           // for LColor enum
24
25 class Combox;
26 struct FD_form_character;
27
28 /** 
29  * This class provides an XForms implementation of the FormCharacter 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         /// Build the popup
41         virtual void build();
42    
43         /// Apply from popup
44         virtual void apply();
45    
46         /// Nothing to update...
47         virtual void update() {}
48
49         /** Callback method (used only to activate Apply button when
50             combox is changed */
51         static void ComboInputCB(int, void *, Combox *);
52
53         /// Type definition from the fdesign produced header file.
54         FD_form_character * build_character();
55         
56         ///
57         boost::scoped_ptr<Combox> combo_language2_;
58         ///
59         std::vector<LyXFont::FONT_FAMILY>         family_;
60         ///
61         std::vector<LyXFont::FONT_SERIES>         series_;
62         ///
63         std::vector<LyXFont::FONT_SHAPE>          shape_;
64         ///
65         std::vector<LyXFont::FONT_SIZE>           size_;
66         ///
67         std::vector<ControlCharacter::FONT_STATE> bar_;
68         ///
69         std::vector<LColor::color>                color_;
70 };
71
72 #endif