diff --git a/sources/appl/Gui/BufferView.cpp b/sources/appl/Gui/BufferView.cpp index dffcd3e..0826c73 100644 --- a/sources/appl/Gui/BufferView.cpp +++ b/sources/appl/Gui/BufferView.cpp @@ -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()); diff --git a/sources/appl/Gui/BufferView.hpp b/sources/appl/Gui/BufferView.hpp index fc269b2..3c66cc4 100644 --- a/sources/appl/Gui/BufferView.hpp +++ b/sources/appl/Gui/BufferView.hpp @@ -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& _buffer); - void calculateMinMaxSize(); + void calculateMinMaxSize() override; }; diff --git a/sources/appl/Gui/TagFileList.cpp b/sources/appl/Gui/TagFileList.cpp index 3171058..1c62294 100644 --- a/sources/appl/Gui/TagFileList.cpp +++ b/sources/appl/Gui/TagFileList.cpp @@ -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) { diff --git a/sources/appl/Gui/TagFileList.hpp b/sources/appl/Gui/TagFileList.hpp index 92241a6..6db5c3c 100644 --- a/sources/appl/Gui/TagFileList.hpp +++ b/sources/appl/Gui/TagFileList.hpp @@ -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: