mirror of
https://github.com/fltk/fltk.git
synced 2026-05-25 00:53:39 +08:00
Made the printer dialog customization strings platform independent, so that
they can be set on all platforms to avoid platform-specific end user code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -91,4 +91,3 @@ public:
|
||||
//
|
||||
// End of "$Id$"
|
||||
//
|
||||
|
||||
|
||||
+22
-35
@@ -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 @@ public:
|
||||
#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,40 +179,8 @@ public:
|
||||
/** [this text may be customized at run-time] */
|
||||
static const char *property_cancel;
|
||||
/** \} */
|
||||
#endif
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#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
|
||||
}; // class Fl_Printer
|
||||
|
||||
/**
|
||||
This plugin socket allows the integration of new device drivers for special
|
||||
|
||||
@@ -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$".
|
||||
//
|
||||
|
||||
@@ -69,27 +69,6 @@ static Fl_Spinner *print_copies=(Fl_Spinner *)0;
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user