[DEV] work on DOC and remove deprecated widget::Drawable

This commit is contained in:
Edouard DUPIN 2013-11-09 10:14:07 +01:00
parent 2235522951
commit fa21a34b0a
40 changed files with 206 additions and 216 deletions

View File

@ -7,7 +7,7 @@ DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "EWOL" PROJECT_NAME = "EWOL"
PROJECT_NUMBER = PROJECT_NUMBER =
OUTPUT_DIRECTORY = "doxygen/" OUTPUT_DIRECTORY = "doxygen/"
CREATE_SUBDIRS = YES CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES REPEAT_BRIEF = YES
@ -88,11 +88,13 @@ INPUT = sources \
external/ejson \ external/ejson \
external/esvg \ external/esvg \
external/etk \ external/etk \
external/exml external/exml \
doc/
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \ FILE_PATTERNS = *.c \
*.cpp \ *.cpp \
*.h *.h \
*.md
RECURSIVE = YES RECURSIVE = YES
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
@ -162,31 +164,14 @@ SEARCHENGINE = YES
# configuration options related to the LaTeX output # configuration options related to the LaTeX output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_LATEX = NO GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the RTF output # configuration options related to the RTF output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_RTF = NO GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the man page output # configuration options related to the man page output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_MAN = NO GENERATE_MAN = YES
MAN_OUTPUT = man MAN_OUTPUT = man
MAN_EXTENSION = .3 MAN_EXTENSION = .3
MAN_LINKS = NO MAN_LINKS = NO
@ -197,7 +182,7 @@ GENERATE_XML = NO
XML_OUTPUT = xml XML_OUTPUT = xml
XML_SCHEMA = XML_SCHEMA =
XML_DTD = XML_DTD =
XML_PROGRAMLISTING = YES XML_PROGRAMLISTING = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output # configuration options for the AutoGen Definitions output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -206,9 +191,6 @@ GENERATE_AUTOGEN_DEF = NO
# configuration options related to the Perl module output # configuration options related to the Perl module output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_PERLMOD = NO GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -232,17 +214,17 @@ PERL_PATH = /usr/bin/perl
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES CLASS_DIAGRAMS = NO
MSCGEN_PATH = MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO HAVE_DOT = NO
DOT_FONTNAME = FreeSans DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10 DOT_FONTSIZE = 10
DOT_FONTPATH = DOT_FONTPATH =
CLASS_GRAPH = YES CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO COLLABORATION_GRAPH = NO
GROUP_GRAPHS = NO GROUP_GRAPHS = NO
UML_LOOK = NO UML_LOOK = YES
TEMPLATE_RELATIONS = NO TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO INCLUDED_BY_GRAPH = NO
@ -265,3 +247,6 @@ DOT_CLEANUP = YES
# Configuration::additions related to the search engine # Configuration::additions related to the search engine
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SEARCHENGINE = YES SEARCHENGINE = YES
MARKDOWN_SUPPORT = YES
ALIASES += license="@par License:\n"

View File

@ -1,18 +0,0 @@
/**
@mainpage Ewol Library framework
<center>
<h1>Ewol Library framework</h1>
Edouard DUPIN <sup>(C)</sup><br/>
License : BSD 3 clauses
</center>
Ewol is a basic graphic inteface for :
- Linux (X11)
- Windows
- MacOs
- Andoid
- Ios (in-progress)
*/

View File

@ -21,6 +21,7 @@
namespace widget { namespace widget {
/** /**
* @ingroup ewolWidgetGroup
* @brief a composed button is a button with an inside composed with the specify XML element == > this permit to generate standard element simple * @brief a composed button is a button with an inside composed with the specify XML element == > this permit to generate standard element simple
*/ */
class Button : public ewol::Widget { class Button : public ewol::Widget {

View File

@ -21,8 +21,10 @@
extern const char * const ewolEventButtonColorChange; extern const char * const ewolEventButtonColorChange;
namespace widget { namespace widget {
class ButtonColor : public ewol::Widget /**
{ * @ingroup ewolWidgetGroup
*/
class ButtonColor : public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
private: private:
@ -65,7 +67,9 @@ namespace widget {
virtual void onDraw(void); virtual void onDraw(void);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual const char * const getObjectType(void) { return "widget::ButtonColor"; }; virtual const char * const getObjectType(void) {
return "widget::ButtonColor";
};
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);
virtual void onReceiveMessage(const ewol::EMessage& _msg); virtual void onReceiveMessage(const ewol::EMessage& _msg);

View File

@ -19,8 +19,10 @@
extern const char* const ewolEventCheckBoxClicked; extern const char* const ewolEventCheckBoxClicked;
namespace widget { namespace widget {
class CheckBox : public ewol::Widget /**
{ * @ingroup ewolWidgetGroup
*/
class CheckBox : public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
public: public:
@ -39,7 +41,9 @@ namespace widget {
protected: // Derived function protected: // Derived function
virtual void onDraw(void); virtual void onDraw(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "Ewol::CheckBox"; }; virtual const char * const getObjectType(void) {
return "widget::CheckBox";
};
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -18,8 +18,10 @@
extern const char * const ewolEventColorBarChange; extern const char * const ewolEventColorBarChange;
namespace widget { namespace widget {
class ColorBar :public ewol::Widget /**
{ * @ingroup ewolWidgetGroup
*/
class ColorBar :public ewol::Widget {
public: public:
ColorBar(void); ColorBar(void);
virtual ~ColorBar(void); virtual ~ColorBar(void);

View File

@ -16,6 +16,7 @@
namespace widget namespace widget
{ {
/** /**
* @ingroup ewolWidgetGroup
* @brief the composer widget is a widget that create a link on a string.file to parse the data and generate some widget tree * @brief the composer widget is a widget that create a link on a string.file to parse the data and generate some widget tree
*/ */
class Composer : public widget::Container class Composer : public widget::Container
@ -83,7 +84,7 @@ namespace widget
const etk::UString& _overloadData=""); const etk::UString& _overloadData="");
public: // herited functions: public: // herited functions:
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::widget::Composer"; return "widget::Composer";
}; };
}; };
}; };

View File

@ -15,6 +15,7 @@
namespace widget { namespace widget {
/** /**
* @ingroup ewolWidgetGroup
* @brief the Cotainer widget is a widget that have an only one subWidget * @brief the Cotainer widget is a widget that have an only one subWidget
*/ */
class Container : public ewol::Widget { class Container : public ewol::Widget {
@ -58,7 +59,7 @@ namespace widget {
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos); virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName); virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::widget::Container"; return "widget::Container";
}; };
virtual bool loadXML(exml::Element* _node); virtual bool loadXML(exml::Element* _node);
virtual void setOffset(const vec2& _newVal); virtual void setOffset(const vec2& _newVal);

View File

@ -15,6 +15,7 @@
namespace widget { namespace widget {
/** /**
* @ingroup ewolWidgetGroup
* @brief the Cotainer widget is a widget that have an only one subWidget * @brief the Cotainer widget is a widget that have an only one subWidget
*/ */
class ContainerN : public ewol::Widget { class ContainerN : public ewol::Widget {
@ -89,7 +90,7 @@ namespace widget {
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos); virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName); virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::ContainerN"; return "widget::ContainerN";
}; };
virtual bool loadXML(exml::Element* _node); virtual bool loadXML(exml::Element* _node);
virtual void setOffset(const vec2& _newVal); virtual void setOffset(const vec2& _newVal);

View File

@ -25,6 +25,9 @@ namespace widget {
CONTEXT_MENU_MARK_LEFT, CONTEXT_MENU_MARK_LEFT,
CONTEXT_MENU_MARK_NONE CONTEXT_MENU_MARK_NONE
}markPosition_te; }markPosition_te;
/**
* @ingroup ewolWidgetGroup
*/
class ContextMenu : public widget::Container { class ContextMenu : public widget::Container {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -65,7 +68,7 @@ namespace widget {
virtual void calculateSize(const vec2& availlable); virtual void calculateSize(const vec2& availlable);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::ContextMenu"; return "widget::ContextMenu";
}; };
virtual ewol::Widget* getWidgetAtPos(const vec2& pos); virtual ewol::Widget* getWidgetAtPos(const vec2& pos);
}; };

View File

@ -1,51 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license BSD v3 (see license file)
*/
#include <ewol/widget/Drawable.h>
widget::Drawable::Drawable(void) {
// nothing to do ...
}
widget::Drawable::~Drawable(void) {
clearOObjectList();
}
void widget::Drawable::addOObject(ewol::Compositing* newObject, int32_t pos) {
if (NULL == newObject) {
EWOL_ERROR("Try to add an empty object in the Widget generic display system");
return;
}
if (pos < 0 || pos >= m_listOObject.size() ) {
m_listOObject.pushBack(newObject);
} else {
m_listOObject.insert(pos, newObject);
}
}
void widget::Drawable::clearOObjectList(void) {
for (int32_t iii=0; iii<m_listOObject.size(); iii++) {
delete(m_listOObject[iii]);
m_listOObject[iii] = NULL;
}
m_listOObject.clear();
}
void widget::Drawable::onDraw(void) {
for (int32_t iii=0; iii<m_listOObject.size(); iii++) {
if (NULL != m_listOObject[iii]) {
m_listOObject[iii]->draw();
}
}
}

View File

@ -1,36 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license BSD v3 (see license file)
*/
#ifndef __EWOL_WIDGET_DRAWABLE_H__
#define __EWOL_WIDGET_DRAWABLE_H__
#include <ewol/widget/Widget.h>
#include <ewol/compositing/Compositing.h>
namespace widget {
class Drawable : public ewol::Widget {
public:
Drawable(void);
virtual ~Drawable(void);
// Derived function
virtual const char * const getObjectType(void) { return "widget::drawable"; };
private:
etk::Vector<ewol::Compositing*> m_listOObject; //!< generic element to display...
public:
void addOObject(ewol::Compositing* newObject, int32_t pos=-1);
void clearOObjectList(void);
protected: // Derived function
virtual void onDraw(void);
};
};
#endif

View File

@ -21,13 +21,14 @@
namespace widget { namespace widget {
/** /**
* @ingroup ewolWidgetGroup
* @brief Entry box display : * @brief Entry box display :
* *
* @code * ~~~~~~~~~~~~~~~~~~~~~~
* ---------------------------------------------- * ----------------------------------------------
* | Editable Text | * | Editable Text |
* ---------------------------------------------- * ----------------------------------------------
* @endcode * ~~~~~~~~~~~~~~~~~~~~~~
*/ */
class Entry : public ewol::Widget { class Entry : public ewol::Widget {
public: public:
@ -200,7 +201,7 @@ namespace widget {
virtual void onReceiveMessage(const ewol::EMessage& _msg); virtual void onReceiveMessage(const ewol::EMessage& _msg);
virtual void onEventClipboard(ewol::clipBoard::clipboardListe_te _clipboardID); virtual void onEventClipboard(ewol::clipBoard::clipboardListe_te _clipboardID);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "EwolEntry"; return "widget::Entry";
}; };
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
protected: // Derived function protected: // Derived function

View File

@ -16,6 +16,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Gird :public ewol::Widget { class Gird :public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -135,7 +138,7 @@ namespace widget {
virtual ewol::Widget* getWidgetAtPos(const vec2& pos); virtual ewol::Widget* getWidgetAtPos(const vec2& pos);
virtual void onObjectRemove(ewol::EObject* _removeObject); virtual void onObjectRemove(ewol::EObject* _removeObject);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::gird"; return "widget::Gird";
}; };
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);

View File

@ -19,6 +19,9 @@
extern const char * const ewolEventImagePressed; extern const char * const ewolEventImagePressed;
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Image :public ewol::Widget { class Image :public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
@ -117,7 +120,7 @@ namespace widget {
virtual bool onGetConfig(const char* _config, etk::UString& _result) const; virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::Image"; return "widget::Image";
}; };
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);

View File

@ -64,7 +64,7 @@ void widget::Joystick::calculateSize(const vec2& availlable) {
void widget::Joystick::onRegenerateDisplay(void) { void widget::Joystick::onRegenerateDisplay(void) {
if (true == needRedraw()) { if (true == needRedraw()) {
// clean the object list ... // clean the object list ...
clearOObjectList();
/* /*
ewol::OObject2DColored * tmpOObjects = NULL; ewol::OObject2DColored * tmpOObjects = NULL;
ewol::OObject2DTextured * tmpOOtexBg = NULL; ewol::OObject2DTextured * tmpOOtexBg = NULL;

View File

@ -11,7 +11,7 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Drawable.h> #include <ewol/widget/Widget.h>
#include <draw/Color.h> #include <draw/Color.h>
extern const char * const ewolEventJoystickEnable; extern const char * const ewolEventJoystickEnable;
@ -23,7 +23,10 @@ namespace widget {
JOYSTICK_NORMAL_MODE, JOYSTICK_NORMAL_MODE,
JOYSTICK_ARROW_MODE, JOYSTICK_ARROW_MODE,
} joystickMode_te; } joystickMode_te;
class Joystick :public widget::Drawable { /**
* @ingroup ewolWidgetGroup
*/
class Joystick :public ewol::Widget {
private: private:
draw::Color m_colorFg; //!< Forground color draw::Color m_colorFg; //!< Forground color
draw::Color m_colorBg; //!< Background color draw::Color m_colorBg; //!< Background color
@ -42,7 +45,9 @@ namespace widget {
Joystick(void); Joystick(void);
virtual ~Joystick(void); virtual ~Joystick(void);
// Derived function // Derived function
virtual const char * const getObjectType(void) { return "Ewol::Joystick"; }; virtual const char * const getObjectType(void) {
return "widget::Joystick";
};
virtual void calculateSize(const vec2& availlable); virtual void calculateSize(const vec2& availlable);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -16,6 +16,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Label : public ewol::Widget { class Label : public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
@ -59,7 +62,7 @@ namespace widget {
virtual void onDraw(void); virtual void onDraw(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::Label"; return "widget::Label";
}; };
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);

View File

@ -15,6 +15,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Layer : public widget::ContainerN { class Layer : public widget::ContainerN {
public: public:
/** /**
@ -32,7 +35,7 @@ namespace widget {
virtual ~Layer(void); virtual ~Layer(void);
public: public:
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::Layer"; return "widget::Layer";
}; };
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos); virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
}; };

View File

@ -16,11 +16,16 @@
#include <ewol/compositing/Compositing.h> #include <ewol/compositing/Compositing.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class List : public widget::WidgetScrooled { class List : public widget::WidgetScrooled {
public: public:
List(void); List(void);
// Derived function // Derived function
virtual const char * const getObjectType(void) { return "ewol::List"; }; virtual const char * const getObjectType(void) {
return "widget::List";
};
virtual ~List(void); virtual ~List(void);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
void setLabel(etk::UString _newLabel); void setLabel(etk::UString _newLabel);

View File

@ -18,6 +18,9 @@ extern const char * const ewolEventFSFolderSelect;
extern const char * const ewolEventFSFolderValidate; extern const char * const ewolEventFSFolderValidate;
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class ListFileSystem : public widget::List { class ListFileSystem : public widget::List {
private: private:
etk::Vector<etk::FSNode *> m_list; etk::Vector<etk::FSNode *> m_list;
@ -37,7 +40,9 @@ namespace widget {
uint32_t getNuberOfRaw(void); uint32_t getNuberOfRaw(void);
bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg); bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
bool onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y); bool onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
const char * const getObjectType(void) { return "EwolListFileSystem"; }; const char * const getObjectType(void) {
return "widget::ListFileSystem";
};
public: public:
// extern API : // extern API :
void setFolder(etk::UString _newFolder); void setFolder(etk::UString _newFolder);

View File

@ -28,13 +28,16 @@ namespace widget {
const char *m_generateEvent; const char *m_generateEvent;
etk::UString m_message; etk::UString m_message;
}; };
/**
* @ingroup ewolWidgetGroup
*/
class Menu :public widget::Sizer { class Menu :public widget::Sizer {
public: public:
Menu(void); Menu(void);
virtual ~Menu(void); virtual ~Menu(void);
// Derived functionv // Derived functionv
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::menu"; return "widget::Menu";
}; };
private: private:
virtual void subWidgetRemoveAll(void); virtual void subWidgetRemoveAll(void);

View File

@ -17,6 +17,9 @@ extern const char * const ewolEventMeshPressed;
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Mesh :public ewol::Widget { class Mesh :public ewol::Widget {
private: private:
// mesh name : // mesh name :
@ -31,7 +34,9 @@ namespace widget {
Mesh(const etk::UString& filename); // automatic considering in the appl Data older Mesh(const etk::UString& filename); // automatic considering in the appl Data older
virtual ~Mesh(void); virtual ~Mesh(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "widget::Mesh"; }; virtual const char * const getObjectType(void) {
return "widget::Mesh";
};
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual void systemDraw(const ewol::DrawProperty& displayProp); virtual void systemDraw(const ewol::DrawProperty& displayProp);
virtual void onDraw(void); virtual void onDraw(void);

View File

@ -18,6 +18,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class PopUp : public widget::Container { class PopUp : public widget::Container {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -87,7 +90,9 @@ namespace widget {
* @brief get the current animation mode. * @brief get the current animation mode.
* @return The animation mode. * @return The animation mode.
*/ */
animation_te getAnimationMode(void) { return m_animation;}; animation_te getAnimationMode(void) const {
return m_animation;
};
protected: // Derived function protected: // Derived function
virtual void onDraw(void); virtual void onDraw(void);

View File

@ -17,6 +17,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class ProgressBar : public ewol::Widget { class ProgressBar : public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -49,7 +52,7 @@ namespace widget {
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::progressBar"; return "widget::ProgressBar";
}; };
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
}; };

View File

@ -26,6 +26,9 @@ namespace widget {
SCROLL_GREP_END_EVENT, SCROLL_GREP_END_EVENT,
}highSpeedMode_te; }highSpeedMode_te;
/**
* @ingroup ewolWidgetGroup
*/
class Scroll : public widget::Container { class Scroll : public widget::Container {
public: public:
// Cinfig parameter list: // Cinfig parameter list:
@ -58,7 +61,7 @@ namespace widget {
const vec2& getLimit(void) const { return m_limit; }; const vec2& getLimit(void) const { return m_limit; };
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "ewol::widget::Scroll"; }; virtual const char * const getObjectType(void) { return "widget::Scroll"; };
void calculateMinMaxSize(void); void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -15,6 +15,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Sizer : public widget::ContainerN { class Sizer : public widget::ContainerN {
public: public:
/** /**
@ -108,7 +111,7 @@ namespace widget {
}; };
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::widget::Sizer"; return "widget::Sizer";
}; };
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);

View File

@ -8,10 +8,9 @@
#include <ewol/widget/Slider.h> #include <ewol/widget/Slider.h>
#include <ewol/compositing/Drawing.h>
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
extern const char * const ewolEventSliderChange = "ewol-event-slider-change"; extern const char * const ewolEventSliderChange = "ewol-event-slider-change";
#undef __class__ #undef __class__
#define __class__ "Slider" #define __class__ "Slider"
@ -74,29 +73,30 @@ void widget::Slider::setMax(int32_t _val) {
markToRedraw(); markToRedraw();
} }
void widget::Slider::onDraw(void) {
m_draw.draw();
}
void widget::Slider::onRegenerateDisplay(void) { void widget::Slider::onRegenerateDisplay(void) {
if (true == needRedraw()) { if (needRedraw() == false) {
// clean the object list ... return;
clearOObjectList();
ewol::Drawing * tmpDraw = new ewol::Drawing;
tmpDraw->setColor(m_textColorFg);
// draw a line :
tmpDraw->setThickness(1);
tmpDraw->setPos(vec3(dotRadius, m_size.y()/2, 0) );
tmpDraw->lineTo(vec3(m_size.x()-dotRadius, m_size.y()/2, 0) );
tmpDraw->setThickness(0);
etk::Color<> borderDot = m_textColorFg;
borderDot.setA(borderDot.a()/2);
tmpDraw->setPos(vec3(4+((float)(m_value-m_min)/(float)(m_max-m_min))*(float)(m_size.x()-2*dotRadius), m_size.y()/2, 0) );
tmpDraw->setColorBg(borderDot);
tmpDraw->circle(dotRadius);
tmpDraw->setColorBg(m_textColorFg);
tmpDraw->circle(dotRadius/1.6);
addOObject(tmpDraw);
} }
// clean the object list ...
m_draw.clear();
m_draw.setColor(m_textColorFg);
// draw a line :
m_draw.setThickness(1);
m_draw.setPos(vec3(dotRadius, m_size.y()/2, 0) );
m_draw.lineTo(vec3(m_size.x()-dotRadius, m_size.y()/2, 0) );
m_draw.setThickness(0);
etk::Color<> borderDot = m_textColorFg;
borderDot.setA(borderDot.a()/2);
m_draw.setPos(vec3(4+((float)(m_value-m_min)/(float)(m_max-m_min))*(float)(m_size.x()-2*dotRadius), m_size.y()/2, 0) );
m_draw.setColorBg(borderDot);
m_draw.circle(dotRadius);
m_draw.setColorBg(m_textColorFg);
m_draw.circle(dotRadius/1.6);
} }
bool widget::Slider::onEventInput(const ewol::EventInput& _event) { bool widget::Slider::onEventInput(const ewol::EventInput& _event) {

View File

@ -12,13 +12,16 @@
#include <etk/types.h> #include <etk/types.h>
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Drawable.h> #include <ewol/widget/Widget.h>
#include <ewol/widget/WidgetManager.h> #include <ewol/compositing/Drawing.h>
extern const char * const ewolEventSliderChange; extern const char * const ewolEventSliderChange;
namespace widget { namespace widget {
class Slider :public widget::Drawable { /**
* @ingroup ewolWidgetGroup
*/
class Slider :public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
public: public:
@ -28,16 +31,21 @@ namespace widget {
int32_t getValue(void); int32_t getValue(void);
void setMin(int32_t _val); void setMin(int32_t _val);
void setMax(int32_t _val); void setMax(int32_t _val);
void setColor(etk::Color<> _newColor) { m_textColorFg = _newColor; }; void setColor(etk::Color<> _newColor) {
private: m_textColorFg = _newColor;
};
protected:
ewol::Drawing m_draw; //!< drawing tool.
int32_t m_value; int32_t m_value;
int32_t m_min; int32_t m_min;
int32_t m_max; int32_t m_max;
etk::Color<> m_textColorFg; //!< Text color etk::Color<> m_textColorFg; //!< Text color
etk::Color<> m_textColorBg; //!< Background color etk::Color<> m_textColorBg; //!< Background color
public: public: // Derived function
// Derived function virtual const char * const getObjectType(void) {
virtual const char * const getObjectType(void) { return "Ewol::Slider"; } ; return "widget::Slider";
}
virtual void onDraw(void);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -17,6 +17,9 @@
#include <ewol/widget/WidgetManager.h> #include <ewol/widget/WidgetManager.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Spacer :public ewol::Widget { class Spacer :public ewol::Widget {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -43,7 +46,9 @@ namespace widget {
void setColor(etk::Color<> _newColor) { m_color = _newColor; markToRedraw(); }; void setColor(etk::Color<> _newColor) { m_color = _newColor; markToRedraw(); };
public: public:
// Derived function // Derived function
virtual const char * const getObjectType(void) { return "ewol::spacer"; }; virtual const char * const getObjectType(void) {
return "widget::Spacer";
};
virtual ewol::Widget * getWidgetAtPos(const vec2& _pos) { return NULL; }; virtual ewol::Widget * getWidgetAtPos(const vec2& _pos) { return NULL; };
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual void onDraw(void); virtual void onDraw(void);

View File

@ -16,6 +16,9 @@
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class WSlider :public widget::ContainerN { class WSlider :public widget::ContainerN {
public: public:
static void init(ewol::WidgetManager& _widgetManager); static void init(ewol::WidgetManager& _widgetManager);
@ -87,7 +90,7 @@ namespace widget {
}; };
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::WSlider"; return "widget::WSlider";
}; };
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);

View File

@ -96,6 +96,9 @@ namespace ewol {
}; };
~EventShortCut(void) { }; ~EventShortCut(void) { };
}; };
/**
* @ingroup ewolWidgetGroup
*/
class Widget : public EObject { class Widget : public EObject {
public: public:
// Config list of properties // Config list of properties
@ -122,7 +125,7 @@ namespace ewol {
* @return true if the object is compatible, otherwise false * @return true if the object is compatible, otherwise false
*/ */
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "Ewol::Widget"; return "ewol::Widget";
}; };
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
// -- Hierarchy management: // -- Hierarchy management:

View File

@ -21,6 +21,9 @@ namespace widget {
SCROLL_MODE_CENTER, //!< Zoom enable, no move left and right SCROLL_MODE_CENTER, //!< Zoom enable, no move left and right
SCROLL_MODE_GAME, //!< Zoom enable, no move left and right SCROLL_MODE_GAME, //!< Zoom enable, no move left and right
} scrollingMode_te; } scrollingMode_te;
/**
* @ingroup ewolWidgetGroup
*/
class WidgetScrooled : public ewol::Widget { class WidgetScrooled : public ewol::Widget {
private: private:
etk::Vector<ewol::Compositing*> m_listOObject; //!< generic element to display... etk::Vector<ewol::Compositing*> m_listOObject; //!< generic element to display...
@ -43,7 +46,9 @@ namespace widget {
protected: // Derived function protected: // Derived function
virtual void onDraw(void); virtual void onDraw(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "EwolWidgetScrooled"; }; virtual const char * const getObjectType(void) {
return "widget::Scrooled";
};
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);

View File

@ -15,6 +15,9 @@
#include <etk/Color.h> #include <etk/Color.h>
namespace ewol { namespace ewol {
/**
* @ingroup ewolWidgetGroup
*/
class Windows :public ewol::Widget { class Windows :public ewol::Widget {
public: public:
Windows(void); Windows(void);

View File

@ -22,13 +22,17 @@
extern const char * const ewolEventColorChooserChange; extern const char * const ewolEventColorChooserChange;
namespace widget { namespace widget {
class ColorChooser : public widget::Sizer /**
{ * @ingroup ewolWidgetGroup
*/
class ColorChooser : public widget::Sizer {
public: public:
ColorChooser(void); ColorChooser(void);
~ColorChooser(void); ~ColorChooser(void);
// Derived function // Derived function
virtual const char * const getObjectType(void) { return "widget::ColorChooser"; }; virtual const char * const getObjectType(void) {
return "widget::ColorChooser";
};
// Derived function // Derived function
virtual void onReceiveMessage(const ewol::EMessage& _msg); virtual void onReceiveMessage(const ewol::EMessage& _msg);
// Derived function // Derived function

View File

@ -19,6 +19,9 @@
#include <ewol/widget/ListFileSystem.h> #include <ewol/widget/ListFileSystem.h>
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class FileChooser : public widget::PopUp { class FileChooser : public widget::PopUp {
public: public:
// Event list of properties // Event list of properties

View File

@ -23,12 +23,17 @@
extern const char * const ewolEventParameterClose; extern const char * const ewolEventParameterClose;
namespace widget { namespace widget {
/**
* @ingroup ewolWidgetGroup
*/
class Parameter : public widget::PopUp { class Parameter : public widget::PopUp {
public: public:
Parameter(void); Parameter(void);
~Parameter(void); ~Parameter(void);
// Derived function // Derived function
virtual const char * const getObjectType(void) { return "EwolParameter"; }; virtual const char * const getObjectType(void) {
return "EwolParameter";
};
// Derived function // Derived function
virtual void onReceiveMessage(const ewol::EMessage& _msg); virtual void onReceiveMessage(const ewol::EMessage& _msg);
// Derived function // Derived function

View File

@ -12,7 +12,6 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/WidgetScrolled.h> #include <ewol/widget/WidgetScrolled.h>
#include <ewol/widget/Drawable.h>
extern const char * const ewolEventParameterListSelect; extern const char * const ewolEventParameterListSelect;
@ -34,6 +33,9 @@ namespace widget {
~elementPL(void) {}; ~elementPL(void) {};
}; };
/**
* @ingroup ewolWidgetGroup
*/
class ParameterList :public widget::WidgetScrooled { class ParameterList :public widget::WidgetScrooled {
private: private:
int32_t m_idSelected; int32_t m_idSelected;
@ -61,7 +63,9 @@ namespace widget {
void menuSeparator(void); void menuSeparator(void);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { return "EwolParameterList"; }; virtual const char * const getObjectType(void) {
return "widgetParameterList";
};
virtual void onRegenerateDisplay(void); virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event); virtual bool onEventInput(const ewol::EventInput& _event);
virtual void calculateMinMaxSize(void); virtual void calculateMinMaxSize(void);

View File

@ -13,14 +13,12 @@
#include <ewol/widget/Label.h> #include <ewol/widget/Label.h>
#include <ewol/widget/Button.h> #include <ewol/widget/Button.h>
#include <ewol/widget/Sizer.h> #include <ewol/widget/Sizer.h>
namespace widget { namespace widget {
/** /**
* @ingroup ewolWidgetGroup
* @brief The std pop up widget is a siple message widget to notyfy user of some simple things, like: * @brief The std pop up widget is a siple message widget to notyfy user of some simple things, like:
*/ *
/** * ~~~~~~~~~~~~~~~~~~~~~
* @page DSP_Perfo Performances :
* <pre>
* +---------------------------------+---+---+---+ * +---------------------------------+---+---+---+
* | Windows name... | _ | O | X | * | Windows name... | _ | O | X |
* +---------------------------------+---+---+---+ * +---------------------------------+---+---+---+
@ -39,7 +37,7 @@ namespace widget {
* | | * | |
* | | * | |
* +---------------------------------------------+ * +---------------------------------------------+
* </pre> * ~~~~~~~~~~~~~~~~~~~~~
*/ */
class StdPopUp : public widget::PopUp { class StdPopUp : public widget::PopUp {
public: public:
@ -77,11 +75,14 @@ namespace widget {
widget::Button* addButton(const etk::UString& _text, bool _autoExit=false); widget::Button* addButton(const etk::UString& _text, bool _autoExit=false);
public: // Derived function public: // Derived function
virtual const char * const getObjectType(void) { virtual const char * const getObjectType(void) {
return "ewol::StdPopUp"; return "widget::StdPopUp";
}; };
virtual void onObjectRemove(ewol::EObject* _removeObject); virtual void onObjectRemove(ewol::EObject* _removeObject);
virtual void onReceiveMessage(const ewol::EMessage& _msg); virtual void onReceiveMessage(const ewol::EMessage& _msg);
}; };
/**
* @}
*/
}; };
#endif #endif

View File

@ -93,7 +93,6 @@ def Create(target):
'ewol/widget/Composer.cpp', 'ewol/widget/Composer.cpp',
'ewol/widget/Container.cpp', 'ewol/widget/Container.cpp',
'ewol/widget/ContainerN.cpp', 'ewol/widget/ContainerN.cpp',
'ewol/widget/Drawable.cpp',
'ewol/widget/Entry.cpp', 'ewol/widget/Entry.cpp',
'ewol/widget/Joystick.cpp', 'ewol/widget/Joystick.cpp',
'ewol/widget/Label.cpp', 'ewol/widget/Label.cpp',