Public Member Functions | |
wxComboBoxExtraInputHandler (wxComboCtrlBase *combo) | |
~wxComboBoxExtraInputHandler () | |
void | OnKey (wxKeyEvent &event) |
void | OnFocus (wxFocusEvent &event) |
Protected Attributes | |
wxComboCtrlBase * | m_combo |
Definition at line 421 of file combo.cpp.
|
Definition at line 425 of file combo.cpp. 00426 : wxEvtHandler() 00427 { 00428 m_combo = combo; 00429 }
|
|
Definition at line 430 of file combo.cpp.
|
|
Definition at line 490 of file combo.cpp. 00491 { 00492 // FIXME: This code does run when control is clicked, 00493 // yet on Windows it doesn't select all the text. 00494 if ( !(m_combo->GetInternalFlags() & wxCC_NO_TEXT_AUTO_SELECT) ) 00495 { 00496 if ( m_combo->GetTextCtrl() ) 00497 m_combo->GetTextCtrl()->SelectAll(); 00498 else 00499 m_combo->SetSelection(-1,-1); 00500 } 00501 00502 if ( event.GetId() != m_combo->GetId() ) 00503 { 00504 // Add textctrl set focus events as combo set focus events 00505 // NOTE: Simply changing the event and skipping didn't seem 00506 // to do the trick. 00507 wxFocusEvent evt2(wxEVT_SET_FOCUS,m_combo->GetId()); 00508 evt2.SetEventObject(m_combo); 00509 m_combo->GetEventHandler()->ProcessEvent(evt2); 00510 } 00511 else 00512 event.Skip(); 00513 00514 event.Skip(); 00515 }
|
|
Definition at line 448 of file combo.cpp. 00449 { 00450 int keycode = event.GetKeyCode(); 00451 00452 if ( keycode == WXK_TAB && !m_combo->IsPopupShown() ) 00453 { 00454 wxNavigationKeyEvent evt; 00455 evt.SetFlags(wxNavigationKeyEvent::FromTab| 00456 (!event.ShiftDown()?wxNavigationKeyEvent::IsForward: 00457 wxNavigationKeyEvent::IsBackward)); 00458 evt.SetEventObject(m_combo); 00459 m_combo->GetParent()->GetEventHandler()->AddPendingEvent(evt); 00460 return; 00461 } 00462 00463 if ( m_combo->IsPopupShown() ) 00464 { 00465 // pass it to the popped up control 00466 m_combo->GetPopupControl()->GetControl()->AddPendingEvent(event); 00467 } 00468 else // no popup 00469 { 00470 int comboStyle = m_combo->GetWindowStyle(); 00471 wxComboPopup* popupInterface = m_combo->GetPopupControl(); 00472 00473 if ( !popupInterface ) 00474 { 00475 event.Skip(); 00476 return; 00477 } 00478 00479 if ( (comboStyle & wxCB_READONLY) || 00480 ( keycode != WXK_RIGHT && keycode != WXK_LEFT ) 00481 ) 00482 { 00483 popupInterface->OnComboKeyEvent(event); 00484 } 00485 else 00486 event.Skip(); 00487 } 00488 }
|
|
|