21 #ifndef __ANTARES_COMMON_COMPONENT_SPOTLIGHT_LISTBOX_PANEL_H__
22 #define __ANTARES_COMMON_COMPONENT_SPOTLIGHT_LISTBOX_PANEL_H__
24 #include <yuni/yuni.h>
25 #include "../../wx-wrapper.h"
26 #include <wx/scrolwin.h>
27 #include "spotlight.h"
29 namespace Antares::Component
31 class ListboxPanel:
public wxScrolledWindow,
public Yuni::IEventObserver<ListboxPanel>
36 searchResultTextHeight = 25,
50 void updateItems(
const Spotlight::IItem::VectorPtr& vptr,
51 const Spotlight::SearchToken::VectorPtr& tokens);
62 void onDraw(wxPaintEvent& evt);
89 Spotlight::IItem::VectorPtr pItems;
91 Spotlight::SearchToken::VectorPtr pTokens;
93 wxString pLonguestGroupName;
94 wxSize pLonguestGroupNameSize;
95 bool pRecomputeLonguestGroupNameSize;
96 wxColour pDisabledColor;
98 wxString pCacheResultText;
99 wxSize pCacheResultTextSize;
103 Spotlight::IProvider::Ptr pProvider;
108 YString pLastGroupName;
112 DECLARE_EVENT_TABLE()
Definition: listbox-panel.h:32
void onMouseMotion(wxMouseEvent &evt)
Event: mouse moved.
Definition: listbox-panel.cpp:86
void onMouseLeave(wxMouseEvent &)
Event: mouse leave.
Definition: listbox-panel.cpp:133
void onMouseLeftUp(wxMouseEvent &evt)
Event: Mouse Click.
Definition: listbox-panel.cpp:359
void onDraw(wxPaintEvent &evt)
Event: draw the panel.
Definition: listbox-panel.cpp:144
void doSelectItemFromMouseDblClick()
Delayed event.
Definition: listbox-panel.cpp:377
void onMouseDblClick(wxMouseEvent &evt)
Event: Mouse Double Click.
Definition: listbox-panel.cpp:368
void resetProvider(Spotlight::IProvider::Ptr provider)
Reset the data provider.
Definition: listbox-panel.cpp:139
virtual ~ListboxPanel()
Destructor.
Definition: listbox-panel.cpp:74
void recomputeBoundsForLonguestGroupName(wxDC &dc)
Recompute the bounds of the longuest group name.
Definition: listbox-panel.cpp:79
ListboxPanel(Spotlight *parent, uint flags)
Default constructor.
Definition: listbox-panel.cpp:51
void doSelectItemFromMouseLeftUp()
Delayed event.
Definition: listbox-panel.cpp:422
void onEraseBackground(wxEraseEvent &)
UI: Erase background, empty to avoid flickering.
Definition: listbox-panel.h:69
Definition: spotlight.h:38