]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormRef.h
major GUII cleanup + Baruchs patch + Angus's patch + removed a couple of generated...
[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         /**@name Constructors and Destructors */
27         //@{
28         ///
29         FormRef(LyXView *, Dialogs *);
30         ///
31         ~FormRef();
32         //@}
33
34 private:
35         ///
36         enum Type{ REF=0, PAGEREF, VREF, VPAGEREF, PRETTYREF };
37         ///
38         enum Goto{ GOREF=0, GOBACK, GOFIRST };
39
40         /// Build the dialog
41         virtual void build();
42         /// Filter the input
43         virtual void input( long );
44         /// Update dialog before showing it
45         virtual void update();
46         /// Not used but must be instantiated
47         virtual void apply();
48         /// delete derived class variables from hide()
49         virtual void clearStore();
50         /// Pointer to the actual instantiation of the xform's form
51         virtual FL_FORM * const form() const;
52
53         ///
54         void updateBrowser( std::vector<string> ) const;
55         ///
56         void showBrowser() const;
57         ///
58         void hideBrowser() const;
59         ///
60         void setSize( int, int, int ) const;
61         ///
62         FD_form_ref * build_ref();
63         ///
64         Type getType() const;
65         ///
66         string getName( Type type ) const;
67
68         ///
69         Goto toggle;
70         /// 
71         std::vector<string> refs;
72
73         /// Real GUI implementation.
74         FD_form_ref * dialog_;
75 };
76
77 #endif