]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/listbox.cpp
removed subprojects for ldef and cdef, changed to in-proc ldef
[wxWidgets.git] / src / univ / listbox.cpp
index a11766268e68f646ef186a93b5f9c4f76ce431ee..a4eda3e861b9d905667adbb23405c1440520a125 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     30.08.00
 // RCS-ID:      $Id$
 // Modified by:
 // Created:     30.08.00
 // RCS-ID:      $Id$
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -1236,7 +1236,7 @@ wxStdListboxInputHandler::SetupCapture(wxListBox *lbox,
     return action;
 }
 
     return action;
 }
 
-bool wxStdListboxInputHandler::HandleKey(wxControl *control,
+bool wxStdListboxInputHandler::HandleKey(wxInputConsumer *consumer,
                                          const wxKeyEvent& event,
                                          bool pressed)
 {
                                          const wxKeyEvent& event,
                                          bool pressed)
 {
@@ -1244,7 +1244,7 @@ bool wxStdListboxInputHandler::HandleKey(wxControl *control,
     if ( pressed && !event.AltDown() )
     {
         bool isMoveCmd = TRUE;
     if ( pressed && !event.AltDown() )
     {
         bool isMoveCmd = TRUE;
-        int style = control->GetWindowStyle();
+        int style = consumer->GetInputWindow()->GetWindowStyle();
 
         wxControlAction action;
         wxString strArg;
 
         wxControlAction action;
         wxString strArg;
@@ -1284,24 +1284,24 @@ bool wxStdListboxInputHandler::HandleKey(wxControl *control,
 
         if ( !!action )
         {
 
         if ( !!action )
         {
-            control->PerformAction(action, -1, strArg);
+            consumer->PerformAction(action, -1, strArg);
 
             if ( isMoveCmd )
             {
                 if ( style & wxLB_SINGLE )
                 {
                     // the current item is always the one selected
 
             if ( isMoveCmd )
             {
                 if ( style & wxLB_SINGLE )
                 {
                     // the current item is always the one selected
-                    control->PerformAction(wxACTION_LISTBOX_SELECT);
+                    consumer->PerformAction(wxACTION_LISTBOX_SELECT);
                 }
                 else if ( style & wxLB_EXTENDED )
                 {
                     if ( event.ShiftDown() )
                 }
                 else if ( style & wxLB_EXTENDED )
                 {
                     if ( event.ShiftDown() )
-                        control->PerformAction(wxACTION_LISTBOX_EXTENDSEL);
+                        consumer->PerformAction(wxACTION_LISTBOX_EXTENDSEL);
                     else
                     {
                         // select the item and make it the new selection anchor
                     else
                     {
                         // select the item and make it the new selection anchor
-                        control->PerformAction(wxACTION_LISTBOX_SELECT);
-                        control->PerformAction(wxACTION_LISTBOX_ANCHOR);
+                        consumer->PerformAction(wxACTION_LISTBOX_SELECT);
+                        consumer->PerformAction(wxACTION_LISTBOX_ANCHOR);
                     }
                 }
                 //else: nothing to do for multiple selection listboxes
                     }
                 }
                 //else: nothing to do for multiple selection listboxes
@@ -1311,13 +1311,13 @@ bool wxStdListboxInputHandler::HandleKey(wxControl *control,
         }
     }
 
         }
     }
 
-    return wxStdInputHandler::HandleKey(control, event, pressed);
+    return wxStdInputHandler::HandleKey(consumer, event, pressed);
 }
 
 }
 
-bool wxStdListboxInputHandler::HandleMouse(wxControl *control,
+bool wxStdListboxInputHandler::HandleMouse(wxInputConsumer *consumer,
                                            const wxMouseEvent& event)
 {
                                            const wxMouseEvent& event)
 {
-    wxListBox *lbox = wxStaticCast(control, wxListBox);
+    wxListBox *lbox = wxStaticCast(consumer->GetInputWindow(), wxListBox);
     int item = HitTest(lbox, event);
     wxControlAction action;
 
     int item = HitTest(lbox, event);
     wxControlAction action;
 
@@ -1357,16 +1357,16 @@ bool wxStdListboxInputHandler::HandleMouse(wxControl *control,
         return TRUE;
     }
 
         return TRUE;
     }
 
-    return wxStdInputHandler::HandleMouse(control, event);
+    return wxStdInputHandler::HandleMouse(consumer, event);
 }
 
 }
 
-bool wxStdListboxInputHandler::HandleMouseMove(wxControl *control,
+bool wxStdListboxInputHandler::HandleMouseMove(wxInputConsumer *consumer,
                                                const wxMouseEvent& event)
 {
     wxWindow *winCapture = wxWindow::GetCapture();
     if ( winCapture && (event.GetEventObject() == winCapture) )
     {
                                                const wxMouseEvent& event)
 {
     wxWindow *winCapture = wxWindow::GetCapture();
     if ( winCapture && (event.GetEventObject() == winCapture) )
     {
-        wxListBox *lbox = wxStaticCast(control, wxListBox);
+        wxListBox *lbox = wxStaticCast(consumer->GetInputWindow(), wxListBox);
 
         if ( !m_btnCapture || !m_trackMouseOutside )
         {
 
         if ( !m_btnCapture || !m_trackMouseOutside )
         {
@@ -1404,7 +1404,7 @@ bool wxStdListboxInputHandler::HandleMouseMove(wxControl *control,
         }
     }
 
         }
     }
 
-    return wxStdInputHandler::HandleMouseMove(control, event);
+    return wxStdInputHandler::HandleMouseMove(consumer, event);
 }
 
 #endif // wxUSE_LISTBOX
 }
 
 #endif // wxUSE_LISTBOX