[DEV] update to the rework of ewol

This commit is contained in:
2012-11-25 11:55:06 +01:00
parent 247045c204
commit 42e042943c
45 changed files with 412 additions and 1473 deletions

View File

@@ -1,26 +1,9 @@
/**
*******************************************************************************
* @file CodeView.h
* @brief Editeur De N'ours : Code Viewer Widget (header)
* @author Edouard DUPIN
* @date 05/01/2011
* @par Project
* Edn
*
* @par Copyright
* Copyright 2010 Edouard DUPIN, all right reserved
*
* This software is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY.
*
* Licence summary :
* You can modify and redistribute the sources code and binaries.
* You can send me the bug-fix
* You can not earn money with this Software (if the source extract from Edn
* represent less than 50% of original Sources)
* Term of the licence in in the file licence.txt.
*
*******************************************************************************
*
* @copyright 2010, Edouard DUPIN, all right reserved
*
* @license GPL v3 (see license file)
*/
#ifndef __CODE_VIEW_H__
@@ -31,26 +14,20 @@
#include <BufferManager.h>
#include <appl/globalMsg.h>
#include <etk/Types.h>
#include <ewol/widget/WidgetScrolled.h>
#include <ewol/ResourceManager.h>
#include <ewol/compositing/Text.h>
#include <ewol/compositing/Drawing.h>
class CodeView :public ewol::WidgetScrooled
class CodeView :public widget::WidgetScrooled
{
public:
void Init(void);
CodeView(etk::UString fontName, int32_t fontSize);
CodeView(void);
virtual ~CodeView(void);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
// Derived function
const char * const GetObjectType(void) { return "ApplCodeView"; };
// Derived function
virtual bool CalculateMinSize(void);
private:
etk::UString m_label;
@@ -64,37 +41,22 @@ class CodeView :public ewol::WidgetScrooled
ewol::Text m_displayText;
ewol::Drawing m_displayDrawing;
public:
// Derived function
virtual void OnRegenerateDisplay(void);
/**
* @brief Receive a message from an other EObject with a specific eventId and data
* @param[in] CallerObject Pointer on the EObject that information came from
* @param[in] eventId Message registered by this class
* @param[in] data Data registered by this class
* @return ---
*/
// Derived function
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
public:
/**
* @brief Event on an input of this Widget
* @param[in] type Type of the input (ewol::INPUT_TYPE_MOUSE/ewol::INPUT_TYPE_FINGER ...)
* @param[in] IdInput Id of the current Input (PC : left=1, right=2, middle=3, none=0 / Tactil : first finger=1 , second=2 (only on this widget, no knowledge at ouside finger))
* @param[in] typeEvent ewol type of event like EVENT_INPUT_TYPE_DOWN/EVENT_INPUT_TYPE_MOVE/EVENT_INPUT_TYPE_UP/EVENT_INPUT_TYPE_SINGLE/EVENT_INPUT_TYPE_DOUBLE/...
* @param[in] pos Absolute position of the event
* @return true the event is used
* @return false the event is not used
*/
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, etk::Vector2D<float> pos);
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
/**
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
* @note : need to have focus ...
* @param[in] mode Mode of data requested
* @return ---
*/
// Derived function
virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, etk::Vector2D<float> pos);
// Derived function
virtual bool OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData);
// Derived function
virtual bool OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent);
// Derived function
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
// Derived function
virtual void OnGetFocus(void);
// Derived function
virtual void OnLostFocus(void);
public:
void SetFontSize(int32_t size);