From e3ee1e7b81c9b1a8806b80cd69c66eeccc679bf9 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 23 Mar 2016 17:13:09 +0000 Subject: Rewrite Fl_Window::size_range_() under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Window.cxx | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'src/Fl_Window.cxx') diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 8cf091427..70701bab6 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -554,6 +554,53 @@ int Fl_Window::handle(int ev) return Fl_Group::handle(ev); } +/** + Sets the allowable range the user can resize this window to. + This only works for top-level windows. + + + If this function is not called, FLTK tries to figure out the range + from the setting of resizable(): + + + It is undefined what happens if the current size does not fit in the + constraints passed to size_range(). + */ +void Fl_Window::size_range(int minw, int minh, int maxw, int maxh, int dw, int dh, int aspect) { + this->minw = minw; + this->minh = minh; + this->maxw = maxw; + this->maxh = maxh; + this->dw = dw; + this->dh = dh; + this->aspect = aspect; + pWindowDriver->size_range(); +} + // // End of "$Id$". // -- cgit v1.2.3