Basic theme adding ==> did not work at all
This commit is contained in:
parent
55c7b47553
commit
5308da4fc2
2
.gitignore
vendored
2
.gitignore
vendored
@ -27,7 +27,7 @@ doxygen/ALL/
|
||||
*.so
|
||||
*.pyc
|
||||
tags
|
||||
ewol
|
||||
#ewol
|
||||
out
|
||||
ewol_debug
|
||||
ewol_release
|
||||
|
16
Makefile
16
Makefile
@ -199,6 +199,20 @@ CXXFILES += ewol/widget/Button.cpp \
|
||||
ewol/widget/SizerVert.cpp
|
||||
# only to test son internal element ...
|
||||
CXXFILES += ewol/widget/Test.cpp
|
||||
# theme management :
|
||||
CXXFILES += ewol/themeManager.cpp \
|
||||
ewol/theme/Theme.cpp \
|
||||
ewol/theme/EolElement.cpp \
|
||||
ewol/theme/EolElementFrame.cpp \
|
||||
ewol/theme/EolColor.cpp \
|
||||
ewol/theme/EolBase.cpp \
|
||||
ewol/theme/EolBaseCircle.cpp \
|
||||
ewol/theme/EolBaseCirclePart.cpp \
|
||||
ewol/theme/EolBaseLine.cpp \
|
||||
ewol/theme/EolBasePolygone.cpp \
|
||||
ewol/theme/EolBaseRect.cpp \
|
||||
ewol/theme/EolBaseTriangle.cpp
|
||||
|
||||
|
||||
|
||||
# Ewol Test Software :
|
||||
@ -244,7 +258,7 @@ build: .encadrer .versionFile $(OUTPUT_NAME)
|
||||
|
||||
|
||||
.versionFile:
|
||||
@rm -f $(OBJECT_DIRECTORY)/ewol.o
|
||||
@rm -f $(OBJECT_DIRECTORY)/ewol/ewol.o
|
||||
|
||||
# build C++
|
||||
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
|
||||
|
@ -23,22 +23,23 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "ewol/ewol.h"
|
||||
#include "ewol/Font.h"
|
||||
#include "ewol/WidgetManager.h"
|
||||
#include <ewol/ewol.h>
|
||||
#include <ewol/Font.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <ewol/themeManager.h>
|
||||
|
||||
#if __PLATFORM__ == X11
|
||||
#include "base/guiX11.h"
|
||||
#include <base/guiX11.h>
|
||||
#elif __PLATFORM__ == DoubleBuffer
|
||||
#include "base/guiDoubleBuffer.h"
|
||||
#include <base/guiDoubleBuffer.h>
|
||||
#elif __PLATFORM__ == Android
|
||||
#include "base/guiAndroid.h"
|
||||
#include <base/guiAndroid.h>
|
||||
#elif __PLATFORM__ == AndroidTablet
|
||||
#include "base/guiAndroidTablet.h"
|
||||
#include <base/guiAndroidTablet.h>
|
||||
#elif __PLATFORM__ == IPhone
|
||||
#include "base/guiIPhone.h"
|
||||
#include <base/guiIPhone.h>
|
||||
#elif __PLATFORM__ == IPad
|
||||
#include "base/guiIPad.h"
|
||||
#include <base/guiIPad.h>
|
||||
#else
|
||||
#error you need to specify a platform ...
|
||||
#endif
|
||||
@ -51,6 +52,7 @@ void ewol::Init(int argc, char *argv[])
|
||||
EWOL_INFO("v" EWOL_VERSION_TAG_NAME);
|
||||
EWOL_INFO("Build Date: " VERSION_BUILD_TIME);
|
||||
guiAbstraction::Init(argc, argv);
|
||||
ewol::theme::Init();
|
||||
ewol::widgetManager::Init();
|
||||
ewol::InitFont();
|
||||
}
|
||||
@ -65,6 +67,7 @@ void ewol::UnInit(void)
|
||||
guiAbstraction::UnInit();
|
||||
ewol::UnInitFont();
|
||||
ewol::widgetManager::UnInit();
|
||||
ewol::theme::UnInit();
|
||||
}
|
||||
|
||||
|
||||
|
28
Sources/ewol/theme/EolBase.cpp
Normal file
28
Sources/ewol/theme/EolBase.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBase.cpp
|
||||
* @brief basic ewol theme eol file basic element Virtual Classes (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBase"
|
||||
|
31
Sources/ewol/theme/EolBase.h
Normal file
31
Sources/ewol/theme/EolBase.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBase.h
|
||||
* @brief basic ewol theme eol file basic element virtual Classes (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE__H__
|
||||
#define __EWOL_THEME_EOL_BASE__H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBaseCircle.cpp
Normal file
28
Sources/ewol/theme/EolBaseCircle.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasicCircle.cpp
|
||||
* @brief basic ewol theme eol file basic element type=Circle (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBaseCircle"
|
||||
|
31
Sources/ewol/theme/EolBaseCircle.h
Normal file
31
Sources/ewol/theme/EolBaseCircle.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasicCircle.h
|
||||
* @brief basic ewol theme eol file basic element type=Circle (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_CIRCLE_H__
|
||||
#define __EWOL_THEME_EOL_BASE_CIRCLE_H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBaseCirclePart.cpp
Normal file
28
Sources/ewol/theme/EolBaseCirclePart.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasicCirclePart.cpp
|
||||
* @brief basic ewol theme eol file basic element type=CirclePart (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBaseCirclePart"
|
||||
|
32
Sources/ewol/theme/EolBaseCirclePart.h
Normal file
32
Sources/ewol/theme/EolBaseCirclePart.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasicCirclePart.h
|
||||
* @brief basic ewol theme eol file basic element type=CirclePart (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_CIRCLE_PART_H__
|
||||
#define __EWOL_THEME_EOL_BASE_CIRCLE_PART_H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBaseLine.cpp
Normal file
28
Sources/ewol/theme/EolBaseLine.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseLine.cpp
|
||||
* @brief basic ewol theme eol file basic element type=Line (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBaseLine"
|
||||
|
32
Sources/ewol/theme/EolBaseLine.h
Normal file
32
Sources/ewol/theme/EolBaseLine.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseLine.h
|
||||
* @brief basic ewol theme eol file basic element type=Line (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_LINE_H__
|
||||
#define __EWOL_THEME_EOL_BASE_LINE_H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBasePolygone.cpp
Normal file
28
Sources/ewol/theme/EolBasePolygone.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasePolygone.cpp
|
||||
* @brief basic ewol theme eol file basic element type=polygone (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBasePolygone"
|
||||
|
32
Sources/ewol/theme/EolBasePolygone.h
Normal file
32
Sources/ewol/theme/EolBasePolygone.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBasePolygone.h
|
||||
* @brief basic ewol theme eol file basic element type=polygone (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_POLYGONE_H__
|
||||
#define __EWOL_THEME_EOL_BASE_POLYGONE_H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBaseRect.cpp
Normal file
28
Sources/ewol/theme/EolBaseRect.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseRect.cpp
|
||||
* @brief basic ewol theme eol file basic element type=rectangle (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBaseRect"
|
||||
|
32
Sources/ewol/theme/EolBaseRect.h
Normal file
32
Sources/ewol/theme/EolBaseRect.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseRect.h
|
||||
* @brief basic ewol theme eol file basic element type=rectangle (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_RECT_H__
|
||||
#define __EWOL_THEME_EOL_BASE_RECT_H__
|
||||
|
||||
#endif
|
||||
|
28
Sources/ewol/theme/EolBaseTriangle.cpp
Normal file
28
Sources/ewol/theme/EolBaseTriangle.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseTriangle.cpp
|
||||
* @brief basic ewol theme eol file basic element type=triangle (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolBaseTriangle"
|
||||
|
32
Sources/ewol/theme/EolBaseTriangle.h
Normal file
32
Sources/ewol/theme/EolBaseTriangle.h
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolBaseTriangle.h
|
||||
* @brief basic ewol theme eol file basic element type=triangle (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol/theme/EolBase.h>
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_BASE_TRIANGLE_H__
|
||||
#define __EWOL_THEME_EOL_BASE_TRIANGLE_H__
|
||||
|
||||
#endif
|
||||
|
29
Sources/ewol/theme/EolColor.cpp
Normal file
29
Sources/ewol/theme/EolColor.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolColor.cpp
|
||||
* @brief basic ewol theme eol file color (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolColor"
|
||||
|
||||
|
30
Sources/ewol/theme/EolColor.h
Normal file
30
Sources/ewol/theme/EolColor.h
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolColor.h
|
||||
* @brief basic ewol theme eol file color (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_COLOR_H__
|
||||
#define __EWOL_THEME_EOL_COLOR_H__
|
||||
|
||||
#endif
|
||||
|
29
Sources/ewol/theme/EolElement.cpp
Normal file
29
Sources/ewol/theme/EolElement.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolElement.cpp
|
||||
* @brief basic ewol theme eol file element (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolElement"
|
||||
|
||||
|
56
Sources/ewol/theme/EolElement.h
Normal file
56
Sources/ewol/theme/EolElement.h
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolElement.h
|
||||
* @brief basic ewol theme eol file element (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_ELEMENT_H__
|
||||
#define __EWOL_THEME_EOL_ELEMENT_H__
|
||||
|
||||
/*
|
||||
namespace ewol {
|
||||
namespace theme {
|
||||
class EolElement {
|
||||
public:
|
||||
EolElement(void) { };
|
||||
virtual ~EolElement(void) { };
|
||||
/*
|
||||
void Load(etk::File & newFile) { };
|
||||
void Generate(int32_t id, int32_t frameId, OObject2DTextured & newObject, etkFloat_t posX, etkFloat_t posY, etkFloat_t sizeX, etkFloat_t sizeY) {};
|
||||
int32_t GetNbFrame(int32_t id) {return 0;};
|
||||
int32_t GetFrameId(int32_t id, etk::String & frameName) {return 0;};
|
||||
int32_t GetObjectId(etk::String name) { return -1; };
|
||||
* /
|
||||
private:
|
||||
//etk::VectorType<ewol::theme::EolColor*> m_listColor;
|
||||
//etk::VectorType<ewol::theme::EolBase*> m_listGroup;
|
||||
//etk::VectorType<ewol::theme::EolElementFrame*> m_listElement;
|
||||
public:
|
||||
// acces to manage and create object ==> drawing system
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
#endif
|
||||
|
29
Sources/ewol/theme/EolElementFrame.cpp
Normal file
29
Sources/ewol/theme/EolElementFrame.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolElementFrame.cpp
|
||||
* @brief basic ewol theme eol file element (specific frame) (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::EolElementFrame"
|
||||
|
||||
|
31
Sources/ewol/theme/EolElementFrame.h
Normal file
31
Sources/ewol/theme/EolElementFrame.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/EolElementFrame.h
|
||||
* @brief basic ewol theme eol file element (specific frame) (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef __EWOL_THEME_EOL_ELEMENT_FRAME_H__
|
||||
#define __EWOL_THEME_EOL_ELEMENT_FRAME_H__
|
||||
|
||||
#endif
|
||||
|
27
Sources/ewol/theme/Theme.cpp
Normal file
27
Sources/ewol/theme/Theme.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/Theme.cpp
|
||||
* @brief basic ewol Theme basic class (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::Theme"
|
63
Sources/ewol/theme/Theme.h
Normal file
63
Sources/ewol/theme/Theme.h
Normal file
@ -0,0 +1,63 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/theme/Theme.h
|
||||
* @brief basic ewol Theme basic class (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef __EWOL_EOL_THEME_H__
|
||||
#define __EWOL_EOL_THEME_H__
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/String.h>
|
||||
#include <etk/File.h>
|
||||
#include <etk/VectorType.h>
|
||||
#include <ewol/OObject.h>
|
||||
#include <ewol/theme/EolColor.h>
|
||||
#include <ewol/theme/EolBase.h>
|
||||
#include <ewol/theme/EolElement.h>
|
||||
#include <ewol/theme/EolElementFrame.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace theme {
|
||||
class Theme {
|
||||
public:
|
||||
Theme(void) { };
|
||||
virtual ~Theme(void) { };
|
||||
void Load(etk::File & newFile) { };
|
||||
void Generate(int32_t id, int32_t frameId, OObject2DTextured & newObject, etkFloat_t posX, etkFloat_t posY, etkFloat_t sizeX, etkFloat_t sizeY) {};
|
||||
int32_t GetNbFrame(int32_t id) {return 0;};
|
||||
int32_t GetFrameId(int32_t id, etk::String & frameName) {return 0;};
|
||||
int32_t GetObjectId(etk::String name) { return -1; };
|
||||
private:
|
||||
//etk::VectorType<ewol::theme::EolColor*> m_listColor;
|
||||
//etk::VectorType<ewol::theme::EolBase*> m_listGroup;
|
||||
//etk::VectorType<ewol::theme::EolElement*> m_listElement;
|
||||
public:
|
||||
// acces to manage and create object ==> drawing system
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
113
Sources/ewol/themeManager.cpp
Normal file
113
Sources/ewol/themeManager.cpp
Normal file
@ -0,0 +1,113 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/themeManager.cpp
|
||||
* @brief basic ewol theme Manager (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <ewol/themeManager.h>
|
||||
#include <ewol/theme/Theme.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::theme::"
|
||||
|
||||
static ewol::theme::Theme defaultTheme;
|
||||
static ewol::theme::Theme userTheme;
|
||||
|
||||
void ewol::theme::Init(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ewol::theme::UnInit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ewol::theme::LoadDefault(etk::File filename)
|
||||
{
|
||||
defaultTheme.Load(filename);
|
||||
}
|
||||
|
||||
|
||||
void ewol::theme::Load(etk::File filename)
|
||||
{
|
||||
userTheme.Load(filename);
|
||||
}
|
||||
|
||||
// if 0 ==> error not fined ...
|
||||
// if <0 ==> default theme
|
||||
// if >0 ==> user theme
|
||||
int32_t ewol::theme::GetObjectId(etk::String name)
|
||||
{
|
||||
int32_t val = userTheme.GetObjectId(name);
|
||||
if (-1 == val) {
|
||||
val = defaultTheme.GetObjectId(name);
|
||||
if (-1 == val) {
|
||||
return 0;
|
||||
} else {
|
||||
return val*(-1);
|
||||
}
|
||||
}
|
||||
return val+1;
|
||||
}
|
||||
|
||||
// ???? GetObjectType(int32_t id);
|
||||
|
||||
|
||||
void ewol::theme::Generate(int32_t id, int32_t frameId, OObject2DTextured & newObject, etkFloat_t posX, etkFloat_t posY, etkFloat_t sizeX, etkFloat_t sizeY)
|
||||
{
|
||||
if (id<=0) {
|
||||
id *= -1;
|
||||
defaultTheme.Generate(id, frameId, newObject, posX, posY, sizeX, sizeY);
|
||||
} else {
|
||||
userTheme.Generate(id+1, frameId, newObject, posX, posY, sizeX, sizeY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int32_t ewol::theme::GetNbFrame(int32_t id)
|
||||
{
|
||||
if (id==0) {
|
||||
return 0;
|
||||
} else if (id<=0) {
|
||||
id *= -1;
|
||||
return defaultTheme.GetNbFrame(id);
|
||||
} else {
|
||||
return userTheme.GetNbFrame(id+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int32_t ewol::theme::GetFrameId(int32_t id, etk::String & frameName)
|
||||
{
|
||||
if (id==0) {
|
||||
return 0;
|
||||
} else if (id<=0) {
|
||||
id *= -1;
|
||||
return defaultTheme.GetFrameId(id, frameName);
|
||||
} else {
|
||||
return userTheme.GetFrameId(id+1, frameName);
|
||||
}
|
||||
}
|
||||
|
52
Sources/ewol/themeManager.h
Normal file
52
Sources/ewol/themeManager.h
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/themeManager.h
|
||||
* @brief basic ewol theme Manager (Header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/11/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef __EWOL_THEME_MANAGER_H__
|
||||
#define __EWOL_THEME_MANAGER_H__
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/String.h>
|
||||
#include <etk/File.h>
|
||||
#include <ewol/OObject.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace theme {
|
||||
void Init(void);
|
||||
void UnInit(void);
|
||||
void LoadDefault(etk::File filename); // default system theme ==> when an element in not find in the user theme, it is search in this one ... not needed
|
||||
void Load(etk::File filename); // add a user theme at the list ==> this remove previous declaration by the user...
|
||||
int32_t GetObjectId(etk::String name);
|
||||
// ???? GetObjectType(int32_t id);
|
||||
void Generate(int32_t id, int32_t frameId, OObject2DTextured & newObject, etkFloat_t posX, etkFloat_t posY, etkFloat_t sizeX, etkFloat_t sizeY);
|
||||
int32_t GetNbFrame(int32_t id);
|
||||
int32_t GetFrameId(int32_t id, etk::String & frameName);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user