]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPrint.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormPrint.h
index d9fb26cb00257e49f7edf24de9d4df305993064a..8f68ba2727fb113392178314bb9a1af516076191 100644 (file)
@@ -5,91 +5,59 @@
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-2000 The LyX Team.
+ *          Copyright 1995-2001 The LyX Team.
  *
- *         This file copyright 1999-2000
+ *         This file copyright 1999-2001
  *         Allan Rae
- *======================================================*/
-/* FormPrint.h
- * FormPrint Interface Class
+ *======================================================
+ *
+ * \file FormPrint.h
+ * \author Allan Rae, rae@lyx.org
+ * \author Angus Leeming, a.leeming@.ac.uk
  */
 
 #ifndef FORMPRINT_H
 #define FORMPRINT_H
 
-#include "DialogBase.h"
-#include "support/utility.hpp"
+#include <boost/smart_ptr.hpp>
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-class LyXView;
-class Dialogs;
-struct FD_form_print;
+#include "FormBase.h"
+#include "RadioButtonGroup.h"
 
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
+class ControlPrint;
+struct FD_form_print;
 
 /** This class provides an XForms implementation of the FormPrint Dialog.
     The print dialog allows users to print their documents.
  */
-class FormPrint : public DialogBase, public noncopyable {
+class FormPrint : public FormCB<ControlPrint, FormDB<FD_form_print> > {
 public:
-       /**@name Constructors and Destructors */
-       //@{
-       /// #FormPrint x(LyXFunc ..., Dialogs ...);#
-       FormPrint(LyXView *, Dialogs *);
-       ///
-       ~FormPrint();
-       //@}
-
-       /**@name Real per-instance Callback Methods */
-       //@{
-       static  int WMHideCB(FL_FORM *, void *);
-       static void OKCB(FL_OBJECT *, long);
-       static void ApplyCB(FL_OBJECT *, long);
-       static void CancelCB(FL_OBJECT *, long);
-       static void InputCB(FL_OBJECT *, long);
-       //@}
+       /// 
+       FormPrint(ControlPrint &);
 
 private:
-       /**@name Slot Methods */
-       //@{
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-       /// Update the dialog.
-       void update();
-       //@}
-
-       /**@name Dialog internal methods */
-       //@{
        /// Apply from dialog
-       void apply();
-       /// Filter the inputs
-       void input();
+       virtual void apply();
        /// Build the dialog
-       void build();
-       ///
+       virtual void build();
+       /// Update the dialog.
+       virtual void update();
+       /// Filter the inputs on callback from xforms
+       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+
+       /// Fdesign generated method
        FD_form_print * build_print();
-       //@}
 
-       /**@name Private Data */
-       //@{
-       /// Real GUI implementation.
-       FD_form_print * dialog_;
-       /// Which LyXView do we belong to?
-       LyXView * lv_;
-       ///
-       Dialogs * d_;
-       /// Update connection.
-       Connection u_;
-       /// Hide connection.
-       Connection h_;
-       //@}
+       /// print target
+       RadioButtonGroup target_;
+       /// page order
+       RadioButtonGroup order_;
+       /// which pages
+       RadioButtonGroup which_;
 };
 
-#endif
+#endif // FORMPRINT_H