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 STATE // Possible states
{
stNormal,
stHovered,
stFocused,
stFocusedHovered,
stDisabled
};
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;
SCROLL_VISIBILITY getHorizontalScrollBar() const;
SCROLL_VISIBILITY getVerticalScrollBar() const;
Color getShadowColor(const STATE state) const;
PointF getShadowShift(const STATE state) const;
int getShadowRadius(const STATE state) const;
RectC 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 SCROLL_VISIBILITY value);
bool setVerticalScrollBar(const SCROLL_VISIBILITY 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 RectC &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 |