]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPrint.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormPrint.C
index a83db97f5a8a4da212a9f9cf55b567b6c013d8fc..48d38d464bd744ae796e8e2e474b7644365250a4 100644 (file)
@@ -6,31 +6,39 @@
  * \author Allan Rae
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
-#include "xformsBC.h"
-#include "ControlPrint.h"
 #include "FormPrint.h"
+#include "ControlPrint.h"
 #include "forms/form_print.h"
-#include "Tooltips.h"
-
-#include "PrinterParams.h"
 
 #include "input_validators.h"
+#include "Tooltips.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
+
+#include "PrinterParams.h"
 
 #include "support/lstrings.h"
-#include FORMS_H_LOCATION
+#include "support/tostr.h"
+
+#include "lyx_forms.h"
 
+using std::string;
 
-typedef FormCB<ControlPrint, FormDB<FD_print> > base_class;
+namespace lyx {
 
-FormPrint::FormPrint()
-       : base_class(_("Print"))
+using support::strToInt;
+
+namespace frontend {
+
+typedef FormController<ControlPrint, FormView<FD_print> > base_class;
+
+FormPrint::FormPrint(Dialog & parent)
+       : base_class(parent, _("Print Document"))
 {}
 
 
@@ -180,7 +188,7 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long)
        if (ob == dialog_->button_browse) {
                // Get the filename from the dialog
                string const in_name = getString(dialog_->input_file);
-               string const out_name = controller().Browse(in_name);
+               string const out_name = controller().browse(in_name);
 
                // Save the filename to the dialog
                if (out_name != in_name && !out_name.empty()) {
@@ -248,3 +256,6 @@ ButtonPolicy::SMInput FormPrint::input(FL_OBJECT * ob, long)
 
        return activate;
 }
+
+} // namespace frontend
+} // namespace lyx