CFileList



Implements FileList control.

You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.

class CFileList :public virtual IFileList, public CControl
{
public:
    enum class State // Possible states 
    {
        Normal,
        Hovered,
        Focused,
        FocusedHovered,
        Disabled
    };
public:
    void(*OnActivate)(IControl *sender, const String &file); // Event called when file has been activated 
    void(*OnDeactivate)(IControl *sender, const String &file); // Event called when file has been deactivated 
    void(*OnSelect)(IControl *sender, const String &file); // Event called when file has been selected 
    void(*OnDeselect)(IControl *sender, const String &file); // Event called when file has been deselected 

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    RectF getClientRect() override;
    RectF getRenderRect() override;
    String getDirectory() override;
    String getFilter() override;
    bool isShowArchieved() override;
    bool isShowCompressed() override;
    bool isShowEncrypted() override;
    bool isShowHidden() override;
    bool isShowNormal() override;
    bool isShowOffline() override;
    bool isShowReadOnly() override;
    bool isShowSystem() override;
    bool isShowTemporary() override;
    String getActiveFile() override;
    int getFileCount() override;
    String getFile(const int index) override;
    bool isFileSelected(const int index) override;

    bool setDPI(const Point &value) override;
    bool setDirectory(const String &value) override;
    bool setFilter(const String &value) override;
    bool setShowArchieved(const bool value) override;
    bool setShowCompressed(const bool value) override;
    bool setShowEncrypted(const bool value) override;
    bool setShowHidden(const bool value) override;
    bool setShowNormal(const bool value) override;
    bool setShowOffline(const bool value) override;
    bool setShowReadOnly(const bool value) override;
    bool setShowSystem(const bool value) override;
    bool setShowTemporary(const bool value) override;
    bool setFileSelected(const int index, const bool value) override;

    bool Rescan() override;

    CFileList();
    CFileList(IForm *parent);
    CFileList(IControl *parent);
    ~CFileList() override;

    State getState(); // Return current state 
    int getActiveIndex(); // Return active item index 
    float getSearchResetInterval() const; // Return search by typing reset interval(in seconds) 
    int getColumns() const; // Return column count 
    bool isMultiselect() const; // Whether multiple item could be selected at the same time 
    float getScrollInterval() const; // Scroll interval(in seconds) 
    // Return layout properties 
    RectF getBorderWidth() const;
    RectF getBorderRadius() const;
    RectF getPadding() const;
    ScrollVisibility getHorizontalScrollBar() const;
    ScrollVisibility getVerticalScrollBar() const;
    Color getShadowColor(const State state) const;
    PointF getShadowShift(const State state) const;
    int getShadowRadius(const State state) const;
    BorderColor getBorderColor(const State state) const;
    Color getLeftBorderColor(const State state) const;
    Color getTopBorderColor(const State state) const;
    Color getRightBorderColor(const State state) const;
    Color getBottomBorderColor(const State state) const;
    Color getBackgroundColor(const State state) const;
    Gradient *getBackgroundGradient(const State state);
    Color getCornerColor(const State state) const;

    bool setHScroll(IBuiltInScroll *value); // Assign new horizontal scroll 
    bool setVScroll(IBuiltInScroll *value); // Assign new vertical scroll 
    bool setActiveIndex(const int value); // Set active item 
    bool setSearchResetInterval(const float value); // Set search reset interval(in seconds) 
    bool setColumns(const int value); // Set column count 
    bool setMultiselect(const bool value); // Set whether several items could be selected at the same time 
    bool setScrollInterval(const float value); // Set scroll interval(in seconds) 
    // Set layout properties 
    bool setBorderWidth(const RectF &value);
    bool setBorderRadius(const RectF &value);
    bool setPadding(const RectF &value);
    bool setHorizontalScrollBar(const ScrollVisibility value);
    bool setVerticalScrollBar(const ScrollVisibility value);
    bool setShadowColor(const State state, const Color &value);
    bool setShadowShift(const State state, const PointF &value);
    bool setShadowRadius(const State state, const int value);
    bool setBorderColor(const State state, const BorderColor &value);
    bool setLeftBorderColor(const State state, const Color &value);
    bool setTopBorderColor(const State state, const Color &value);
    bool setRightBorderColor(const State state, const Color &value);
    bool setBottomBorderColor(const State state, const Color &value);
    bool setBackgroundColor(const State state, const Color &value);
    bool setCornerColor(const State state, const Color &value);

    void LockUpdate(); // Lock update and repaint 
    void UnlockUpdate(); // Unlock update and repaint 
};
Namespace: nitisa::standard
Include: Standard/Controls/FileList/FileList.h