Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Window::ItemWindow Class Reference
Inheritance diagram for Antares::Window::ItemWindow:
Antares::Component::Spotlight::IItem

Public Types

using Ptr = std::shared_ptr<ItemWindow>
 Smart ptr.
 
- Public Types inherited from Antares::Component::Spotlight::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

 ItemWindow (const Yuni::String &title, int id)
 
- Public Member Functions inherited from Antares::Component::Spotlight::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.
 
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.
 
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.
 
virtual void draw (wxDC &dc, uint itemHeight, wxRect &bounds, bool selected, const SearchToken::VectorPtr &tokens) const
 Draw the item.
 

Public Attributes

Yuni::String title
 
int id
 
- Public Attributes inherited from Antares::Component::Spotlight::IItem
int tag
 User-custom tag.
 

Additional Inherited Members

- Protected Attributes inherited from Antares::Component::Spotlight::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.
 

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