NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
SearchCtrlPopup Class Reference

The popup control for the generic search control. Implemented ontop of a list view. More...

#include <searchctrl.hpp>

Inheritance diagram for SearchCtrlPopup:
Collaboration diagram for SearchCtrlPopup:

Public Member Functions

virtual bool Create (wxWindow *parent) override
 
virtual void Init () override
 
virtual wxWindow * GetControl () override
 
virtual wxString GetStringValue () const override
 Returns the string representation of the selected item after the popup had been closed. More...
 
void OnKeyEvent (wxKeyEvent &event)
 This event handler is necessary to pass the keycodes, which are accidentally catched in this control, to the actual text entry of the composed control. More...
 
void OnMouseUp (wxMouseEvent &WXUNUSED(event))
 This event handler fires, if the user double clicks on an item in the popup list. More...
 
void OnMouseMove (wxMouseEvent &event)
 This event handler provides the mouse hover effect in the popup list. More...
 
void OnDragStart (wxListEvent &event)
 This event handler is the drag-drop handler for the search results. More...
 
void Set (wxArrayString &stringArray)
 A set function to update the contents in the displayed list. More...
 
void SetColSizes (const wxArrayInt &sizes)
 Change the column sizes. Will create as many columns as fields are in the array. More...
 
void EnableDragDrop (bool enable)
 Enable or disable the drag-drop feature of this control. More...
 
void EnableColors (bool enable)
 Enables or disables coloring of functions in blue. More...
 
void SetCallTips (const wxString &calltip, const wxString &calltiphighlight=wxEmptyString)
 Sets the calltips for the popup list. More...
 

Private Member Functions

wxArrayString split (wxString sString)
 
 wxDECLARE_EVENT_TABLE ()
 

Private Attributes

int m_ListId
 
bool m_enableDragDrop
 
bool m_enableColors
 
wxArrayInt m_sizes
 
wxString m_callTip
 
wxString m_callTipHighlight
 

Detailed Description

The popup control for the generic search control. Implemented ontop of a list view.

Definition at line 31 of file searchctrl.hpp.

Member Function Documentation

◆ Create()

virtual bool SearchCtrlPopup::Create ( wxWindow *  parent)
inlineoverridevirtual

Definition at line 44 of file searchctrl.hpp.

◆ EnableColors()

void SearchCtrlPopup::EnableColors ( bool  enable)
inline

Enables or disables coloring of functions in blue.

Parameters
enablebool
Returns
void

Definition at line 106 of file searchctrl.hpp.

References m_enableColors.

Referenced by ToolBarSearchCtrl::ToolBarSearchCtrl().

◆ EnableDragDrop()

void SearchCtrlPopup::EnableDragDrop ( bool  enable)
inline

Enable or disable the drag-drop feature of this control.

Parameters
enablebool
Returns
void

Definition at line 93 of file searchctrl.hpp.

References m_enableDragDrop.

Referenced by ToolBarSearchCtrl::ToolBarSearchCtrl().

◆ GetControl()

virtual wxWindow * SearchCtrlPopup::GetControl ( )
inlineoverridevirtual

Definition at line 59 of file searchctrl.hpp.

◆ GetStringValue()

wxString SearchCtrlPopup::GetStringValue ( ) const
overridevirtual

Returns the string representation of the selected item after the popup had been closed.

Returns
wxString

Definition at line 70 of file searchctrl.cpp.

References m_ListId.

◆ Init()

virtual void SearchCtrlPopup::Init ( )
inlineoverridevirtual

◆ OnDragStart()

void SearchCtrlPopup::OnDragStart ( wxListEvent &  event)

This event handler is the drag-drop handler for the search results.

Parameters
eventwxListEvent&
Returns
void

Definition at line 335 of file searchctrl.cpp.

References m_enableDragDrop, and m_ListId.

◆ OnKeyEvent()

void SearchCtrlPopup::OnKeyEvent ( wxKeyEvent &  event)

This event handler is necessary to pass the keycodes, which are accidentally catched in this control, to the actual text entry of the composed control.

Parameters
eventwxKeyEvent&
Returns
void

Definition at line 89 of file searchctrl.cpp.

References m_ListId.

◆ OnMouseMove()

void SearchCtrlPopup::OnMouseMove ( wxMouseEvent &  event)

This event handler provides the mouse hover effect in the popup list.

Parameters
eventwxMouseEvent&
Returns
void

Definition at line 310 of file searchctrl.cpp.

References HIGHLIGHTCOLOR, m_callTip, m_callTipHighlight, and m_enableColors.

◆ OnMouseUp()

void SearchCtrlPopup::OnMouseUp ( wxMouseEvent &  WXUNUSEDevent)

This event handler fires, if the user double clicks on an item in the popup list.

Parameters
eventwxMouseEvent&
Returns
void

Definition at line 295 of file searchctrl.cpp.

References m_ListId.

◆ Set()

void SearchCtrlPopup::Set ( wxArrayString &  stringArray)

A set function to update the contents in the displayed list.

Parameters
stringArraywxArrayString&
Returns
void

Definition at line 363 of file searchctrl.cpp.

References HIGHLIGHTCOLOR, m_enableColors, m_sizes, min, and split().

Referenced by SearchCtrl::OnTextChange().

Here is the call graph for this function:

◆ SetCallTips()

void SearchCtrlPopup::SetCallTips ( const wxString &  calltip,
const wxString &  calltiphighlight = wxEmptyString 
)
inline

Sets the calltips for the popup list.

Parameters
calltipconst wxString&
calltiphighlightconst wxString&
Returns
void

Definition at line 119 of file searchctrl.hpp.

References m_callTip, and m_callTipHighlight.

Referenced by PackageListSearchCtrl::PackageListSearchCtrl(), ToolBarSearchCtrl::ToolBarSearchCtrl(), and TreeSearchCtrl::TreeSearchCtrl().

◆ SetColSizes()

void SearchCtrlPopup::SetColSizes ( const wxArrayInt &  sizes)
inline

Change the column sizes. Will create as many columns as fields are in the array.

Parameters
sizesconst wxArrayInt&
Returns
void

Definition at line 80 of file searchctrl.hpp.

References m_sizes.

Referenced by PackageListSearchCtrl::PackageListSearchCtrl(), and ToolBarSearchCtrl::ToolBarSearchCtrl().

◆ split()

wxArrayString SearchCtrlPopup::split ( wxString  sString)
private

Referenced by Set().

◆ wxDECLARE_EVENT_TABLE()

SearchCtrlPopup::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ m_callTip

wxString SearchCtrlPopup::m_callTip
private

Definition at line 38 of file searchctrl.hpp.

Referenced by Init(), OnMouseMove(), and SetCallTips().

◆ m_callTipHighlight

wxString SearchCtrlPopup::m_callTipHighlight
private

Definition at line 39 of file searchctrl.hpp.

Referenced by Init(), OnMouseMove(), and SetCallTips().

◆ m_enableColors

bool SearchCtrlPopup::m_enableColors
private

Definition at line 36 of file searchctrl.hpp.

Referenced by EnableColors(), Init(), OnMouseMove(), and Set().

◆ m_enableDragDrop

bool SearchCtrlPopup::m_enableDragDrop
private

Definition at line 35 of file searchctrl.hpp.

Referenced by EnableDragDrop(), Init(), and OnDragStart().

◆ m_ListId

int SearchCtrlPopup::m_ListId
private

Definition at line 34 of file searchctrl.hpp.

Referenced by GetStringValue(), Init(), OnDragStart(), OnKeyEvent(), and OnMouseUp().

◆ m_sizes

wxArrayInt SearchCtrlPopup::m_sizes
private

Definition at line 37 of file searchctrl.hpp.

Referenced by Init(), Set(), and SetColSizes().


The documentation for this class was generated from the following files: