]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
fix unused variables and parameters warnings
[wxWidgets.git] / src / common / wincmn.cpp
index c26cfb27c308973f0c35276b5b7caaec2d95aa15..c79c389854d31283884f914182f6801c1f2e6246 100644 (file)
@@ -193,11 +193,6 @@ wxWindowBase::wxWindowBase()
 
     m_scrollHelper = (wxScrollHelper *) NULL;
 
-    m_minVirtualWidth =
-    m_maxVirtualWidth = wxDefaultCoord;
-    m_minVirtualHeight =
-    m_maxVirtualHeight = wxDefaultCoord;
-
     m_windowVariant = wxWINDOW_VARIANT_NORMAL;
 #if wxUSE_SYSTEM_OPTIONS
     if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) )
@@ -771,26 +766,20 @@ void wxWindowBase::DoSetSizeHints( int minW, int minH,
 }
 
 
-void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
-                                        int maxW, int maxH )
+#if WXWIN_COMPATIBILITY_2_8
+void wxWindowBase::SetVirtualSizeHints(int WXUNUSED(minW), int WXUNUSED(minH),
+                                       int WXUNUSED(maxW), int WXUNUSED(maxH))
 {
-    m_minVirtualWidth = minW;
-    m_maxVirtualWidth = maxW;
-    m_minVirtualHeight = minH;
-    m_maxVirtualHeight = maxH;
 }
 
-void wxWindowBase::DoSetVirtualSize( int x, int y )
+void wxWindowBase::SetVirtualSizeHints(const wxSize& WXUNUSED(minsize),
+                                       const wxSize& WXUNUSED(maxsize))
 {
-    if ( m_minVirtualWidth != wxDefaultCoord && m_minVirtualWidth > x )
-        x = m_minVirtualWidth;
-    if ( m_maxVirtualWidth != wxDefaultCoord && m_maxVirtualWidth < x )
-        x = m_maxVirtualWidth;
-    if ( m_minVirtualHeight != wxDefaultCoord && m_minVirtualHeight > y )
-        y = m_minVirtualHeight;
-    if ( m_maxVirtualHeight != wxDefaultCoord && m_maxVirtualHeight < y )
-        y = m_maxVirtualHeight;
+}
+#endif // WXWIN_COMPATIBILITY_2_8
 
+void wxWindowBase::DoSetVirtualSize( int x, int y )
+{
     m_virtualSize = wxSize(x, y);
 }
 
@@ -1051,6 +1040,11 @@ bool wxWindowBase::RemoveEventHandler(wxEvtHandler *handler)
     return false;
 }
 
+bool wxWindowBase::HandleWindowEvent(wxEvent& event) const
+{
+    return GetEventHandler()->SafelyProcessEvent(event);
+}
+
 // ----------------------------------------------------------------------------
 // colours, fonts &c
 // ----------------------------------------------------------------------------
@@ -2635,6 +2629,27 @@ bool wxWindowBase::TryParent(wxEvent& event)
     return wxEvtHandler::TryParent(event);
 }
 
+// ----------------------------------------------------------------------------
+// window relationships
+// ----------------------------------------------------------------------------
+
+wxWindow *wxWindowBase::DoGetSibling(WindowOrder order) const
+{
+    wxCHECK_MSG( GetParent(), NULL,
+                    _T("GetPrev/NextSibling() don't work for TLWs!") );
+
+    wxWindowList& siblings = GetParent()->GetChildren();
+    wxWindowList::compatibility_iterator i = siblings.Find((wxWindow *)this);
+    wxCHECK_MSG( i, NULL, _T("window not a child of its parent?") );
+
+    if ( order == OrderBefore )
+        i = i->GetPrevious();
+    else // OrderAfter
+        i = i->GetNext();
+
+    return i ? i->GetData() : NULL;
+}
+
 // ----------------------------------------------------------------------------
 // keyboard navigation
 // ----------------------------------------------------------------------------
@@ -2654,7 +2669,7 @@ bool wxWindowBase::DoNavigateIn(int flags)
 #endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
 }
 
-void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
+void wxWindowBase::DoMoveInTabOrder(wxWindow *win, WindowOrder move)
 {
     // check that we're not a top level window
     wxCHECK_RET( GetParent(),
@@ -2674,7 +2689,7 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
     // can't just move the node around
     wxWindow *self = (wxWindow *)this;
     siblings.DeleteObject(self);
-    if ( move == MoveAfter )
+    if ( move == OrderAfter )
     {
         i = i->GetNext();
     }
@@ -2683,7 +2698,7 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, MoveKind move)
     {
         siblings.Insert(i, self);
     }
-    else // MoveAfter and win was the last sibling
+    else // OrderAfter and win was the last sibling
     {
         siblings.Append(self);
     }