]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPrint.h
different low-level key handling for xforms 0.89, use signals in workarea, changes...
[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 "support/utility.hpp"
22
23 #ifdef __GNUG__
24 #pragma interface
25 #endif
26
27 class LyXView;
28 class Dialogs;
29 struct FD_form_print;
30
31 #ifdef SIGC_CXX_NAMESPACES
32 using SigC::Connection;
33 #endif
34
35 /** This class provides an XForms implementation of the FormPrint Dialog.
36     The print dialog allows users to print their documents.
37  */
38 class FormPrint : public DialogBase, public noncopyable {
39 public:
40         /// #FormPrint x(LyXFunc ..., Dialogs ...);#
41         FormPrint(LyXView *, Dialogs *);
42         ///
43         ~FormPrint();
44
45         ///
46         static  int WMHideCB(FL_FORM *, void *);
47         ///
48         static void OKCB(FL_OBJECT *, long);
49         ///
50         static void ApplyCB(FL_OBJECT *, long);
51         ///
52         static void CancelCB(FL_OBJECT *, long);
53         ///
54         static void InputCB(FL_OBJECT *, long);
55 private:
56         /// Create the dialog if necessary, update it and display it.
57         void show();
58         /// Hide the dialog.
59         void hide();
60         /// Update the dialog.
61         void update();
62
63         /// Apply from dialog
64         void apply();
65         /// Filter the inputs
66         void input();
67         /// Build the dialog
68         void build();
69         ///
70         FD_form_print * build_print();
71
72         /// Real GUI implementation.
73         FD_form_print * dialog_;
74         /// Which LyXView do we belong to?
75         LyXView * lv_;
76         ///
77         Dialogs * d_;
78         /// Update connection.
79         Connection u_;
80         /// Hide connection.
81         Connection h_;
82 };
83
84 #endif