]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
removed extremely user-unfriendly translations
[wxWidgets.git] / src / common / wincmn.cpp
index dd192234579cb1d1cf2d0e281937d4eef510d708..7c40f7ce74a588e0f59a350989752f85a5cdfa3e 100644 (file)
 // static data
 // ----------------------------------------------------------------------------
 
+#if defined(__WXPM__)
+int wxWindowBase::ms_lastControlId = 2000;
+#else
 int wxWindowBase::ms_lastControlId = -200;
+#endif
 
 IMPLEMENT_ABSTRACT_CLASS(wxWindowBase, wxEvtHandler)
 
@@ -466,6 +470,15 @@ void wxWindowBase::Fit()
     //else: do nothing if we have no children
 }
 
+// fits virtual size (ie. scrolled area etc.) around children
+void wxWindowBase::FitInside()
+{
+    if ( GetChildren().GetCount() > 0 )
+    {
+        SetVirtualSize( GetBestVirtualSize() );
+    }
+}
+
 // return the size best suited for the current window
 wxSize wxWindowBase::DoGetBestSize() const
 {
@@ -589,8 +602,6 @@ void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
     m_maxVirtualWidth = maxW;
     m_minVirtualHeight = minH;
     m_maxVirtualHeight = maxH;
-
-    SetVirtualSize( GetClientSize() );
 }
 
 void wxWindowBase::DoSetVirtualSize( int x, int y )
@@ -1753,10 +1764,16 @@ void wxWindowBase::UpdateWindowUI()
 #if wxUSE_TEXTCTRL
                 wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
                 if ( text )
-                    text->SetValue(event.GetText());
+                {
+                       if ( event.GetText() != text->GetValue() )
+                       text->SetValue(event.GetText());
+                }
                 else
 #endif // wxUSE_TEXTCTRL
-                    control->SetLabel(event.GetText());
+                               {
+                                       if ( event.GetText() != control->GetLabel() )
+                       control->SetLabel(event.GetText());
+                }
             }
         }
 
@@ -1972,7 +1989,7 @@ void wxWindowBase::CaptureMouse()
     if ( winOld )
     {
         ((wxWindowBase*) winOld)->DoReleaseMouse();
-       
+
         // save it on stack
         wxWindowNext *item = new wxWindowNext;
         item->win = winOld;
@@ -1995,7 +2012,7 @@ void wxWindowBase::ReleaseMouse()
     if ( ms_winCaptureNext )
     {
         ((wxWindowBase*)ms_winCaptureNext->win)->DoCaptureMouse();
-       
+
         wxWindowNext *item = ms_winCaptureNext;
         ms_winCaptureNext = item->next;
         delete item;