Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Component::HTMLListbox::Component Class Referencefinal

Listbox with HTML content. More...

#include <component.h>

Inheritance diagram for Antares::Component::HTMLListbox::Component:
Antares::Component::Panel

Public Member Functions

Constructor & Destructor
 Component (wxWindow *parent)
 Default Constructor.
 
virtual ~Component ()
 Destructor.
 
void clear ()
 Removes all items.
 
void add (Item::IItem::Ptr it)
 Add an item.
 
void setElement (Item::IItem::Ptr it, int index_item)
 
int size ()
 
void resizeTo (int newSize)
 
template<class D >
D * addDatasource ()
 Add a datasource.
 
void forceReload ()
 Force a visual refresh of the component.
 
void forceRedraw ()
 
void updateHtmlContent ()
 Refresh only the content of all items.
 
void forceUpdate ()
 Force the update of the whole content.
 
Datasource::IDatasourcedatasource ()
 Get the current datasource.
 
uint size () const
 Get the number of items.
 
bool empty () const
 Get if the container is empty.
 
- 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.
 

Operators

Yuni::Event< void(Item::IItem::Ptr)> onItemSelected
 Event: An item has been selected.
 
Yuni::Event< void(Item::IItem::Ptr)> onItemDblClick
 Event: An item has been double clicked.
 
Componentoperator+= (Item::IItem::Ptr it)
 Operator +=.
 
Componentoperator<< (Item::IItem::Ptr it)
 Operator <<.
 

Additional Inherited Members

- Static Public Member Functions inherited from Antares::Component::Panel
static void OnMouseMoveFromExternalComponent ()
 Event triggered by any other component (not derived from Panel)
 
- Protected Member Functions inherited from Antares::Component::Panel
virtual bool triggerMouseClickEvent () const
 

Detailed Description

Listbox with HTML content.

Warning
This component is DEPRECATED !!!

This component can be considered as a ListBox, with HTML content. Each item is more than a simple string, and must inherit from the class Item::IItem. The component can only be filled with a custom datasource. This component is lazy. It onlys updates from the datasource when it is really visible by the user.

Constructor & Destructor Documentation

◆ Component()

Antares::Component::HTMLListbox::Component::Component ( wxWindow * parent)

Default Constructor.

Parameters
parentThe parent window

Member Function Documentation

◆ add()

void Antares::Component::HTMLListbox::Component::add ( Item::IItem::Ptr it)

Add an item.

Parameters
invalidateTrue to force the visual update of the component

◆ addDatasource()

template<class D >
D * Antares::Component::HTMLListbox::Component::addDatasource ( )
inline

Add a datasource.

c->addDatasource<MyDatasource>();

◆ updateHtmlContent()

void Antares::Component::HTMLListbox::Component::updateHtmlContent ( )

Refresh only the content of all items.

The list itself won't be refreshed, only the content

See also
forceUpdate()

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