|
@@ -20,9 +20,9 @@ UIMLElement::UIMLElement()
|
|
|
|
|
|
|
|
UIMLElement::~UIMLElement() {}
|
|
UIMLElement::~UIMLElement() {}
|
|
|
|
|
|
|
|
-//! applies the layout parameters to a Zeichnung
|
|
|
|
|
|
|
+//! applies the layout parameters to a Drawable
|
|
|
void UIMLElement::layout(XML::Element& element,
|
|
void UIMLElement::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -67,11 +67,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(la),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(la),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* laz = generalLayouter.zZeichnungById(la);
|
|
|
|
|
|
|
+ Drawable* laz = generalLayouter.zDrawableById(la);
|
|
|
if (laz) x = laz->getX();
|
|
if (laz) x = laz->getX();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -99,11 +99,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(la),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(la),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* laz = generalLayouter.zZeichnungById(la);
|
|
|
|
|
|
|
+ Drawable* laz = generalLayouter.zDrawableById(la);
|
|
|
if (laz) x = laz->getX() + laz->getBreite();
|
|
if (laz) x = laz->getX() + laz->getBreite();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -131,11 +131,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(ra),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(ra),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* raz = generalLayouter.zZeichnungById(ra);
|
|
|
|
|
|
|
+ Drawable* raz = generalLayouter.zDrawableById(ra);
|
|
|
if (raz) x = raz->getX() - z.getBreite();
|
|
if (raz) x = raz->getX() - z.getBreite();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -163,11 +163,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(ta),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(ta),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* taz = generalLayouter.zZeichnungById(ta);
|
|
|
|
|
|
|
+ Drawable* taz = generalLayouter.zDrawableById(ta);
|
|
|
if (taz) y = taz->getY();
|
|
if (taz) y = taz->getY();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -195,11 +195,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(ta),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(ta),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* taz = generalLayouter.zZeichnungById(ta);
|
|
|
|
|
|
|
+ Drawable* taz = generalLayouter.zDrawableById(ta);
|
|
|
if (taz) y = taz->getY() + taz->getHeight();
|
|
if (taz) y = taz->getY() + taz->getHeight();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -227,11 +227,11 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
if (ed.exists())
|
|
if (ed.exists())
|
|
|
{
|
|
{
|
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
generalLayouter.layout(*ed.begin().val(),
|
|
|
- *generalLayouter.zZeichnungById(ba),
|
|
|
|
|
|
|
+ *generalLayouter.zDrawableById(ba),
|
|
|
pWidth,
|
|
pWidth,
|
|
|
pHeight,
|
|
pHeight,
|
|
|
generalLayouter);
|
|
generalLayouter);
|
|
|
- Zeichnung* baz = generalLayouter.zZeichnungById(ba);
|
|
|
|
|
|
|
+ Drawable* baz = generalLayouter.zDrawableById(ba);
|
|
|
if (baz) y = baz->getY() - z.getHeight();
|
|
if (baz) y = baz->getY() - z.getHeight();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -255,13 +255,13 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
y = calculateSize(yt, pHeight);
|
|
y = calculateSize(yt, pHeight);
|
|
|
}
|
|
}
|
|
|
z.setPosition(x, y);
|
|
z.setPosition(x, y);
|
|
|
- ZeichnungHintergrund* zh = dynamic_cast<ZeichnungHintergrund*>(&z);
|
|
|
|
|
|
|
+ DrawableBackground* zh = dynamic_cast<DrawableBackground*>(&z);
|
|
|
if (zh)
|
|
if (zh)
|
|
|
{
|
|
{
|
|
|
if (element.hasAttribute("border"))
|
|
if (element.hasAttribute("border"))
|
|
|
{
|
|
{
|
|
|
int br = (int)element.getAttributeValue("border");
|
|
int br = (int)element.getAttributeValue("border");
|
|
|
- zh->setStyle(ZeichnungHintergrund::Style::Rahmen, br > 0);
|
|
|
|
|
|
|
+ zh->setStyle(DrawableBackground::Style::Rahmen, br > 0);
|
|
|
zh->setRahmenBreite((int)element.getAttributeValue("border"));
|
|
zh->setRahmenBreite((int)element.getAttributeValue("border"));
|
|
|
}
|
|
}
|
|
|
if (element.hasAttribute("border-color"))
|
|
if (element.hasAttribute("border-color"))
|
|
@@ -274,10 +274,10 @@ void UIMLElement::layout(XML::Element& element,
|
|
|
pHeight = z.getInnenHeight();
|
|
pHeight = z.getInnenHeight();
|
|
|
for (auto i : getChildren(element))
|
|
for (auto i : getChildren(element))
|
|
|
{
|
|
{
|
|
|
- Zeichnung* z = 0;
|
|
|
|
|
|
|
+ Drawable* z = 0;
|
|
|
if (i->hasAttribute("id"))
|
|
if (i->hasAttribute("id"))
|
|
|
{
|
|
{
|
|
|
- z = generalLayouter.zZeichnungById(i->getAttributeValue("id"));
|
|
|
|
|
|
|
+ z = generalLayouter.zDrawableById(i->getAttributeValue("id"));
|
|
|
}
|
|
}
|
|
|
if (z)
|
|
if (z)
|
|
|
{
|
|
{
|
|
@@ -390,7 +390,7 @@ bool UIMLTextField::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("textfield");
|
|
return element.getName().istGleich("textfield");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLTextField::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLTextField::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
@@ -401,7 +401,7 @@ Zeichnung* UIMLTextField::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLTextField::updateElement(
|
|
bool Framework::UIMLTextField::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
|
if (!t) return false;
|
|
if (!t) return false;
|
|
@@ -417,7 +417,7 @@ bool Framework::UIMLTextField::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLTextField::layout(XML::Element& element,
|
|
void UIMLTextField::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -485,7 +485,7 @@ bool UIMLButton::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("button");
|
|
return element.getName().istGleich("button");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLButton::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLButton::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
Knopf* k = generalFactory.getFactory().createKnopf(
|
|
Knopf* k = generalFactory.getFactory().createKnopf(
|
|
@@ -495,7 +495,7 @@ Zeichnung* UIMLButton::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLButton::updateElement(
|
|
bool Framework::UIMLButton::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
Knopf* k = dynamic_cast<Knopf*>(&z);
|
|
Knopf* k = dynamic_cast<Knopf*>(&z);
|
|
|
if (!k) return false;
|
|
if (!k) return false;
|
|
@@ -510,7 +510,7 @@ bool Framework::UIMLButton::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLButton::layout(XML::Element& element,
|
|
void UIMLButton::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -532,7 +532,7 @@ bool UIMLCheck::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("check");
|
|
return element.getName().istGleich("check");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLCheck::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLCheck::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
KontrollKnopf* k = generalFactory.getFactory().createKontrollKnopf(
|
|
KontrollKnopf* k = generalFactory.getFactory().createKontrollKnopf(
|
|
@@ -542,7 +542,7 @@ Zeichnung* UIMLCheck::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLCheck::updateElement(
|
|
bool Framework::UIMLCheck::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
KontrollKnopf* k = dynamic_cast<KontrollKnopf*>(&z);
|
|
KontrollKnopf* k = dynamic_cast<KontrollKnopf*>(&z);
|
|
|
if (!k) return false;
|
|
if (!k) return false;
|
|
@@ -557,7 +557,7 @@ bool Framework::UIMLCheck::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLCheck::layout(XML::Element& element,
|
|
void UIMLCheck::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -582,7 +582,7 @@ bool UIMLText::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("text");
|
|
return element.getName().istGleich("text");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLText::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLText::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
@@ -593,7 +593,7 @@ Zeichnung* UIMLText::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLText::updateElement(
|
|
bool Framework::UIMLText::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
|
if (!t) return false;
|
|
if (!t) return false;
|
|
@@ -609,7 +609,7 @@ bool Framework::UIMLText::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLText::layout(XML::Element& element,
|
|
void UIMLText::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -677,7 +677,7 @@ bool UIMLTextArea::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("textarea");
|
|
return element.getName().istGleich("textarea");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLTextArea::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLTextArea::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
@@ -688,7 +688,7 @@ Zeichnung* UIMLTextArea::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLTextArea::updateElement(
|
|
bool Framework::UIMLTextArea::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
TextFeld* t = dynamic_cast<TextFeld*>(&z);
|
|
|
if (!t) return false;
|
|
if (!t) return false;
|
|
@@ -704,7 +704,7 @@ bool Framework::UIMLTextArea::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLTextArea::layout(XML::Element& element,
|
|
void UIMLTextArea::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -774,7 +774,7 @@ bool UIMLTable::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("table");
|
|
return element.getName().istGleich("table");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLTable::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLTable::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
ObjTabelle* t = generalFactory.getFactory().createObjTabelle(
|
|
ObjTabelle* t = generalFactory.getFactory().createObjTabelle(
|
|
@@ -784,7 +784,7 @@ Zeichnung* UIMLTable::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
DLLEXPORT bool Framework::UIMLTable::updateElement(
|
|
DLLEXPORT bool Framework::UIMLTable::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
ObjTabelle* t = dynamic_cast<ObjTabelle*>(&z);
|
|
ObjTabelle* t = dynamic_cast<ObjTabelle*>(&z);
|
|
|
if (!t) return false;
|
|
if (!t) return false;
|
|
@@ -811,7 +811,7 @@ DLLEXPORT bool Framework::UIMLTable::updateElement(
|
|
|
{
|
|
{
|
|
|
if (t->getSpaltenAnzahl() < c) t->addSpalte(Text(c - 1));
|
|
if (t->getSpaltenAnzahl() < c) t->addSpalte(Text(c - 1));
|
|
|
if (numCols < c) numCols = c;
|
|
if (numCols < c) numCols = c;
|
|
|
- Zeichnung* z = t->zZeichnung(Text(c - 1), id);
|
|
|
|
|
|
|
+ Drawable* z = t->zDrawable(Text(c - 1), id);
|
|
|
if (!z
|
|
if (!z
|
|
|
|| !generalFactory.updateElement(
|
|
|| !generalFactory.updateElement(
|
|
|
element, *z, generalFactory))
|
|
element, *z, generalFactory))
|
|
@@ -823,7 +823,7 @@ DLLEXPORT bool Framework::UIMLTable::updateElement(
|
|
|
t->setSpaltenBreite(Text(c - 1), z->getBreite());
|
|
t->setSpaltenBreite(Text(c - 1), z->getBreite());
|
|
|
if (z->getHeight() > t->getZeilenHeight(Text(id)))
|
|
if (z->getHeight() > t->getZeilenHeight(Text(id)))
|
|
|
t->setZeilenHeight(Text(id), z->getHeight());
|
|
t->setZeilenHeight(Text(id), z->getHeight());
|
|
|
- t->setZeichnungZ(Text(c - 1), id, z);
|
|
|
|
|
|
|
+ t->setDrawableZ(Text(c - 1), id, z);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
c++;
|
|
c++;
|
|
@@ -857,7 +857,7 @@ DLLEXPORT bool Framework::UIMLTable::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLTable::layout(XML::Element& element,
|
|
void UIMLTable::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -883,8 +883,8 @@ void UIMLTable::layout(XML::Element& element,
|
|
|
}
|
|
}
|
|
|
for (int i = 0; i < objT->getSpaltenAnzahl(); i++)
|
|
for (int i = 0; i < objT->getSpaltenAnzahl(); i++)
|
|
|
{
|
|
{
|
|
|
- if (objT->zZeichnung(i, 0))
|
|
|
|
|
- objT->setSpaltenBreite(i, objT->zZeichnung(i, 0)->getBreite());
|
|
|
|
|
|
|
+ if (objT->zDrawable(i, 0))
|
|
|
|
|
+ objT->setSpaltenBreite(i, objT->zDrawable(i, 0)->getBreite());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -903,7 +903,7 @@ bool UIMLFrame::isApplicableFor(XML::Element& element)
|
|
|
return element.getName().istGleich("frame");
|
|
return element.getName().istGleich("frame");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLFrame::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLFrame::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
Fenster* f = generalFactory.getFactory().createFenster(
|
|
Fenster* f = generalFactory.getFactory().createFenster(
|
|
@@ -913,13 +913,13 @@ Zeichnung* UIMLFrame::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLFrame::updateElement(
|
|
bool Framework::UIMLFrame::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
Fenster* f = dynamic_cast<Fenster*>(&z);
|
|
Fenster* f = dynamic_cast<Fenster*>(&z);
|
|
|
if (!f) return false;
|
|
if (!f) return false;
|
|
|
for (auto member = f->getMembers().begin(); member;)
|
|
for (auto member = f->getMembers().begin(); member;)
|
|
|
{ // remove all members that are not in the xml
|
|
{ // remove all members that are not in the xml
|
|
|
- Framework::Text id = generalFactory.getZeichnungId(*member.val());
|
|
|
|
|
|
|
+ Framework::Text id = generalFactory.getDrawableId(*member.val());
|
|
|
if (id.getLength() == 0)
|
|
if (id.getLength() == 0)
|
|
|
{
|
|
{
|
|
|
member.remove();
|
|
member.remove();
|
|
@@ -934,7 +934,7 @@ bool Framework::UIMLFrame::updateElement(
|
|
|
for (auto i = element.getChilds(); i; i++)
|
|
for (auto i = element.getChilds(); i; i++)
|
|
|
{
|
|
{
|
|
|
Text id = i->getAttributeValue("id");
|
|
Text id = i->getAttributeValue("id");
|
|
|
- Zeichnung* z = generalFactory.zZeichnungById(id);
|
|
|
|
|
|
|
+ Drawable* z = generalFactory.zDrawableById(id);
|
|
|
if (!id.getLength() || !z || f->getMembers().indexOf(z) < 0
|
|
if (!id.getLength() || !z || f->getMembers().indexOf(z) < 0
|
|
|
|| !generalFactory.updateElement(*i.val(), *z, generalFactory))
|
|
|| !generalFactory.updateElement(*i.val(), *z, generalFactory))
|
|
|
{
|
|
{
|
|
@@ -942,7 +942,7 @@ bool Framework::UIMLFrame::updateElement(
|
|
|
{
|
|
{
|
|
|
f->removeMember(z);
|
|
f->removeMember(z);
|
|
|
}
|
|
}
|
|
|
- if (z) generalFactory.removeZeichnung(*z);
|
|
|
|
|
|
|
+ if (z) generalFactory.removeDrawable(*z);
|
|
|
z = generalFactory.parseElement(*i.val(), generalFactory);
|
|
z = generalFactory.parseElement(*i.val(), generalFactory);
|
|
|
if (z) f->addMember(z);
|
|
if (z) f->addMember(z);
|
|
|
}
|
|
}
|
|
@@ -959,7 +959,7 @@ bool Framework::UIMLFrame::updateElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLFrame::layout(XML::Element& element,
|
|
void UIMLFrame::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -1009,9 +1009,9 @@ void UIMLFrame::layout(XML::Element& element,
|
|
|
{
|
|
{
|
|
|
int gap = calculateSize(element.getAttributeValue("gap"), pHeight);
|
|
int gap = calculateSize(element.getAttributeValue("gap"), pHeight);
|
|
|
int y = 0;
|
|
int y = 0;
|
|
|
- for (Zeichnung* z : f->getMembers())
|
|
|
|
|
|
|
+ for (Drawable* z : f->getMembers())
|
|
|
{
|
|
{
|
|
|
- Text id = generalLayouter.getZeichnungId(*z);
|
|
|
|
|
|
|
+ Text id = generalLayouter.getDrawableId(*z);
|
|
|
auto child = element.selectChildsByAttribute("id", id);
|
|
auto child = element.selectChildsByAttribute("id", id);
|
|
|
|
|
|
|
|
if (child.exists())
|
|
if (child.exists())
|
|
@@ -1031,9 +1031,9 @@ void UIMLFrame::layout(XML::Element& element,
|
|
|
{
|
|
{
|
|
|
int gap = calculateSize(element.getAttributeValue("gap"), pWidth);
|
|
int gap = calculateSize(element.getAttributeValue("gap"), pWidth);
|
|
|
int x = 0;
|
|
int x = 0;
|
|
|
- for (Zeichnung* z : f->getMembers())
|
|
|
|
|
|
|
+ for (Drawable* z : f->getMembers())
|
|
|
{
|
|
{
|
|
|
- Text id = generalLayouter.getZeichnungId(*z);
|
|
|
|
|
|
|
+ Text id = generalLayouter.getDrawableId(*z);
|
|
|
auto child = element.selectChildsByAttribute("id", id);
|
|
auto child = element.selectChildsByAttribute("id", id);
|
|
|
|
|
|
|
|
if (child.exists())
|
|
if (child.exists())
|
|
@@ -1073,11 +1073,11 @@ void UIMLFrame::layout(XML::Element& element,
|
|
|
|
|
|
|
|
// Creates a UIML View
|
|
// Creates a UIML View
|
|
|
UIMLView::UIMLView()
|
|
UIMLView::UIMLView()
|
|
|
- : ZeichnungHintergrund()
|
|
|
|
|
|
|
+ : DrawableBackground()
|
|
|
{
|
|
{
|
|
|
style = Style::MEIgnoreInside | Style::MEIgnoreParentInside
|
|
style = Style::MEIgnoreInside | Style::MEIgnoreParentInside
|
|
|
| Style::MEIgnoreSichtbar | Style::MEIgnoreVerarbeitet;
|
|
| Style::MEIgnoreSichtbar | Style::MEIgnoreVerarbeitet;
|
|
|
- members = new RCTrie<Zeichnung>();
|
|
|
|
|
|
|
+ members = new RCTrie<Drawable>();
|
|
|
dom = 0;
|
|
dom = 0;
|
|
|
nextId = 0;
|
|
nextId = 0;
|
|
|
memset(&init, 0, sizeof(UIInit));
|
|
memset(&init, 0, sizeof(UIInit));
|
|
@@ -1139,7 +1139,7 @@ void UIMLView::doMausEreignis(MausEreignis& me, bool userRet)
|
|
|
{
|
|
{
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{ // TODO render elements backwards
|
|
{ // TODO render elements backwards
|
|
|
- Zeichnung* z = members->z(i->getAttributeValue("id"),
|
|
|
|
|
|
|
+ Drawable* z = members->z(i->getAttributeValue("id"),
|
|
|
i->getAttributeValue("id").getLength());
|
|
i->getAttributeValue("id").getLength());
|
|
|
if (z) z->doPublicMausEreignis(me);
|
|
if (z) z->doPublicMausEreignis(me);
|
|
|
}
|
|
}
|
|
@@ -1161,14 +1161,14 @@ void UIMLView::doMausEreignis(MausEreignis& me, bool userRet)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::UIMLView::setOnMemberMouseEvent(std::function<bool(
|
|
void Framework::UIMLView::setOnMemberMouseEvent(std::function<bool(
|
|
|
- XML::Element& element, Zeichnung& member, MausEreignis me)>
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& member, MausEreignis me)>
|
|
|
onEventAction)
|
|
onEventAction)
|
|
|
{
|
|
{
|
|
|
onMemberMouseEvent = onEventAction;
|
|
onMemberMouseEvent = onEventAction;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::UIMLView::setOnMemberKeyboardEvent(std::function<bool(
|
|
void Framework::UIMLView::setOnMemberKeyboardEvent(std::function<bool(
|
|
|
- XML::Element& element, Zeichnung& member, TastaturEreignis te)>
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& member, TastaturEreignis te)>
|
|
|
onEventAction)
|
|
onEventAction)
|
|
|
{
|
|
{
|
|
|
onMemberKeyboardEvent = onEventAction;
|
|
onMemberKeyboardEvent = onEventAction;
|
|
@@ -1211,8 +1211,8 @@ void UIMLView::setUIML(XML::Element* uiml)
|
|
|
Framework::Text id = i->getAttributeValue("id");
|
|
Framework::Text id = i->getAttributeValue("id");
|
|
|
if (!newChilds.whereAttributeEquals("id", id).exists())
|
|
if (!newChilds.whereAttributeEquals("id", id).exists())
|
|
|
{
|
|
{
|
|
|
- Zeichnung* z = members->z(id, id.getLength());
|
|
|
|
|
- if (z) removeZeichnung(*z);
|
|
|
|
|
|
|
+ Drawable* z = members->z(id, id.getLength());
|
|
|
|
|
+ if (z) removeDrawable(*z);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
dom = uiml;
|
|
dom = uiml;
|
|
@@ -1223,7 +1223,7 @@ void UIMLView::setUIML(XML::Element* uiml)
|
|
|
dom = uiml;
|
|
dom = uiml;
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{
|
|
{
|
|
|
- Zeichnung* z = parseElement(*i.val(), *this);
|
|
|
|
|
|
|
+ Drawable* z = parseElement(*i.val(), *this);
|
|
|
if (z) z->release();
|
|
if (z) z->release();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1238,14 +1238,14 @@ void UIMLView::setUIML(Text uiml)
|
|
|
|
|
|
|
|
// Returns a drawing that has a specific id in UIML
|
|
// Returns a drawing that has a specific id in UIML
|
|
|
// id: the id of the drawing
|
|
// id: the id of the drawing
|
|
|
-Zeichnung* UIMLView::zZeichnungById(const char* id)
|
|
|
|
|
|
|
+Drawable* UIMLView::zDrawableById(const char* id)
|
|
|
{
|
|
{
|
|
|
return members->z(id, textLength(id));
|
|
return members->z(id, textLength(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Returns a drawing that has a specific id in UIML
|
|
// Returns a drawing that has a specific id in UIML
|
|
|
// id: the id of the drawing
|
|
// id: the id of the drawing
|
|
|
-Zeichnung* UIMLView::getZeichnungById(const char* id)
|
|
|
|
|
|
|
+Drawable* UIMLView::getDrawableById(const char* id)
|
|
|
{
|
|
{
|
|
|
return members->get(id, textLength(id));
|
|
return members->get(id, textLength(id));
|
|
|
}
|
|
}
|
|
@@ -1255,7 +1255,7 @@ void Framework::UIMLView::update()
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{
|
|
{
|
|
|
Text id = i->getAttributeValue("id");
|
|
Text id = i->getAttributeValue("id");
|
|
|
- Zeichnung* z = zZeichnungById(id);
|
|
|
|
|
|
|
+ Drawable* z = zDrawableById(id);
|
|
|
if (!id.getLength() || !z || !updateElement(*i.val(), *z, *this))
|
|
if (!id.getLength() || !z || !updateElement(*i.val(), *z, *this))
|
|
|
{
|
|
{
|
|
|
z = parseElement(*i.val(), *this);
|
|
z = parseElement(*i.val(), *this);
|
|
@@ -1273,7 +1273,7 @@ void UIMLView::layout()
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{
|
|
{
|
|
|
Text id = i->getAttributeValue("id");
|
|
Text id = i->getAttributeValue("id");
|
|
|
- Zeichnung* z = zZeichnungById(id);
|
|
|
|
|
|
|
+ Drawable* z = zDrawableById(id);
|
|
|
if (z)
|
|
if (z)
|
|
|
{
|
|
{
|
|
|
layout(*i.val(),
|
|
layout(*i.val(),
|
|
@@ -1292,7 +1292,7 @@ void UIMLView::layout()
|
|
|
Text UIMLView::addMember(Text uiml)
|
|
Text UIMLView::addMember(Text uiml)
|
|
|
{
|
|
{
|
|
|
XML::Element* e = new XML::Element(uiml);
|
|
XML::Element* e = new XML::Element(uiml);
|
|
|
- Zeichnung* z = parseElement(*e, *this);
|
|
|
|
|
|
|
+ Drawable* z = parseElement(*e, *this);
|
|
|
if (z)
|
|
if (z)
|
|
|
{
|
|
{
|
|
|
dom->addChildAtFront(e);
|
|
dom->addChildAtFront(e);
|
|
@@ -1316,7 +1316,7 @@ Text UIMLView::addMember(Text uiml, Text parentId)
|
|
|
{
|
|
{
|
|
|
if (ed2.begin()->getName().istGleich("frame"))
|
|
if (ed2.begin()->getName().istGleich("frame"))
|
|
|
{
|
|
{
|
|
|
- Zeichnung* z = parseElement(*e, *this);
|
|
|
|
|
|
|
+ Drawable* z = parseElement(*e, *this);
|
|
|
if (z)
|
|
if (z)
|
|
|
{
|
|
{
|
|
|
dynamic_cast<Fenster*>(
|
|
dynamic_cast<Fenster*>(
|
|
@@ -1347,13 +1347,13 @@ void UIMLView::removeMember(Text id)
|
|
|
void UIMLView::doTastaturEreignis(TastaturEreignis& te)
|
|
void UIMLView::doTastaturEreignis(TastaturEreignis& te)
|
|
|
{
|
|
{
|
|
|
bool verarbeitet = te.verarbeitet;
|
|
bool verarbeitet = te.verarbeitet;
|
|
|
- ZeichnungHintergrund::doTastaturEreignis(te);
|
|
|
|
|
|
|
+ DrawableBackground::doTastaturEreignis(te);
|
|
|
te.verarbeitet = verarbeitet;
|
|
te.verarbeitet = verarbeitet;
|
|
|
if (dom)
|
|
if (dom)
|
|
|
{
|
|
{
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{ // TODO render elements backwards
|
|
{ // TODO render elements backwards
|
|
|
- Zeichnung* z = members->z(i->getAttributeValue("id"),
|
|
|
|
|
|
|
+ Drawable* z = members->z(i->getAttributeValue("id"),
|
|
|
i->getAttributeValue("id").getLength());
|
|
i->getAttributeValue("id").getLength());
|
|
|
if (z) z->doTastaturEreignis(te);
|
|
if (z) z->doTastaturEreignis(te);
|
|
|
}
|
|
}
|
|
@@ -1370,20 +1370,20 @@ bool UIMLView::tick(double tickVal)
|
|
|
{
|
|
{
|
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
for (auto i = dom->getChilds(); i; i++)
|
|
|
{ // TODO render elements backwards
|
|
{ // TODO render elements backwards
|
|
|
- Zeichnung* z = members->z(i->getAttributeValue("id"),
|
|
|
|
|
|
|
+ Drawable* z = members->z(i->getAttributeValue("id"),
|
|
|
i->getAttributeValue("id").getLength());
|
|
i->getAttributeValue("id").getLength());
|
|
|
if (z) rend |= z->tick(tickVal);
|
|
if (z) rend |= z->tick(tickVal);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return ZeichnungHintergrund::tick(tickVal);
|
|
|
|
|
|
|
+ return DrawableBackground::tick(tickVal);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Draws the background of a drawing to rObj
|
|
// Draws the background of a drawing to rObj
|
|
|
void UIMLView::render(Bild& rObj)
|
|
void UIMLView::render(Bild& rObj)
|
|
|
{
|
|
{
|
|
|
- if (hatStyle(Zeichnung::Style::Sichtbar))
|
|
|
|
|
|
|
+ if (hatStyle(Drawable::Style::Sichtbar))
|
|
|
{
|
|
{
|
|
|
- ZeichnungHintergrund::render(rObj);
|
|
|
|
|
|
|
+ DrawableBackground::render(rObj);
|
|
|
if (dom)
|
|
if (dom)
|
|
|
{
|
|
{
|
|
|
if (!rObj.setDrawOptions(pos.x + getRahmenBreite(),
|
|
if (!rObj.setDrawOptions(pos.x + getRahmenBreite(),
|
|
@@ -1398,7 +1398,7 @@ void UIMLView::render(Bild& rObj)
|
|
|
for (int i = dom->getChildCount() - 1; i >= 0; i--)
|
|
for (int i = dom->getChildCount() - 1; i >= 0; i--)
|
|
|
{ // TODO render elements backwards
|
|
{ // TODO render elements backwards
|
|
|
XML::Element* e = dom->zChild(i);
|
|
XML::Element* e = dom->zChild(i);
|
|
|
- Zeichnung* z = members->z(e->getAttributeValue("id"),
|
|
|
|
|
|
|
+ Drawable* z = members->z(e->getAttributeValue("id"),
|
|
|
e->getAttributeValue("id").getLength());
|
|
e->getAttributeValue("id").getLength());
|
|
|
if (z) z->render(rObj);
|
|
if (z) z->render(rObj);
|
|
|
}
|
|
}
|
|
@@ -1432,7 +1432,7 @@ bool UIMLView::isApplicableFor(XML::Element& element)
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Zeichnung* UIMLView::parseElement(
|
|
|
|
|
|
|
+Drawable* UIMLView::parseElement(
|
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
XML::Element& element, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
Text id;
|
|
Text id;
|
|
@@ -1443,7 +1443,7 @@ Zeichnung* UIMLView::parseElement(
|
|
|
id = Text("_") += nextId++;
|
|
id = Text("_") += nextId++;
|
|
|
element.setAttribute("id", id);
|
|
element.setAttribute("id", id);
|
|
|
}
|
|
}
|
|
|
- Zeichnung* z = members->z(id, id.getLength());
|
|
|
|
|
|
|
+ Drawable* z = members->z(id, id.getLength());
|
|
|
if (!z)
|
|
if (!z)
|
|
|
{
|
|
{
|
|
|
// precompute attributes
|
|
// precompute attributes
|
|
@@ -1516,7 +1516,7 @@ Zeichnung* UIMLView::parseElement(
|
|
|
[this, z](void* p, void* o, MausEreignis me) {
|
|
[this, z](void* p, void* o, MausEreignis me) {
|
|
|
return dom->selectChildren()
|
|
return dom->selectChildren()
|
|
|
.selectAllElements()
|
|
.selectAllElements()
|
|
|
- .whereAttributeEquals("id", getZeichnungId(*z))
|
|
|
|
|
|
|
+ .whereAttributeEquals("id", getDrawableId(*z))
|
|
|
.getFirstElement()
|
|
.getFirstElement()
|
|
|
.map<bool>([this, &me, z](
|
|
.map<bool>([this, &me, z](
|
|
|
RCPointer<XML::Element> element) {
|
|
RCPointer<XML::Element> element) {
|
|
@@ -1533,7 +1533,7 @@ Zeichnung* UIMLView::parseElement(
|
|
|
[this, z](void* p, void* o, TastaturEreignis te) {
|
|
[this, z](void* p, void* o, TastaturEreignis te) {
|
|
|
return dom->selectChildren()
|
|
return dom->selectChildren()
|
|
|
.selectAllElements()
|
|
.selectAllElements()
|
|
|
- .whereAttributeEquals("id", getZeichnungId(*z))
|
|
|
|
|
|
|
+ .whereAttributeEquals("id", getDrawableId(*z))
|
|
|
.getFirstElement()
|
|
.getFirstElement()
|
|
|
.map<bool>([this, &te, z](
|
|
.map<bool>([this, &te, z](
|
|
|
RCPointer<XML::Element> element) {
|
|
RCPointer<XML::Element> element) {
|
|
@@ -1546,7 +1546,7 @@ Zeichnung* UIMLView::parseElement(
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
members->set(
|
|
members->set(
|
|
|
- id, id.getLength(), dynamic_cast<Zeichnung*>(z->getThis()));
|
|
|
|
|
|
|
+ id, id.getLength(), dynamic_cast<Drawable*>(z->getThis()));
|
|
|
idList.add(new Text(id));
|
|
idList.add(new Text(id));
|
|
|
memberList.add(z);
|
|
memberList.add(z);
|
|
|
}
|
|
}
|
|
@@ -1557,7 +1557,7 @@ Zeichnung* UIMLView::parseElement(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool Framework::UIMLView::updateElement(
|
|
bool Framework::UIMLView::updateElement(
|
|
|
- XML::Element& element, Zeichnung& z, UIMLContainer& generalFactory)
|
|
|
|
|
|
|
+ XML::Element& element, Drawable& z, UIMLContainer& generalFactory)
|
|
|
{
|
|
{
|
|
|
bool result = 0;
|
|
bool result = 0;
|
|
|
for (UIMLElement* e : knownElements)
|
|
for (UIMLElement* e : knownElements)
|
|
@@ -1575,16 +1575,16 @@ bool Framework::UIMLView::updateElement(
|
|
|
"id"))
|
|
"id"))
|
|
|
{ // element could not be updated so all children will be removed
|
|
{ // element could not be updated so all children will be removed
|
|
|
Framework::Text id = element->getAttributeValue("id");
|
|
Framework::Text id = element->getAttributeValue("id");
|
|
|
- Zeichnung* z = zZeichnungById(id);
|
|
|
|
|
- if (z) removeZeichnung(*z);
|
|
|
|
|
|
|
+ Drawable* z = zDrawableById(id);
|
|
|
|
|
+ if (z) removeDrawable(*z);
|
|
|
}
|
|
}
|
|
|
- removeZeichnung(z);
|
|
|
|
|
|
|
+ removeDrawable(z);
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void UIMLView::layout(XML::Element& element,
|
|
void UIMLView::layout(XML::Element& element,
|
|
|
- Zeichnung& z,
|
|
|
|
|
|
|
+ Drawable& z,
|
|
|
int pWidth,
|
|
int pWidth,
|
|
|
int pHeight,
|
|
int pHeight,
|
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
@@ -1599,14 +1599,14 @@ void UIMLView::layout(XML::Element& element,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Text Framework::UIMLView::getZeichnungId(Zeichnung& z)
|
|
|
|
|
|
|
+Text Framework::UIMLView::getDrawableId(Drawable& z)
|
|
|
{
|
|
{
|
|
|
int index = memberList.getWertIndex(&z);
|
|
int index = memberList.getWertIndex(&z);
|
|
|
if (index >= 0) return *idList.z(index);
|
|
if (index >= 0) return *idList.z(index);
|
|
|
return "";
|
|
return "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Framework::UIMLView::removeZeichnung(Zeichnung& z)
|
|
|
|
|
|
|
+void Framework::UIMLView::removeDrawable(Drawable& z)
|
|
|
{
|
|
{
|
|
|
int index = memberList.getWertIndex(&z);
|
|
int index = memberList.getWertIndex(&z);
|
|
|
if (index >= 0)
|
|
if (index >= 0)
|
|
@@ -1618,9 +1618,9 @@ void Framework::UIMLView::removeZeichnung(Zeichnung& z)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool Framework::UIMLView::registerZeichnung(const char* id, Zeichnung* z)
|
|
|
|
|
|
|
+bool Framework::UIMLView::registerDrawable(const char* id, Drawable* z)
|
|
|
{
|
|
{
|
|
|
- Zeichnung* existing = members->z(id, textLength(id));
|
|
|
|
|
|
|
+ Drawable* existing = members->z(id, textLength(id));
|
|
|
if (existing)
|
|
if (existing)
|
|
|
{
|
|
{
|
|
|
z->release();
|
|
z->release();
|
|
@@ -1642,7 +1642,7 @@ Punkt UIMLView::calculateContentSize()
|
|
|
for (int i = dom->getChildCount() - 1; i >= 0; i--)
|
|
for (int i = dom->getChildCount() - 1; i >= 0; i--)
|
|
|
{ // TODO render elements backwards
|
|
{ // TODO render elements backwards
|
|
|
XML::Element* e = dom->zChild(i);
|
|
XML::Element* e = dom->zChild(i);
|
|
|
- Zeichnung* z = members->z(
|
|
|
|
|
|
|
+ Drawable* z = members->z(
|
|
|
e->getAttributeValue("id"), e->getAttributeValue("id").getLength());
|
|
e->getAttributeValue("id"), e->getAttributeValue("id").getLength());
|
|
|
if (z)
|
|
if (z)
|
|
|
{
|
|
{
|