Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Component::Spotlight Class Referencefinal
Inheritance diagram for Antares::Component::Spotlight:
Antares::Component::Panel

Classes

class  IItem
 
class  IProvider
 Data Provider. More...
 
class  NullProvider
 A null provider. More...
 
class  SearchToken
 A search token. More...
 
class  Separator
 
class  Text
 

Public Types

enum  Options {
  optNone = 0 , optResultsInAPopup = 1 , optGroups = 2 , optAutoResizeParent = 4 ,
  optNoSearchInput = 8 , optBkgWhite = 16
}
 
enum  { defaultFlags = optResultsInAPopup | optGroups }
 

Public Member Functions

Constructor & Destructor
 Spotlight (wxWindow *parent, uint flags=defaultFlags)
 Default constructor.
 
virtual ~Spotlight ()
 Destructor.
 
Search
void search (const Yuni::String &text)
 Update the component with a given search string.
 
void search (const wxString &text)
 Update the component with a given search string.
 
void redoResearch ()
 Redo the last search.
 
void resetSearchInput ()
 Reset the search input.
 
void onMapLayerChanged (const wxString *text)
 set the value of the search input
 
void onMapLayerAdded (const wxString *text)
 
void onMapLayerRemoved (const wxString *text)
 
void onMapLayerRenamed (const wxString *text)
 
Data provider
IProvider::Ptr provider () const
 Get the provider.
 
void provider (IProvider::Ptr provider)
 Set the provider.
 
- Public Member Functions inherited from Antares::Component::Panel
 Panel (wxWindow *parent)
 Constructor.
 
virtual ~Panel ()
 Destructor.
 
virtual void onMouseDown (wxMouseEvent &)
 Click down.
 
virtual void onMouseUp (wxMouseEvent &)
 Click up.
 
virtual void onMouseClick ()
 The panel has been clicked (delayed)
 
virtual void onMouseEnter ()
 The mouse has entered.
 
virtual void onMouseLeave ()
 The mouse has leaved.
 
virtual void onMouseMoved (int, int)
 The mouse has moved.
 

Static Public Member Functions

static void FrameShow (wxWindow *parent, IProvider::Ptr provider, uint flags=optGroups, uint width=340)
 Display the spotlight in a frame.
 
static void FrameClose ()
 Close any opened window.
 
- Static Public Member Functions inherited from Antares::Component::Panel
static void OnMouseMoveFromExternalComponent ()
 Event triggered by any other component (not derived from Panel)
 

Visual

Yuni::Event< void(const IItem::VectorPtr &, const SearchToken::VectorPtr &)> onUpdateItems
 Event: update items.
 
uint pFlags
 Flags.
 
IProvider::Ptr pDataProvider
 
IItem::VectorPtr pResults
 Result set.
 
SearchToken::VectorPtr pTokens
 
Yuni::String pLastResearch
 The last research.
 
Yuni::Event< void(IProvider::Ptr)> pResetProvider
 Internal updater for the provider.
 
wxComboBox * pLayerFilter
 ComboBox Filter.
 
wxTextCtrl * pEdit
 Text edit.
 
wxWindow * pListbox
 The listbox.
 
uint pItemHeight
 Item height.
 
int pDisplayHandle
 Display monitor handle.
 
wxWindow * pLayoutParent
 Parent to consider for layout positioning when used from a frame.
 
bool pAllowFrameResize
 Previous height.
 
wxBoxSizer * vz
 
wxBoxSizer * hzCombo
 
uint itemHeight () const
 Get the item height.
 
void itemHeight (uint h)
 Set the item height.
 
void updateResults ()
 Update the GUI with the new results.
 
void convertRawTextIntoSearchTokenVector (SearchToken::Vector &out, const Yuni::String &text)
 Convert a raw text into a vector of tokens.
 
void createComponents (Spotlight *parent, bool input, bool results)
 
void onInputUpdated (wxCommandEvent &evt)
 Event: the text input has been changed.
 
void onComboUpdated (wxCommandEvent &evt)
 
void resizeParentWindow ()
 Resize the parent window.
 

Additional Inherited Members

- Protected Member Functions inherited from Antares::Component::Panel
virtual bool triggerMouseClickEvent () const
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
defaultFlags 

Default flags used by the constructor.

◆ Options

Enumerator
optGroups 

Display groups as well.

optAutoResizeParent 

Try to automatically resize the parent window when according to the list.

optNoSearchInput 

The search input will not be shown.

optBkgWhite 

Use a white background instead of the default one.

Constructor & Destructor Documentation

◆ Spotlight()

Antares::Component::Spotlight::Spotlight ( wxWindow * parent,
uint flags = defaultFlags )

Default constructor.

Parameters
parentThe parent window
flagsFlags

Member Function Documentation

◆ onMapLayerChanged()

void Antares::Component::Spotlight::onMapLayerChanged ( const wxString * text)

set the value of the search input

The component will be updated with the value of the text.

◆ resetSearchInput()

void Antares::Component::Spotlight::resetSearchInput ( )

Reset the search input.

The component will be updated with an empty search input.

◆ search()

void Antares::Component::Spotlight::search ( const wxString & text)

Update the component with a given search string.

See also
search(const Yuni::String&)

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