[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3.6.1,1.3.6.2 the
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3.6.1,1.3.6.2 theme_priv.h,1.3.6.1,1.3.6.2 themeloader.cpp,1.3.6.3,1.3.6.4 |
Date: |
Sat, 04 Jan 2003 16:13:43 -0500 |
Update of /cvsroot/paragui/paragui/src/themes
In directory subversions:/tmp/cvs-serv24897/src/themes
Modified Files:
Tag: devel-1-0
theme_priv.cpp theme_priv.h themeloader.cpp
Log Message:
- kicked version to 1.0.4
- added "using namespace std;" to paraconfig.h
- removed all std:: prefixes
- removed std:: hacks for gcc, mwerks compilers (no longer needed due to
default namespace std)
Index: theme_priv.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.cpp,v
retrieving revision 1.3.6.1
retrieving revision 1.3.6.2
diff -C2 -r1.3.6.1 -r1.3.6.2
*** theme_priv.cpp 30 Jul 2002 09:21:55 -0000 1.3.6.1
--- theme_priv.cpp 4 Jan 2003 21:13:41 -0000 1.3.6.2
***************
*** 43,47 ****
return NULL;
! std::string n = widgettype;
MAP_WIDGET::iterator result = widget.find(n);
--- 43,47 ----
return NULL;
! string n = widgettype;
MAP_WIDGET::iterator result = widget.find(n);
***************
*** 283,287 ****
for(Uint32 i=0; i<strings.size(); i++) {
! if(strings[i]->name == (std::string)name) {
return strings[i]->value.c_str();
}
--- 283,287 ----
for(Uint32 i=0; i<strings.size(); i++) {
! if(strings[i]->name == (string)name) {
return strings[i]->value.c_str();
}
Index: theme_priv.h
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/theme_priv.h,v
retrieving revision 1.3.6.1
retrieving revision 1.3.6.2
diff -C2 -r1.3.6.1 -r1.3.6.2
*** theme_priv.h 29 May 2002 22:11:46 -0000 1.3.6.1
--- theme_priv.h 4 Jan 2003 21:13:41 -0000 1.3.6.2
***************
*** 52,57 ****
style = 0;
}
! std::string name;
! std::string value;
int size;
int index;
--- 52,57 ----
style = 0;
}
! string name;
! string value;
int size;
int index;
***************
*** 69,74 ****
virtual ~THEME_STRING() {}
! std::string name;
! std::string value;
};
--- 69,74 ----
virtual ~THEME_STRING() {}
! string name;
! string value;
};
***************
*** 83,88 ****
}
! std::string name;
! std::string value;
Uint32 colorkey;
bool hasColorKey;
--- 83,88 ----
}
! string name;
! string value;
Uint32 colorkey;
bool hasColorKey;
***************
*** 92,96 ****
class THEME_PROPERTY {
public:
! std::string name;
long value;
};
--- 92,96 ----
class THEME_PROPERTY {
public:
! string name;
long value;
};
***************
*** 98,102 ****
class THEME_GRADIENT {
public:
! std::string name;
THEME_COLOR color[4];
PG_Gradient gradient;
--- 98,102 ----
class THEME_GRADIENT {
public:
! string name;
THEME_COLOR color[4];
PG_Gradient gradient;
***************
*** 107,115 ****
// of using char * directly?
struct pg_hashstr {
! size_t operator()(std::string s1) const {
#if PG_VERSIONNUM(__GNUC__, __GNUC_MINOR__, 0) >= PG_VERSIONNUM(3, 1, 0)
return __gnu_cxx::hash<const char *>()(s1.c_str());
#else
! return std::hash<const char *>()(s1.c_str());
#endif
}
--- 107,115 ----
// of using char * directly?
struct pg_hashstr {
! size_t operator()(string s1) const {
#if PG_VERSIONNUM(__GNUC__, __GNUC_MINOR__, 0) >= PG_VERSIONNUM(3, 1, 0)
return __gnu_cxx::hash<const char *>()(s1.c_str());
#else
! return hash<const char *>()(s1.c_str());
#endif
}
***************
*** 129,145 ****
THEME_FONT* font;
! std::string type;
! std::string name;
! std::vector<THEME_STRING*> strings;
#ifdef HASH_MAP_INC
! typedef STL_MAP<std::string, THEME_FILENAME*, pg_hashstr> MAP_FILENAME;
! typedef STL_MAP<std::string, THEME_GRADIENT*, pg_hashstr> MAP_GRADIENT;
! typedef STL_MAP<std::string, THEME_PROPERTY*, pg_hashstr> MAP_PROPERTY;
#else
! typedef std::map<std::string, THEME_FILENAME*> MAP_FILENAME;
! typedef std::map<std::string, THEME_GRADIENT*> MAP_GRADIENT;
! typedef std::map<std::string, THEME_PROPERTY*> MAP_PROPERTY;
#endif
--- 129,145 ----
THEME_FONT* font;
! string type;
! string name;
! vector<THEME_STRING*> strings;
#ifdef HASH_MAP_INC
! typedef STL_MAP<string, THEME_FILENAME*, pg_hashstr> MAP_FILENAME;
! typedef STL_MAP<string, THEME_GRADIENT*, pg_hashstr> MAP_GRADIENT;
! typedef STL_MAP<string, THEME_PROPERTY*, pg_hashstr> MAP_PROPERTY;
#else
! typedef map<string, THEME_FILENAME*> MAP_FILENAME;
! typedef map<string, THEME_GRADIENT*> MAP_GRADIENT;
! typedef map<string, THEME_PROPERTY*> MAP_PROPERTY;
#endif
***************
*** 158,167 ****
THEME_OBJECT* FindObject(const char* objectname);
! std::string type;
#ifdef HASH_MAP_INC
! typedef STL_MAP<std::string, THEME_OBJECT*, pg_hashstr> MAP_OBJECT;
#else
! typedef std::map<std::string, THEME_OBJECT*> MAP_OBJECT;
#endif
--- 158,167 ----
THEME_OBJECT* FindObject(const char* objectname);
! string type;
#ifdef HASH_MAP_INC
! typedef STL_MAP<string, THEME_OBJECT*, pg_hashstr> MAP_OBJECT;
#else
! typedef map<string, THEME_OBJECT*> MAP_OBJECT;
#endif
***************
*** 194,206 ****
THEME_FONT* defaultfont;
! std::string title;
! std::string description;
! std::string author;
! std::string email;
#ifdef HASH_MAP_INC
! typedef STL_MAP<std::string, THEME_WIDGET*, pg_hashstr> MAP_WIDGET;
#else
! typedef std::map<std::string, THEME_WIDGET*> MAP_WIDGET;
#endif
--- 194,206 ----
THEME_FONT* defaultfont;
! string title;
! string description;
! string author;
! string email;
#ifdef HASH_MAP_INC
! typedef STL_MAP<string, THEME_WIDGET*, pg_hashstr> MAP_WIDGET;
#else
! typedef map<string, THEME_WIDGET*> MAP_WIDGET;
#endif
Index: themeloader.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/themes/themeloader.cpp,v
retrieving revision 1.3.6.3
retrieving revision 1.3.6.4
diff -C2 -r1.3.6.3 -r1.3.6.4
*** themeloader.cpp 17 Jun 2002 08:18:43 -0000 1.3.6.3
--- themeloader.cpp 4 Jan 2003 21:13:41 -0000 1.3.6.4
***************
*** 49,65 ****
#endif
- using std::cerr;
- using std::cout;
- using std::endl;
-
typedef struct _PARSE_INFO {
int depth;
int mode;
THEME_THEME* theme;
! std::string str_currentWidget;
! std::string str_currentObject;
THEME_WIDGET* p_currentWidget;
THEME_OBJECT* p_currentObject;
! std::string themename;
}
PARSE_INFO;
--- 49,61 ----
#endif
typedef struct _PARSE_INFO {
int depth;
int mode;
THEME_THEME* theme;
! string str_currentWidget;
! string str_currentObject;
THEME_WIDGET* p_currentWidget;
THEME_OBJECT* p_currentObject;
! string themename;
}
PARSE_INFO;
***************
*** 132,136 ****
void parseWidgetProps(PARSE_INFO* info, const XML_Char* prop, const
XML_Char** atts) {
! std::string val=atts[1];
if(tcscmp(T(prop), T("type")) == 0) {
--- 128,132 ----
void parseWidgetProps(PARSE_INFO* info, const XML_Char* prop, const
XML_Char** atts) {
! string val=atts[1];
if(tcscmp(T(prop), T("type")) == 0) {
***************
*** 149,153 ****
void parseObjectProps(PARSE_INFO* info, const XML_Char* prop, const
XML_Char** atts) {
! std::string val=atts[1];
int i;
THEME_OBJECT* object = info->p_currentObject;
--- 145,149 ----
void parseObjectProps(PARSE_INFO* info, const XML_Char* prop, const
XML_Char** atts) {
! string val=atts[1];
int i;
THEME_OBJECT* object = info->p_currentObject;
***************
*** 289,293 ****
THEME_GRADIENT* gradient = new THEME_GRADIENT;
Uint32 c;
! std::string val;
for(i=0; atts[i]; i += 2) {
--- 285,289 ----
THEME_GRADIENT* gradient = new THEME_GRADIENT;
Uint32 c;
! string val;
for(i=0; atts[i]; i += 2) {
***************
*** 397,401 ****
PG_Theme* PG_Theme::Load(const char* xmltheme) {
! std::string filename;
// create new parse info
--- 393,397 ----
PG_Theme* PG_Theme::Load(const char* xmltheme) {
! string filename;
// create new parse info
***************
*** 412,416 ****
// check if we have a compressed themefile somewhere
! filename = (std::string)xmltheme + (std::string)".zip";
// and add it to the searchpath
--- 408,412 ----
// check if we have a compressed themefile somewhere
! filename = (string)xmltheme + (string)".zip";
// and add it to the searchpath
***************
*** 419,423 ****
char sep = PG_FileArchive::GetDirSeparator()[0];
! std::string fullpath = (std::string)path;
if(fullpath[fullpath.size()-1] != sep) {
fullpath += sep;
--- 415,419 ----
char sep = PG_FileArchive::GetDirSeparator()[0];
! string fullpath = (string)path;
if(fullpath[fullpath.size()-1] != sep) {
fullpath += sep;
***************
*** 436,440 ****
// try to open the theme
! filename = (std::string)xmltheme + (std::string)THEME_SUFFIX;
if(!PG_FileArchive::Exists(filename.c_str())) {
PG_LogERR("theme '%s' not found !", filename.c_str());
--- 432,436 ----
// try to open the theme
! filename = (string)xmltheme + (string)THEME_SUFFIX;
if(!PG_FileArchive::Exists(filename.c_str())) {
PG_LogERR("theme '%s' not found !", filename.c_str());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/themes theme_priv.cpp,1.3.6.1,1.3.6.2 theme_priv.h,1.3.6.1,1.3.6.2 themeloader.cpp,1.3.6.3,1.3.6.4,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/test paratest.cpp,1.2.6.7,1.2.6.8 writefile.cpp,1.1.2.1,1.1.2.2
- Next by Date:
[paragui-cvs] CVS: paragui/src/widgets pgwindow.cpp,1.3.6.3,1.3.6.4
- Previous by thread:
[paragui-cvs] CVS: paragui/test paratest.cpp,1.2.6.7,1.2.6.8 writefile.cpp,1.1.2.1,1.1.2.2
- Next by thread:
[paragui-cvs] CVS: paragui/src/widgets pgwindow.cpp,1.3.6.3,1.3.6.4
- Index(es):