NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Implementation of a generic search control based on a combo box. More...
#include <searchctrl.hpp>
Public Member Functions | |
SearchCtrl (wxWindow *parent, wxWindowID id, const wxString &value=wxEmptyString, int style=wxCB_SORT) | |
void | OnItemSelect (wxCommandEvent &event) |
This event handler function will be fired, if the user selects a proposed string in the opened dropdown list. More... | |
void | OnTextChange (wxCommandEvent &event) |
This event handler function will be fired, if the user changes the text in the control. It will provide a dropdown menu with possible candidates matching to the provided search string. More... | |
void | OnMouseEnter (wxMouseEvent &event) |
This event handler will show the drop down list, if the text field contains data and the mouse enters the text field. Replacement for the buggy EVT_SET_FOCUS event. More... | |
DECLARE_EVENT_TABLE () | |
Protected Member Functions | |
virtual bool | selectItem (const wxString &value) |
Child classes may override this member function to do something, when the user selects an item in the popup. More... | |
virtual wxString | getDragDropText (const wxString &value) |
Child classes may override this member function to provide a custom string for the built-in drag-drop functionality. More... | |
virtual wxArrayString | getCandidates (const wxString &enteredText) |
Child classes must override this member function to provide the candidates to be filled into the popup based upon the letters entered in the text entry window. More... | |
Protected Attributes | |
SearchCtrlPopup * | popUp |
Private Attributes | |
bool | textChangeMutex |
wxString | textEntryValue |
Friends | |
class | SearchCtrlPopup |
Implementation of a generic search control based on a combo box.
Definition at line 134 of file searchctrl.hpp.
|
inline |
Definition at line 152 of file searchctrl.hpp.
References popUp, and SearchCtrlPopup.
SearchCtrl::DECLARE_EVENT_TABLE | ( | ) |
|
protectedvirtual |
Child classes must override this member function to provide the candidates to be filled into the popup based upon the letters entered in the text entry window.
enteredText | const wxString& |
Reimplemented in ToolBarSearchCtrl, TreeSearchCtrl, and PackageListSearchCtrl.
Definition at line 447 of file searchctrl.cpp.
Referenced by OnTextChange().
|
protectedvirtual |
Child classes may override this member function to provide a custom string for the built-in drag-drop functionality.
value | const wxString& |
Reimplemented in ToolBarSearchCtrl.
Definition at line 431 of file searchctrl.cpp.
void SearchCtrl::OnItemSelect | ( | wxCommandEvent & | event | ) |
This event handler function will be fired, if the user selects a proposed string in the opened dropdown list.
event | wxCommandEvent& |
Definition at line 465 of file searchctrl.cpp.
References selectItem().
void SearchCtrl::OnMouseEnter | ( | wxMouseEvent & | event | ) |
This event handler will show the drop down list, if the text field contains data and the mouse enters the text field. Replacement for the buggy EVT_SET_FOCUS event.
event | wxMouseEvent& |
Definition at line 530 of file searchctrl.cpp.
void SearchCtrl::OnTextChange | ( | wxCommandEvent & | event | ) |
This event handler function will be fired, if the user changes the text in the control. It will provide a dropdown menu with possible candidates matching to the provided search string.
event | wxCommandEvent& |
Definition at line 488 of file searchctrl.cpp.
References getCandidates(), popUp, SearchCtrlPopup::Set(), textChangeMutex, and textEntryValue.
|
protectedvirtual |
Child classes may override this member function to do something, when the user selects an item in the popup.
value | const wxString& |
Reimplemented in ToolBarSearchCtrl, TreeSearchCtrl, and PackageListSearchCtrl.
Definition at line 414 of file searchctrl.cpp.
Referenced by OnItemSelect().
|
friend |
Definition at line 141 of file searchctrl.hpp.
Referenced by SearchCtrl().
|
protected |
Definition at line 143 of file searchctrl.hpp.
Referenced by OnTextChange(), PackageListSearchCtrl::PackageListSearchCtrl(), SearchCtrl(), ToolBarSearchCtrl::ToolBarSearchCtrl(), and TreeSearchCtrl::TreeSearchCtrl().
|
private |
Definition at line 137 of file searchctrl.hpp.
Referenced by OnTextChange().
|
private |
Definition at line 138 of file searchctrl.hpp.
Referenced by OnTextChange().