[DEV] update at the new color class
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
|
||||
Colorize::Colorize(const etk::UString &_newColorName) :
|
||||
m_colorName(_newColorName),
|
||||
m_colorFG(draw::color::black),
|
||||
m_colorBG(draw::color::none),
|
||||
m_colorFG(etk::color::black),
|
||||
m_colorBG(etk::color::none),
|
||||
m_italic(false),
|
||||
m_bold(false)
|
||||
{
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
#ifndef __COLORIZE_H__
|
||||
#define __COLORIZE_H__
|
||||
#include <draw/Color.h>
|
||||
#include <etk/Color.h>
|
||||
#include <etk/UString.h>
|
||||
|
||||
class Colorize {
|
||||
@@ -24,17 +24,17 @@ class Colorize {
|
||||
const etk::UString& GetName(void) { return m_colorName; };
|
||||
|
||||
private:
|
||||
draw::Color m_colorFG;
|
||||
etk::Color<> m_colorFG;
|
||||
public:
|
||||
void SetFgColor(const etk::UString& _myColor) { m_colorFG=_myColor.c_str(); };
|
||||
const draw::Color& GetFG(void) { return m_colorFG; };
|
||||
bool HaveFg(void) { return m_colorFG.a!=0; };
|
||||
void SetFgColor(const etk::UString& _myColor) { m_colorFG=_myColor; };
|
||||
const etk::Color<>& GetFG(void) { return m_colorFG; };
|
||||
bool HaveFg(void) { return m_colorFG.a()!=0; };
|
||||
private:
|
||||
draw::Color m_colorBG;
|
||||
etk::Color<> m_colorBG;
|
||||
public:
|
||||
void SetBgColor(const etk::UString& _myColor) { m_colorBG=_myColor.c_str(); };
|
||||
const draw::Color& GetBG(void) { return m_colorBG; };
|
||||
bool HaveBg(void) { return m_colorBG.a!=0; };
|
||||
void SetBgColor(const etk::UString& _myColor) { m_colorBG=_myColor; };
|
||||
const etk::Color<>& GetBG(void) { return m_colorBG; };
|
||||
bool HaveBg(void) { return m_colorBG.a()!=0; };
|
||||
private:
|
||||
bool m_italic;
|
||||
public:
|
||||
|
@@ -22,7 +22,7 @@ class classColorManager: public ewol::EObject
|
||||
etk::UString m_fileColor;
|
||||
etk::Vector<Colorize*> listMyColor; //!< List of ALL Color
|
||||
Colorize * errorColor;
|
||||
draw::Color basicColors[COLOR_NUMBER_MAX];
|
||||
etk::Color<> basicColors[COLOR_NUMBER_MAX];
|
||||
|
||||
public:
|
||||
// Constructeur
|
||||
@@ -80,7 +80,7 @@ class classColorManager: public ewol::EObject
|
||||
// an error
|
||||
return errorColor;
|
||||
}
|
||||
draw::Color& Get(basicColor_te _myColor)
|
||||
etk::Color<>& Get(basicColor_te _myColor)
|
||||
{
|
||||
if (_myColor < COLOR_NUMBER_MAX) {
|
||||
return basicColors[_myColor];
|
||||
@@ -195,7 +195,7 @@ void classColorManager::LoadFile(const etk::UString& _xmlFilename)
|
||||
}
|
||||
etk::UString color = pGuiNode->GetAttribute("val");
|
||||
if (color.Size()!=0) {
|
||||
basicColors[id] = color.c_str();
|
||||
basicColors[id] = color;
|
||||
}
|
||||
}
|
||||
} else if (pNode->GetValue()=="syntax") {
|
||||
@@ -292,10 +292,10 @@ Colorize* ColorizeManager::Get(const etk::UString& _colorName)
|
||||
return localManager->Get(_colorName);
|
||||
}
|
||||
|
||||
draw::Color errorColor;
|
||||
|
||||
draw::Color& ColorizeManager::Get(basicColor_te _myColor)
|
||||
etk::Color<>& ColorizeManager::Get(basicColor_te _myColor)
|
||||
{
|
||||
static etk::Color<> errorColor;
|
||||
if (NULL == localManager) {
|
||||
return errorColor;
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <Colorize.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <draw/Color.h>
|
||||
#include <etk/Color.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
||||
typedef enum {
|
||||
@@ -39,7 +39,7 @@ namespace ColorizeManager
|
||||
void UnInit(void);
|
||||
void LoadFile(const etk::UString& _xmlFilename);
|
||||
Colorize * Get(const etk::UString& _colorName);
|
||||
draw::Color& Get(basicColor_te _myColor);
|
||||
etk::Color<>& Get(basicColor_te _myColor);
|
||||
bool Exist(const etk::UString& _colorName);
|
||||
void DisplayListOfColor(void);
|
||||
};
|
||||
|
Reference in New Issue
Block a user