Author: AlbrechtS
Date: 2010-04-11 11:42:35 -0700 (Sun, 11 Apr 2010)
New Revision: 7480
Log:
Made the printer dialog customization strings platform independent, so that
they can be set on all platforms to avoid platform-specific end user code.
Modified:
branches/branch-1.3/FL/Fl_Abstract_Printer.H
branches/branch-1.3/FL/Fl_Printer.H
branches/branch-1.3/src/Fl_Printer.cxx
branches/branch-1.3/src/print_panel.cxx
Modified: branches/branch-1.3/FL/Fl_Abstract_Printer.H
===================================================================
--- branches/branch-1.3/FL/Fl_Abstract_Printer.H 2010-04-11 09:52:05 UTC
(rev 7479)
+++ branches/branch-1.3/FL/Fl_Abstract_Printer.H 2010-04-11 18:42:35 UTC
(rev 7480)
@@ -91,4 +91,3 @@
//
// End of "$Id$"
//
-
Modified: branches/branch-1.3/FL/Fl_Printer.H
===================================================================
--- branches/branch-1.3/FL/Fl_Printer.H 2010-04-11 09:52:05 UTC (rev 7479)
+++ branches/branch-1.3/FL/Fl_Printer.H 2010-04-11 18:42:35 UTC (rev 7480)
@@ -65,7 +65,7 @@
\endcode
Use Fl_PSfile_Device::file_chooser_title to customize the title of the file
chooser dialog that opens
when using the "Print To File" option of the print dialog.
- Class Fl_RGB_Image prints but looses its transparency if it has one.
+ Class Fl_RGB_Image prints but loses its transparency if it has one.
<li>MSWindows platform: Transparent Fl_RGB_Image 's don't print with exact
transparency on most printers.
Fl_RGB_Image 's don't rotate() well.
A workaround is to use the print_window_part() call.
@@ -113,11 +113,30 @@
#endif
int end_page (void);
void end_job (void);
+
/**
@brief The destructor.
*/
~Fl_Printer(void);
-#ifdef FL_DOXYGEN
+
+#else // Xlib (Linux/Unix)
+
+#include <FL/Fl_PSfile_Device.H>
+
+class Fl_Printer : public Fl_PSfile_Device {
+
+public:
+
+ Fl_Printer(void) {};
+ ~Fl_Printer(void) {};
+ int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL);
+
+#endif // Fl_Printer (platform-dependent)
+
+ // Fl_Printer:: common for all platforms
+
+public: // just to be sure ...
+
/** \name These attributes apply to the Xlib platform only.
\{
*/
@@ -160,41 +179,9 @@
/** [this text may be customized at run-time] */
static const char *property_cancel;
/** \} */
-#endif
-};
-#else
+}; // class Fl_Printer
-#include <FL/Fl_PSfile_Device.H>
-
-class Fl_Printer : public Fl_PSfile_Device {
-public:
- static const char *dialog_title; // all of this must be duplicated above for
correct documentation
- static const char *dialog_printer;
- static const char *dialog_range;
- static const char *dialog_copies;
- static const char *dialog_all;
- static const char *dialog_pages;
- static const char *dialog_from;
- static const char *dialog_to;
- static const char *dialog_properties;
- static const char *dialog_copyNo;
- static const char *dialog_print_button;
- static const char *dialog_cancel_button;
- static const char *dialog_print_to_file;
- static const char *property_title;
- static const char *property_pagesize;
- static const char *property_mode;
- static const char *property_use;
- static const char *property_save;
- static const char *property_cancel;
-
- Fl_Printer(void) {};
- ~Fl_Printer(void) {};
- int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL);
-};
-#endif
-
/**
This plugin socket allows the integration of new device drivers for special
window or screen types. It is currently used to provide an automated printing
Modified: branches/branch-1.3/src/Fl_Printer.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Printer.cxx 2010-04-11 09:52:05 UTC (rev
7479)
+++ branches/branch-1.3/src/Fl_Printer.cxx 2010-04-11 18:42:35 UTC (rev
7480)
@@ -36,6 +36,28 @@
#include <src/Fl_PS_Printer.cxx>
+// print dialog customization strings
+
+const char *Fl_Printer::dialog_title = "Print";
+const char *Fl_Printer::dialog_printer = "Printer:";
+const char *Fl_Printer::dialog_range = "Print Range";
+const char *Fl_Printer::dialog_copies = "Copies";
+const char *Fl_Printer::dialog_all = "All";
+const char *Fl_Printer::dialog_pages = "Pages";
+const char *Fl_Printer::dialog_from = "From:";
+const char *Fl_Printer::dialog_to = "To:";
+const char *Fl_Printer::dialog_properties = "Properties...";
+const char *Fl_Printer::dialog_copyNo = "# Copies:";
+const char *Fl_Printer::dialog_print_button = "Print";
+const char *Fl_Printer::dialog_cancel_button = "Cancel";
+const char *Fl_Printer::dialog_print_to_file = "Print To File";
+const char *Fl_Printer::property_title = "Printer Properties";
+const char *Fl_Printer::property_pagesize = "Page Size:";
+const char *Fl_Printer::property_mode = "Output Mode:";
+const char *Fl_Printer::property_use = "Use";
+const char *Fl_Printer::property_save = "Save";
+const char *Fl_Printer::property_cancel = "Cancel";
+
//
// End of "$Id$".
//
Modified: branches/branch-1.3/src/print_panel.cxx
===================================================================
--- branches/branch-1.3/src/print_panel.cxx 2010-04-11 09:52:05 UTC (rev
7479)
+++ branches/branch-1.3/src/print_panel.cxx 2010-04-11 18:42:35 UTC (rev
7480)
@@ -69,27 +69,6 @@
static int print_start = 0; // 1 if print_okay has been clicked
static int print_pipe = 0; // 0 = file, 1 = pipe (lp)
-const char *Fl_Printer::dialog_title = "Print";
-const char *Fl_Printer::dialog_printer = "Printer:";
-const char *Fl_Printer::dialog_range = "Print Range";
-const char *Fl_Printer::dialog_copies = "Copies";
-const char *Fl_Printer::dialog_all = "All";
-const char *Fl_Printer::dialog_pages = "Pages";
-const char *Fl_Printer::dialog_from = "From:";
-const char *Fl_Printer::dialog_to = "To:";
-const char *Fl_Printer::dialog_properties = "Properties...";
-const char *Fl_Printer::dialog_copyNo = "# Copies:";
-const char *Fl_Printer::dialog_print_button = "Print";
-const char *Fl_Printer::dialog_cancel_button = "Cancel";
-const char *Fl_Printer::dialog_print_to_file = "Print To File";
-const char *Fl_Printer::property_title = "Printer Properties";
-const char *Fl_Printer::property_pagesize = "Page Size:";
-const char *Fl_Printer::property_mode = "Output Mode:";
-const char *Fl_Printer::property_use = "Use";
-const char *Fl_Printer::property_save = "Save";
-const char *Fl_Printer::property_cancel = "Cancel";
-
-
static void cb_print_choice(Fl_Choice*, void*) {
print_update_status();
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit