Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Separator Class Referencefinal
Inheritance diagram for Separator:
IItem

Public Types

using Ptr = std::shared_ptr<Separator>
 Ptr.
 
using Vector = std::vector<Ptr>
 Vector of items.
 
using VectorPtr = std::shared_ptr<Vector>
 Vector Ptr.
 
- Public Types inherited from IItem
using Ptr = std::shared_ptr<IItem>
 Ptr.
 
using Vector = std::vector<Ptr>
 Vector of items.
 
using VectorPtr = std::shared_ptr<Vector>
 Vector Ptr.
 
using GroupType = Yuni::CString<64, false>
 Group.
 

Public Member Functions

Constructor & Destructor
 Separator ()
 Default constructor.
 
virtual ~Separator ()
 Destructor.
 
virtual bool canBeSelected () const
 Get if the item can be selected.
 
virtual void draw (wxDC &dc, uint itemHeight, wxRect &bounds, bool selected, const SearchToken::VectorPtr &tokens) const
 Draw the item.
 
- Public Member Functions inherited from IItem
 IItem ()
 Default constructor.
 
virtual ~IItem ()
 Destructor.
 
const Yuni::String & caption () const
 Get the caption.
 
template<class StringT >
void caption (const StringT &caption)
 Set the caption.
 
void caption (const wxString &caption)
 Set the caption.
 
const Yuni::String & subcaption () const
 Get the sub-caption.
 
template<class StringT >
void subcaption (const StringT &caption)
 Set the caption.
 
const GroupTypegroup () const
 Get the group of the item.
 
template<class StringT >
void group (const StringT &g)
 Set the group.
 
template<class StringT >
bool isSameGroup (const StringT &group) const
 Compare with another group.
 
bool selected () const
 Get if the item is selected.
 
void select ()
 Mark the item as selected.
 
void unselect ()
 Mark the item as not selected.
 
void image (const wxBitmap &bmp)
 Set the item's image (reference)
 
void image (const wxBitmap *bmp)
 Set the item's image (pointer, can be null)
 
const wxBitmap & image () const
 Get the item& image.
 
template<class StringT >
void addTag (const StringT &text)
 Add a new tag.
 
template<class StringT >
void addTag (const StringT &text, uint8_t r, uint8_t g, uint8_t b)
 Add a new tag.
 
template<class StringT >
void addRightTag (const StringT &text)
 Add a new tag on the right.
 
template<class StringT >
void addRightTag (const StringT &text, uint8_t r, uint8_t g, uint8_t b)
 Add a new tag on the right.
 
void clearTags ()
 Clear all tags.
 
bool countedAsResult () const
 Get if this item should be counted as a result.
 
void countedAsResult (bool v)
 Set if this item should be counted as a result.
 

Additional Inherited Members

- Public Attributes inherited from IItem
int tag
 User-custom tag.
 
- Protected Attributes inherited from IItem
GroupType pGroup
 The group.
 
Yuni::String pCaption
 Caption.
 
Yuni::String pSubCaption
 
wxBitmap pBitmap
 Image.
 
bool pSelected
 Selected.
 
bool pCountedAsResult
 Flag to determine if this items should be counted as a result.
 
Tag::Vector pLeftTags
 Tags on the left.
 
Tag::Vector pRightTags
 Tags on the right.
 
wxString pCacheCaption
 Cache wxString.
 

Member Function Documentation

◆ canBeSelected()

virtual bool Separator::canBeSelected ( ) const
inlinevirtual

Get if the item can be selected.

Reimplemented from IItem.

◆ draw()

virtual void Separator::draw ( wxDC & dc,
uint itemHeight,
wxRect & bounds,
bool selected,
const SearchToken::VectorPtr & tokens ) const
virtual

Draw the item.

Parameters
dcThe device context
[in,out]boundsThe bounds of the surface. The width and the height should be be modified

Reimplemented from IItem.


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