|
@@ -206,11 +206,8 @@ void UIMLElement::layout(XML::Element& element,
|
|
}
|
|
}
|
|
if (z)
|
|
if (z)
|
|
{
|
|
{
|
|
- generalLayouter.layout(*i.val(),
|
|
+ generalLayouter.layout(
|
|
- *z,
|
|
+ *i.val(), *z, pWidth, pHeight, generalLayouter);
|
|
- pWidth,
|
|
|
|
- pHeight,
|
|
|
|
- generalLayouter);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -235,7 +232,19 @@ Zeichnung* UIMLTextField::parseElement(
|
|
{
|
|
{
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
- t->addStyle(TextFeld::Style::TextFeld);
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ t->setStyle((int)style);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ t->addStyle(TextFeld::Style::TextFeld);
|
|
|
|
+ }
|
|
return t;
|
|
return t;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -245,22 +254,20 @@ void UIMLTextField::layout(XML::Element& element,
|
|
int pHeight,
|
|
int pHeight,
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
{
|
|
{
|
|
- z.setStyle(TextFeld::Style::HCenter,
|
|
+ if (element.hasAttribute("text-align-horizontal"))
|
|
- element.hasAttribute("text-align-horizontal")
|
|
+ z.setStyle(TextFeld::Style::HCenter,
|
|
- && element.getAttributeValue("text-align-horizontal")
|
|
+ element.getAttributeValue("text-align-horizontal")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
- z.setStyle(TextFeld::Style::VCenter,
|
|
+ if (element.hasAttribute("text-align-vertical"))
|
|
- element.hasAttribute("text-align-vertical")
|
|
+ z.setStyle(TextFeld::Style::VCenter,
|
|
- && element.getAttributeValue("text-align-vertical")
|
|
+ element.getAttributeValue("text-align-vertical")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
if (element.hasAttribute("font-size"))
|
|
if (element.hasAttribute("font-size"))
|
|
((TextFeld*)&z)
|
|
((TextFeld*)&z)
|
|
->setSchriftSize(
|
|
->setSchriftSize(
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
- z.setStyle(TextFeld::Style::Editierbar,
|
|
+ if (element.hasAttribute("disabled"))
|
|
- !element.hasAttribute("disabled")
|
|
+ z.removeStyle(TextFeld::Style::Editierbar);
|
|
- || (element.getAttributeValue("disabled").getLength() != 0
|
|
|
|
- && !element.getAttributeValue("disabled").istGleich("true")));
|
|
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
if (element.hasAttribute("width"))
|
|
if (element.hasAttribute("width"))
|
|
{
|
|
{
|
|
@@ -295,6 +302,15 @@ Zeichnung* UIMLButton::parseElement(
|
|
{
|
|
{
|
|
Knopf* k = generalFactory.getFactory().createKnopf(
|
|
Knopf* k = generalFactory.getFactory().createKnopf(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ k->setStyle((int)style);
|
|
|
|
+ }
|
|
return k;
|
|
return k;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -326,6 +342,15 @@ Zeichnung* UIMLCheck::parseElement(
|
|
{
|
|
{
|
|
KontrollKnopf* k = generalFactory.getFactory().createKontrollKnopf(
|
|
KontrollKnopf* k = generalFactory.getFactory().createKontrollKnopf(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ k->setStyle((int)style);
|
|
|
|
+ }
|
|
return k;
|
|
return k;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -360,7 +385,19 @@ Zeichnung* UIMLText::parseElement(
|
|
{
|
|
{
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
- t->addStyle(TextFeld::Style::Text);
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ t->setStyle((int)style);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ t->addStyle(TextFeld::Style::Text);
|
|
|
|
+ }
|
|
return t;
|
|
return t;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -370,22 +407,20 @@ void UIMLText::layout(XML::Element& element,
|
|
int pHeight,
|
|
int pHeight,
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
{
|
|
{
|
|
- z.setStyle(TextFeld::Style::HCenter,
|
|
+ if (element.hasAttribute("text-align-horizontal"))
|
|
- element.hasAttribute("text-align-horizontal")
|
|
+ z.setStyle(TextFeld::Style::HCenter,
|
|
- && element.getAttributeValue("text-align-horizontal")
|
|
+ element.getAttributeValue("text-align-horizontal")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
- z.setStyle(TextFeld::Style::VCenter,
|
|
+ if (element.hasAttribute("text-align-vertical"))
|
|
- element.hasAttribute("text-align-vertical")
|
|
+ z.setStyle(TextFeld::Style::VCenter,
|
|
- && element.getAttributeValue("text-align-vertical")
|
|
+ element.getAttributeValue("text-align-vertical")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
if (element.hasAttribute("font-size"))
|
|
if (element.hasAttribute("font-size"))
|
|
((TextFeld*)&z)
|
|
((TextFeld*)&z)
|
|
->setSchriftSize(
|
|
->setSchriftSize(
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
- z.setStyle(TextFeld::Style::Editierbar,
|
|
+ if (element.hasAttribute("disabled"))
|
|
- !element.hasAttribute("disabled")
|
|
+ z.removeStyle(TextFeld::Style::Editierbar);
|
|
- || (element.getAttributeValue("disabled").getLength() != 0
|
|
|
|
- && !element.getAttributeValue("disabled").istGleich("true")));
|
|
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
if (element.hasAttribute("width"))
|
|
if (element.hasAttribute("width"))
|
|
{
|
|
{
|
|
@@ -420,7 +455,19 @@ Zeichnung* UIMLTextArea::parseElement(
|
|
{
|
|
{
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
TextFeld* t = generalFactory.getFactory().createTextFeld(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
- t->addStyle(TextFeld::Style::TextGebiet);
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ t->setStyle((int)style);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ t->addStyle(TextFeld::Style::TextGebiet);
|
|
|
|
+ }
|
|
return t;
|
|
return t;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -430,22 +477,20 @@ void UIMLTextArea::layout(XML::Element& element,
|
|
int pHeight,
|
|
int pHeight,
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
{
|
|
{
|
|
- z.setStyle(TextFeld::Style::HCenter,
|
|
+ if (element.hasAttribute("text-align-horizontal"))
|
|
- element.hasAttribute("text-align-horizontal")
|
|
+ z.setStyle(TextFeld::Style::HCenter,
|
|
- && element.getAttributeValue("text-align-horizontal")
|
|
+ element.getAttributeValue("text-align-horizontal")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
- z.setStyle(TextFeld::Style::VCenter,
|
|
+ if (element.hasAttribute("text-align-vertical"))
|
|
- element.hasAttribute("text-align-vertical")
|
|
+ z.setStyle(TextFeld::Style::VCenter,
|
|
- && element.getAttributeValue("text-align-vertical")
|
|
+ element.getAttributeValue("text-align-vertical")
|
|
- .istGleich("center"));
|
|
+ .istGleich("center"));
|
|
if (element.hasAttribute("font-size"))
|
|
if (element.hasAttribute("font-size"))
|
|
((TextFeld*)&z)
|
|
((TextFeld*)&z)
|
|
->setSchriftSize(
|
|
->setSchriftSize(
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
(unsigned char)(int)element.getAttributeValue("font-size"));
|
|
- z.setStyle(TextFeld::Style::Editierbar,
|
|
+ if (element.hasAttribute("disabled"))
|
|
- !element.hasAttribute("disabled")
|
|
+ z.removeStyle(TextFeld::Style::Editierbar);
|
|
- || (element.getAttributeValue("disabled").getLength() != 0
|
|
|
|
- && !element.getAttributeValue("disabled").istGleich("true")));
|
|
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
((TextFeld*)&z)->setText(element.getText());
|
|
((TextFeld*)&z)
|
|
((TextFeld*)&z)
|
|
->zTextRenderer()
|
|
->zTextRenderer()
|
|
@@ -509,6 +554,15 @@ Zeichnung* UIMLTable::parseElement(
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ t->setStyle((int)style);
|
|
|
|
+ }
|
|
return t;
|
|
return t;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -518,15 +572,15 @@ void UIMLTable::layout(XML::Element& element,
|
|
int pHeight,
|
|
int pHeight,
|
|
UIMLContainer& generalLayouter)
|
|
UIMLContainer& generalLayouter)
|
|
{
|
|
{
|
|
- z.setStyle(ObjTabelle::Style::HScroll,
|
|
+ if (element.hasAttribute("scroll"))
|
|
- element.hasAttribute("scroll")
|
|
+ {
|
|
- && element.getAttributeValue("scroll").istGleich("horizontal"));
|
|
+ z.setStyle(ObjTabelle::Style::HScroll,
|
|
- z.setStyle(ObjTabelle::Style::VScroll,
|
|
+ element.getAttributeValue("scroll").istGleich("horizontal"));
|
|
- element.hasAttribute("scroll")
|
|
+ z.setStyle(ObjTabelle::Style::VScroll,
|
|
- && element.getAttributeValue("scroll").istGleich("vertical"));
|
|
+ element.getAttributeValue("scroll").istGleich("vertical"));
|
|
- z.setStyle(ObjTabelle::Style::scroll,
|
|
+ z.setStyle(ObjTabelle::Style::scroll,
|
|
- element.hasAttribute("scroll")
|
|
+ element.getAttributeValue("scroll").istGleich("both"));
|
|
- && element.getAttributeValue("scroll").istGleich("both"));
|
|
+ }
|
|
UIMLElement::layout(element, z, pWidth, pHeight, generalLayouter);
|
|
UIMLElement::layout(element, z, pWidth, pHeight, generalLayouter);
|
|
ObjTabelle* objT = (ObjTabelle*)&z;
|
|
ObjTabelle* objT = (ObjTabelle*)&z;
|
|
if (objT->getZeilenAnzahl() > 0)
|
|
if (objT->getZeilenAnzahl() > 0)
|
|
@@ -559,6 +613,15 @@ Zeichnung* UIMLFrame::parseElement(
|
|
{
|
|
{
|
|
Fenster* f = generalFactory.getFactory().createFenster(
|
|
Fenster* f = generalFactory.getFactory().createFenster(
|
|
generalFactory.getFactory().initParam);
|
|
generalFactory.getFactory().initParam);
|
|
|
|
+ if (element.hasAttribute("style"))
|
|
|
|
+ {
|
|
|
|
+ Text style = element.getAttributeValue("style");
|
|
|
|
+ if (!style.hatAt(0, "0x"))
|
|
|
|
+ {
|
|
|
|
+ style.insert(0, "0x");
|
|
|
|
+ }
|
|
|
|
+ f->setStyle((int)style);
|
|
|
|
+ }
|
|
for (auto i = element.getChilds(); i; i++)
|
|
for (auto i = element.getChilds(); i; i++)
|
|
{
|
|
{
|
|
Zeichnung* z = generalFactory.parseElement(*i.val(), generalFactory);
|
|
Zeichnung* z = generalFactory.parseElement(*i.val(), generalFactory);
|