Descrives service for list item.
You can find more information in comments below.
class IListItemService
{
public:
virtual IListItemOwner *getOwner() = 0; // Return attached IListItemOwner interface for communication with owner control
virtual PointF getRequiredSize() = 0; // Return total required size
virtual bool setOwner(IListItemOwner *value) = 0; // Should store specified owner
virtual bool setParent(IListItem *value) = 0; // Should store specified parent
virtual bool setSize(const PointF &value) = 0; // Should set specified size
virtual bool setPosition(const PointF &value) = 0; // Should set specified position(it is relative to parent)
virtual bool setHovered(const bool value) = 0; // Should set flag indication the item is hovered or not
// Since 4.0.0
virtual bool setDPI(const Point &value) = 0; // Adjust list item parameters to specified DPI. Default DPI is { 96, 96 }
virtual void Release() = 0; // Destroy instance
virtual void UpdateFromStyle() = 0; // Update list item from style returned by associated list item owner getStyle() method
virtual void Render(const Matrix &matrix, const BLOCK *block, const bool last_pass, // Render independently on visibility state
ITexture **clip) = 0; // If clip is not nullptr it should be used by list item during rendering and prevent creating/destroying new clip texture each time
virtual void FreeResources() = 0; // Should free all renderer and window resources
virtual bool MoveItem(IListItem *item, const int before) = 0; // Change item position in parent item list. Index should be in range 0..ItemCount, item should be child and it's index should not be equal to index
// Input(return true if input processed. If so it will be repainted by owner or any other, like menu close, action will be performed)
virtual bool KeyDown(const KEY key, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on key down
virtual bool KeyUp(const KEY key, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on key release
virtual bool Char(const wchar_t chr, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify about character received from keyboard input
virtual bool MouseDown(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on mouse button down
virtual void MouseDownCancel() = 0; // Called by owner to cancel prev mouse down event
virtual bool MouseMove(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on mouse pointer moving
virtual bool MouseUp(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on mouse button release
virtual bool MouseDoubleClick(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift) = 0; // Called by owner to notify on mouse button double click
virtual bool MouseVerticalWheel(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift, const int delta) = 0; // Called by owner to notify on mouse vertical wheel
virtual bool MouseHorizontalWheel(const PointF &position, const bool left, const bool middle, const bool right, const bool ctrl, const bool alt, const bool shift, const int delta) = 0; // Called by owner to notify on mouse horizontal wheel
virtual bool DropFiles(const PointF &position, const std::vector<String> &filenames) = 0; // Called by owner to notify about files dropping
};
Namespace: | nitisa |
Include: | Nitisa/Interfaces/IListItem.h |