]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCharacter.h
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormCharacter.h
1 // -*- C++ -*-
2 /**
3  * \file FormCharacter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  * \author Angus Leeming 
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef FORM_CHARACTER_H
14 #define FORM_CHARACTER_H
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 #include "character.h"        // for FONT_STATE enum
25
26 #include <boost/scoped_ptr.hpp>
27
28 class Combox;
29 struct FD_character;
30
31 /**
32  * This class provides an XForms implementation of the Character Dialog.
33  * The character dialog allows users to change the character settings
34  * in their documents.
35  */
36 class FormCharacter
37         : public FormCB<ControlCharacter, FormDB<FD_character> > {
38 public:
39         ///
40         FormCharacter();
41 private:
42
43         /// Apply from dialog
44         virtual void apply();
45
46         /// Build the dialog
47         virtual void build();
48
49         /// Update the dialog.
50         virtual void update();
51
52         /// Filter the inputs on callback from xforms
53         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
54
55         /** Callback method (used only to activate Apply button when
56             combox is changed */
57         static void ComboInputCB(int, void *, Combox *);
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<frnt::FONT_STATE>      bar_;
71         ///
72         std::vector<LColor::color>         color_;
73         ///
74         std::vector<string>                lang_;
75 };
76
77 #endif