]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormMinipage.h
Added Minipage-Dialog, small fix in LyXTabular::l_getline (removing \r).
[lyx.git] / src / frontends / xforms / FormMinipage.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1995 Matthias Ettrich
8  *          Copyright 1995-2000 The LyX Team.
9  *
10  *======================================================*/
11 /* FormMinipage.h
12  * FormMinipage Interface Class
13  */
14
15 #ifndef FORMMINIPAGE_H
16 #define FORMMINIPAGE_H
17
18 #include <boost/smart_ptr.hpp>
19
20 #ifdef __GNUG__
21 #pragma interface
22 #endif
23
24 #include "FormInset.h"
25 #include "xformsBC.h"
26
27 class LyXView;
28 class Dialogs;
29 class InsetMinipage;
30 struct FD_form_minipage;
31
32 /** This class provides an XForms implementation of the FormMinipage
33     Dialog.
34  */
35 class FormMinipage : public FormInset {
36 public:
37         /// #FormMinipage x(LyXView ..., Dialogs ...);#
38         FormMinipage(LyXView *, Dialogs *);
39
40 private:
41         /// Pointer to the actual instantiation of the ButtonController.
42         virtual xformsBC & bc();
43         /// Connect signals etc.
44         virtual void connect();
45
46         /// Slot launching dialog to an existing inset
47         void showInset(InsetMinipage *);
48         /// Slot launching dialog to an existing inset
49         void updateInset(InsetMinipage *);
50         /// Apply from dialog
51         virtual void apply();
52         /// Update dialog before showing it
53         virtual void update();
54         /// Pointer to the actual instantiation of the xforms form
55         virtual FL_FORM * form() const;
56         /// Build the dialog
57         virtual void build();
58
59         ///
60         FD_form_minipage * build_minipage();
61         
62         /// Real GUI implementation.
63         boost::scoped_ptr<FD_form_minipage> dialog_;
64         /// The ButtonController
65         ButtonController<OkApplyCancelReadOnlyPolicy, xformsBC> bc_;
66
67         /// pointer to the inset passed through showInset
68         InsetMinipage * inset_;
69 };
70
71
72 inline
73 xformsBC & FormMinipage::bc()
74 {
75         return bc_;
76 }
77 #endif