diff options
| author | Manolo Gouy <Manolo> | 2011-04-15 21:38:05 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-04-15 21:38:05 +0000 |
| commit | 9ff9cf123046b64be860a48438566ed6a9f5c541 (patch) | |
| tree | e5d0ddae9a4d580082fba1c0f98190dc50595e4d /FL | |
| parent | c473215f2a1ac2659e92973ff9ecaf1579ffc313 (diff) | |
Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Paged_Device.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Window.H | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/FL/Fl_Paged_Device.H b/FL/Fl_Paged_Device.H index bdc448925..5ef4a1137 100644 --- a/FL/Fl_Paged_Device.H +++ b/FL/Fl_Paged_Device.H @@ -132,6 +132,14 @@ public: virtual void translate(int x, int y); virtual void untranslate(void); virtual void print_widget(Fl_Widget* widget, int delta_x = 0, int delta_y = 0); + /** Prints a window with its title bar and frame if any. + + \p x_offset and \p y_offset are optional coordinates of where to position the window top left. + Equivalent to print_widget() if \p win is a subwindow or has no border. + Use Fl_Window::decorated_w() and Fl_Window::decorated_h() to get the size of the + printed window. + */ + void print_window(Fl_Window *win, int x_offset = 0, int y_offset = 0); virtual void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0); virtual int end_page (void); virtual void end_job (void); diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 1390f173e..ab7f43e16 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -443,6 +443,18 @@ public: void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); // platform dependent void default_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); static void default_callback(Fl_Window*, void* v); + + /** Returns the window width including any frame added by the window manager. + + Same as w() if applied to a subwindow. + */ + int decorated_w(); + /** Returns the window height including any window title bar and any frame + added by the window manager. + + Same as h() if applied to a subwindow. + */ + int decorated_h(); }; |
