]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPrint.h
bba61cd3cbaf4db450825eea36c64788bd9c51ca
[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 "DialogBase.h"
21 #include "form_print.h"
22 #ifdef SIGC_CXX_NAMESPACES
23 using SigC::Connection;
24 #endif
25
26 class LyXView;
27 class Dialogs;
28
29 /** This class provides an XForms implementation of the FormPrint Dialog.
30     The print dialog allows users to print their documents.
31  */
32 class FormPrint : public DialogBase {
33 public:
34         /**@name Constructors and Destructors */
35         //@{
36         /// #FormPrint x(LyXFunc ..., Dialogs ...);#
37         FormPrint(LyXView *, Dialogs *);
38         ///
39         ~FormPrint();
40         //@}
41
42         /**@name Real per-instance Callback Methods */
43         //@{
44         static  int WMHideCB(FL_FORM *, void *);
45         static void OKCB(FL_OBJECT *, long);
46         static void ApplyCB(FL_OBJECT *, long);
47         static void CancelCB(FL_OBJECT *, long);
48         static void InputCB(FL_OBJECT *, long);
49         //@}
50
51 private:
52         FormPrint() {}
53         FormPrint(FormPrint &) : DialogBase() {}
54
55         /**@name Slot Methods */
56         //@{
57         /// Create the dialog if necessary, update it and display it.
58         void show();
59         /// Hide the dialog.
60         void hide();
61         /// Update the dialog.
62         void update();
63         //@}
64
65         /**@name Dialog internal methods */
66         //@{
67         /// Apply from dialog
68         void apply();
69         /// Filter the inputs
70         void input();
71         /// Build the dialog
72         void build();
73         ///
74         FD_form_print * build_print();
75         /// Explicitly free the dialog.
76         void free();
77         //@}
78
79         /**@name Private Data */
80         //@{
81         /// Real GUI implementation.
82         FD_form_print * dialog_;
83         /// Which LyXView do we belong to?
84         LyXView * lv_;
85         Dialogs * d_;
86         /// Update connection.
87         Connection u_;
88         /// Hide connection.
89         Connection h_;
90         //@}
91 };
92
93 #endif