|
@@ -382,7 +382,8 @@ void TextFeld::addZeile( const char *zeile )
|
|
|
if( tm->text )
|
|
|
{
|
|
|
Text *txt = new Text( zeile );
|
|
|
- txt->append( "\n" );
|
|
|
+ if( zeile[ txt->getLength() - 1 ] != '\n' )
|
|
|
+ txt->append( "\n" );
|
|
|
TextRenderer *r = tm->renderer->z( 0 );
|
|
|
if( tm->textStyle.get( tm->textStyle.getEintragAnzahl() - 1 ).rendererIndex < tm->renderer->getEintragAnzahl() )
|
|
|
r = tm->renderer->z( tm->textStyle.get( tm->textStyle.getEintragAnzahl() - 1 ).rendererIndex );
|
|
@@ -405,6 +406,39 @@ void TextFeld::addZeile( const char *zeile )
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+void TextFeld::addZeile( const char *zeile, int color )
|
|
|
+{
|
|
|
+ if( tm->text )
|
|
|
+ {
|
|
|
+ Text *txt = new Text( zeile );
|
|
|
+ if( zeile[ txt->getLength() - 1 ] != '\n' )
|
|
|
+ txt->append( "\n" );
|
|
|
+ TextRenderer * r = tm->renderer->z( 0 );
|
|
|
+ if( tm->textStyle.get( tm->textStyle.getEintragAnzahl() - 1 ).rendererIndex < tm->renderer->getEintragAnzahl() )
|
|
|
+ r = tm->renderer->z( tm->textStyle.get( tm->textStyle.getEintragAnzahl() - 1 ).rendererIndex );
|
|
|
+ if( r )
|
|
|
+ {
|
|
|
+ bool vs = vertikalScrollBar && hatStyle( Style::VScroll );
|
|
|
+ int rbr = ( rahmen && hatStyle( Style::Rahmen ) ) ? rahmen->getRBreite() : 0;
|
|
|
+ r->setSchriftSize( tm->textStyle.get( tm->textStyle.getEintragAnzahl() - 1 ).fontSize );
|
|
|
+ r->textFormatieren( txt, gr.x - ( (int)vs * 15 ) - rbr * 2 );
|
|
|
+ }
|
|
|
+ lockZeichnung();
|
|
|
+ tm->text->append( txt->getText() );
|
|
|
+ setSchriftFarbe( tm->text->getLength() - txt->getLength(), tm->text->getLength(), color );
|
|
|
+ unlockZeichnung();
|
|
|
+ txt->release();
|
|
|
+ if( hatStyle( Style::VScroll ) )
|
|
|
+ updateVScroll();
|
|
|
+ if( hatStyle( Style::HScroll ) )
|
|
|
+ updateHScroll();
|
|
|
+ rend = 1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
void TextFeld::deselectAuswahl()
|
|
|
{
|