Browse Source

KontrollKnopf zu UIML hinzugefügt

Kolja Strohm 5 years ago
parent
commit
5ec9088a88
2 changed files with 9 additions and 0 deletions
  1. 8 0
      UIMLView.cpp
  2. 1 0
      UIMLView.h

+ 8 - 0
UIMLView.cpp

@@ -183,6 +183,14 @@ Zeichnung *UIMLView::parseElement( XML::Element *e )
                 k->setSchriftSize( (unsigned char)(int)e->getAttributeValue( "font-size" ) );
             z = k;
         }
+        if( e->getName().istGleich( "check" ) )
+        {
+            KontrollKnopf *k = init.createKontrollKnopf( init.initParam );
+            k->setText( e->getText() );
+            k->setStyle( KontrollKnopf::Style::Selected, e->hasAttribute( "selected" ) );
+            if( e->hasAttribute( "font-size" ) )
+                k->setSSize( (unsigned char)(int)e->getAttributeValue( "font-size" ) );
+        }
         if( e->getName().istGleich( "table" ) )
         {
             ObjTabelle *t = init.createObjTabelle( init.initParam );

+ 1 - 0
UIMLView.h

@@ -12,6 +12,7 @@
     class (only as direct child of uimlview),
     textfield, 
     button, 
+    check, (KontrollKnopf)
     text,
     textarea,
     table (allowed child elements: tr),