summaryrefslogtreecommitdiff
path: root/xml/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'xml/object.c')
-rw-r--r--xml/object.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/xml/object.c b/xml/object.c
index 02fc3fc..8b3d5d2 100644
--- a/xml/object.c
+++ b/xml/object.c
@@ -5,7 +5,7 @@
#include "font.h"
static const std::string ObjectNames[] =
- { "image", "text", "marquee", "blink", "rectangle", "ellipse", "slope", "progress",
+ { "image", "text", "marquee", "blink", "rectangle", "ellipse", "slope", "progress",
"scrolltext", "scrollbar", "block", "list", "item" };
cxObject::cxObject(cxDisplay *Parent):
@@ -72,13 +72,13 @@ cxObject::cxObject(const cxObject &Src):
mObjects = new cxObjects(*Src.mObjects);
}
-cxObject::~cxObject()
+cxObject::~cxObject()
{
delete mCondition;
delete mObjects;
}
-bool cxObject::ParseType(const std::string &Text)
+bool cxObject::ParseType(const std::string &Text)
{
for (int i = 0; i < (int)__COUNT_OBJECT__; ++i) {
if (ObjectNames[i] == Text) {
@@ -89,7 +89,7 @@ bool cxObject::ParseType(const std::string &Text)
return false;
}
-bool cxObject::ParseCondition(const std::string &Text)
+bool cxObject::ParseCondition(const std::string &Text)
{
cxFunction *result = new cxFunction(this);
if (result->Parse(Text)) {
@@ -100,28 +100,28 @@ bool cxObject::ParseCondition(const std::string &Text)
return false;
}
-bool cxObject::ParseAlignment(const std::string &Text)
+bool cxObject::ParseAlignment(const std::string &Text)
{
if (Text == "center") mAlign = (eTextAlignment)(taTop | taCenter);
else if (Text == "right") mAlign = (eTextAlignment)(taTop | taRight);
else if (Text == "left") mAlign = (eTextAlignment)(taTop | taLeft);
- else
+ else
return false;
return true;
}
-bool cxObject::ParseFontFace(const std::string &Text)
+bool cxObject::ParseFontFace(const std::string &Text)
{
int size = 0, width = 0, pos;
std::string face = Text;
if ((pos = face.find('@')) != -1) {
std::string s = face.substr(pos + 1);
- const char *p = s.c_str();
+ const char *p = s.c_str();
char *end;
size = strtol(p, &end, 10);
if (*end == ',')
width = strtol(end + 1, NULL, 10);
-
+
face.erase(pos);
}
@@ -141,7 +141,7 @@ void cxObject::SetListIndex(uint Index, int Tab)
mCondition->SetListIndex(Index, Tab);
}
-const std::string &cxObject::TypeName(void) const
+const std::string &cxObject::TypeName(void) const
{
return ObjectNames[mType];
}
@@ -192,13 +192,13 @@ txSize cxObject::Size(const txPoint &BaseOffset, const txSize &BaseSize, const t
return txSize(p2.x - p1.x + 1, p2.y - p1.y + 1);
}
-const tColor *cxObject::Fg(void) const
+const tColor *cxObject::Fg(void) const
{
static tColor Fg;
return cText2SkinRender::ItemColor(mFg, Fg) ? &Fg : NULL;
}
-const tColor *cxObject::Bg(void) const
+const tColor *cxObject::Bg(void) const
{
static tColor Bg;
return cText2SkinRender::ItemColor(mBg, Bg) ? &Bg : NULL;
@@ -210,25 +210,25 @@ const tColor *cxObject::Bl(void) const
return cText2SkinRender::ItemColor(mBl, Bl) ? &Bl : NULL;
}
-const tColor *cxObject::Mask(void) const
+const tColor *cxObject::Mask(void) const
{
static tColor Mask;
return cText2SkinRender::ItemColor(mMask, Mask) ? &Mask : NULL;
}
-const tColor *cxObject::Mark(void) const
+const tColor *cxObject::Mark(void) const
{
static tColor Mark;
return cText2SkinRender::ItemColor(mMark, Mark) ? &Mark : NULL;
}
-const tColor *cxObject::Active(void) const
+const tColor *cxObject::Active(void) const
{
static tColor Active;
return cText2SkinRender::ItemColor(mActive, Active) ? &Active : NULL;
}
-const tColor *cxObject::Keep(void) const
+const tColor *cxObject::Keep(void) const
{
static tColor Keep;
return cText2SkinRender::ItemColor(mKeep, Keep) ? &Keep : NULL;
@@ -238,7 +238,7 @@ cxObjects::cxObjects(void)
{
}
-cxObjects::~cxObjects()
+cxObjects::~cxObjects()
{
for (uint i = 0; i < size(); ++i)
delete operator[](i);