edn/sources/appl/Gui/BufferView.h

66 lines
1.7 KiB
C
Raw Normal View History

/**
* @author Edouard DUPIN
2012-11-25 11:55:06 +01:00
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
2012-11-25 11:55:06 +01:00
#ifndef __BUFFER_VIEW_H__
#define __BUFFER_VIEW_H__
2012-04-23 10:15:43 +02:00
#include <appl/Debug.h>
#include <BufferManager.h>
2012-04-24 09:42:14 +02:00
#include <appl/globalMsg.h>
#include <ewol/widget/List.h>
2013-09-02 06:45:12 +02:00
#include <ewol/widget/Windows.h>
2011-07-22 18:31:43 +02:00
2012-10-18 11:09:19 +02:00
namespace appl
{
class dataBufferStruct
{
public:
2012-11-01 10:47:36 +01:00
etk::FSNode m_bufferName;
uint32_t m_bufferID;
bool m_isModify;
2013-10-09 22:00:24 +02:00
dataBufferStruct(etk::FSNode& _bufferName, int32_t _bufferID, bool _isModify) :
m_bufferName(_bufferName),
m_bufferID(_bufferID),
m_isModify(_isModify) {
2012-10-18 11:09:19 +02:00
};
~dataBufferStruct(void) { };
};
};
class BufferView : public widget::List
{
private:
2013-10-09 22:00:24 +02:00
int32_t m_selectedIdRequested;
int32_t m_selectedID;
etk::Vector<appl::dataBufferStruct*> m_list;
public:
// Constructeur
BufferView(void);
~BufferView(void);
// Derived function
2013-10-07 22:04:21 +02:00
const char * const getObjectType(void) { return "ApplBufferView"; };
// Derived function
2013-10-07 22:04:21 +02:00
virtual void onReceiveMessage(const ewol::EMessage& _msg);
protected:
// function call to display the list :
2013-10-07 22:04:21 +02:00
virtual etk::Color<> getBasicBG(void);
void removeAllElement(void);
// Derived function
2013-10-07 22:04:21 +02:00
virtual uint32_t getNuberOfColomn(void);
2013-10-09 22:00:24 +02:00
virtual bool getTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
2013-10-07 22:04:21 +02:00
virtual uint32_t getNuberOfRaw(void);
2013-10-09 22:00:24 +02:00
virtual bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
virtual bool onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
};
#endif