|
@@ -77,7 +77,7 @@ void UIMLView::doMausEreignis( MausEreignis &me, bool userRet )
|
|
|
{
|
|
|
for( auto i = dom->getChilds(); i; i++ )
|
|
|
{
|
|
|
- Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ), i->getAttributeValue( "id" ).getLength() );
|
|
|
if( z )
|
|
|
z->doPublicMausEreignis( me );
|
|
|
}
|
|
@@ -120,7 +120,7 @@ void UIMLView::parseTable( Iterator<XML::Element *> childs, ObjTabelle *table )
|
|
|
if( table->getSpaltenAnzahl() < c )
|
|
|
table->addSpalte( Text( c - 1 ) );
|
|
|
if( z )
|
|
|
- table->setZeichnungZ( (char *)Text( c - 1 ), (char *)line, dynamic_cast<Zeichnung *>( z->getThis() ) );
|
|
|
+ table->setZeichnungZ( (char *)Text( c - 1 ), (char *)line, dynamic_cast<Zeichnung *>(z->getThis()) );
|
|
|
c++;
|
|
|
}
|
|
|
}
|
|
@@ -133,7 +133,7 @@ void UIMLView::parseFrame( Iterator<XML::Element *> childs, Fenster *frame )
|
|
|
{
|
|
|
Zeichnung *z = parseElement( i._ );
|
|
|
if( z )
|
|
|
- frame->addMember( dynamic_cast<Zeichnung *>( z->getThis() ) );
|
|
|
+ frame->addMember( dynamic_cast<Zeichnung *>(z->getThis()) );
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -147,7 +147,7 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
id = Text( "_" ) += nextId++;
|
|
|
e->setAttribute( "id", id );
|
|
|
}
|
|
|
- Zeichnung *z = members->z( id );
|
|
|
+ Zeichnung *z = members->z( id, id.getLength() );
|
|
|
if( !z )
|
|
|
{
|
|
|
|
|
@@ -278,7 +278,7 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
if( z && e->hasAttribute( "disabled" ) )
|
|
|
z->removeStyle( Zeichnung::Style::Erlaubt );
|
|
|
if( z )
|
|
|
- members->set( id, z );
|
|
|
+ members->set( id, id.getLength(), z );
|
|
|
}
|
|
|
return z;
|
|
|
}
|
|
@@ -286,7 +286,7 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
{
|
|
|
Text id = e->getAttributeValue( "id" );
|
|
|
- Zeichnung *z = members->z( id );
|
|
|
+ Zeichnung *z = members->z( id, id.getLength() );
|
|
|
if( z )
|
|
|
{
|
|
|
int width = z->getBreite();
|
|
@@ -296,14 +296,14 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text w = e->getAttributeValue( "width" );
|
|
|
width = w;
|
|
|
if( w.getText()[ w.getLength() - 1 ] == '%' )
|
|
|
- width = (int)( ( pWidth / 100.0 ) * width );
|
|
|
+ width = (int)((pWidth / 100.0) * width);
|
|
|
}
|
|
|
if( e->hasAttribute( "height" ) )
|
|
|
{
|
|
|
Text h = e->getAttributeValue( "height" );
|
|
|
height = h;
|
|
|
if( h.getText()[ h.getLength() - 1 ] == '%' )
|
|
|
- height = (int)( ( pHeight / 100.0 ) * height );
|
|
|
+ height = (int)((pHeight / 100.0) * height);
|
|
|
}
|
|
|
z->setSize( width, height );
|
|
|
if( e->hasAttribute( "align-left" ) )
|
|
@@ -319,7 +319,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
XML::Editor ed = e->zParent()->selectChildsByAttribute( "id", la );
|
|
|
for( auto i = ed.getIterator(); i; i++ )
|
|
|
layout( i, pWidth, pHeight );
|
|
|
- Zeichnung *laz = members->z( la );
|
|
|
+ Zeichnung *laz = members->z( la, la.getLength() );
|
|
|
if( laz )
|
|
|
x = laz->getX() + laz->getBreite();
|
|
|
}
|
|
@@ -328,7 +328,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text mt = e->getAttributeValue( "margin-left" );
|
|
|
int m = mt;
|
|
|
if( mt.getText()[ mt.getLength() - 1 ] == '%' )
|
|
|
- m = (int)( ( pWidth / 100.0 ) * m );
|
|
|
+ m = (int)((pWidth / 100.0) * m);
|
|
|
x += m;
|
|
|
}
|
|
|
z->setX( x );
|
|
@@ -346,7 +346,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
XML::Editor ed = e->zParent()->selectChildsByAttribute( "id", ra );
|
|
|
for( auto i = ed.getIterator(); i; i++ )
|
|
|
layout( i, pWidth, pHeight );
|
|
|
- Zeichnung *raz = members->z( ra );
|
|
|
+ Zeichnung *raz = members->z( ra, ra.getLength() );
|
|
|
if( raz )
|
|
|
x = raz->getX() - z->getBreite();
|
|
|
}
|
|
@@ -355,7 +355,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text mt = e->getAttributeValue( "margin-right" );
|
|
|
int m = mt;
|
|
|
if( mt.getText()[ mt.getLength() - 1 ] == '%' )
|
|
|
- m = (int)( ( pWidth / 100.0 ) * m );
|
|
|
+ m = (int)((pWidth / 100.0) * m);
|
|
|
x -= m;
|
|
|
}
|
|
|
z->setX( x );
|
|
@@ -373,7 +373,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
XML::Editor ed = e->zParent()->selectChildsByAttribute( "id", ta );
|
|
|
for( auto i = ed.getIterator(); i; i++ )
|
|
|
layout( i, pWidth, pHeight );
|
|
|
- Zeichnung *taz = members->z( ta );
|
|
|
+ Zeichnung *taz = members->z( ta, ta.getLength() );
|
|
|
if( taz )
|
|
|
y = taz->getY() + taz->getHeight();
|
|
|
}
|
|
@@ -382,7 +382,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text mt = e->getAttributeValue( "margin-top" );
|
|
|
int m = mt;
|
|
|
if( mt.getText()[ mt.getLength() - 1 ] == '%' )
|
|
|
- m = (int)( ( pHeight / 100.0 ) * m );
|
|
|
+ m = (int)((pHeight / 100.0) * m);
|
|
|
y += m;
|
|
|
}
|
|
|
z->setY( y );
|
|
@@ -400,7 +400,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
XML::Editor ed = e->zParent()->selectChildsByAttribute( "id", ba );
|
|
|
for( auto i = ed.getIterator(); i; i++ )
|
|
|
layout( i, pWidth, pHeight );
|
|
|
- Zeichnung *baz = members->z( ba );
|
|
|
+ Zeichnung *baz = members->z( ba, ba.getLength() );
|
|
|
if( baz )
|
|
|
y = baz->getY() - z->getHeight();
|
|
|
}
|
|
@@ -409,7 +409,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text mt = e->getAttributeValue( "margin-bottom" );
|
|
|
int m = mt;
|
|
|
if( mt.getText()[ mt.getLength() - 1 ] == '%' )
|
|
|
- m = (int)( ( pHeight / 100.0 ) * m );
|
|
|
+ m = (int)((pHeight / 100.0) * m);
|
|
|
y -= m;
|
|
|
}
|
|
|
z->setY( y );
|
|
@@ -421,19 +421,19 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
|
|
|
Text xt = e->getAttributeValue( "x" );
|
|
|
x = xt;
|
|
|
if( xt.getText()[ xt.getLength() - 1 ] == '%' )
|
|
|
- x = (int)( ( pWidth / 100.0 ) * x );
|
|
|
+ x = (int)((pWidth / 100.0) * x);
|
|
|
}
|
|
|
if( e->hasAttribute( "y" ) )
|
|
|
{
|
|
|
Text yt = e->getAttributeValue( "y" );
|
|
|
y = yt;
|
|
|
if( yt.getText()[ yt.getLength() - 1 ] == '%' )
|
|
|
- y = (int)( ( pHeight / 100.0 ) * y );
|
|
|
+ y = (int)((pHeight / 100.0) * y);
|
|
|
}
|
|
|
z->setPosition( x, y );
|
|
|
if( e->getName().istGleich( "textarea" ) )
|
|
|
{
|
|
|
- ( (TextFeld *)z )->zTextRenderer()->textFormatieren( ( (TextFeld *)z )->zText(), z->getInnenBreite() );
|
|
|
+ ((TextFeld *)z)->zTextRenderer()->textFormatieren( ((TextFeld *)z)->zText(), z->getInnenBreite() );
|
|
|
}
|
|
|
}
|
|
|
if( z )
|
|
@@ -496,7 +496,7 @@ void UIMLView::setUIML( Text uiml )
|
|
|
|
|
|
Zeichnung *UIMLView::zZeichnung( Text id )
|
|
|
{
|
|
|
- return members->z( id );
|
|
|
+ return members->z( id, id.getLength() );
|
|
|
}
|
|
|
|
|
|
|
|
@@ -537,7 +537,7 @@ Text UIMLView::addMember( Text uiml, Text parentId )
|
|
|
Zeichnung *z = parseElement( e );
|
|
|
if( z )
|
|
|
{
|
|
|
- dynamic_cast<Fenster *>( members->z( parentId ) )->addMember( dynamic_cast<Zeichnung *>( z->getThis() ) );
|
|
|
+ dynamic_cast<Fenster *>(members->z( parentId, parentId.getLength() ))->addMember( dynamic_cast<Zeichnung *>(z->getThis()) );
|
|
|
ed2.getIterator()->addChild( e );
|
|
|
}
|
|
|
return e->getAttributeValue( "id" );
|
|
@@ -555,7 +555,7 @@ void UIMLView::removeMember( Text id )
|
|
|
{
|
|
|
XML::Editor e = dom->selectChildsByAttribute( "id", id );
|
|
|
e.remove();
|
|
|
- members->remove( id );
|
|
|
+ members->remove( id, id.getLength() );
|
|
|
}
|
|
|
|
|
|
|
|
@@ -569,7 +569,7 @@ void UIMLView::doTastaturEreignis( TastaturEreignis &te )
|
|
|
{
|
|
|
for( auto i = dom->getChilds(); i; i++ )
|
|
|
{
|
|
|
- Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ), i->getAttributeValue( "id" ).getLength() );
|
|
|
if( z )
|
|
|
z->doTastaturEreignis( te );
|
|
|
}
|
|
@@ -585,7 +585,7 @@ bool UIMLView::tick( double tickVal )
|
|
|
{
|
|
|
for( auto i = dom->getChilds(); i; i++ )
|
|
|
{
|
|
|
- Zeichnung *z = members->z( i->getAttributeValue( "id" ) );
|
|
|
+ Zeichnung *z = members->z( i->getAttributeValue( "id" ), i->getAttributeValue( "id" ).getLength() );
|
|
|
if( z )
|
|
|
rend |= z->tick( tickVal );
|
|
|
}
|
|
@@ -607,7 +607,7 @@ void UIMLView::render( Bild &rObj )
|
|
|
for( int i = dom->getChildCount() - 1; i >= 0; i-- )
|
|
|
{
|
|
|
XML::Element *e = dom->zChild( i );
|
|
|
- Zeichnung *z = members->z( e->getAttributeValue( "id" ) );
|
|
|
+ Zeichnung *z = members->z( e->getAttributeValue( "id" ), e->getAttributeValue( "id" ).getLength() );
|
|
|
if( z )
|
|
|
z->render( rObj );
|
|
|
}
|
|
@@ -626,5 +626,5 @@ XML::Element *UIMLView::zDom() const
|
|
|
|
|
|
XML::Element *UIMLView::getDom() const
|
|
|
{
|
|
|
- return dom ? dynamic_cast<XML::Element *>( dom->getThis() ) : 0;
|
|
|
+ return dom ? dynamic_cast<XML::Element *>(dom->getThis()) : 0;
|
|
|
}
|