]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormPrint.h
Compile fixes for DEC cxx, John's maths and keymap patches.
[features.git] / src / frontends / xforms / FormPrint.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  *          This file copyright 1999-2000
11  *          Allan Rae
12  *======================================================*/
13 /* FormPrint.h
14  * FormPrint Interface Class
15  */
16
17 #ifndef FORMPRINT_H
18 #define FORMPRINT_H
19
20 #include <boost/smart_ptr.hpp>
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 #include "FormBaseDeprecated.h"
27 #include "RadioButtonGroup.h"
28
29 struct FD_form_print;
30
31 /** This class provides an XForms implementation of the FormPrint Dialog.
32     The print dialog allows users to print their documents.
33  */
34 class FormPrint : public FormBaseBD {
35 public:
36         /// #FormPrint x(LyXView ..., Dialogs ...);#
37         FormPrint(LyXView *, Dialogs *);
38
39 private:
40         /// Pointer to the actual instantiation of the ButtonController.
41         virtual xformsBC & bc();
42         /// Update the dialog.
43         virtual void update();
44         /// Apply from dialog
45         virtual void apply();
46         /// Filter the inputs
47         virtual bool input(FL_OBJECT *, long);
48         /// Pointer to the actual instantiation of the xforms form
49         virtual FL_FORM * form() const;
50         /// Build the dialog
51         virtual void build();
52         /// Open the file browse dialog.
53         void browse();
54
55         ///
56         FD_form_print * build_print();
57         
58         /// Real GUI implementation.
59         boost::scoped_ptr<FD_form_print> dialog_;
60         /// print target
61         RadioButtonGroup target_;
62         /// page order
63         RadioButtonGroup order_;
64         /// which pages
65         RadioButtonGroup which_;
66         /// The ButtonController
67         ButtonController<OkApplyCancelPolicy, xformsBC> bc_;
68 };
69
70
71 inline
72 xformsBC & FormPrint::bc()
73 {
74         return bc_;
75 }
76 #endif