]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormPrint.h
John's FormExternal patch, Edwin's Qt2 patch and Baruch's gnome patch.
[lyx.git] / src / frontends / gnome / FormPrint.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 2000 The LyX Team.
8  *
9  * ====================================================== */
10 /* FormPrint.h
11  * FormPrint Interface Class
12  */
13
14 #ifndef FORMPRINT_H
15 #define FORMPRINT_H
16
17 #include "DialogBase.h"
18
19 #include <gtk--/widget.h>
20 #include <gtk--/radiobutton.h>
21 #include <gtk--/checkbutton.h>
22 #include <gtk--/spinbutton.h>
23 #include <gnome--/entry.h>
24 #include <gnome--/file-entry.h>
25
26
27 #ifdef __GNUG__
28 #pragma interface
29 #endif
30
31 class LyXView;
32 class Dialogs;
33
34 #ifdef SIGC_CXX_NAMESPACES
35 using SigC::Connection;
36 #endif
37
38 /** This class provides an Gnome implementation of the FormPrint Dialog.
39     The print dialog allows users to print their documents.
40  */
41 class FormPrint : public DialogBase {
42 public:
43   /**@name Constructors and Destructors */
44   //@{
45   /// #FormPrint x(LyXFunc ..., Dialogs ...);#
46   FormPrint(LyXView *, Dialogs *);
47   ///
48   ~FormPrint();
49   //@}
50   
51
52 private:
53   /**@name Slot Methods */
54   //@{
55   /// Create the dialog if necessary, update it and display it.
56   void show();
57   /// Hide the dialog.
58   void hide();
59   /// Update the dialog.
60   void update() { }
61   void updateSlot(bool = false);
62   /// Free memory
63   void free();
64   //@}
65   
66   /**@name Dialog internal methods */
67   //@{
68   /// Apply from dialog
69   void apply();
70   //@}
71   
72   /**@name Private Data */
73   //@{
74   /// Real GUI implementation.
75   Gtk::Widget * dialog_;
76   
77   Gtk::RadioButton * print_all_;
78   Gtk::RadioButton * print_odd_;
79   Gtk::RadioButton * print_even_;
80
81   Gtk::CheckButton * print_pages_;
82
83   Gtk::SpinButton  * print_from_;
84   Gtk::SpinButton  * print_to_;
85   
86   Gtk::RadioButton * order_normal_;
87   Gtk::RadioButton * order_reverse_;
88
89   Gtk::CheckButton * copies_unsorted_;
90   Gtk::SpinButton  * copies_count_;
91
92   Gtk::RadioButton * printto_printer_;
93   Gtk::RadioButton * printto_file_;
94
95   Gnome::Entry * printto_printcommand_;
96   Gnome::FileEntry * printto_fileentry_;
97   
98   /// Which LyXView do we belong to?
99   LyXView * lv_;
100   Dialogs * d_;
101   /// Update connection.
102   Connection u_;
103   /// Hide connection.
104   Connection h_;
105   //@}
106 };
107
108 #endif