Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
IModelList.hpp
Go to the documentation of this file.
1#ifndef LIBS_GUI_IMODELLIST_HPP_
2#define LIBS_GUI_IMODELLIST_HPP_
3
4#include "core/exception.hpp"
5
6#include <cstdint>
7#include <memory>
8#include <string>
9
10class CList;
11class CDataList;
12
14{
15public:
16 virtual ~IModelList() = default;
17
18 [[nodiscard]] virtual uint64_t numRows() const = 0;
19 [[nodiscard]] virtual std::shared_ptr<CDataList> getDataCell(uint64_t indRow, uint64_t indColumn) const = 0;
20
21 virtual void updateFrameData() {};
22
23 virtual void addColumns(CList *list)
24 {
25 throw iv::exception::NotImplemented("Shouldn't be called, if be called implement", __FILE__, __LINE__);
26 }
27
28 [[nodiscard]] virtual bool isCellActive(uint64_t indRow, uint64_t indCol) const
29 {
30 return true;
31 }
32
33 virtual bool hasForeground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbForeground) const
34 {
35 return false;
36 }
37
38 virtual bool hasBackground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbBackground) const
39 {
40 return false;
41 }
42};
43
44#endif /* LIBS_GUI_IMODELLIST_HPP_ */
Definition CDataList.hpp:13
Definition CList.hpp:15
Definition IModelList.hpp:14
virtual void addColumns(CList *list)
Definition IModelList.hpp:23
virtual uint64_t numRows() const =0
virtual bool isCellActive(uint64_t indRow, uint64_t indCol) const
Definition IModelList.hpp:28
virtual ~IModelList()=default
virtual bool hasBackground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbBackground) const
Definition IModelList.hpp:38
virtual bool hasForeground(uint64_t indRow, uint64_t indColumn, iv::types::color *rgbForeground) const
Definition IModelList.hpp:33
virtual std::shared_ptr< CDataList > getDataCell(uint64_t indRow, uint64_t indColumn) const =0
virtual void updateFrameData()
Definition IModelList.hpp:21
uint32_t color
Definition types.hpp:12