]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormRef.h
Angus's xforms patch + Preferences redesign -- need help fixing BadDrawable + Abort...
[lyx.git] / src / frontends / xforms / FormRef.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FORMREF_H
13 #define FORMREF_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "FormCommand.h"
20 struct FD_form_ref;
21
22 /** This class provides an XForms implementation of the FormRef Dialog.
23  */
24 class FormRef : public FormCommand {
25 public:
26         ///
27         FormRef(LyXView *, Dialogs *);
28         ///
29         ~FormRef();
30 private:
31         ///
32         enum Type{
33                 ///
34                 REF,
35                 ///
36                 PAGEREF,
37                 ///
38                 VREF,
39                 ///
40                 VPAGEREF,
41                 ///
42                 PRETTYREF
43         };
44         ///
45         enum Goto{
46                 ///
47                 GOREF,
48                 ///
49                 GOBACK,
50                 ///
51                 GOFIRST
52         };
53
54         /// Build the dialog
55         virtual void build();
56         /// Filter the input
57         virtual bool input( long );
58         /// Update dialog before showing it
59         virtual void update();
60         /// Not used but must be instantiated
61         virtual void apply();
62         /// delete derived class variables from hide()
63         virtual void clearStore();
64         /// Pointer to the actual instantiation of the xform's form
65         virtual FL_FORM * form() const;
66
67         ///
68         void updateBrowser( std::vector<string> ) const;
69         ///
70         void showBrowser() const;
71         ///
72         void hideBrowser() const;
73         ///
74         void setSize( int, int, int ) const;
75         ///
76         FD_form_ref * build_ref();
77         ///
78         Type getType() const;
79         ///
80         string getName( Type type ) const;
81
82         ///
83         Goto toggle;
84         /// 
85         std::vector<string> refs;
86
87         /// Real GUI implementation.
88         FD_form_ref * dialog_;
89 };
90
91 #endif