Content


NTL
Core
CControlItemList

CControlItemList



Control working with plain item lists basic implementation. Use it as a base class of your control if the control works with plain list of items and you want it's items could be properly managed in Form Builder.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CControlItemList :public virtual IComponentItemList, public CControl
{
protected:
    std::vecto<IListItem*> m_aItems; // Items 

    void SortItems() override;
    void BeforeRelease() override;
public:
    int getItemCount() override;
    IListItem *getItem(const int index) override;
    int getItemIndex(IListItem *item) override;
    bool isAcceptItem(IListItem *item) override;

    bool AddItem(IListItem *item) override;
    bool InsertItem(IListItem *item, const int before) override;
    bool DeleteItem(const int index) override;
    bool DeleteItem(IListItem *item) override;
    bool DeleteItems() override;

    CControlItemList(
        const String &class_name,
        const bool accept_form,
        const bool accept_control,
        const bool accept_controls,
        const bool accept_focus,
        const bool accept_modal,
        const bool tab_stop,
        const Point &design_dpi = DesignDPI);
};
Namespace: nitisa
Include: Nitisa/Core/ControlItemList.h