From: Robin Dunn Date: Wed, 7 Apr 2004 23:06:35 +0000 (+0000) Subject: Changed name to wxFIXED_MINSIZE since that is more descriptive of what X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f52e0cf4893f90451eaf5987e4786bde066f629c?hp=74a57fcda4c14d108284d35d742e9f27f0183e4a Changed name to wxFIXED_MINSIZE since that is more descriptive of what it does. The size can still be changed by the sizer, but it won't query the minsize if this flag is set. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/sizer.tex b/docs/latex/wx/sizer.tex index ed306b1efc..984889707b 100644 --- a/docs/latex/wx/sizer.tex +++ b/docs/latex/wx/sizer.tex @@ -111,13 +111,13 @@ dependent on the specific kind of sizer used. the space allotted to the item.} \twocolitem{\windowstyle{wxSHAPED}}{The item will be expanded as much as possible while also maintaining its aspect ratio} -\twocolitem{\windowstyle{wxFIXED\_SIZE}}{Normally wxSizers will use +\twocolitem{\windowstyle{wxFIXED\_MINSIZE}}{Normally wxSizers will use \helpref{GetAdjustedBestSize}{wxwindowgetadjustedbestsize} to determin what the minimal size of window items should be, and will use that size to calculate the layout. This allows layouts to adjust when an item changes and it's {\it best size} becomes different. If you would rather have a window item stay the size it - started with then use wxFIXED\_SIZE.} + started with then use wxFIXED\_MINSIZE.} \twocolitem{\windowstyle{wxALIGN\_CENTER}\\ \windowstyle{wxALIGN\_LEFT}\\ \windowstyle{wxALIGN\_RIGHT}\\ diff --git a/include/wx/defs.h b/include/wx/defs.h index a10b3763a5..14e5b97d1c 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -1031,7 +1031,7 @@ enum wxStretch wxGROW = 0x2000, wxEXPAND = wxGROW, wxSHAPED = 0x4000, - wxFIXED_SIZE = 0x8000, + wxFIXED_MINSIZE = 0x8000, wxTILE = 0xc000, // for compatibility only, default now, don't use explicitly any more diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 06c64979b4..424968309f 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -193,7 +193,7 @@ wxSize wxSizerItem::CalcMin() } else { - if ( IsWindow() && !(m_flag & wxFIXED_SIZE) ) + if ( IsWindow() && !(m_flag & wxFIXED_MINSIZE) ) { // the size of the window may change during run-time, we should // use the current minimal size diff --git a/wxPython/demo/IntCtrl.py b/wxPython/demo/IntCtrl.py index 8226d1848a..7f6b168575 100644 --- a/wxPython/demo/IntCtrl.py +++ b/wxPython/demo/IntCtrl.py @@ -28,10 +28,10 @@ class TestPanel( wx.Panel ): grid = wx.FlexGridSizer( 0, 2, 0, 0 ) grid.Add( self.set_min, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - grid.Add( self.min, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid.Add( self.min, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid.Add(self.set_max, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - grid.Add( self.max, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid.Add( self.max, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid.Add( self.limit_target, 0, wx.ALIGN_LEFT|wx.ALL, 5 ) grid.Add( (20, 0), 0, wx.ALIGN_LEFT|wx.ALL, 5 ) diff --git a/wxPython/demo/MaskedNumCtrl.py b/wxPython/demo/MaskedNumCtrl.py index 97ccc913e7..e0e4077600 100644 --- a/wxPython/demo/MaskedNumCtrl.py +++ b/wxPython/demo/MaskedNumCtrl.py @@ -79,16 +79,16 @@ value entry ctrl:""") grid1 = wx.FlexGridSizer( 0, 4, 0, 0 ) grid1.Add( intlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) - grid1.Add( self.integerwidth, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid1.Add( self.integerwidth, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid1.Add( groupcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) - grid1.Add( self.groupchar, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid1.Add( self.groupchar, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid1.Add( fraclabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - grid1.Add( self.fractionwidth, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid1.Add( self.fractionwidth, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid1.Add( decimalcharlabel, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) - grid1.Add( self.decimalchar, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) + grid1.Add( self.decimalchar, 0, wx.FIXED_MINSIZE|wx.ALIGN_LEFT|wx.ALL, 5 ) grid1.Add( self.set_min, 0, wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) grid1.Add( self.min, 0, wx.ALIGN_LEFT|wx.ALL, 5 ) diff --git a/wxPython/demo/MimeTypesManager.py b/wxPython/demo/MimeTypesManager.py index 24b62a3527..94922d5c3b 100644 --- a/wxPython/demo/MimeTypesManager.py +++ b/wxPython/demo/MimeTypesManager.py @@ -46,7 +46,7 @@ class MimeTypesDemoPanel(wx.Panel): usizer.Add(t, 0, wx.ALL | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL, 2) self.ext = wx.TextCtrl(self, -1, value="wav", style = wx.TE_PROCESS_ENTER ) - usizer.Add(self.ext, 0, wx.FIXED_SIZE | wx.ALL | wx.ALIGN_TOP, 4) + usizer.Add(self.ext, 0, wx.FIXED_MINSIZE | wx.ALL | wx.ALIGN_TOP, 4) self.Bind(wx.EVT_TEXT_ENTER, self.OnLookup, self.ext) # Select how to look it up @@ -85,13 +85,13 @@ class MimeTypesDemoPanel(wx.Panel): llsizer.Add(t, (0, 0), (1, 1), wx.ALL | wx.EXPAND | wx.ALIGN_CENTER, 2) self.icon = wx.StaticBitmap(self, -1, images.getNoIconBitmap()) - llsizer.Add(self.icon, (0, 1), (1, 1), wx.FIXED_SIZE | wx.ALL | wx.ALIGN_CENTER, 2) + llsizer.Add(self.icon, (0, 1), (1, 1), wx.FIXED_MINSIZE | wx.ALL | wx.ALIGN_CENTER, 2) self.iconsource = wx.TextCtrl(self, -1, value="", size=(125, -1), style = wx.TE_READONLY ) llsizer.Add(self.iconsource, (0, 2), (1, 1), wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 2) self.iconoffset = wx.TextCtrl(self, -1, value="", size=(25,-1), style = wx.TE_READONLY ) - llsizer.Add(self.iconoffset, (0, 3), (1, 1), wx.FIXED_SIZE | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2) + llsizer.Add(self.iconoffset, (0, 3), (1, 1), wx.FIXED_MINSIZE | wx.ALL | wx.ALIGN_CENTER_VERTICAL, 2) #------- MIME Type diff --git a/wxPython/src/_core_rename.i b/wxPython/src/_core_rename.i index 3e6027cbad..cc468375df 100644 --- a/wxPython/src/_core_rename.i +++ b/wxPython/src/_core_rename.i @@ -276,7 +276,7 @@ %rename(GROW) wxGROW; %rename(EXPAND) wxEXPAND; %rename(SHAPED) wxSHAPED; -%rename(FIXED_SIZE) wxFIXED_SIZE; +%rename(FIXED_MINSIZE) wxFIXED_MINSIZE; %rename(TILE) wxTILE; %rename(ADJUST_MINSIZE) wxADJUST_MINSIZE; %rename(BORDER_DEFAULT) wxBORDER_DEFAULT; diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index c0b251404b..9c11aded57 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -609,7 +609,7 @@ enum wxStretch wxGROW, wxEXPAND, wxSHAPED, - wxFIXED_SIZE, + wxFIXED_MINSIZE, wxTILE, wxADJUST_MINSIZE, }; diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index d9fa992c28..296206f5e5 100644 --- a/wxPython/src/gtk/core.py +++ b/wxPython/src/gtk/core.py @@ -285,7 +285,7 @@ SHRINK = _core.SHRINK GROW = _core.GROW EXPAND = _core.EXPAND SHAPED = _core.SHAPED -FIXED_SIZE = _core.FIXED_SIZE +FIXED_MINSIZE = _core.FIXED_MINSIZE TILE = _core.TILE ADJUST_MINSIZE = _core.ADJUST_MINSIZE BORDER_DEFAULT = _core.BORDER_DEFAULT diff --git a/wxPython/src/gtk/core_wrap.cpp b/wxPython/src/gtk/core_wrap.cpp index 264627c9f5..890f065427 100644 --- a/wxPython/src/gtk/core_wrap.cpp +++ b/wxPython/src/gtk/core_wrap.cpp @@ -42241,7 +42241,7 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"GROW", SWIG_FromInt((int)wxGROW)); PyDict_SetItemString(d,"EXPAND", SWIG_FromInt((int)wxEXPAND)); PyDict_SetItemString(d,"SHAPED", SWIG_FromInt((int)wxSHAPED)); - PyDict_SetItemString(d,"FIXED_SIZE", SWIG_FromInt((int)wxFIXED_SIZE)); + PyDict_SetItemString(d,"FIXED_MINSIZE", SWIG_FromInt((int)wxFIXED_MINSIZE)); PyDict_SetItemString(d,"TILE", SWIG_FromInt((int)wxTILE)); PyDict_SetItemString(d,"ADJUST_MINSIZE", SWIG_FromInt((int)wxADJUST_MINSIZE)); PyDict_SetItemString(d,"BORDER_DEFAULT", SWIG_FromInt((int)wxBORDER_DEFAULT)); diff --git a/wxPython/wx/lib/colourchooser/pycolourbox.py b/wxPython/wx/lib/colourchooser/pycolourbox.py index 90117a198b..a1108c7b1c 100644 --- a/wxPython/wx/lib/colourchooser/pycolourbox.py +++ b/wxPython/wx/lib/colourchooser/pycolourbox.py @@ -38,7 +38,7 @@ class PyColourBox(wx.Panel): self.colour_box = wx.Window(self, -1, style=wx.SIMPLE_BORDER) sizer = wx.GridSizer(1, 1) - sizer.Add(self.colour_box, 0, wx.FIXED_SIZE | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) + sizer.Add(self.colour_box, 0, wx.FIXED_MINSIZE | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) sizer.SetItemMinSize(self.colour_box, size[0] - 5, size[1] - 5) self.SetAutoLayout(True) self.SetSizer(sizer) diff --git a/wxPython/wx/lib/colourchooser/pycolourchooser.py b/wxPython/wx/lib/colourchooser/pycolourchooser.py index 763777a35c..295698896d 100644 --- a/wxPython/wx/lib/colourchooser/pycolourchooser.py +++ b/wxPython/wx/lib/colourchooser/pycolourchooser.py @@ -202,9 +202,9 @@ class PyColourChooser(wx.Panel): self.ventry.SetSize((40, -1)) hsvgrid = wx.FlexGridSizer(1, 6, 2, 2) hsvgrid.AddMany ([ - (hlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.hentry, 0, wx.FIXED_SIZE), - (slabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.sentry, 0, wx.FIXED_SIZE), - (vlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.ventry, 0, wx.FIXED_SIZE), + (hlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.hentry, 0, wx.FIXED_MINSIZE), + (slabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.sentry, 0, wx.FIXED_MINSIZE), + (vlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.ventry, 0, wx.FIXED_MINSIZE), ]) rlabel = wx.StaticText(self, -1, _("R:")) @@ -218,9 +218,9 @@ class PyColourChooser(wx.Panel): self.bentry.SetSize((40, -1)) lgrid = wx.FlexGridSizer(1, 6, 2, 2) lgrid.AddMany([ - (rlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.rentry, 0, wx.FIXED_SIZE), - (glabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.gentry, 0, wx.FIXED_SIZE), - (blabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.bentry, 0, wx.FIXED_SIZE), + (rlabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.rentry, 0, wx.FIXED_MINSIZE), + (glabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.gentry, 0, wx.FIXED_MINSIZE), + (blabel, 0, wx.ALIGN_CENTER_VERTICAL), (self.bentry, 0, wx.FIXED_MINSIZE), ]) gsizer = wx.GridSizer(2, 1) diff --git a/wxPython/wxPython/core.py b/wxPython/wxPython/core.py index 879217de7e..507b5cc74f 100644 --- a/wxPython/wxPython/core.py +++ b/wxPython/wxPython/core.py @@ -292,7 +292,7 @@ wxSHRINK = wx.core.SHRINK wxGROW = wx.core.GROW wxEXPAND = wx.core.EXPAND wxSHAPED = wx.core.SHAPED -wxFIXED_SIZE = wx.core.FIXED_SIZE +wxFIXED_MINSIZE = wx.core.FIXED_MINSIZE wxTILE = wx.core.TILE wxADJUST_MINSIZE = wx.core.ADJUST_MINSIZE wxBORDER_DEFAULT = wx.core.BORDER_DEFAULT