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 <CodeView.h>
|
|
|
|
#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;
|
|
|
|
dataBufferStruct(etk::FSNode& bufferName, int32_t bufferID, bool isModify) :
|
2012-10-18 11:09:19 +02:00
|
|
|
m_bufferName(bufferName),
|
|
|
|
m_bufferID(bufferID),
|
|
|
|
m_isModify(isModify)
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
~dataBufferStruct(void) { };
|
|
|
|
};
|
2013-05-21 09:11:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class BufferView : public widget::List
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
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"; };
|
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);
|
|
|
|
virtual bool getTitle(int32_t colomn, etk::UString &myTitle, etk::Color<> &fg, etk::Color<> &bg);
|
|
|
|
virtual uint32_t getNuberOfRaw(void);
|
|
|
|
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
|
|
|
|
|
|
|
|
|