2011-07-20 10:33:24 +02:00
|
|
|
/**
|
|
|
|
* @author Edouard DUPIN
|
2012-11-25 11:55:06 +01:00
|
|
|
*
|
|
|
|
* @copyright 2010, Edouard DUPIN, all right reserved
|
|
|
|
*
|
|
|
|
* @license GPL v3 (see license file)
|
2011-07-20 10:33:24 +02:00
|
|
|
*/
|
2012-11-25 11:55:06 +01:00
|
|
|
|
2011-07-20 10:33:24 +02:00
|
|
|
#ifndef __BUFFER_VIEW_H__
|
|
|
|
#define __BUFFER_VIEW_H__
|
|
|
|
|
2012-04-23 10:15:43 +02:00
|
|
|
#include <appl/Debug.h>
|
2012-01-11 15:26:53 +01:00
|
|
|
#include <BufferManager.h>
|
2012-04-24 09:42:14 +02:00
|
|
|
#include <appl/globalMsg.h>
|
2012-02-03 18:14:45 +01:00
|
|
|
#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) { };
|
|
|
|
};
|
2013-05-21 09:11:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2013-05-21 09:11:14 +02:00
|
|
|
public:
|
|
|
|
// Constructeur
|
|
|
|
BufferView(void);
|
|
|
|
~BufferView(void);
|
|
|
|
// Derived function
|
2013-10-07 22:04:21 +02:00
|
|
|
const char * const getObjectType(void) { return "ApplBufferView"; };
|
2013-05-21 09:11:14 +02:00
|
|
|
// Derived function
|
2013-10-07 22:04:21 +02:00
|
|
|
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
2013-05-21 09:11:14 +02:00
|
|
|
protected:
|
|
|
|
// function call to display the list :
|
2013-10-07 22:04:21 +02:00
|
|
|
virtual etk::Color<> getBasicBG(void);
|
|
|
|
void removeAllElement(void);
|
2013-05-21 09:11:14 +02:00
|
|
|
// 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);
|
2011-07-20 10:33:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|