|
@@ -101,32 +101,55 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
if( !e->hasAttribute( "margin-bottom" ) )
|
|
|
e->setAttribute( "margin-bottom", m );
|
|
|
}
|
|
|
-
|
|
|
- if( e->getName().istGleich( "textfield" ) )
|
|
|
+ if( e->hasAttribute( "class" ) )
|
|
|
{
|
|
|
- TextFeld *t = init.createTextFeld( init.initParam );
|
|
|
- t->setStyle( TextFeld::Style::TextFeld );
|
|
|
- t->setText( e->getText() );
|
|
|
- z = t;
|
|
|
- }
|
|
|
- if( e->getName().istGleich( "text" ) )
|
|
|
- {
|
|
|
- TextFeld *t = init.createTextFeld( init.initParam );
|
|
|
- t->setStyle( TextFeld::Style::Text );
|
|
|
- t->setText( e->getText() );
|
|
|
- z = t;
|
|
|
+ Text c = e->getAttributeValue( "class" );
|
|
|
+ while( 1 )
|
|
|
+ {
|
|
|
+ Text *t;
|
|
|
+ if( c.hat( "," ) )
|
|
|
+ t = c.getTeilText( 0, c.positionVon( ',' ) );
|
|
|
+ else
|
|
|
+ t = new Text( c );
|
|
|
+ XML::Editor ce = dom->selectChildsByName( "class" ).whereAttributeEquals( "id", *t );
|
|
|
+ for( auto i = ce.getIterator(); i; i++ )
|
|
|
+ {
|
|
|
+ for( auto j = i->getAttributeNames(), k = i->getAttributeValues(); j && k; j++, k++ )
|
|
|
+ {
|
|
|
+ if( !e->hasAttribute( j->getText() ) )
|
|
|
+ e->setAttribute( j->getText(), i->getText() );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ t->release();
|
|
|
+ if( c.hat( "," ) )
|
|
|
+ c.remove( 0, c.positionVon( ',' + 1 ) );
|
|
|
+ else
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- if( e->getName().istGleich( "textarea" ) )
|
|
|
+
|
|
|
+ if( e->getName().istGleich( "textfield" ) ||
|
|
|
+ e->getName().istGleich( "text" ) ||
|
|
|
+ e->getName().istGleich( "textarea" ) )
|
|
|
{
|
|
|
TextFeld *t = init.createTextFeld( init.initParam );
|
|
|
- t->setStyle( TextFeld::Style::TextGebiet );
|
|
|
+ if( e->getName().istGleich( "textfield" ) )
|
|
|
+ t->setStyle( TextFeld::Style::TextFeld );
|
|
|
+ if( e->getName().istGleich( "text" ) )
|
|
|
+ t->setStyle( TextFeld::Style::Text );
|
|
|
+ if( e->getName().istGleich( "textarea" ) )
|
|
|
+ t->setStyle( TextFeld::Style::TextGebiet );
|
|
|
t->setText( e->getText() );
|
|
|
+ if( e->hasAttribute( "font-size" ) )
|
|
|
+ t->setSchriftSize( (int)e->getAttributeValue( "font-size" ) );
|
|
|
z = t;
|
|
|
}
|
|
|
if( e->getName().istGleich( "button" ) )
|
|
|
{
|
|
|
Knopf *k = init.createKnopf( init.initParam );
|
|
|
k->setText( e->getText() );
|
|
|
+ if( e->hasAttribute( "font-size" ) )
|
|
|
+ k->setSchriftSize( (int)e->getAttributeValue( "font-size" ) );
|
|
|
z = k;
|
|
|
}
|
|
|
if( e->getName().istGleich( "table" ) )
|
|
@@ -140,7 +163,8 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
z->setToolTipText( e->getAttributeValue( "tooltip" ), init.initParam.bildschirm );
|
|
|
if( z && e->hasAttribute( "style" ) )
|
|
|
z->setStyle( (__int64)e->getAttributeValue( "style" ) );
|
|
|
- members->set( id, z );
|
|
|
+ if( z )
|
|
|
+ members->set( id, z );
|
|
|
}
|
|
|
return z;
|
|
|
}
|
|
@@ -347,12 +371,13 @@ void UIMLView::doMausEreignis( MausEreignis &me )
|
|
|
bool verarbeitet = me.verarbeitet;
|
|
|
ZeichnungHintergrund::doMausEreignis( me );
|
|
|
me.verarbeitet = verarbeitet;
|
|
|
- for( auto i = members->getIterator(); i; i++ )
|
|
|
+ if( dom )
|
|
|
{
|
|
|
-
|
|
|
- if( i._ )
|
|
|
- {
|
|
|
- i->doMausEreignis( me );
|
|
|
+ for( auto i = dom->getChilds(); i; i++ )
|
|
|
+ {
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ if( z )
|
|
|
+ z->doMausEreignis( me );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -364,12 +389,13 @@ void UIMLView::doTastaturEreignis( TastaturEreignis &te )
|
|
|
bool verarbeitet = te.verarbeitet;
|
|
|
ZeichnungHintergrund::doTastaturEreignis( te );
|
|
|
te.verarbeitet = verarbeitet;
|
|
|
- for( auto i = members->getIterator(); i; i++ )
|
|
|
+ if( dom )
|
|
|
{
|
|
|
-
|
|
|
- if( i._ )
|
|
|
- {
|
|
|
- i->doTastaturEreignis( te );
|
|
|
+ for( auto i = dom->getChilds(); i; i++ )
|
|
|
+ {
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ if( z )
|
|
|
+ z->doTastaturEreignis( te );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -379,12 +405,13 @@ void UIMLView::doTastaturEreignis( TastaturEreignis &te )
|
|
|
|
|
|
bool UIMLView::tick( double tickVal )
|
|
|
{
|
|
|
- for( auto i = members->getIterator(); i; i++ )
|
|
|
+ if( dom )
|
|
|
{
|
|
|
-
|
|
|
- if( i._ )
|
|
|
- {
|
|
|
- rend |= i->tick( tickVal );
|
|
|
+ for( auto i = dom->getChilds(); i; i++ )
|
|
|
+ {
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ if( z )
|
|
|
+ rend |= z->tick( tickVal );
|
|
|
}
|
|
|
}
|
|
|
return ZeichnungHintergrund::tick( tickVal );
|
|
@@ -394,12 +421,13 @@ bool UIMLView::tick( double tickVal )
|
|
|
void UIMLView::render( Bild &rObj )
|
|
|
{
|
|
|
ZeichnungHintergrund::render( rObj );
|
|
|
- for( auto i = members->getIterator(); i; i++ )
|
|
|
- {
|
|
|
-
|
|
|
- if( i._ )
|
|
|
- {
|
|
|
- i->render( rObj );
|
|
|
+ if( dom )
|
|
|
+ {
|
|
|
+ for( auto i = dom->getChilds(); i; i++ )
|
|
|
+ {
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ if( z )
|
|
|
+ z->render( rObj );
|
|
|
}
|
|
|
}
|
|
|
}
|