diff options
| author | Manolo Gouy <Manolo> | 2016-01-28 11:51:07 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-01-28 11:51:07 +0000 |
| commit | 1c3c544edf1af6884e4002f04aa28cce4a06fbec (patch) | |
| tree | 26f72eccf3d60dc04d5026df9678eec7652d33d1 /src/Fl_win32.cxx | |
| parent | e2cc1a80f09b7b33665be2ae14ef20673f9d6f7b (diff) | |
Added Fl_Window::capture_titlebar_and_borders a new private member function
that triggers a warning when FL_PORTING is ON and with a default platform-neutral
implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index ea4a43fac..2d4c9d8fc 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -2741,10 +2741,10 @@ int Fl_Window::decorated_h() On the WIN32 platform, this function exploits a feature of fl_read_image() which, when called with NULL first argument and when fl_gc is set to the screen device context, captures the window decoration. */ -void Fl_X::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) +void Fl_Window::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) { top = left = bottom = right = NULL; - if (!w->shown() || w->parent() || !w->border() || !w->visible()) return; + if (!shown() || parent() || !border() || !visible()) return; int wsides, hbottom, bt; RECT r = border_width_title_bar_height(w, wsides, hbottom, bt); int htop = bt + hbottom; @@ -2752,11 +2752,11 @@ void Fl_X::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Window save_win = fl_window; Fl_Surface_Device *previous = Fl_Surface_Device::surface(); Fl_Display_Device::display_device()->set_current(); - w->show(); + show(); Fl::check(); - w->make_current(); + make_current(); fl_gc = GetDC(NULL); // get the screen device context - int ww = w->w() + 2 * wsides; + int ww = w() + 2 * wsides; // capture the 4 window sides from screen fl_window = NULL; // force use of read_win_rectangle() by fl_read_image() uchar *rgb; @@ -2766,11 +2766,11 @@ void Fl_X::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, top->alloc_array = 1; } if (wsides) { - rgb = fl_read_image(NULL, r.left, r.top + htop, wsides, w->h()); - left = new Fl_RGB_Image(rgb, wsides, w->h(), 3); + rgb = fl_read_image(NULL, r.left, r.top + htop, wsides, h()); + left = new Fl_RGB_Image(rgb, wsides, h(), 3); left->alloc_array = 1; - rgb = fl_read_image(NULL, r.right - wsides, r.top + htop, wsides, w->h()); - right = new Fl_RGB_Image(rgb, wsides, w->h(), 3); + rgb = fl_read_image(NULL, r.right - wsides, r.top + htop, wsides, h()); + right = new Fl_RGB_Image(rgb, wsides, h(), 3); right->alloc_array = 1; rgb = fl_read_image(NULL, r.left, r.bottom-hbottom, ww, hbottom); bottom = new Fl_RGB_Image(rgb, ww, hbottom, 3); |
