[DEV] update the List display
This commit is contained in:
parent
45827887f7
commit
18ca91a514
@ -178,17 +178,13 @@ etk::Color<> BufferView::getBasicBG() {
|
||||
return (*m_paintingProperties)[m_colorBackground1].getForeground();
|
||||
}
|
||||
|
||||
uint32_t BufferView::getNuberOfColomn() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool BufferView::getTitle(int32_t _colomn, etk::String &_myTitle, etk::Color<> &_fg, etk::Color<> &_bg) {
|
||||
_myTitle = "Buffers : ";
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t BufferView::getNuberOfRaw() {
|
||||
return m_list.size();
|
||||
ivec2 BufferView::getMatrixSize() const {
|
||||
return ivec2(1,m_list.size());
|
||||
}
|
||||
|
||||
fluorine::Variant BufferView::getData(int32_t _role, const ivec2& _pos) {
|
||||
@ -220,7 +216,7 @@ bool BufferView::onItemEvent(int32_t _IdInput, enum gale::key::status _typeEvent
|
||||
APPL_INFO("Event on List : IdInput=" << _IdInput << " pos=" << _pos );
|
||||
if( _pos.y() >= 0
|
||||
&& _pos.y() < (int64_t)m_list.size()) {
|
||||
if (m_list[_raw].m_buffer != null) {
|
||||
if (m_list[_pos.y()].m_buffer != null) {
|
||||
if (m_bufferManager != null) {
|
||||
APPL_INFO("Select file :" << m_list[_pos.y()].m_buffer->getFileName() << " in list");
|
||||
m_bufferManager->open(m_list[_pos.y()].m_buffer->getFileName());
|
||||
|
@ -64,9 +64,8 @@ class BufferView : public ewol::widget::List {
|
||||
etk::Color<> getBasicBG() override;
|
||||
void removeAllElement();
|
||||
// Derived function
|
||||
uint32_t getNuberOfColomn() override;
|
||||
bool getTitle(int32_t _colomn, etk::String& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg) override;
|
||||
uint32_t getNuberOfRaw() override;
|
||||
ivec2 getMatrixSize() const override;
|
||||
fluorine::Variant getData(int32_t _role, const ivec2& _pos) override;
|
||||
bool onItemEvent(int32_t _IdInput, enum gale::key::status _typeEvent, const ivec2& _pos, const vec2& _mousePosition) override;
|
||||
private: //callback function:
|
||||
@ -76,6 +75,6 @@ class BufferView : public ewol::widget::List {
|
||||
void onCallbackNewBuffer(const etk::String& _value);
|
||||
void onCallbackselectNewFile(const etk::String& _value);
|
||||
void onCallbackBufferRemoved(const ememory::SharedPtr<appl::Buffer>& _buffer);
|
||||
void calculateMinMaxSize();
|
||||
void calculateMinMaxSize() override;
|
||||
};
|
||||
|
||||
|
@ -37,17 +37,13 @@ etk::Color<> appl::TagFileList::getBasicBG() {
|
||||
return 0x00000010;
|
||||
}
|
||||
|
||||
uint32_t appl::TagFileList::getNuberOfColomn() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool appl::TagFileList::getTitle(int32_t _colomn, etk::String& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg) {
|
||||
_myTitle = "title";
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t appl::TagFileList::getNuberOfRaw() {
|
||||
return m_list.size();
|
||||
ivec2 appl::TagFileList::getMatrixSize() const {
|
||||
return ivec2(2,m_list.size());
|
||||
}
|
||||
|
||||
fluorine::Variant appl::TagFileList::getData(int32_t _role, const ivec2& _pos) {
|
||||
|
@ -44,9 +44,8 @@ namespace appl {
|
||||
virtual ~TagFileList();
|
||||
// display API :
|
||||
etk::Color<> getBasicBG() override;
|
||||
uint32_t getNuberOfColomn() override;
|
||||
bool getTitle(int32_t _colomn, etk::String& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg) override;
|
||||
uint32_t getNuberOfRaw() override;
|
||||
ivec2 getMatrixSize() const override;
|
||||
fluorine::Variant getData(int32_t _role, const ivec2& _pos) override;
|
||||
bool onItemEvent(int32_t _IdInput, enum gale::key::status _typeEvent, const ivec2& _pos, const vec2& _mousePosition) override;
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user