|
Antares Simulator
Power System Simulator
|
Classes | |
| class | IPart |
| class | Tag |
Public Types | |
| 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 | |
| IItem () | |
| Default constructor. | |
| virtual | ~IItem () |
| Destructor. | |
Caption | |
| 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. | |
Group | |
| const GroupType & | group () 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. | |
Selection | |
| virtual bool | canBeSelected () const |
| Get if the item can be selected. | |
| bool | selected () const |
| Get if the item is selected. | |
| void | select () |
| Mark the item as selected. | |
| void | unselect () |
| Mark the item as not selected. | |
Image | |
| 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. | |
Tags | |
| 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. | |
Result | |
| 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. | |
Drawing | |
| int | tag |
| User-custom tag. | |
| 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. | |
| virtual void | draw (wxDC &dc, uint itemHeight, wxRect &bounds, bool selected, const SearchToken::VectorPtr &tokens) const |
| Draw the item. More... | |
|
virtual |
Draw the item.
| dc | The device context | |
| [in,out] | bounds | The bounds of the surface. The width and the height should be be modified |
Reimplemented in Separator.