]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormRef.h
More pref work from Angus
[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 "FormInset.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         /// Connect signals etc. Set form's max size.
55         virtual void connect();
56         /// Disconnect signals. Also perform any necessary housekeeping.
57         virtual void disconnect();
58
59         /// Build the dialog
60         virtual void build();
61         /// Filter the input
62         virtual bool input( FL_OBJECT *, long );
63         /// Update dialog before showing it
64         virtual void update();
65         /// Not used but must be instantiated
66         virtual void apply();
67         /// Pointer to the actual instantiation of the xform's form
68         virtual FL_FORM * form() const;
69
70         ///
71         void updateBrowser( std::vector<string> ) const;
72         ///
73         void showBrowser() const;
74         ///
75         void hideBrowser() const;
76         ///
77         void setSize( int, int ) const;
78         ///
79         FD_form_ref * build_ref();
80         ///
81         Type getType() const;
82         ///
83         string getName( Type type ) const;
84
85         ///
86         Goto toggle;
87         /// 
88         std::vector<string> refs;
89
90         /// Real GUI implementation.
91         FD_form_ref * dialog_;
92 };
93
94 #endif