]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCharacter.h
f19aa77c1fa4c8eabcef3fb8fc7dc5ca8c4a8520
[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  */
9
10 #ifndef FORM_CHARACTER_H
11 #define FORM_CHARACTER_H
12
13 #include <boost/smart_ptr.hpp>
14
15 #include "FormBaseDeprecated.h"
16 #include "xformsBC.h"
17
18 #ifdef __GNUG_
19 #pragma interface
20 #endif
21
22 class LyXView;
23 class Dialogs;
24 class Combox;
25 struct FD_form_character;
26
27 /** 
28  * This class provides an XForms implementation of the FormCharacter Dialog.
29  * The character dialog allows users to change the character settings
30  * in their documents.
31  */
32 class FormCharacter : public FormBaseBD {
33 public:
34         ///
35         FormCharacter(LyXView *, Dialogs *);
36 private:
37         
38         /// Pointer to the actual instantiation of the ButtonController.
39         virtual xformsBC & bc();
40
41         /// Build the popup
42         virtual void build();
43    
44         /// Apply from popup
45         virtual void apply();
46    
47         /// Update the popup.
48         virtual void update();
49    
50         /// Pointer to the actual instantiation of the xform's form
51         virtual FL_FORM * form() const;
52
53         ///
54         FD_form_character * build_character();
55         
56         /// Real GUI implementation.
57         boost::scoped_ptr<FD_form_character> dialog_;
58
59         ///
60         boost::scoped_ptr<Combox> combo_language2_;
61
62         /// The ButtonController
63         ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
64 };
65
66
67 inline
68 xformsBC & FormCharacter::bc()
69 {
70         return bc_;
71 }
72 #endif