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