diff options
| author | Manolo Gouy <Manolo> | 2010-03-16 18:27:19 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-03-16 18:27:19 +0000 |
| commit | 1b6e7bd81272849f89b6e1c34b41de0b7d67c7f5 (patch) | |
| tree | 73ba49f3918d1cd231733ac151548816cef97d69 /src | |
| parent | 664c2f4b4e9d6d6d46375cef455127e168fcf88b (diff) | |
The "Print front window" external button is available if compiling with -DUSE_PRINT_BUTTON
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 10 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 2b123422c..f26d639db 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1781,8 +1781,10 @@ void Fl_Window::show() { if (!fl_capture) BringWindowToTop(i->xid); //ShowWindow(i->xid,fl_capture?SW_SHOWNOACTIVATE:SW_RESTORE); } +#ifdef USE_PRINT_BUTTON void preparePrintFront(void); preparePrintFront(); +#endif } Fl_Window *Fl_Window::current_; @@ -1930,7 +1932,8 @@ Fl_Region XRectangleRegion(int x, int y, int w, int h) { return CreatePolygonRgn(pt, 4, ALTERNATE); } -// temporary for testing purposes of the Fl_Printer class +#ifdef USE_PRINT_BUTTON +// to test the Fl_Printer class creating a "Print front window" button in a separate window // contains also preparePrintFront call above #include <FL/Fl_Printer.H> #include <FL/Fl_Button.H> @@ -1958,10 +1961,11 @@ void printFront(Fl_Widget *o, void *data) printer.origin(w/2, h/2 ); printer.rotate(ROTATE); printer.print_widget( win, - win->w()/2, - win->h()/2 ); + //printer.print_window_part( win, 0,0, win->w(), win->h(), - win->w()/2, - win->h()/2 ); #else printer.print_widget( win ); + //printer.print_window_part( win, 0,0, win->w(), win->h() ); #endif - //printer.print_window_part( win, 0,0, win->w(), win->h(), - win->w()/2, - win->h()/2 ); printer.end_page(); printer.end_job(); o->window()->show(); @@ -1978,6 +1982,8 @@ void preparePrintFront(void) w.end(); w.show(); } +#endif // USE_PRINT_BUTTON + #endif // FL_DOXYGEN // diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index e7cdf6e43..2cc7a1477 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1735,8 +1735,10 @@ void Fl_Window::show() { } else { XMapRaised(fl_display, i->xid); } +#ifdef USE_PRINT_BUTTON void preparePrintFront(void); preparePrintFront(); +#endif } Window fl_window; @@ -1759,7 +1761,8 @@ void Fl_Window::make_current() { } -// temporary for testing purposes of the Fl_Printer class +#ifdef USE_PRINT_BUTTON +// to test the Fl_Printer class creating a "Print front window" button in a separate window // contains also preparePrintFront call above #include <FL/Fl_Printer.H> #include <FL/Fl_Button.H> @@ -1809,6 +1812,7 @@ void preparePrintFront(void) w.end(); w.show(); } +#endif // USE_PRINT_BUTTON #endif |
