]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 867158 ] Warning free gizmos
authorJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 08:35:31 +0000 (08:35 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 08:35:31 +0000 (08:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/include/wx/gizmos/dynamicsash.h
contrib/include/wx/gizmos/multicell.h
contrib/samples/gizmos/dynsash/dynsash.cpp
contrib/samples/gizmos/dynsash_switch/dynsash_switch.cpp
contrib/samples/gizmos/led/led.cpp
contrib/samples/gizmos/multicell/mtest.cpp
contrib/src/gizmos/dynamicsash.cpp
contrib/src/gizmos/multicell.cpp
contrib/src/gizmos/splittree.cpp

index aebaaa595de63fc97d41df2b791a14461bd65193..2a37a2be3cfa23440f06495cfd34a5ee76354ddc 100644 (file)
@@ -132,7 +132,7 @@ private:
 };
 
 typedef void (wxEvtHandler::*wxDynamicSashSplitEventFunction)(wxDynamicSashSplitEvent&);
-typedef void (wxEvtHandler::*wxDynamicSashUnifyEventFunction)(wxDynamicSashSplitEvent&);
+typedef void (wxEvtHandler::*wxDynamicSashUnifyEventFunction)(wxDynamicSashUnifyEvent&);
 
 /*
     wxDynamicSashWindow.  See above.
index f4cab3fffb821c963defe70ab3fbab19e34b9be0..a22b9871ca89cf79d10fee775c1c16014863d3b8 100644 (file)
@@ -154,6 +154,16 @@ public:
                m_minCellSize = size;
        };
 
+  /* These are to hide Add() method of parents and to avoid Borland warning about hiding virtual functions */
+  void Add( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL )
+       { wxFlexGridSizer::Add( window, proportion, flag, border, userData); }
+  void Add( wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL )
+       { wxFlexGridSizer::Add( sizer, proportion, flag, border, userData); }
+  void Add( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL )
+       { wxFlexGridSizer::Add( width, height, proportion, flag, border, userData); }
+  void Add( wxSizerItem *item )
+       { wxFlexGridSizer::Add( item); }
+
 private:
        wxWindow            *m_parent;
        unsigned int         m_maxRows, m_maxCols;
index e31b11c036680eed3a29d3cffc57fa8f5ef564d3..8c38649dc793000698ab936425923669135d53c4 100644 (file)
@@ -52,12 +52,12 @@ private:
 IMPLEMENT_APP(Demo)
 
 wxChar *HTML_content =
-wxT("<P><H1>wxDynamicSashWindow demo</H1>"
-"<P>Here is an example of how you can use <TT>wxDynamicSashWindow</TT> to allow your users to "
-"dynamically split and unify the views of your windows.  Try dragging out a few splits "
-"and then reunifying the window."
-"<P>Also, see the <TT>dynsash_switch</TT> sample for an example of an application which "
-"manages the scrollbars provided by <TT>wxDynamicSashWindow</TT> itself.");
+wxT("<P><H1>wxDynamicSashWindow demo</H1>")
+wxT("<P>Here is an example of how you can use <TT>wxDynamicSashWindow</TT> to allow your users to ")
+wxT("dynamically split and unify the views of your windows.  Try dragging out a few splits ")
+wxT("and then reunifying the window.")
+wxT("<P>Also, see the <TT>dynsash_switch</TT> sample for an example of an application which ")
+wxT("manages the scrollbars provided by <TT>wxDynamicSashWindow</TT> itself.");
 
 bool Demo::OnInit() {
     wxInitAllImageHandlers();
@@ -78,8 +78,9 @@ bool Demo::OnInit() {
 SashHtmlWindow::SashHtmlWindow(wxWindow *parent, wxWindowID id,
                                const wxPoint& pos, const wxSize& size, long style, const wxString& name) :
                                     wxHtmlWindow(parent, id, pos, size, style, name) {
-    Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT,
-        (wxObjectEventFunction)(wxCommandEventFunction)(wxDynamicSashSplitEventFunction) &SashHtmlWindow::OnSplit);
+    Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
+                                          (wxEventFunction)
+                                          (wxDynamicSashSplitEventFunction)&SashHtmlWindow::OnSplit);
 
     m_dyn_sash = parent;
 }
@@ -95,7 +96,7 @@ wxSize SashHtmlWindow::DoGetBestSize() const {
         return wxHtmlWindow::GetBestSize();
 }
 
-void SashHtmlWindow::OnSplit(wxDynamicSashSplitEvent& event) {
+void SashHtmlWindow::OnSplit(wxDynamicSashSplitEvent& WXUNUSED(event)) {
     wxHtmlWindow *html = new SashHtmlWindow(m_dyn_sash, -1);
     html->SetPage(HTML_content);
 }
index 1ac49a9edae87669fd580f7374d84d72f0def327..50db96f4aca8d8b7c7b6de74e555a526c07a54dd 100644 (file)
@@ -109,30 +109,60 @@ SwitchView::SwitchView(wxDynamicSashWindow *win) {
     hscroll->SetEventHandler(this);
     vscroll->SetEventHandler(this);
 
-    Connect(GetId(), wxEVT_SIZE, (wxObjectEventFunction)&SwitchView::OnSize);
-    Connect(m_choice->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, (wxObjectEventFunction)&SwitchView::OnChoice);
-    Connect(m_view->GetId(), wxEVT_PAINT, (wxObjectEventFunction)&SwitchView::OnPaint);
-
-    Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)&SwitchView::OnFocus);
-    Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)&SwitchView::OnScroll);
-    Connect(-1, wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)&SwitchView::OnErase);
-
-    Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)&SwitchView::OnSplit);
-    Connect(-1, wxEVT_DYNAMIC_SASH_UNIFY, (wxObjectEventFunction)&SwitchView::OnUnify);
+    Connect(GetId(), wxEVT_SIZE, (wxObjectEventFunction)
+                                 (wxEventFunction)
+                                 (wxSizeEventFunction)&SwitchView::OnSize);
+    Connect(m_choice->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, (wxObjectEventFunction)
+                                                              (wxEventFunction)
+                                                              (wxCommandEventFunction)&SwitchView::OnChoice);
+    Connect(m_view->GetId(), wxEVT_PAINT, (wxObjectEventFunction)
+                                          (wxEventFunction)
+                                          (wxPaintEventFunction)&SwitchView::OnPaint);
+
+    Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)
+                                 (wxEventFunction)
+                                 (wxFocusEventFunction)&SwitchView::OnFocus);
+    Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
+                                  (wxEventFunction)
+                                  (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
+                                     (wxEventFunction)
+                                     (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
+                                     (wxEventFunction)
+                                     (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
+                                       (wxEventFunction)
+                                       (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
+                                     (wxEventFunction)
+                                     (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
+                                       (wxEventFunction)
+                                       (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
+                                         (wxEventFunction)
+                                         (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
+                                           (wxEventFunction)
+                                           (wxScrollEventFunction)&SwitchView::OnScroll);
+    Connect(-1, wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)
+                                        (wxEventFunction)
+                                        (wxEraseEventFunction)&SwitchView::OnErase);
+
+    Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
+                                          (wxEventFunction)
+                                          (wxDynamicSashSplitEventFunction)&SwitchView::OnSplit);
+    Connect(-1, wxEVT_DYNAMIC_SASH_UNIFY, (wxObjectEventFunction)
+                                          (wxEventFunction)
+                                          (wxDynamicSashUnifyEventFunction)&SwitchView::OnUnify);
 }
 
 wxSize SwitchView::DoGetBestSize() const {
     return wxSize(64, 64);
 }
 
-void SwitchView::OnSize(wxSizeEvent& event) {
+void SwitchView::OnSize(wxSizeEvent& WXUNUSED(event)) {
     Layout();
 
     wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this);
@@ -153,7 +183,7 @@ void SwitchView::OnSize(wxSizeEvent& event) {
     }
 }
 
-void SwitchView::OnPaint(wxPaintEvent& event) {
+void SwitchView::OnPaint(wxPaintEvent& WXUNUSED(event)) {
     wxPaintDC dc(m_view);
 
     wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this);
@@ -174,11 +204,11 @@ void SwitchView::OnPaint(wxPaintEvent& event) {
     }
 }
 
-void SwitchView::OnErase(wxEraseEvent& event) {
+void SwitchView::OnErase(wxEraseEvent& WXUNUSED(event)) {
     // Do nothing
 }
 
-void SwitchView::OnSplit(wxDynamicSashSplitEvent& event) {
+void SwitchView::OnSplit(wxDynamicSashSplitEvent& WXUNUSED(event)) {
     SwitchView *view = new SwitchView(m_dyn_sash);
     view->m_choice->SetSelection(m_choice->GetSelection());
 
@@ -189,7 +219,7 @@ void SwitchView::OnSplit(wxDynamicSashSplitEvent& event) {
     vscroll->SetEventHandler(this);
 }
 
-void SwitchView::OnUnify(wxDynamicSashUnifyEvent& event) {
+void SwitchView::OnUnify(wxDynamicSashUnifyEvent& WXUNUSED(event)) {
     wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this);
     wxScrollBar *vscroll = m_dyn_sash->GetVScrollBar(this);
 
@@ -197,11 +227,11 @@ void SwitchView::OnUnify(wxDynamicSashUnifyEvent& event) {
     vscroll->SetEventHandler(this);
 }
 
-void SwitchView::OnChoice(wxCommandEvent& event) {
+void SwitchView::OnChoice(wxCommandEvent& WXUNUSED(event)) {
     m_view->Refresh();
 }
 
-void SwitchView::OnScroll(wxScrollEvent& event) {
+void SwitchView::OnScroll(wxScrollEvent& WXUNUSED(event)) {
     m_view->Refresh();
 }
 
index 4818281f8b655df6998b0d1ba966cb64fb10402b..356be602f3c6d13f3ec8998166bcc4aa7a3d0326 100644 (file)
@@ -225,37 +225,37 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
     Close(TRUE);
 }
 
-void MyFrame::OnIncrement(wxCommandEvent& event)
+void MyFrame::OnIncrement(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnIncrement();
 }
 
-void MyFrame::OnDecrement(wxCommandEvent& event)
+void MyFrame::OnDecrement(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnDecrement();
 }
 
-void MyFrame::OnSetValue(wxCommandEvent& event)
+void MyFrame::OnSetValue(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnSetValue();
 }
 
-void MyFrame::OnAlignLeft(wxCommandEvent& event)
+void MyFrame::OnAlignLeft(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnAlignLeft();
 }
 
-void MyFrame::OnAlignCenter(wxCommandEvent& event)
+void MyFrame::OnAlignCenter(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnAlignCenter();
 }
 
-void MyFrame::OnAlignRight(wxCommandEvent& event)
+void MyFrame::OnAlignRight(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnAlignRight();
 }
 
-void MyFrame::OnDrawFaded(wxCommandEvent& event)
+void MyFrame::OnDrawFaded(wxCommandEvent& WXUNUSED(event))
 {
     m_panel->OnDrawFaded();
 }
index e9c6db6b395f5889322184973ad71b1ecc3c25ce..a35ae93898120fd7f91178a81e2430ee3b667ccf 100644 (file)
@@ -208,7 +208,7 @@ void MyFrame::OnPaint(wxPaintEvent& WXUNUSED(event) )
        }
 }
 
-void MyFrame::OnCloseWindow(wxCloseEvent& event)
+void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 {
        Destroy();
 }
index 365955d8f8cbf1ccbe057f31e911f4feb27c3aaa..32d3e9382297762a27392450eae78ffff69aa248 100644 (file)
@@ -313,13 +313,27 @@ bool wxDynamicSashWindowImpl::Create() {
 
     m_container->SetEventHandler(this);
 
-    Connect(-1, wxEVT_SIZE, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnSize);
-    Connect(-1, wxEVT_PAINT, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnPaint);
-    Connect(-1, wxEVT_MOTION, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
-    Connect(-1, wxEVT_ENTER_WINDOW, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
-    Connect(-1, wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnLeave);
-    Connect(-1, wxEVT_LEFT_DOWN, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnPress);
-    Connect(-1, wxEVT_LEFT_UP, (wxObjectEventFunction)&wxDynamicSashWindowImpl::OnRelease);
+    Connect(-1, wxEVT_SIZE, (wxObjectEventFunction)
+                            (wxEventFunction)
+                            (wxSizeEventFunction)&wxDynamicSashWindowImpl::OnSize);
+    Connect(-1, wxEVT_PAINT, (wxObjectEventFunction)
+                             (wxEventFunction)
+                             (wxPaintEventFunction)&wxDynamicSashWindowImpl::OnPaint);
+    Connect(-1, wxEVT_MOTION, (wxObjectEventFunction)
+                              (wxEventFunction)
+                              (wxMouseEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
+    Connect(-1, wxEVT_ENTER_WINDOW, (wxObjectEventFunction)
+                                    (wxEventFunction)
+                                    (wxMouseEventFunction)&wxDynamicSashWindowImpl::OnMouseMove);
+    Connect(-1, wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)
+                                    (wxEventFunction)
+                                    (wxMouseEventFunction)&wxDynamicSashWindowImpl::OnLeave);
+    Connect(-1, wxEVT_LEFT_DOWN, (wxObjectEventFunction)
+                                 (wxEventFunction)
+                                 (wxMouseEventFunction)&wxDynamicSashWindowImpl::OnPress);
+    Connect(-1, wxEVT_LEFT_UP, (wxObjectEventFunction)
+                               (wxEventFunction)
+                               (wxMouseEventFunction)&wxDynamicSashWindowImpl::OnRelease);
 
     return TRUE;
 }
@@ -902,15 +916,33 @@ bool wxDynamicSashWindowLeaf::Create() {
         m_hscroll->SetEventHandler(this);
         m_vscroll->SetEventHandler(this);
 
-        Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnFocus);
-        Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
-        Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SET_FOCUS, (wxObjectEventFunction)
+                                     (wxEventFunction)
+                                     (wxFocusEventFunction)&wxDynamicSashWindowLeaf::OnFocus);
+        Connect(-1, wxEVT_SCROLL_TOP, (wxObjectEventFunction)
+                                      (wxEventFunction)
+                                      (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_BOTTOM, (wxObjectEventFunction)
+                                         (wxEventFunction)
+                                         (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_LINEUP, (wxObjectEventFunction)
+                                         (wxEventFunction)
+                                         (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_LINEDOWN, (wxObjectEventFunction)
+                                           (wxEventFunction)
+                                           (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_PAGEUP, (wxObjectEventFunction)
+                                         (wxEventFunction)
+                                         (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_PAGEDOWN, (wxObjectEventFunction)
+                                           (wxEventFunction)
+                                           (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)
+                                             (wxEventFunction)
+                                             (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
+        Connect(-1, wxEVT_SCROLL_THUMBRELEASE, (wxObjectEventFunction)
+                                               (wxEventFunction)
+                                               (wxScrollEventFunction)&wxDynamicSashWindowLeaf::OnScroll);
     }
 
     wxLayoutConstraints *layout = new wxLayoutConstraints();
index 49ece0103f2be182c5ca237f52e97cc65d581cb3..d50fd58826ad425883825915e4a1a483b092eb03 100644 (file)
@@ -380,12 +380,9 @@ wxSize wxMultiCellSizer::CalcMin()
        if (m_children.GetCount() == 0)
                return wxSize(10,10);
 
-       int m_minWidth = 0;
-       int m_minHeight = 0;
-
        GetMinimums();
-       m_minWidth = Sum(m_maxWidth, m_cell_count.GetWidth());
-       m_minHeight = Sum(m_maxHeight, m_cell_count.GetHeight());
+       int m_minWidth = Sum(m_maxWidth, m_cell_count.GetWidth());
+       int m_minHeight = Sum(m_maxHeight, m_cell_count.GetHeight());
        return wxSize( m_minWidth, m_minHeight );
 }
 //---------------------------------------------------------------------------
index 8a16309acf5c21dd7755e47ca1cc6b3b3d88b6d1..87b3668ffdf6b002815013acb0914d030c2cc2ba 100644 (file)
@@ -298,20 +298,19 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
 
     wxSize clientSize = GetClientSize();
     wxRect itemRect;
-    int cy=0;
     wxTreeItemId h, lastH;
     for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
     {
         if (GetBoundingRect(h, itemRect))
         {
-            cy = itemRect.GetTop();
+            int cy = itemRect.GetTop();
             dc.DrawLine(0, cy, clientSize.x, cy);
             lastH = h;
         }
     }
     if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
     {
-        cy = itemRect.GetBottom();
+        int cy = itemRect.GetBottom();
         dc.DrawLine(0, cy, clientSize.x, cy);
     }
 }
@@ -508,13 +507,12 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
 
     wxSize clientSize = GetClientSize();
     wxRect itemRect;
-    int cy=0;
     wxTreeItemId h, lastH;
     for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
     {
         if (m_treeCtrl->GetBoundingRect(h, itemRect))
         {
-            cy = itemRect.GetTop();
+            int cy = itemRect.GetTop();
             wxRect drawItemRect(0, cy, clientSize.x, itemRect.GetHeight());
 
             lastH = h;
@@ -526,7 +524,7 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
     }
     if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
     {
-        cy = itemRect.GetBottom();
+        int cy = itemRect.GetBottom();
         dc.DrawLine(0, cy, clientSize.x, cy);
     }
 }