class Core::Portable::ListView

Overview

A container with a content area, background/header area and more. More…

#include <corelistview.h>

class ListView:
    public Core::Portable::ContainerView,
    public Core::Portable::ListViewStyle
{
public:
    // enums

    enum SelectionTrigger;

    // classes

    class Content;

    // methods

    PROPERTY_FLAG(options, Skin::kListViewBehaviorWheelSelection, isWheelSelection);
    isDeselectAllowed ListViewModel* getModel() const;
    void setModel(ListViewModel* model);
    void modelChanged();
    void selectItem(int index, SelectionTrigger trigger);
    void makeSelectedItemVisible();
    void makeItemVisible(int index);
    void getItemRect(Rect& rect, int index) const;
    void scrollBy(int delta);
    void scrollTo(int index);
    int getScrollPosition() const;
    virtual void draw(const DrawEvent& e);
    virtual void setSize(Core::RectRef newSize);
    virtual void setAttributes(const Attributes& a);
    bool onTouchInput(const TouchEvent& e);
    virtual CStringPtr getConnectionType() const;
    virtual void connect(void* object);
    virtual void onFocus(bool state);
};

// direct descendants

class MenuView;

Inherited Members

public:
    // fields

     itemInset;
    ItemInset selectColor;
    ItemInset SelectColor focusBorder;

    // methods

    virtual void addView(VC* view);
    virtual void removeView(VC* view);
    const ConstVector<VC*>& getChildren() const;
    void draw(const DrawEvent& e);
    DECLARE_CORE_CLASS('CntV', ContainerView, View) const;
    PROPERTY_POINTER(IViewOwner, owner, Owner);
    virtual void resizeToChildren();

    View* findView(
        const Point& where,
        bool deep = true,
        const ViewFilter* filter = nullptr
    ) const;

    View* findView(const ViewFilter& filter, bool deep = true) const;

    template <class T>
    T* findView(CStringPtr name, bool deep = true) const;

    bool isChildView(const View* view, bool deep = true) const;
    void addView(View* view);
    void removeView(View* view);
    virtual ContainerView* asContainer();
    bool onTouchInput(const TouchEvent& e);
    virtual void onIdle();
    PROPERTY_VARIABLE(Coord, rowHeight, RowHeight);
    ItemInset PROPERTY_VARIABLE(Coord, scrollerSize, ScrollerSize);
    ItemInset SelectColor PROPERTY_VARIABLE(Color, separatorColor, SeparatorColor);

Detailed Documentation

A container with a content area, background/header area and more.

Methods

void setModel(ListViewModel* model)

ATT: model is not owned!