|
@@ -3,84 +3,84 @@
|
|
|
#include <Textfeld.h>
|
|
|
#include <MausEreignis.h>
|
|
|
|
|
|
-Knopf *initKnopf( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, char *titel )
|
|
|
+Knopf* initKnopf(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, const char* titel)
|
|
|
{
|
|
|
- Knopf *ret = uiFactory.createKnopf( uiFactory.initParam );
|
|
|
- ret->addStyle( style );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- ret->setText( titel );
|
|
|
- return ret;
|
|
|
+ Knopf* ret = uiFactory.createKnopf(uiFactory.initParam);
|
|
|
+ ret->addStyle(style);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ ret->setText(titel);
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
-KontrollKnopf *initKontrollKnopf( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, char *txt )
|
|
|
+KontrollKnopf* initKontrollKnopf(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, const char* txt)
|
|
|
{
|
|
|
- KontrollKnopf *ret = uiFactory.createKontrollKnopf( uiFactory.initParam );
|
|
|
- ret->addStyle( style );
|
|
|
- ret->setText( txt );
|
|
|
- ret->setSText( txt );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- return ret;
|
|
|
+ KontrollKnopf* ret = uiFactory.createKontrollKnopf(uiFactory.initParam);
|
|
|
+ ret->addStyle(style);
|
|
|
+ ret->setText(txt);
|
|
|
+ ret->setSText(txt);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
-TextFeld *initTextFeld( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, char *txt )
|
|
|
+TextFeld* initTextFeld(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, const char* txt)
|
|
|
{
|
|
|
- TextFeld *ret = uiFactory.createTextFeld( uiFactory.initParam );
|
|
|
- ret->setStyle( style );
|
|
|
- ret->setText( txt );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- return ret;
|
|
|
+ TextFeld* ret = uiFactory.createTextFeld(uiFactory.initParam);
|
|
|
+ ret->setStyle(style);
|
|
|
+ ret->setText(txt);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
-AuswahlBox *initAuswahlBox( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, std::initializer_list< char * > values )
|
|
|
+AuswahlBox* initAuswahlBox(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, std::initializer_list< const char* > values)
|
|
|
{
|
|
|
- AuswahlBox *ret = uiFactory.createAuswahlBox( uiFactory.initParam );
|
|
|
- ret->addStyle( style );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- for( auto i = values.begin(); i != values.end(); i++ )
|
|
|
- {
|
|
|
- ret->addEintrag( *i );
|
|
|
- }
|
|
|
- return ret;
|
|
|
+ AuswahlBox* ret = uiFactory.createAuswahlBox(uiFactory.initParam);
|
|
|
+ ret->addStyle(style);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ for (auto i = values.begin(); i != values.end(); i++)
|
|
|
+ {
|
|
|
+ ret->addEintrag(*i);
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
-ObjTabelle *initObjTabelle( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, std::initializer_list< OBJTabelleSpalteIni > spalten, int überschriftHöhe )
|
|
|
+ObjTabelle* initObjTabelle(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, std::initializer_list< OBJTabelleSpalteIni > spalten, int überschriftHöhe)
|
|
|
{
|
|
|
- ObjTabelle *ret = uiFactory.createObjTabelle( uiFactory.initParam );
|
|
|
- ret->addStyle( style );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- for( auto i = spalten.begin(); i != spalten.end(); i++ )
|
|
|
- {
|
|
|
- ret->addSpalte( i->name );
|
|
|
- ret->setSpaltenBreite( i->name, i->breite );
|
|
|
- if( ( style | ObjTabelle::Style::SpaltenBreiteMin ) == style )
|
|
|
- ret->setMinSpaltenBreite( i->name, i->minBreite );
|
|
|
- if( ( style | ObjTabelle::Style::SpaltenBreiteMax ) == style )
|
|
|
- ret->setMaxSpaltenBreite( i->name, i->maxBreite );
|
|
|
- if( überschriftHöhe )
|
|
|
- {
|
|
|
- if( ret->getZeilenNummer( "Überschrift" ) < 0 )
|
|
|
- {
|
|
|
- ret->addZeile( 0, "Überschrift" );
|
|
|
- ret->setZeilenHeight( 0, 20 );
|
|
|
- }
|
|
|
- ret->setZeichnungZ( i->name, "Überschrift", initTextFeld( 0, 0, i->breite, 20, uiFactory, TextFeld::Style::Text | TextFeld::Style::Center, i->name ) );
|
|
|
- }
|
|
|
- }
|
|
|
- return ret;
|
|
|
+ ObjTabelle* ret = uiFactory.createObjTabelle(uiFactory.initParam);
|
|
|
+ ret->addStyle(style);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ for (auto i = spalten.begin(); i != spalten.end(); i++)
|
|
|
+ {
|
|
|
+ ret->addSpalte(i->name);
|
|
|
+ ret->setSpaltenBreite(i->name, i->breite);
|
|
|
+ if ((style | ObjTabelle::Style::SpaltenBreiteMin) == style)
|
|
|
+ ret->setMinSpaltenBreite(i->name, i->minBreite);
|
|
|
+ if ((style | ObjTabelle::Style::SpaltenBreiteMax) == style)
|
|
|
+ ret->setMaxSpaltenBreite(i->name, i->maxBreite);
|
|
|
+ if (überschriftHöhe)
|
|
|
+ {
|
|
|
+ if (ret->getZeilenNummer("Überschrift") < 0)
|
|
|
+ {
|
|
|
+ ret->addZeile(0, "Überschrift");
|
|
|
+ ret->setZeilenHeight(0, 20);
|
|
|
+ }
|
|
|
+ ret->setZeichnungZ(i->name, "Überschrift", initTextFeld(0, 0, i->breite, 20, uiFactory, TextFeld::Style::Text | TextFeld::Style::Center, i->name));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
-LDiag *initLinienDiagramm( int x, int y, int br, int hö, UIInit &uiFactory, __int64 style, DiagDaten *data )
|
|
|
+LDiag* initLinienDiagramm(int x, int y, int br, int hö, UIInit& uiFactory, __int64 style, DiagDaten* data)
|
|
|
{
|
|
|
- LDiag *ret = uiFactory.createLDiag( uiFactory.initParam );
|
|
|
- ret->setStyle( style );
|
|
|
- ret->setPosition( x, y );
|
|
|
- ret->setSize( br, hö );
|
|
|
- if( data )
|
|
|
- ret->setDiagDatenZ( data );
|
|
|
- return ret;
|
|
|
+ LDiag* ret = uiFactory.createLDiag(uiFactory.initParam);
|
|
|
+ ret->setStyle(style);
|
|
|
+ ret->setPosition(x, y);
|
|
|
+ ret->setSize(br, hö);
|
|
|
+ if (data)
|
|
|
+ ret->setDiagDatenZ(data);
|
|
|
+ return ret;
|
|
|
}
|