ADDED wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
authorRobert Roebling <robert@roebling.de>
Fri, 11 Dec 1998 15:41:28 +0000 (15:41 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 11 Dec 1998 15:41:28 +0000 (15:41 +0000)
  Corrected inheritence of wxTreeEvent, wxNotebookEvent, wxListEvent on
    wxMSW and wxGTK
  Corrected scrolling step etc. in wxListCtrl
  Built-in correction of out-of-bounds values for position of scrollbar thumb
  Reverted interpretation of wxVERTICAL for radiobox
  Applied Phls patch for wxStaticText

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

26 files changed:
Makefile
include/wx/event.h
include/wx/generic/listctrl.h
include/wx/generic/treectrl.h
include/wx/gtk/notebook.h
include/wx/gtk1/notebook.h
samples/controls/controls.cpp
src/common/event.cpp
src/generic/listctrl.cpp
src/generic/statusbr.cpp
src/generic/treectrl.cpp
src/gtk/dnd.cpp
src/gtk/notebook.cpp
src/gtk/radiobox.cpp
src/gtk/stattext.cpp
src/gtk/window.cpp
src/gtk1/dnd.cpp
src/gtk1/notebook.cpp
src/gtk1/radiobox.cpp
src/gtk1/stattext.cpp
src/gtk1/window.cpp
src/msw/data.cpp
src/msw/gauge95.cpp
src/msw/listctrl.cpp
src/msw/notebook.cpp
src/msw/treectrl.cpp

index c35ef5ea063188379cda66e73e957d479468482b..fdc7eff8637d0903f7f81a57ebdeac37fd19d2ad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,8 +56,8 @@ user::
 install::
        @echo "entering directory src for installing"
        @cd src; ${MAKE} install
-       @echo "entering directory utils for installing"
-       @cd utils; ${MAKE} install
+#      @echo "entering directory utils for installing"
+#      @cd utils; ${MAKE} install
        
 # the following ones recreate all Makefiles.
 
index a99125394e5f1c521a0909ad5f6baccf8a42f358..576e2711568961a86c282d7ee8f046da7702e0f3 100644 (file)
@@ -179,6 +179,8 @@ const wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED =      wxEVT_FIRST + 709;
 const wxEventType wxEVT_COMMAND_LIST_KEY_DOWN =             wxEVT_FIRST + 710;
 const wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM =          wxEVT_FIRST + 711;
 const wxEventType wxEVT_COMMAND_LIST_COL_CLICK =            wxEVT_FIRST + 712;
+const wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK =     wxEVT_FIRST + 713;
+const wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK =    wxEVT_FIRST + 714;
 
  /* Tab and notebook control event types */
 const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED =           wxEVT_FIRST + 800;
@@ -362,7 +364,7 @@ public:
 private:
     bool m_bAllow;
 
-    DECLARE_DYNAMIC_CLASS(wxCommandEvent)
+    DECLARE_DYNAMIC_CLASS(wxNotifyEvent)
 };
 
 // Scroll event class
index 96ac43a453ee938464757e448e061e98e645daf8..afe4e8a7ceef9f714c4029b14db0767cf423dad1 100644 (file)
@@ -190,7 +190,7 @@ class wxListItem: public wxObject
 // wxListEvent
 //-----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxListEvent: public wxCommandEvent
+class WXDLLEXPORT wxListEvent: public wxNotifyEvent
 {
   DECLARE_DYNAMIC_CLASS(wxListEvent)
 
@@ -222,7 +222,8 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
 #define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
 #define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
 #define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
-
+#define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
+#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
 
 //-----------------------------------------------------------------------------
 //  wxListItemData (internal)
@@ -461,7 +462,6 @@ class wxListMainWindow: public wxScrolledWindow
     void RefreshLine( wxListLineData *line );
     void OnPaint( wxPaintEvent &event );
     void HilightAll( bool on );
-    void ActivateLine( wxListLineData *line );
     void SendNotify( wxListLineData *line, wxEventType command );
     void FocusLine( wxListLineData *line );
     void UnfocusLine( wxListLineData *line );
@@ -519,7 +519,6 @@ class wxListMainWindow: public wxScrolledWindow
     void InsertColumn( long col, wxListItem &item );
 //    void AddColumn( wxListItem &item );
     void SortItems( wxListCtrlCompare fn, long data );
-    virtual bool OnListNotify( wxListEvent &event );
 
   DECLARE_EVENT_TABLE()
 };
@@ -568,6 +567,7 @@ class wxListCtrl: public wxControl
     bool GetItemPosition( long item, wxPoint& pos ) const;
     bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
     int GetItemCount(void) const;
+    int GetColumnCount(void) const;
     void SetItemSpacing( int spacing, bool isSmall = FALSE );
     int GetItemSpacing( bool isSmall ) const;
     int GetSelectedItemCount(void) const;
@@ -601,7 +601,6 @@ class wxListCtrl: public wxControl
     bool ScrollList(int dx, int dy);
     bool SortItems(wxListCtrlCompare fn, long data);
     bool Update(long item);
-    virtual bool OnListNotify(wxListEvent& WXUNUSED(event)) { return FALSE; }
     void OnIdle( wxIdleEvent &event );
     
     // We have to hand down a few functions
index a9779e966895306e6caf701d8c620a5d983cab2c..49e3e4fb3f959d3630829a84631e60cb11bef060 100644 (file)
@@ -91,7 +91,7 @@ protected:
 // -----------------------------------------------------------------------------
 // wxTreeEvent - the event generated by the tree control
 // -----------------------------------------------------------------------------
-class WXDLLEXPORT wxTreeEvent : public wxCommandEvent
+class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
 {
 friend class wxTreeCtrl;
 public:
index d61603dd8fdaa9c32926e784f21bbd8085072ab5..086aed01756ec5353470b74a00ee7e7917809433 100644 (file)
@@ -32,12 +32,12 @@ class wxNotebookPage;
 // notebook events
 // ----------------------------------------------------------------------------
 
-class wxNotebookEvent : public wxCommandEvent
+class wxNotebookEvent : public wxNotifyEvent
 {
 public:
   wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
                   int nSel = -1, int nOldSel = -1)
-  : wxCommandEvent(commandType, id)
+  : wxNotifyEvent(commandType, id)
   {
       m_bAllow = TRUE;
       m_nSel = nSel;
index d61603dd8fdaa9c32926e784f21bbd8085072ab5..086aed01756ec5353470b74a00ee7e7917809433 100644 (file)
@@ -32,12 +32,12 @@ class wxNotebookPage;
 // notebook events
 // ----------------------------------------------------------------------------
 
-class wxNotebookEvent : public wxCommandEvent
+class wxNotebookEvent : public wxNotifyEvent
 {
 public:
   wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
                   int nSel = -1, int nOldSel = -1)
-  : wxCommandEvent(commandType, id)
+  : wxNotifyEvent(commandType, id)
   {
       m_bAllow = TRUE;
       m_nSel = nSel;
index 2172c7d2659776827eafbec46c44136e35ba41ba..d67b979d0afd00b2275db79b64af1ab01a0f215b 100644 (file)
@@ -365,9 +365,9 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
   panel = new wxPanel(m_notebook);
 //  panel->SetBackgroundColour("cadet blue");
 //  panel->SetForegroundColour("blue");
-  m_radio = new wxRadioBox( panel, ID_RADIOBOX, "That", wxPoint(10,160), wxSize(-1,-1), 2, choices2, 1, wxRA_HORIZONTAL );
+  m_radio = new wxRadioBox( panel, ID_RADIOBOX, "That", wxPoint(10,160), wxSize(-1,-1), 2, choices2, 1, wxRA_VERTICAL );
 //  m_radio->SetBackgroundColour("wheat");
-  m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices, 1, wxRA_VERTICAL );
+  m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices, 1, wxRA_HORIZONTAL );
 //  m_radio->SetBackgroundColour("wheat");
   (void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
   (void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(180,80), wxSize(140,30) );
index de088d74f0d374e3097c915c5418d9e50fd76853..402ee199c2ee9578d5b14cc34468f11b8090eb75 100644 (file)
@@ -35,6 +35,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxNotifyEvent, wxCommandEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent)
index 3a916fb19fb34d003db473459de7c02668979819..98cedb189b45b6d29ef93d9122af8514f206ae5e 100644 (file)
@@ -23,122 +23,122 @@ IMPLEMENT_DYNAMIC_CLASS(wxListItemData,wxObject);
 
 wxListItemData::wxListItemData(void)
 {
-  m_image = -1;
-  m_data = 0;
-  m_xpos = 0;
-  m_ypos = 0;
-  m_width = 0;
-  m_height = 0;
-  m_colour = wxBLACK;
+    m_image = -1;
+    m_data = 0;
+    m_xpos = 0;
+    m_ypos = 0;
+    m_width = 0;
+    m_height = 0;
+    m_colour = wxBLACK;
 }
 
 wxListItemData::wxListItemData( const wxListItem &info )
 {
-  m_image = -1;
-  m_data = 0;
-  m_colour = info.m_colour;
-  SetItem( info );
+    m_image = -1;
+    m_data = 0;
+    m_colour = info.m_colour;
+    SetItem( info );
 }
 
 void wxListItemData::SetItem( const wxListItem &info )
 {
-  if (info.m_mask & wxLIST_MASK_TEXT) m_text = info.m_text;
-  if (info.m_mask & wxLIST_MASK_IMAGE) m_image = info.m_image;
-  if (info.m_mask & wxLIST_MASK_DATA) m_data = info.m_data;
-  m_colour = info.m_colour;
-  m_xpos = 0;
-  m_ypos = 0;
-  m_width = info.m_width;
-  m_height = 0;
+    if (info.m_mask & wxLIST_MASK_TEXT) m_text = info.m_text;
+    if (info.m_mask & wxLIST_MASK_IMAGE) m_image = info.m_image;
+    if (info.m_mask & wxLIST_MASK_DATA) m_data = info.m_data;
+    m_colour = info.m_colour;
+    m_xpos = 0;
+    m_ypos = 0;
+    m_width = info.m_width;
+    m_height = 0;
 }
 
 void wxListItemData::SetText( const wxString &s )
 {
-  m_text = s;
+    m_text = s;
 }
 
 void wxListItemData::SetImage( int image )
 {
-  m_image = image;
+    m_image = image;
 }
 
 void wxListItemData::SetData( long data )
 {
-  m_data = data;
+    m_data = data;
 }
 
 void wxListItemData::SetPosition( int x, int y )
 {
-  m_xpos = x;
-  m_ypos = y;
+    m_xpos = x;
+    m_ypos = y;
 }
 
 void wxListItemData::SetSize( int const width, int height )
 {
-  if (width != -1) m_width = width;
-  if (height != -1) m_height = height;
+    if (width != -1) m_width = width;
+    if (height != -1) m_height = height;
 }
 
 void wxListItemData::SetColour( wxColour *col )
 {
-  m_colour = col;
+    m_colour = col;
 }
 
 bool wxListItemData::HasImage(void) const
 {
-  return (m_image >= 0);
+    return (m_image >= 0);
 }
 
 bool wxListItemData::HasText(void) const
 {
-  return (!m_text.IsNull());
+    return (!m_text.IsNull());
 }
 
 bool wxListItemData::IsHit( int x, int y ) const
 {
-  return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height));
+    return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height));
 }
 
 void wxListItemData::GetText( wxString &s )
 {
-  s = m_text;
+    s = m_text;
 }
 
 int wxListItemData::GetX( void ) const
 {
-  return m_xpos;
+    return m_xpos;
 }
 
 int wxListItemData::GetY( void ) const
 {
-  return m_ypos;
+    return m_ypos;
 }
 
 int wxListItemData::GetWidth(void) const
 {
-  return m_width;
+    return m_width;
 }
 
 int wxListItemData::GetHeight(void) const
 {
-  return m_height;
+    return m_height;
 }
 
 int wxListItemData::GetImage(void) const
 {
-  return m_image;
+    return m_image;
 }
 
 void wxListItemData::GetItem( wxListItem &info )
 {
-  info.m_text = m_text;
-  info.m_image = m_image;
-  info.m_data = m_data;
+    info.m_text = m_text;
+    info.m_image = m_image;
+    info.m_data = m_data;
 }
 
 wxColour *wxListItemData::GetColour(void)
 {
-  return m_colour;
+    return m_colour;
 }
 
 //-----------------------------------------------------------------------------
@@ -149,99 +149,99 @@ IMPLEMENT_DYNAMIC_CLASS(wxListHeaderData,wxObject);
 
 wxListHeaderData::wxListHeaderData(void)
 {
-  m_mask = 0;
-  m_image = 0;
-  m_format = 0;
-  m_width = 0;
-  m_xpos = 0;
-  m_ypos = 0;
-  m_height = 0;
+    m_mask = 0;
+    m_image = 0;
+    m_format = 0;
+    m_width = 0;
+    m_xpos = 0;
+    m_ypos = 0;
+    m_height = 0;
 }
 
 wxListHeaderData::wxListHeaderData( const wxListItem &item )
 {
-  SetItem( item );
-  m_xpos = 0;
-  m_ypos = 0;
-  m_height = 0;
+    SetItem( item );
+    m_xpos = 0;
+    m_ypos = 0;
+    m_height = 0;
 }
 
 void wxListHeaderData::SetItem( const wxListItem &item )
 {
-  m_mask = item.m_mask;
-  m_text = item.m_text;
-  m_image = item.m_image;
-  m_format = item.m_format;
-  m_width = item.m_width;
-  if (m_width < 0) m_width = 80;
-  if (m_width < 6) m_width = 6;
+    m_mask = item.m_mask;
+    m_text = item.m_text;
+    m_image = item.m_image;
+    m_format = item.m_format;
+    m_width = item.m_width;
+    if (m_width < 0) m_width = 80;
+    if (m_width < 6) m_width = 6;
 }
 
 void wxListHeaderData::SetPosition( int x, int y )
 {
-  m_xpos = x;
-  m_ypos = y;
+    m_xpos = x;
+    m_ypos = y;
 }
 
 void wxListHeaderData::SetHeight( int h )
 {
-  m_height = h;
+    m_height = h;
 }
 
 void wxListHeaderData::SetWidth( int w )
 {
-  m_width = w;
-  if (m_width < 0) m_width = 80;
-  if (m_width < 6) m_width = 6;
+    m_width = w;
+    if (m_width < 0) m_width = 80;
+    if (m_width < 6) m_width = 6;
 }
 
 void wxListHeaderData::SetFormat( int format )
 {
-  m_format = format;
+    m_format = format;
 }
 
 bool wxListHeaderData::HasImage(void) const
 {
-  return (m_image != 0);
+    return (m_image != 0);
 }
 
 bool wxListHeaderData::HasText(void) const
 {
-  return (m_text.Length() > 0);
+    return (m_text.Length() > 0);
 }
 
 bool wxListHeaderData::IsHit( int x, int y ) const
 {
-  return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height));
+    return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height));
 }
 
 void wxListHeaderData::GetItem( wxListItem &item )
 {
-  item.m_mask = m_mask;
-  item.m_text = m_text;
-  item.m_image = m_image;
-  item.m_format = m_format;
-  item.m_width = m_width;
+    item.m_mask = m_mask;
+    item.m_text = m_text;
+    item.m_image = m_image;
+    item.m_format = m_format;
+    item.m_width = m_width;
 }
 
 void wxListHeaderData::GetText( wxString &s )
 {
-  s =  m_text;
+    s =  m_text;
 }
 
 int wxListHeaderData::GetImage(void) const
 {
-  return m_image;
+    return m_image;
 }
 
 int wxListHeaderData::GetWidth(void) const
 {
-  return m_width;
+    return m_width;
 }
 
 int wxListHeaderData::GetFormat(void) const
 {
-  return m_format;
+    return m_format;
 }
 
 //-----------------------------------------------------------------------------
@@ -252,71 +252,71 @@ IMPLEMENT_DYNAMIC_CLASS(wxListLineData,wxObject);
 
 wxListLineData::wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush )
 {
-  m_mode = mode;
-  m_hilighted = FALSE;
-  m_owner = owner;
-  m_hilightBrush = hilightBrush;
-  m_items.DeleteContents( TRUE );
-  m_spacing = 0;
+    m_mode = mode;
+    m_hilighted = FALSE;
+    m_owner = owner;
+    m_hilightBrush = hilightBrush;
+    m_items.DeleteContents( TRUE );
+    m_spacing = 0;
 }
 
 void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing )
 {
-  m_spacing = spacing;
-  switch (m_mode)
-  {
-    case wxLC_ICON:
+    m_spacing = spacing;
+    switch (m_mode)
     {
-      m_bound_all.width = m_spacing;
-      m_bound_all.height = m_spacing+13;
-      wxNode *node = m_items.First();
-      if (node)
-      {
-        wxListItemData *item = (wxListItemData*)node->Data();
-        wxString s;
-        item->GetText( s );
-        long lw,lh;
-        dc->GetTextExtent( s, &lw, &lh );
-        if (lw > m_spacing) m_bound_all.width = lw;
-      }
-      break;
-    }
-    case wxLC_LIST:
-    {
-      wxNode *node = m_items.First();
-      if (node)
-      {
-        wxListItemData *item = (wxListItemData*)node->Data();
-        wxString s;
-        item->GetText( s );
-        long lw,lh;
-        dc->GetTextExtent( s, &lw, &lh );
-        m_bound_all.width = lw;
-        m_bound_all.height = lh;
-      }
-      break;
-    }
-    case wxLC_REPORT:
-    {
-      m_bound_all.width = 0;
-      m_bound_all.height = 0;
-      wxNode *node = m_items.First();
-      while (node)
-      {
-        wxListItemData *item = (wxListItemData*)node->Data();
-        wxString s;
-        item->GetText( s );
-        if (s.IsNull()) s = "H";
-        long lw,lh;
-        dc->GetTextExtent( s, &lw, &lh );
-        item->SetSize( item->GetWidth(), lh );
-        m_bound_all.width += lw;
-        m_bound_all.height = lh;
-        node = node->Next();
-      }
-      break;
+        case wxLC_ICON:
+        {
+            m_bound_all.width = m_spacing;
+            m_bound_all.height = m_spacing+13;
+            wxNode *node = m_items.First();
+            if (node)
+            {
+                wxListItemData *item = (wxListItemData*)node->Data();
+                wxString s;
+                item->GetText( s );
+                long lw,lh;
+                dc->GetTextExtent( s, &lw, &lh );
+                if (lw > m_spacing) m_bound_all.width = lw;
+            }
+            break;
+        }
+        case wxLC_LIST:
+        {
+            wxNode *node = m_items.First();
+            if (node)
+            {
+                wxListItemData *item = (wxListItemData*)node->Data();
+                wxString s;
+                item->GetText( s );
+                long lw,lh;
+                dc->GetTextExtent( s, &lw, &lh );
+                m_bound_all.width = lw;
+                m_bound_all.height = lh;
+            }
+            break;
+        }
+        case wxLC_REPORT:
+        {
+            m_bound_all.width = 0;
+            m_bound_all.height = 0;
+            wxNode *node = m_items.First();
+            while (node)
+            {
+                wxListItemData *item = (wxListItemData*)node->Data();
+                wxString s;
+                item->GetText( s );
+                if (s.IsNull()) s = "H";
+                long lw,lh;
+                dc->GetTextExtent( s, &lw, &lh );
+                item->SetSize( item->GetWidth(), lh );
+                m_bound_all.width += lw;
+                m_bound_all.height = lh;
+                node = node->Next();
+            }
+            break;
+        }
     }
-  }
 }
 
 void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width )
@@ -381,7 +381,7 @@ void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width
       m_bound_all.x -= 2;
       m_bound_all.y -= 2;
       m_bound_all.width += 4;
-      m_bound_all.height += 4;
+      m_bound_all.height += 3;
       AssignRect( m_bound_hilight, m_bound_all );
       AssignRect( m_bound_icon, 0, 0, 0, 0 );
       break;
@@ -404,13 +404,13 @@ void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width
 
 void wxListLineData::SetColumnPosition( int index, int x )
 {
-  int i = index;
-  wxNode *node = m_items.Nth( i );
-  if (node)
-  {
-    wxListItemData *item = (wxListItemData*)node->Data();
-    item->SetPosition( x, m_bound_all.y+1 );
-  }
+    int i = index;
+    wxNode *node = m_items.Nth( i );
+    if (node)
+    {
+        wxListItemData *item = (wxListItemData*)node->Data();
+        item->SetPosition( x, m_bound_all.y+1 );
+    }
 }
 
 void wxListLineData::GetSize( int &width, int &height )
@@ -1064,28 +1064,13 @@ void wxListMainWindow::HilightAll( bool on )
   }
 }
 
-void wxListMainWindow::ActivateLine( wxListLineData *line )
-{
-  if (!GetParent()) return;
-  wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
-  le.SetEventObject( GetParent() );
-  le.m_code = 0;
-  le.m_itemIndex = GetIndexOfLine( line );
-  le.m_col = 0;
-  line->GetItem( 0, le.m_item );
-  OnListNotify( le );
-}
-
 void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
 {
-  if (!GetParent()) return;
   wxListEvent le( command, GetParent()->GetId() );
   le.SetEventObject( GetParent() );
-  le.m_code = 0;
   le.m_itemIndex = GetIndexOfLine( line );
-  le.m_col = 0;
   line->GetItem( 0, le.m_item );
-  OnListNotify( le );
+  GetParent()->GetEventHandler()->ProcessEvent( le );
 }
 
 void wxListMainWindow::FocusLine( wxListLineData *WXUNUSED(line) )
@@ -1120,239 +1105,242 @@ void wxListMainWindow::StartLabelEdit( wxListLineData *line )
 
 void wxListMainWindow::RenameLine( wxListLineData *line, const wxString &newName )
 {
-  if (!GetParent()) return;
-
   wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
   le.SetEventObject( GetParent() );
-  le.m_code = 0;
   le.m_itemIndex = GetIndexOfLine( line );
-  le.m_col = 0;
   line->GetItem( 0, le.m_item );
   le.m_item.m_text = newName;
-  OnListNotify( le );
+  GetParent()->GetEventHandler()->ProcessEvent( le );
 }
 
 void wxListMainWindow::OnRenameTimer()
 {
-  StartLabelEdit( m_current );
-  wxString s;
-  m_current->GetText( 0, s );
-  int x = 0;
-  int y = 0;
-  int w = 0;
-  int h = 0;
-  m_current->GetLabelExtent( x, y, w, h );
+    StartLabelEdit( m_current );
+    wxString s;
+    m_current->GetText( 0, s );
+    int x = 0;
+    int y = 0;
+    int w = 0;
+    int h = 0;
+    m_current->GetLabelExtent( x, y, w, h );
 
-  wxClientDC dc(this);
-  PrepareDC( dc );
-  x = dc.LogicalToDeviceX( x );
-  y = dc.LogicalToDeviceY( y );
+    wxClientDC dc(this);
+    PrepareDC( dc );
+    x = dc.LogicalToDeviceX( x );
+    y = dc.LogicalToDeviceY( y );
 
-  wxListTextCtrl *text = new wxListTextCtrl(
-    this, -1, &m_renameAccept, &m_renameRes, this, s, wxPoint(x-4,y-4), wxSize(w+11,h+8) );
-  text->SetFocus();
-/*
-  m_text->SetSize( x+3, y+3, w+6, h+6 );
-  m_text->SetValue( s );
-  m_text->Show( TRUE );
-  m_text->SetFocus();
-*/
-/*
-  char *res = wxGetTextFromUser( _("Enter new name:"), "", s );
-  if (res)
-  {
-    m_dirty = TRUE;
-    s = res;
-    RenameLine( m_current, s );
-  }
-  */
+    wxListTextCtrl *text = new wxListTextCtrl(
+      this, -1, &m_renameAccept, &m_renameRes, this, s, wxPoint(x-4,y-4), wxSize(w+11,h+8) );
+    text->SetFocus();
 }
 
 void wxListMainWindow::OnRenameAccept()
 {
-  RenameLine( m_current, m_renameRes );
+    RenameLine( m_current, m_renameRes );
 }
 
 void wxListMainWindow::OnMouse( wxMouseEvent &event )
 {
-  if (GetParent()->GetEventHandler()->ProcessEvent( event)) return;
+    if (GetParent()->GetEventHandler()->ProcessEvent( event)) return;
 
-  if (!m_current) return;
-  if (m_dirty) return;
+    if (!m_current) return;
+    if (m_dirty) return;
 
-  wxClientDC dc(this);
-  PrepareDC(dc);
-  long x = dc.DeviceToLogicalX( (long)event.GetX() );
-  long y = dc.DeviceToLogicalY( (long)event.GetY() );
-
-  long hitResult = 0;
-  wxNode *node = m_lines.First();
-  wxListLineData *line = (wxListLineData *) NULL;
-  while (node)
-  {
-    line = (wxListLineData*)node->Data();
-    hitResult = line->IsHit( x, y );
-    if (hitResult) break;
-    line = (wxListLineData *) NULL;
-    node = node->Next();
-  }
+    wxClientDC dc(this);
+    PrepareDC(dc);
+    long x = dc.DeviceToLogicalX( (long)event.GetX() );
+    long y = dc.DeviceToLogicalY( (long)event.GetY() );
+    
+    // Did we actually hit an item ?
+    long hitResult = 0;
+    wxNode *node = m_lines.First();
+    wxListLineData *line = (wxListLineData *) NULL;
+    while (node)
+    {
+        line = (wxListLineData*)node->Data();
+        hitResult = line->IsHit( x, y );
+        if (hitResult) break;
+        line = (wxListLineData *) NULL;
+        node = node->Next();
+    }
 
-  if (!event.Dragging())
-    m_dragCount = 0;
-  else
-    m_dragCount++;
+    if (!event.Dragging())
+        m_dragCount = 0;
+    else
+        m_dragCount++;
 
-  if (event.Dragging() && (m_dragCount > 3))
-  {
-    m_dragCount = 0;
-    wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
-    le.SetEventObject( this );
-    le.m_code = 0;
-    le.m_itemIndex = 0;
-    le.m_col = 0;
-    OnListNotify( le );
-  }
+    if (event.Dragging() && (m_dragCount > 3))
+    {
+        m_dragCount = 0;
+       
+        wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
+        le.SetEventObject( GetParent() );
+       le.m_pointDrag.x = x;
+       le.m_pointDrag.y = y;
+       GetParent()->GetEventHandler()->ProcessEvent( le );
+       
+       return;
+    }
 
-  if (!line) return;
+    if (!line) return;
 
-  if (event.ButtonDClick())
-  {
-    m_usedKeys = FALSE;
-    m_lastOnSame = FALSE;
-    m_renameTimer->Stop();
-    ActivateLine( line );
-    return;
-  }
+    if (event.ButtonDClick())
+    {
+        m_usedKeys = FALSE;
+        m_lastOnSame = FALSE;
+        m_renameTimer->Stop();
+    
+        SendNotify( line, wxEVT_COMMAND_LIST_KEY_DOWN );
+    
+       return;
+    }
 
-  if (event.LeftUp() && m_lastOnSame)
-  {
-    m_usedKeys = FALSE;
-    if ((line == m_current) &&
-        (hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
-//  (m_mode & wxLC_ICON) &&
-  (m_mode & wxLC_EDIT_LABELS)  )
+    if (event.LeftUp() && m_lastOnSame)
     {
-      m_renameTimer->Start( 100, TRUE );
+        m_usedKeys = FALSE;
+        if ((line == m_current) &&
+            (hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
+            (m_mode & wxLC_EDIT_LABELS)  )
+        {
+            m_renameTimer->Start( 100, TRUE );
+        }
+        m_lastOnSame = FALSE;
+        return;
     }
-    m_lastOnSame = FALSE;
-    return;
-  }
 
-  if (event.LeftDown())
-  {
-    m_usedKeys = FALSE;
-    wxListLineData *oldCurrent = m_current;
-    if (m_mode & wxLC_SINGLE_SEL)
+    if (event.RightDown())
     {
-      m_current = line;
-      HilightAll( FALSE );
-      m_current->ReverseHilight();
-      RefreshLine( m_current );
+        SendNotify( line, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK );
+        return;
     }
-    else
+  
+    if (event.MiddleDown())
     {
-      if (event.ShiftDown())
-      {
-        m_current = line;
-        m_current->ReverseHilight();
-        RefreshLine( m_current );
-      }
-      else if (event.ControlDown())
-      {
-        m_current = line;
-        int numOfCurrent = -1;
-        node = m_lines.First();
-        while (node)
+        SendNotify( line, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK );
+        return;
+    }
+  
+    if (event.LeftDown())
+    {
+        m_usedKeys = FALSE;
+        wxListLineData *oldCurrent = m_current;
+        if (m_mode & wxLC_SINGLE_SEL)
         {
-          wxListLineData *test_line = (wxListLineData*)node->Data();
-    numOfCurrent++;
-    if (test_line == oldCurrent) break;
-          node = node->Next();
+            m_current = line;
+            HilightAll( FALSE );
+            m_current->ReverseHilight();
+            RefreshLine( m_current );
         }
-        int numOfLine = -1;
-        node = m_lines.First();
-        while (node)
+        else
         {
-          wxListLineData *test_line = (wxListLineData*)node->Data();
-    numOfLine++;
-    if (test_line == line) break;
-          node = node->Next();
+            if (event.ShiftDown())
+            {
+                m_current = line;
+                m_current->ReverseHilight();
+                RefreshLine( m_current );
+            }
+            else if (event.ControlDown())
+            {
+                m_current = line;
+               
+                int numOfCurrent = -1;
+                node = m_lines.First();
+                while (node)
+                {
+                    wxListLineData *test_line = (wxListLineData*)node->Data();
+                    numOfCurrent++;
+                    if (test_line == oldCurrent) break;
+                    node = node->Next();
+                }
+               
+                int numOfLine = -1;
+                node = m_lines.First();
+                while (node)
+                {
+                    wxListLineData *test_line = (wxListLineData*)node->Data();
+                    numOfLine++;
+                    if (test_line == line) break;
+                    node = node->Next();
+                }
+
+                if (numOfLine < numOfCurrent)
+                {  
+                   int i = numOfLine; 
+                   numOfLine = numOfCurrent; 
+                   numOfCurrent = i; 
+               }
+           
+                wxNode *node = m_lines.Nth( numOfCurrent );
+                for (int i = 0; i <= numOfLine-numOfCurrent; i++)
+                {
+                    wxListLineData *test_line= (wxListLineData*)node->Data();
+                    test_line->Hilight(TRUE);
+                    RefreshLine( test_line );
+                    node = node->Next();
+                }
+            }
+            else
+            {
+                m_current = line;
+                HilightAll( FALSE );
+                m_current->ReverseHilight();
+                RefreshLine( m_current );
+            }
         }
-
-  if (numOfLine < numOfCurrent)
-    { int i = numOfLine; numOfLine = numOfCurrent; numOfCurrent = i; }
-  wxNode *node = m_lines.Nth( numOfCurrent );
-  for (int i = 0; i <= numOfLine-numOfCurrent; i++)
-  {
-    wxListLineData *test_line= (wxListLineData*)node->Data();
-    test_line->Hilight(TRUE);
-    RefreshLine( test_line );
-    node = node->Next();
-  }
-      }
-      else
-      {
-        m_current = line;
-        HilightAll( FALSE );
-        m_current->ReverseHilight();
-        RefreshLine( m_current );
-      }
-    }
-    if (m_current != oldCurrent)
-    {
-      RefreshLine( oldCurrent );
-      UnfocusLine( oldCurrent );
-      FocusLine( m_current );
+        if (m_current != oldCurrent)
+        {
+            RefreshLine( oldCurrent );
+            UnfocusLine( oldCurrent );
+            FocusLine( m_current );
+        }
+        m_lastOnSame = (m_current == oldCurrent);
+        return;
     }
-    m_lastOnSame = (m_current == oldCurrent);
-    return;
-  }
-
 }
 
 void wxListMainWindow::MoveToFocus( void )
 {
-  if (!m_current) return;
+    if (!m_current) return;
   
-  int x = 0;
-  int y = 0;
-  int w = 0;
-  int h = 0;
-  m_current->GetExtent( x, y, w, h );
-  int w_p = 0;
-  int h_p = 0;
-  GetClientSize( &w_p, &h_p );
-  if (m_mode & wxLC_REPORT)
-  {
-    if (GetScrollPos( wxHORIZONTAL ) != 0) SetScrollPos( wxHORIZONTAL, 0);
-    int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
-    if ((y > y_s) && (y+h < y_s+h_p)) return;
-    if (y-y_s < 5) SetScrollPos( wxVERTICAL, (y-5)/m_yScroll );
-    if (y+h+5 > y_s+h_p) SetScrollPos( wxVERTICAL, (y+h-h_p+h+15)/m_yScroll );
-    m_dirty = TRUE;
-  }
-  else
-  {
-    if (GetScrollPos( wxVERTICAL ) != 0) SetScrollPos( wxVERTICAL, 0);
-    int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL );
-    if ((x > x_s) && (x+w < x_s+w_p)) return;
-    if (x-x_s < 5) SetScrollPos( wxHORIZONTAL, (x-5)/m_xScroll );
-    if (x+w-5 > x_s+w_p) SetScrollPos( wxHORIZONTAL, (x+w-w_p+15)/m_xScroll );
-    m_dirty = TRUE;
-  }
+    int x = 0;
+    int y = 0;
+    int w = 0;
+    int h = 0;
+    m_current->GetExtent( x, y, w, h );
+    int w_p = 0;
+    int h_p = 0;
+    GetClientSize( &w_p, &h_p );
+    if (m_mode & wxLC_REPORT)
+    {
+        if (GetScrollPos( wxHORIZONTAL ) != 0) SetScrollPos( wxHORIZONTAL, 0);
+        int y_s = m_yScroll*GetScrollPos( wxVERTICAL );
+        if ((y > y_s) && (y+h < y_s+h_p)) return;
+        if (y-y_s < 5) SetScrollPos( wxVERTICAL, (y-5-h_p/2)/m_yScroll );
+        if (y+h+5 > y_s+h_p) SetScrollPos( wxVERTICAL, (y+h-h_p/2+h+15)/m_yScroll );
+        m_dirty = TRUE;
+    }
+    else
+    {
+        if (GetScrollPos( wxVERTICAL ) != 0) SetScrollPos( wxVERTICAL, 0);
+        int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL );
+        if ((x > x_s) && (x+w < x_s+w_p)) return;
+        if (x-x_s < 5) SetScrollPos( wxHORIZONTAL, (x-5)/m_xScroll );
+        if (x+w-5 > x_s+w_p) SetScrollPos( wxHORIZONTAL, (x+w-w_p+15)/m_xScroll );
+        m_dirty = TRUE;
+    }
 }
 
 void wxListMainWindow::OnArrowChar( wxListLineData *newCurrent, bool shiftDown )
 {
-  if ((m_mode & wxLC_SINGLE_SEL) || (m_usedKeys == FALSE)) m_current->Hilight( FALSE );
-  wxListLineData *oldCurrent = m_current;
-  m_current = newCurrent;
-  MoveToFocus();
-  if (shiftDown || (m_mode & wxLC_SINGLE_SEL)) m_current->Hilight( TRUE );
-  RefreshLine( m_current );
-  RefreshLine( oldCurrent );
-  FocusLine( m_current );
-  UnfocusLine( oldCurrent );
+    if ((m_mode & wxLC_SINGLE_SEL) || (m_usedKeys == FALSE)) m_current->Hilight( FALSE );
+    wxListLineData *oldCurrent = m_current;
+    m_current = newCurrent;
+    MoveToFocus();
+    if (shiftDown || (m_mode & wxLC_SINGLE_SEL)) m_current->Hilight( TRUE );
+    RefreshLine( m_current );
+    RefreshLine( oldCurrent );
+    FocusLine( m_current );
+    UnfocusLine( oldCurrent );
 }
 
 void wxListMainWindow::OnChar( wxKeyEvent &event )
@@ -1460,8 +1448,8 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
         wxNode *node = m_lines.Member( m_current )->Next();
         if (node) m_current = (wxListLineData*)node->Data();
         MoveToFocus();
-  RefreshLine( oldCurrent );
-  RefreshLine( m_current );
+        RefreshLine( oldCurrent );
+        RefreshLine( m_current );
         UnfocusLine( oldCurrent );
         FocusLine( m_current );
       }
@@ -1470,7 +1458,11 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
     case WXK_RETURN:
     case WXK_EXECUTE:
     {
-      ActivateLine( m_current );
+      wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
+      le.SetEventObject( GetParent() );
+      le.m_itemIndex = GetIndexOfLine( m_current );
+      m_current->GetItem( 0, le.m_item );
+      GetParent()->GetEventHandler()->ProcessEvent( le );
     }
     break;
     default:
@@ -1662,195 +1654,197 @@ void wxListMainWindow::GetColumn( int col, wxListItem &item )
 
 int wxListMainWindow::GetColumnWidth( int col )
 {
-  wxNode *node = m_columns.Nth( col );
-  if (node)
-  {
-    wxListHeaderData *column = (wxListHeaderData*)node->Data();
-    return column->GetWidth();
-  }
-  else
-    return 0;
+    wxNode *node = m_columns.Nth( col );
+    if (node)
+    {
+        wxListHeaderData *column = (wxListHeaderData*)node->Data();
+        return column->GetWidth();
+    }
+    else
+    {
+        return 0; 
+    }
 }
 
 int wxListMainWindow::GetColumnCount( void )
 {
-  return m_columns.Number();
+    return m_columns.Number();
 }
 
 int wxListMainWindow::GetCountPerPage( void )
 {
-  return m_visibleLines;
+    return m_visibleLines;
 }
 
 void wxListMainWindow::SetItem( wxListItem &item )
 {
-  m_dirty = TRUE;
-  wxNode *node = m_lines.Nth( item.m_itemId );
-  if (node)
-  {
-    wxListLineData *line = (wxListLineData*)node->Data();
-    if (m_mode & wxLC_REPORT) item.m_width = GetColumnWidth( item.m_col )-3;
-    line->SetItem( item.m_col, item );
-  }
+    m_dirty = TRUE;
+    wxNode *node = m_lines.Nth( item.m_itemId );
+    if (node)
+    {
+        wxListLineData *line = (wxListLineData*)node->Data();
+        if (m_mode & wxLC_REPORT) item.m_width = GetColumnWidth( item.m_col )-3;
+        line->SetItem( item.m_col, item );
+    }
 }
 
 void wxListMainWindow::SetItemState( long item, long state, long stateMask )
 {
-  // m_dirty = TRUE; no recalcs needed
+    // m_dirty = TRUE; no recalcs needed
 
-  wxListLineData *oldCurrent = m_current;
+    wxListLineData *oldCurrent = m_current;
 
-  if (stateMask & wxLIST_STATE_FOCUSED)
-  {
-    wxNode *node = m_lines.Nth( item );
-    if (node)
+    if (stateMask & wxLIST_STATE_FOCUSED)
     {
-      wxListLineData *line = (wxListLineData*)node->Data();
-      UnfocusLine( m_current );
-      m_current = line;
-      FocusLine( m_current );
-      RefreshLine( m_current );
-      RefreshLine( oldCurrent );
+        wxNode *node = m_lines.Nth( item );
+        if (node)
+        {
+            wxListLineData *line = (wxListLineData*)node->Data();
+            UnfocusLine( m_current );
+            m_current = line;
+            FocusLine( m_current );
+            RefreshLine( m_current );
+            RefreshLine( oldCurrent );
+        }
     }
-  }
-
-  if (stateMask & wxLIST_STATE_SELECTED)
-  {
-    bool on = state & wxLIST_STATE_SELECTED;
-    if (!on && (m_mode & wxLC_SINGLE_SEL)) return;
 
-    wxNode *node = m_lines.Nth( item );
-    if (node)
+    if (stateMask & wxLIST_STATE_SELECTED)
     {
-      wxListLineData *line = (wxListLineData*)node->Data();
-      if (m_mode & wxLC_SINGLE_SEL)
-      {
-        UnfocusLine( m_current );
-  m_current = line;
-        FocusLine( m_current );
-        oldCurrent->Hilight( FALSE );
-        RefreshLine( m_current );
-        RefreshLine( oldCurrent );
-      }
-      bool on = state & wxLIST_STATE_SELECTED;
-      line->Hilight( on );
-      RefreshLine( line );
+        bool on = state & wxLIST_STATE_SELECTED;
+        if (!on && (m_mode & wxLC_SINGLE_SEL)) return;
+
+        wxNode *node = m_lines.Nth( item );
+        if (node)
+        {
+            wxListLineData *line = (wxListLineData*)node->Data();
+            if (m_mode & wxLC_SINGLE_SEL)
+            {
+                UnfocusLine( m_current );
+                m_current = line;
+                FocusLine( m_current );
+                oldCurrent->Hilight( FALSE );
+                RefreshLine( m_current );
+                RefreshLine( oldCurrent );
+            }
+            bool on = state & wxLIST_STATE_SELECTED;
+            line->Hilight( on );
+            RefreshLine( line );
+        }
     }
-  }
 }
 
 int wxListMainWindow::GetItemState( long item, long stateMask )
 {
-  int ret = wxLIST_STATE_DONTCARE;
-  if (stateMask & wxLIST_STATE_FOCUSED)
-  {
-    wxNode *node = m_lines.Nth( item );
-    if (node)
+    int ret = wxLIST_STATE_DONTCARE;
+    if (stateMask & wxLIST_STATE_FOCUSED)
     {
-      wxListLineData *line = (wxListLineData*)node->Data();
-      if (line == m_current) ret |= wxLIST_STATE_FOCUSED;
+        wxNode *node = m_lines.Nth( item );
+        if (node)
+        {
+            wxListLineData *line = (wxListLineData*)node->Data();
+            if (line == m_current) ret |= wxLIST_STATE_FOCUSED;
+        }
     }
-  }
-  if (stateMask & wxLIST_STATE_SELECTED)
-  {
-    wxNode *node = m_lines.Nth( item );
-    if (node)
+    if (stateMask & wxLIST_STATE_SELECTED)
     {
-      wxListLineData *line = (wxListLineData*)node->Data();
-      if (line->IsHilighted()) ret |= wxLIST_STATE_FOCUSED;
+        wxNode *node = m_lines.Nth( item );
+        if (node)
+        {
+            wxListLineData *line = (wxListLineData*)node->Data();
+            if (line->IsHilighted()) ret |= wxLIST_STATE_FOCUSED;
+        }
     }
-  }
-  return ret;
+    return ret;
 }
 
 void wxListMainWindow::GetItem( wxListItem &item )
 {
-  wxNode *node = m_lines.Nth( item.m_itemId );
-  if (node)
-  {
-    wxListLineData *line = (wxListLineData*)node->Data();
-    line->GetItem( item.m_col, item );
-  }
-  else
-  {
-    item.m_mask = 0;
-    item.m_text = "";
-    item.m_image = 0;
-    item.m_data = 0;
-  }
+    wxNode *node = m_lines.Nth( item.m_itemId );
+    if (node)
+    {
+        wxListLineData *line = (wxListLineData*)node->Data();
+        line->GetItem( item.m_col, item );
+    }
+    else
+    {
+        item.m_mask = 0;
+        item.m_text = "";
+        item.m_image = 0;
+        item.m_data = 0;
+    }
 }
 
 int wxListMainWindow::GetItemCount( void )
 {
-  return m_lines.Number();
+    return m_lines.Number();
 }
 
 void wxListMainWindow::GetItemRect( long index, wxRectangle &rect )
 {
-  wxNode *node = m_lines.Nth( index );
-  if (node)
-  {
-    wxListLineData *line = (wxListLineData*)node->Data();
-    line->GetRect( rect );
-  }
-  else
-  {
-    rect.x = 0;
-    rect.y = 0;
-    rect.width = 0;
-    rect.height = 0;
-  }
+    wxNode *node = m_lines.Nth( index );
+    if (node)
+    {
+        wxListLineData *line = (wxListLineData*)node->Data();
+        line->GetRect( rect );
+    }
+    else
+    {
+        rect.x = 0;
+        rect.y = 0;
+        rect.width = 0;
+        rect.height = 0;
+    }
 }
 
 bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos)
 {
-  wxNode *node = m_lines.Nth( item );
-  if (node)
-  {
-    wxRectangle rect;
-    wxListLineData *line = (wxListLineData*)node->Data();
-    line->GetRect( rect );
-    pos.x = rect.x;
-    pos.y = rect.y;
-  }
-  else
-  {
-    pos.x = 0;
-    pos.y = 0;
-  }
-  return TRUE;
+    wxNode *node = m_lines.Nth( item );
+    if (node)
+    {
+        wxRectangle rect;
+        wxListLineData *line = (wxListLineData*)node->Data();
+        line->GetRect( rect );
+        pos.x = rect.x;
+        pos.y = rect.y;
+    }
+    else
+    {
+       pos.x = 0;
+       pos.y = 0;
+    }
+    return TRUE;
 }
 
 int wxListMainWindow::GetSelectedItemCount( void )
 {
-  int ret = 0;
-  wxNode *node = m_lines.First();
-  while (node)
-  {
-    wxListLineData *line = (wxListLineData*)node->Data();
-    if (line->IsHilighted()) ret++;
-    node = node->Next();
-  }
-  return ret;
+    int ret = 0;
+    wxNode *node = m_lines.First();
+    while (node)
+    {
+        wxListLineData *line = (wxListLineData*)node->Data();
+        if (line->IsHilighted()) ret++;
+        node = node->Next();
+    }
+    return ret;
 }
 
 void wxListMainWindow::SetMode( long mode )
 {
-  m_dirty = TRUE;
-  m_mode = mode;
+    m_dirty = TRUE;
+    m_mode = mode;
 
-  DeleteEverything();
+    DeleteEverything();
 
-  if (m_mode & wxLC_REPORT)
-  {
-    m_xScroll = 0;
-    m_yScroll = 15;
-  }
-  else
-  {
-    m_xScroll = 15;
-    m_yScroll = 0;
-  }
+    if (m_mode & wxLC_REPORT)
+    {
+        m_xScroll = 0;
+        m_yScroll = 15;
+    }
+    else
+    {
+        m_xScroll = 15;
+        m_yScroll = 0;
+    }
 }
 
 long wxListMainWindow::GetMode( void ) const
@@ -1860,117 +1854,120 @@ long wxListMainWindow::GetMode( void ) const
 
 void wxListMainWindow::CalculatePositions( void )
 {
-  if (!m_lines.First()) return;
+    if (!m_lines.First()) return;
 
-  wxPaintDC dc( this );
-  dc.SetFont( GetFont() );
+    wxPaintDC dc( this );
+    dc.SetFont( GetFont() );
 
-  int iconSpacing = 0;
-  if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing;
-  if (m_mode & wxLC_SMALL_ICON) iconSpacing = m_small_spacing;
+    int iconSpacing = 0;
+    if (m_mode & wxLC_ICON) iconSpacing = m_normal_spacing;
+    if (m_mode & wxLC_SMALL_ICON) iconSpacing = m_small_spacing;
   
-  // we take the first line (which also can be an icon or
-  // an a text item in wxLC_ICON and wxLC_LIST modes) to
-  // measure the size of the line
+    // we take the first line (which also can be an icon or
+    // an a text item in wxLC_ICON and wxLC_LIST modes) to
+    // measure the size of the line
   
-  int lineWidth = 0;
-  int lineHeight = 0;
-  int lineSpacing = 0;
-
-  wxListLineData *line = (wxListLineData*)m_lines.First()->Data();
-  line->CalculateSize( &dc, iconSpacing );
-  int dummy = 0;
-  line->GetSize( dummy, lineSpacing );
-  lineSpacing += 4;
+    int lineWidth = 0;
+    int lineHeight = 0;
+    int lineSpacing = 0;
 
-  int clientWidth = 0;
-  int clientHeight = 0;
+    wxListLineData *line = (wxListLineData*)m_lines.First()->Data();
+    line->CalculateSize( &dc, iconSpacing );
+    int dummy = 0;
+    line->GetSize( dummy, lineSpacing );
+    lineSpacing += 4;
 
-  if (m_mode & wxLC_REPORT)
-  {
-    int x = 4;
-    int y = 1;
-    int entireHeight = m_lines.Number() * lineSpacing + 10;
-    int scroll_pos = GetScrollPos( wxVERTICAL );
-    SetScrollbars( m_xScroll, m_yScroll, 0, (entireHeight+10) / m_yScroll, 0, scroll_pos, TRUE );
-    GetClientSize( &clientWidth, &clientHeight );
+    int clientWidth = 0;
+    int clientHeight = 0;
 
-    wxNode* node = m_lines.First();
-    while (node)
+    if (m_mode & wxLC_REPORT)
     {
-      wxListLineData *line = (wxListLineData*)node->Data();
-      line->CalculateSize( &dc, iconSpacing );
-      line->SetPosition( &dc, x, y, clientWidth );
-      int col_x = 2;
-      for (int i = 0; i < GetColumnCount(); i++)
-      {
-        line->SetColumnPosition( i, col_x );
-        col_x += GetColumnWidth( i );
-      }
-      y += lineSpacing;
-      node = node->Next();
+        int x = 4;
+        int y = 1;
+        int entireHeight = m_lines.Number() * lineSpacing + 2;
+        int scroll_pos = GetScrollPos( wxVERTICAL );
+        SetScrollbars( m_xScroll, m_yScroll, 0, (entireHeight+15-6) / m_yScroll, 0, scroll_pos, TRUE );
+        GetClientSize( &clientWidth, &clientHeight );
+
+        wxNode* node = m_lines.First();
+        while (node)
+        {
+            wxListLineData *line = (wxListLineData*)node->Data();
+            line->CalculateSize( &dc, iconSpacing );
+            line->SetPosition( &dc, x, y, clientWidth );
+            int col_x = 2;
+            for (int i = 0; i < GetColumnCount(); i++)
+            {
+                line->SetColumnPosition( i, col_x );
+                col_x += GetColumnWidth( i );
+            }
+            y += lineSpacing;  // one pixel blank line between items
+            node = node->Next();
+        }
+       m_visibleLines = m_lines.GetCount();
     }
-  }
-  else
-  {
-    // at first we try without any scrollbar. if the items don't
-    // fit into the window, we recalculate after subtracting an
-    // approximated 15 pt for the horizontal scrollbar
+    else
+    {
+        // at first we try without any scrollbar. if the items don't
+        // fit into the window, we recalculate after subtracting an
+        // approximated 15 pt for the horizontal scrollbar
     
-    GetSize( &clientWidth, &clientHeight );
+        GetSize( &clientWidth, &clientHeight );
+       clientHeight -= 4;  // sunken frame
 
-    int entireWidth = 0;
+        int entireWidth = 0;
 
-    for (int tries = 0; tries < 2; tries++)
-    {
-      entireWidth = 0;
-      int x = 5;
-      int y = 3;
-      int maxWidth = 0;
-      wxNode *node = m_lines.First();
-      while (node)
-      {
-        wxListLineData *line = (wxListLineData*)node->Data();
-        line->CalculateSize( &dc, iconSpacing );
-        line->SetPosition( &dc, x, y, clientWidth );
-        line->GetSize( lineWidth, lineHeight );
-        if (lineWidth > maxWidth) maxWidth = lineWidth;
-        y += lineSpacing;
-        if (y+lineSpacing-8 > clientHeight-6)
-        {
-          y = 3;
-          x += maxWidth+13;
-          entireWidth += maxWidth+13;
-          maxWidth = 0;
-        }
-        node = node->Next();
-        if (!node) entireWidth += maxWidth;
-        if ((tries == 0) && (entireWidth > clientWidth))
+        for (int tries = 0; tries < 2; tries++)
         {
-           clientHeight -= 15; // scrollbar height
-           break;
+            entireWidth = 0;
+            int x = 5;  // painting is done at x-2
+            int y = 5;  // painting is done at y-2
+            int maxWidth = 0;
+            wxNode *node = m_lines.First();
+            while (node)
+            {
+                wxListLineData *line = (wxListLineData*)node->Data();
+                line->CalculateSize( &dc, iconSpacing );
+                line->SetPosition( &dc, x, y, clientWidth );
+                line->GetSize( lineWidth, lineHeight );
+                if (lineWidth > maxWidth) maxWidth = lineWidth;
+                y += lineSpacing;
+                if (y+lineSpacing-7 >= clientHeight) // -7 for earlier "line breaking"
+                {
+                    y = 5;
+                    x += maxWidth+5;
+                    entireWidth += maxWidth+5;
+                    maxWidth = 0;
+                }
+                node = node->Next();
+                if (!node) entireWidth += maxWidth;
+                if ((tries == 0) && (entireWidth > clientWidth))
+                {
+                    clientHeight -= 15; // scrollbar height
+                    break;
+                }
+                if (!node) tries = 1;  // everything fits, no second try required
+            }
         }
-        if (!node) tries = 1;  // everything fits, no second try required
-      }
+        m_visibleLines = (clientHeight+7) / (lineSpacing); // +7 for earlier "line breaking"
+       
+        int scroll_pos = GetScrollPos( wxHORIZONTAL );
+        SetScrollbars( m_xScroll, m_yScroll, (entireWidth+15) / m_xScroll, 0, scroll_pos, 0, TRUE );
     }
-    int scroll_pos = GetScrollPos( wxHORIZONTAL );
-    SetScrollbars( m_xScroll, m_yScroll, (entireWidth+15) / m_xScroll, 0, scroll_pos, 0, TRUE );
-  }
-  m_visibleLines = (clientHeight-4) / (lineSpacing);
 }
 
 void wxListMainWindow::RealizeChanges( void )
 {
-  if (!m_current)
-  {
-    wxNode *node = m_lines.First();
-    if (node) m_current = (wxListLineData*)node->Data();
-  }
-  if (m_current)
-  {
-    FocusLine( m_current );
-    if (m_mode & wxLC_SINGLE_SEL) m_current->Hilight( TRUE );
-  }
+    if (!m_current)
+    {
+        wxNode *node = m_lines.First();
+        if (node) m_current = (wxListLineData*)node->Data();
+    }
+    if (m_current)
+    {
+        FocusLine( m_current );
+        if (m_mode & wxLC_SINGLE_SEL) m_current->Hilight( TRUE );
+    }
 }
 
 long wxListMainWindow::GetNextItem( long item, int WXUNUSED(geometry), int state )
@@ -2178,12 +2175,6 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
   m_lines.Sort( list_ctrl_compare_func_1 );
 }
 
-bool wxListMainWindow::OnListNotify( wxListEvent &event )
-{
-  if (GetParent()) GetParent()->GetEventHandler()->ProcessEvent( event );
-  return FALSE;
-}
-
 // -------------------------------------------------------------------------------------
 // wxListItem
 // -------------------------------------------------------------------------------------
@@ -2208,15 +2199,18 @@ wxListItem::wxListItem(void)
 // wxListEvent
 // -------------------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
 
 wxListEvent::wxListEvent( wxEventType commandType, int id ):
-  wxCommandEvent( commandType, id )
+  wxNotifyEvent( commandType, id )
 {
   m_code = 0;
   m_itemIndex = 0;
+  m_oldItemIndex = 0;
   m_col = 0;
   m_cancelled = FALSE;
+  m_pointDrag.x = 0;
+  m_pointDrag.y = 0;
 }
 
 // -------------------------------------------------------------------------------------
@@ -2486,6 +2480,11 @@ int wxListCtrl::GetItemCount(void) const
   return m_mainWin->GetItemCount();
 }
 
+int wxListCtrl::GetColumnCount(void) const
+{
+  return m_mainWin->GetColumnCount();
+}
+
 void wxListCtrl::SetItemSpacing( int spacing, bool isSmall )
 {
   m_mainWin->SetItemSpacing( spacing, isSmall );
index 13c524247e8003fa5bfd9bb20e5a27d90c1a9df7..01321e734a859311617644f02ac75f4e88e4de97 100644 (file)
@@ -199,6 +199,11 @@ void wxStatusBar::DrawFieldText(wxDC& dc, int i)
 
   int xpos = rect.x + leftMargin;
   int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ;
+  
+#ifdef __WXGTK__
+  xpos++;
+  ypos++;
+#endif
 
   dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height);
 
index 1374ae318718ca1f0bd342a096fece5a309fac83..480eb4c13f13535ee5ece6f25f0f8a81505c4980 100644 (file)
@@ -140,10 +140,10 @@ private:
 // wxTreeEvent
 // -----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
 
 wxTreeEvent::wxTreeEvent( wxEventType commandType, int id )
-           : wxCommandEvent( commandType, id )
+           : wxNotifyEvent( commandType, id )
 {
   m_code = 0;
   m_itemOld = (wxGenericTreeItem *)NULL;
index 8df9096096e06ab6cf4fafeb038f32e005b2de88..e36ee810cbef2333a09ef0634815ae6f7e7c79e8 100644 (file)
@@ -785,7 +785,7 @@ wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
     shape_motion( drag_icon, (GdkEventMotion *)NULL );
     shape_motion( drop_icon, (GdkEventMotion *)NULL );
 */
-    
+
   while (gdk_dnd.drag_really || gdk_dnd.drag_perhaps) wxYield();
   
   UnregisterWindow();
index 0a71d34dd3920b3da10210185d1064e9ef8c626f..0ae08846d607c08a31e964c09e5c0415aefe1e97 100644 (file)
@@ -527,5 +527,5 @@ void wxNotebook::ApplyWidgetStyle()
 // wxNotebookEvent
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
 
index 7121185c9ecfd659ef92bbbef719b05e6ac85965..38e1be21dc98593ff95c133a2692bd996132d459 100644 (file)
@@ -86,7 +86,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
   
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
   
-    if (m_windowStyle & wxRA_VERTICAL)
+    if (m_windowStyle & wxRA_HORIZONTAL)
     {
         GSList *radio_button_group = (GSList *) NULL;
         for (int i = 0; i < n; i++)
@@ -194,7 +194,7 @@ void wxRadioBox::OnSize( wxSizeEvent &event )
   int x = m_x+5;
   int y = m_y+15;
   
-  if (m_windowStyle & wxRA_VERTICAL)
+  if (m_windowStyle & wxRA_HORIZONTAL)
   {
     wxNode *node = m_boxes.First();
     while (node)
index d753dc015563c2425e36bf17894776c40c0b31d1..fd3c5ee83d3ba2fd19499e75e93023ea46792340 100644 (file)
@@ -66,12 +66,10 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
          int x = gdk_string_measure( m_widget->style->font, s ) + 4;
          if (x > newSize.x) newSize.x = x;
          *nl++ = '\n';
-         if ((nl = strchr(s = nl, '\n'))) 
-        {
-           ++y;
-         } 
-        else 
-        {
+         ++y;
+         if (! (nl = strchr(s = nl, '\n'))) 
+         {
+        
            int x = gdk_string_measure( m_widget->style->font, s ) + 4;
            if (x > newSize.x) newSize.x = x;
          }
@@ -87,7 +85,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
      if (y == 1) 
        newSize.y = 26;
      else
-       newSize.y = 4 + y * (m_widget->style->font->ascent + 2*m_widget->style->font->descent);
+       newSize.y = 4 + y * (m_widget->style->font->ascent + m_widget->style->font->descent + 2);
    }
   
   SetSize( newSize.x, newSize.y );
index c376ff0886afc931377e347474609276330bb4dc..13c4c1d7b555521b5ef596a66c82c9ef7a269fea 100644 (file)
@@ -2428,6 +2428,8 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     float fpos = (float)pos;
     float frange = (float)range;
     float fthumb = (float)thumbVisible;
+    if (fpos > frange-fthumb) fpos = frange-fthumb;
+    if (fpos < 0.0) fpos = 0.0;
 
     if ((fabs(frange-m_hAdjust->upper) < 0.2) &&
         (fabs(fthumb-m_hAdjust->page_size) < 0.2))
@@ -2450,6 +2452,8 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     float fpos = (float)pos;
     float frange = (float)range;
     float fthumb = (float)thumbVisible;
+    if (fpos > frange-fthumb) fpos = frange-fthumb;
+    if (fpos < 0.0) fpos = 0.0;
 
     if ((fabs(frange-m_vAdjust->upper) < 0.2) &&
         (fabs(fthumb-m_vAdjust->page_size) < 0.2))
@@ -2486,10 +2490,12 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
   wxASSERT_MSG( (m_wxwindow != NULL), "window needs client area" );
 
   if (!m_wxwindow) return;
-
+  
   if (orient == wxHORIZONTAL)
   {
     float fpos = (float)pos;
+    if (fpos > m_hAdjust->upper - m_hAdjust->page_size) fpos = m_hAdjust->upper - m_hAdjust->page_size;
+    if (fpos < 0.0) fpos = 0.0;
     m_oldHorizontalPos = fpos;
 
     if (fabs(fpos-m_hAdjust->value) < 0.2) return;
@@ -2498,7 +2504,10 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
   else
   {
     float fpos = (float)pos;
+    if (fpos > m_vAdjust->upper - m_vAdjust->page_size) fpos = m_vAdjust->upper - m_vAdjust->page_size;
+    if (fpos < 0.0) fpos = 0.0;
     m_oldVerticalPos = fpos;
+    
     if (fabs(fpos-m_vAdjust->value) < 0.2) return;
     m_vAdjust->value = fpos;
   }
index 8df9096096e06ab6cf4fafeb038f32e005b2de88..e36ee810cbef2333a09ef0634815ae6f7e7c79e8 100644 (file)
@@ -785,7 +785,7 @@ wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
     shape_motion( drag_icon, (GdkEventMotion *)NULL );
     shape_motion( drop_icon, (GdkEventMotion *)NULL );
 */
-    
+
   while (gdk_dnd.drag_really || gdk_dnd.drag_perhaps) wxYield();
   
   UnregisterWindow();
index 0a71d34dd3920b3da10210185d1064e9ef8c626f..0ae08846d607c08a31e964c09e5c0415aefe1e97 100644 (file)
@@ -527,5 +527,5 @@ void wxNotebook::ApplyWidgetStyle()
 // wxNotebookEvent
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
 
index 7121185c9ecfd659ef92bbbef719b05e6ac85965..38e1be21dc98593ff95c133a2692bd996132d459 100644 (file)
@@ -86,7 +86,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
   
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
   
-    if (m_windowStyle & wxRA_VERTICAL)
+    if (m_windowStyle & wxRA_HORIZONTAL)
     {
         GSList *radio_button_group = (GSList *) NULL;
         for (int i = 0; i < n; i++)
@@ -194,7 +194,7 @@ void wxRadioBox::OnSize( wxSizeEvent &event )
   int x = m_x+5;
   int y = m_y+15;
   
-  if (m_windowStyle & wxRA_VERTICAL)
+  if (m_windowStyle & wxRA_HORIZONTAL)
   {
     wxNode *node = m_boxes.First();
     while (node)
index d753dc015563c2425e36bf17894776c40c0b31d1..fd3c5ee83d3ba2fd19499e75e93023ea46792340 100644 (file)
@@ -66,12 +66,10 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
          int x = gdk_string_measure( m_widget->style->font, s ) + 4;
          if (x > newSize.x) newSize.x = x;
          *nl++ = '\n';
-         if ((nl = strchr(s = nl, '\n'))) 
-        {
-           ++y;
-         } 
-        else 
-        {
+         ++y;
+         if (! (nl = strchr(s = nl, '\n'))) 
+         {
+        
            int x = gdk_string_measure( m_widget->style->font, s ) + 4;
            if (x > newSize.x) newSize.x = x;
          }
@@ -87,7 +85,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
      if (y == 1) 
        newSize.y = 26;
      else
-       newSize.y = 4 + y * (m_widget->style->font->ascent + 2*m_widget->style->font->descent);
+       newSize.y = 4 + y * (m_widget->style->font->ascent + m_widget->style->font->descent + 2);
    }
   
   SetSize( newSize.x, newSize.y );
index c376ff0886afc931377e347474609276330bb4dc..13c4c1d7b555521b5ef596a66c82c9ef7a269fea 100644 (file)
@@ -2428,6 +2428,8 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     float fpos = (float)pos;
     float frange = (float)range;
     float fthumb = (float)thumbVisible;
+    if (fpos > frange-fthumb) fpos = frange-fthumb;
+    if (fpos < 0.0) fpos = 0.0;
 
     if ((fabs(frange-m_hAdjust->upper) < 0.2) &&
         (fabs(fthumb-m_hAdjust->page_size) < 0.2))
@@ -2450,6 +2452,8 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
     float fpos = (float)pos;
     float frange = (float)range;
     float fthumb = (float)thumbVisible;
+    if (fpos > frange-fthumb) fpos = frange-fthumb;
+    if (fpos < 0.0) fpos = 0.0;
 
     if ((fabs(frange-m_vAdjust->upper) < 0.2) &&
         (fabs(fthumb-m_vAdjust->page_size) < 0.2))
@@ -2486,10 +2490,12 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
   wxASSERT_MSG( (m_wxwindow != NULL), "window needs client area" );
 
   if (!m_wxwindow) return;
-
+  
   if (orient == wxHORIZONTAL)
   {
     float fpos = (float)pos;
+    if (fpos > m_hAdjust->upper - m_hAdjust->page_size) fpos = m_hAdjust->upper - m_hAdjust->page_size;
+    if (fpos < 0.0) fpos = 0.0;
     m_oldHorizontalPos = fpos;
 
     if (fabs(fpos-m_hAdjust->value) < 0.2) return;
@@ -2498,7 +2504,10 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) )
   else
   {
     float fpos = (float)pos;
+    if (fpos > m_vAdjust->upper - m_vAdjust->page_size) fpos = m_vAdjust->upper - m_vAdjust->page_size;
+    if (fpos < 0.0) fpos = 0.0;
     m_oldVerticalPos = fpos;
+    
     if (fabs(fpos-m_vAdjust->value) < 0.2) return;
     m_vAdjust->value = fpos;
   }
index 53d6991dc3bfdd1f3da5b61c26a3a63d9bac944f..8999733aef6dbebadaa346e930539277b77a738b 100644 (file)
@@ -332,6 +332,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
 IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxNotifyEvent, wxCommandEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent)
index f671fb2c7eb44f958e84ed153718fee09d3e55b2..31b9f85f19bcd037d616c96a17183c04d25a9f3c 100644 (file)
@@ -86,7 +86,7 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
   if (width == -1)
     width = 50;
   if (height == -1)
-    height = 50;
+    height = 28;
   SetSize(x, y, width, height);
 
   ShowWindow((HWND) GetHWND(), SW_SHOW);
index 66e3278c0e5e50e7075f57684068ea875ac1d67a..950b6d809bdaf6cabed1b32852dbbba77b563e75 100644 (file)
@@ -1430,7 +1430,7 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_
 }
 
 // List event
-IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
 
 wxListEvent::wxListEvent(wxEventType commandType, int id)
            : wxNotifyEvent(commandType, id)
index 74dfb4cd9d6b71aeae09bddb548daa3427c5b7b6..28577f7992ff3c6e82ab78c9b6f24fc0910434ac 100644 (file)
@@ -69,7 +69,7 @@
   END_EVENT_TABLE()
 
   IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
-  IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
+  IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
 #endif
 
 // ============================================================================
index cbecafa355f5261000db5a02b3ae827c16466f1f..7fcab3a9a81f10dc2cef5467cb3cd97a5db9c00a 100644 (file)
@@ -939,7 +939,7 @@ bool wxTreeCtrl::MSWNotify(WXWPARAM wParam, WXLPARAM lParam, WXLPARAM *result)
 // Tree event
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
 
 wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
            : wxNotifyEvent(commandType, id)