]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPrint.h
45aeca3cc6a9a7a703cb3a54f63622b3441a5eb3
[lyx.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 #include "xformsBC.h"
29
30 class LyXView;
31 class Dialogs;
32 struct FD_form_print;
33
34 /** This class provides an XForms implementation of the FormPrint Dialog.
35     The print dialog allows users to print their documents.
36  */
37 class FormPrint : public FormBaseBD {
38 public:
39         /// #FormPrint x(LyXView ..., Dialogs ...);#
40         FormPrint(LyXView *, Dialogs *);
41
42 private:
43         /// Pointer to the actual instantiation of the ButtonController.
44         virtual xformsBC & bc();
45         /// Update the dialog.
46         virtual void update();
47         /// Apply from dialog
48         virtual void apply();
49         /// Filter the inputs
50         virtual bool input(FL_OBJECT *, long);
51         /// Pointer to the actual instantiation of the xforms form
52         virtual FL_FORM * form() const;
53         /// Build the dialog
54         virtual void build();
55         /// Open the file browse dialog.
56         void browse();
57
58         ///
59         FD_form_print * build_print();
60         
61         /// Real GUI implementation.
62         boost::scoped_ptr<FD_form_print> dialog_;
63         /// print target
64         RadioButtonGroup target_;
65         /// page order
66         RadioButtonGroup order_;
67         /// which pages
68         RadioButtonGroup which_;
69         /// The ButtonController
70         ButtonController<OkApplyCancelPolicy, xformsBC> bc_;
71 };
72
73
74 inline
75 xformsBC & FormPrint::bc()
76 {
77         return bc_;
78 }
79 #endif