|
@@ -3,6 +3,7 @@
|
|
|
#include "TextFeld.h"
|
|
|
#include "Knopf.h"
|
|
|
#include "Tabelle.h"
|
|
|
+#include "Fenster.h"
|
|
|
#include "Schrift.h"
|
|
|
#include "Bildschirm.h"
|
|
|
|
|
@@ -75,6 +76,16 @@ void UIMLView::parseTable( Iterator<XML::Element*> childs, ObjTabelle *table )
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void UIMLView::parseFrame( Iterator<XML::Element*> childs, Fenster *frame )
|
|
|
+{
|
|
|
+ for( auto i = childs; i; i++ )
|
|
|
+ {
|
|
|
+ Zeichnung *z = parseElement( i._ );
|
|
|
+ if( z )
|
|
|
+ frame->addMember( z->getThis() );
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
{
|
|
|
Text id;
|
|
@@ -175,6 +186,12 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
|
|
|
parseTable( e->getChilds(), t );
|
|
|
z = t;
|
|
|
}
|
|
|
+ if( e->getName().istGleich( "frame" ) )
|
|
|
+ {
|
|
|
+ Fenster *f = init.createFenster( init.initParam );
|
|
|
+ parseFrame( e->getChilds(), f );
|
|
|
+ z = f;
|
|
|
+ }
|
|
|
// add general attributes
|
|
|
if( z && e->hasAttribute( "tooltip" ) )
|
|
|
z->setToolTipText( e->getAttributeValue( "tooltip" ), init.initParam.bildschirm );
|
|
@@ -399,6 +416,42 @@ void UIMLView::layout()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// fügt ein element hinzu
|
|
|
+// uiml: Ein xml text gemät des KSG UIML standarts, welcher das neue Objekt darstellt
|
|
|
+void UIMLView::addMember( Text uiml )
|
|
|
+{
|
|
|
+ XML::Element *e = new XML::Element( uiml );
|
|
|
+ if( parseElement( e ) )
|
|
|
+ dom->addChild( e );
|
|
|
+}
|
|
|
+
|
|
|
+// fügt ein element zu einem Elternelement hinzu (funktioniert momentan nur mit frame Objekten)
|
|
|
+// uiml: Ein xml text gemät des KSG UIML standarts, welcher das neue Objekt darstellt
|
|
|
+void UIMLView::addMember( Text uiml, Text parentId )
|
|
|
+{
|
|
|
+ XML::Element *e = new XML::Element( uiml );
|
|
|
+ XML::Editor ed = dom->selectChildren();
|
|
|
+ while( ed.getIterator() )
|
|
|
+ {
|
|
|
+ XML::Editor ed2 = ed.whereAttributeEquals( "id", parentId );
|
|
|
+ if( ed2.getIterator() )
|
|
|
+ {
|
|
|
+ if( ed2.getIterator()->getName().istGleich( "frame" ) )
|
|
|
+ {
|
|
|
+ Zeichnung *z = parseElement( e );
|
|
|
+ if( z )
|
|
|
+ {
|
|
|
+ ( (Fenster*)members->z( parentId ) )->addMember( z->getThis() );
|
|
|
+ ed2.getIterator()->addChild( e );
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ed = ed.selectChildren();
|
|
|
+ }
|
|
|
+ e->release();
|
|
|
+}
|
|
|
+
|
|
|
// Verarbeitet ein Maus Ereignis. Wird vom Framework automatisch aufgerufen.
|
|
|
// me: Das Ereignis
|
|
|
void UIMLView::doMausEreignis( MausEreignis &me )
|