]> git.saurik.com Git - wxWidgets.git/commitdiff
added minsize variable for sizers and sizeritems
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 5 Aug 2000 21:25:54 +0000 (21:25 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 5 Aug 2000 21:25:54 +0000 (21:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xml/xh_sizer.cpp
contrib/utils/wxrcedit/df/boxsizer.df
contrib/utils/wxrcedit/df/flexgridsizer.df
contrib/utils/wxrcedit/df/gridsizer.df
contrib/utils/wxrcedit/df/sizeritem.df
contrib/utils/wxrcedit/df/staticboxsizer.df

index 0442de477eadb678d8b467054ce6ab0b042a2070..3df8288457e368fbf9730158732482a6ead5218a 100644 (file)
@@ -90,13 +90,22 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
                 m_ParentSizer = old_par;
                 wxSizer *sizer = wxDynamicCast(item, wxSizer);
                 wxWindow *wnd = wxDynamicCast(item, wxWindow);
+                wxSize minsize = GetSize(_T("minsize"));
                 
                 if (sizer)
+                {
                     m_ParentSizer->Add(sizer, GetLong(_T("option")), 
                                        GetStyle(_T("flag")), GetLong(_T("border")));
+                    if (!(minsize == wxDefaultSize))
+                        m_ParentSizer->SetItemMinSize(sizer, minsize.x, minsize.y);
+                }
                 else if (wnd)
+                {
                     m_ParentSizer->Add(wnd, GetLong(_T("option")), 
                                        GetStyle(_T("flag")), GetLong(_T("border")));
+                    if (!(minsize == wxDefaultSize))
+                        m_ParentSizer->SetItemMinSize(wnd, minsize.x, minsize.y);
+                }
                 else 
                     wxLogError(_T("Error in resource."));
                 
@@ -147,6 +156,11 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
             sizer = new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")),
                                     GetLong(_T("vgap")), GetLong(_T("hgap")));
 
+        wxSize minsize = GetSize(_T("minsize"));
+        if (!(minsize == wxDefaultSize))
+            sizer->SetMinSize(minsize);
+
+
         wxSizer *old_par = m_ParentSizer;
         m_ParentSizer = sizer;
         bool old_ins = m_IsInside;
index 80c1609369edda0b4d433372293fd3730c1d0312..a7845b1e55fd2ad22183096f9c3db5fccdb083ea 100644 (file)
@@ -4,3 +4,4 @@ icon 0
 childtype sizer_item
 derived from panel_item
 var orient of flags wxHORIZONTAL,wxVERTICAL
+var minsize of coord
index a0674690229e8e638e804f2710155064b4cf6f5c..414dd886e6bbe752c1e202f7a3172d541927f7c7 100644 (file)
@@ -7,3 +7,4 @@ var rows of integer
 var cols of integer
 var vgap of integer
 var hgap of integer
+var minsize of coord
index ea0d051b906acf5f5dad6f184649b59394e124ea..ad1726206c0d33ccbb6088137f2c4016829df0bc 100644 (file)
@@ -7,3 +7,4 @@ var rows of integer
 var cols of integer
 var vgap of integer
 var hgap of integer
+var minsize of coord
index 25b2b6544c614ac33979fbbd2af00e111b734548..7ee1f74ecc1757a26cd70a80c65b703c1216140d 100644 (file)
@@ -6,3 +6,4 @@ type sizeritem
 var option of integer
 var flag of flags wxEXPAND,wxALL,wxLEFT,wxRIGHT,wxTOP,wxBOTTOM,wxALIGN_CENTER,wxALIGN_LEFT,wxALIGN_TOP,wxALIGN_RIGHT,wxALIGN_BOTTOM,wxALIGN_CENTER_HORIZONTAL,wxALIGN_CENTER_VERTICAL,wxNORTH,wxSOUTH,wxEAST,wxWEST,wxGROW,wxSHAPED,wxSTRETCH_NOT
 var border of integer
+var minsize of coord
index 055d7992132ee1017b6c840be4a4a34b15cb81c4..40e62f8b7e1e8515002a6ca286d610fd37a10c03 100644 (file)
@@ -1,3 +1,4 @@
 node staticboxsizer
 derived from boxsizer
 var label of text
+var minsize of coord