diff -Nru graphtft-0.0.8-orig/display.c graphtft-0.0.8/display.c
--- graphtft-0.0.8-orig/display.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/display.c	2005-06-11 23:24:08.000000000 +0200
@@ -33,6 +33,7 @@
 #include <vdr/menu.h>
 
 #define SECONDS(x) ((x)*1000)
+#define MSECONDS(x) ((x)*1)
 
 cGraphTFTDisplay::cGraphTFTDisplay()
 #if VDRVERSNUM >= 10300
@@ -44,6 +45,11 @@
 
 	// init thread stuff
 	_active = false;
+	_marquee_active = false;
+	_marquee_left = false;
+	_marquee_idx = 0;
+	_marquee_count = 0;
+	_marquee_strip = 0;
 	_updateIn = SECONDS(60);
 	_recordingIn = 0;
 	_volumeIn = 0;
@@ -70,7 +76,7 @@
 	_menu.currentPos = 0;
 	_menu.topPos = 0;
 	_pSelect = NULL;
-	_Dumped =  time_ms();
+	_Dumped =  timeMs.Elapsed();
 
 	// init pbp stuff
 	_pbpActive = false;
@@ -187,7 +193,7 @@
 		d(4, "updating display\n");
 
 		// milliseconds elapsed since last update
-		elapsed = wait ? time_ms() - wait : 0;
+		elapsed = wait ? timeMs.Elapsed() - wait : 0;
 
 		// check for volumebar
 		if (_volumeIn < 0)
@@ -219,7 +225,7 @@
 		}
 
 		// here do the update
-		wait = time_ms();
+		wait = timeMs.Elapsed();
 		switch (_mode) {
 		case NormalTV:
 			Display(sectionNormalTV);
@@ -242,7 +248,7 @@
 		default:
 			break;
 		}
-		elapsed = time_ms() - wait;
+		elapsed = timeMs.Elapsed() - wait;
 		d(4, "update took %d ms\n", elapsed);
 		
 		// next update in...?
@@ -250,8 +256,12 @@
 			_updateIn = SECONDS(1) - elapsed; // one second minus update time
 		else if (_recordings.size() > 1)
 			_updateIn = _recordingIn; // use time calculated above
-		else
-			_updateIn = SECONDS(60); // one minute
+		else {
+			if( _marquee_active == false ){
+				_updateIn = SECONDS(60); // one minute
+				_marquee_active = true;
+			}
+		}
 
 		// possibly updating osdmessage 
 		if (_messageIn > 0 && _messageIn < _updateIn)
@@ -279,7 +289,7 @@
 		}*/
 
 		// wait for event or timeout
-		wait = time_ms();
+		wait = timeMs.Elapsed();
 		_doUpdate.TimedWait(_mutex, _updateIn);
 
 		while (_delayIn > 0) { // a delayed update was requested
@@ -381,6 +391,10 @@
 			}
 		}
 		_delayIn = 100;
+		_marquee_active = false;
+		if( GraphTFTSetup.ViewType == 2 || GraphTFTSetup.ViewType == 3) {
+			_updateIn = MSECONDS(GraphTFTSetup.ScrollTime); 
+		}
 		_doUpdate.Broadcast();
 	}
 }
@@ -413,6 +427,10 @@
 		if ((pos = _channelInfo.rfind(',')) != -1)
 			_channelInfo.erase(pos);
 		_delayIn = 100;
+		_marquee_active = false;
+		if( GraphTFTSetup.ViewType == 2 || GraphTFTSetup.ViewType == 3) {
+			_updateIn = MSECONDS(GraphTFTSetup.ScrollTime); 
+		}
 		_doUpdate.Broadcast();
 	}
 }
@@ -722,11 +740,11 @@
 				break;
 
 			case itemText:
-				DisplayText( p->X(), p->Y(), p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(), p->Transperents(), p->Font(), p->Size(), p->Align(), p->Lines(), p->Text() );
+				DisplayText( p->X(), p->Y(), p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(), p->Transperents(), p->Font(), p->Size(), p->Align(), p->Lines(), p->Text(),false );
 				 break;
 
 			case itemTimebar:
-				 DisplayTimebar( p->X(), p->Y() ,p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(),p->Transperents(),p->Switch());
+				 DisplayTimebar( p->X(), p->Y() ,p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(),p->Transperents(),p->Switch(), p->BgX(), p->BgY(), p->BgWidth(), p->BgHeight(), p->BgRed(), p->BgGreen(), p->BgBlue());
 				 break;
 
 			case itemDate:
@@ -835,7 +853,7 @@
 				break;
 				
 			case itemReplayProcessbar:
-				DisplayReplayProcessBar(p->X(), p->Y() ,p->Width(),p->Height(), p->Red(), p->Green(), p->Blue(),p->Transperents());
+				DisplayReplayProcessBar(p->X(), p->Y() ,p->Width(),p->Height(), p->Red(), p->Green(), p->Blue(),p->Transperents(), p->BgX(), p->BgY() ,p->BgWidth(),p->BgHeight(), p->BgRed(), p->BgGreen(), p->BgBlue(),p->BgTransperents());
 				break;
 
 			case itemReplayCurrent:
@@ -865,7 +883,7 @@
 				break;
 			case itemMenu:
 				if (!_pSelect) _pSelect = p;
-				DisplayMenu(p->X(), p->Y(), p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(), p->Transperents(), p->Font(), p->Size(), p->Align(), p->Lines(), _pSelect->Red(), _pSelect->Green(), _pSelect->Blue(), _pSelect->Transperents(), _pSelect->Font(), _pSelect->Size(), _pSelect->Align(), _pSelect->Lines(), p->Path(), _pSelect->Path2(), _pSelect->Path());
+				DisplayMenu(p->X(), p->Y(), p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(), p->Transperents(), p->Font(), p->Size(), p->Align(), p->Lines(), _pSelect->Red(), _pSelect->Green(), _pSelect->Blue(), _pSelect->Transperents(), _pSelect->Font(), _pSelect->Size(), _pSelect->Align(), _pSelect->Lines(), p->Path(), _pSelect->Path2(), _pSelect->Path(), _pSelect->MenuStaticPicture(), _pSelect->MenuStaticX(), _pSelect->MenuStaticY());
 				break;
 			case itemMenuButtonRed:
 				DisplayMenuButton(  p->X(), p->Y(), p->Width(),p->Height(),p->Red(), p->Green(), p->Blue(), p->Transperents(), p->Font(), p->Size(), p->Align(), p->Lines(), 0);
@@ -910,10 +928,10 @@
 	_render->refresh();
 	if (GraphTFTSetup.DumpImage) 
 	{
-		int lastDumpDiff = _Dumped ? time_ms() - _Dumped : 0;
+		int lastDumpDiff = _Dumped ? timeMs.Elapsed() - _Dumped : 0;
 		d(6,"DisplayShow: lastDumpDiff: %d  DumpRefresh: %d\n", lastDumpDiff, GraphTFTSetup.DumpRefresh * 100 );
 		if ( lastDumpDiff > ( GraphTFTSetup.DumpRefresh * 1000) ){
-			_Dumped =  time_ms();
+			_Dumped =  timeMs.Elapsed();
 			_render->dumpImage2File("", GraphTFTSetup.DumpImageX, GraphTFTSetup.DumpImageY);
 	
 		}
@@ -998,47 +1016,159 @@
 void
 cGraphTFTDisplay::DisplayDate(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	string date = DayDateTime(time(NULL));
-	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date);
+	string date = *DayDateTime(time(NULL));
+	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date ,false);
 }
 
 void
 cGraphTFTDisplay::DisplayDateOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	string date = DayDateTime(time(NULL));
-	date = date.substr(5,5);
-	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date);
+	string date = *DayDateTime(time(NULL));
+	date = date.substr(4,5);
+	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date, false);
 }
 
 void
 cGraphTFTDisplay::DisplayTimeOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	string date = DayDateTime(time(NULL));
-	date = date.substr(13,5);
-	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date);
+	string date = *DayDateTime(time(NULL));
+	date = date.substr(10,5);
+	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, date, false);
 }
 
 void
-cGraphTFTDisplay::DisplayText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size,	int align, int lines, string text)
+cGraphTFTDisplay::DisplayText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size,	int align, int lines, string text, bool marquee )
 {
+	string title_text;
+
 	if ( width == 0 ) width = 720 - x;
 	if ( height == 0 ) height = 576 - y;
 
-	_render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+	if ( marquee == false ) {
+		_render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+	} else {
+		switch( GraphTFTSetup.ViewType) {
+			// Normal Modus
+			case 0:  _render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+						break;
+			// Gekuerzter Modus
+			case 1:  if( (int)text.length() <= (int)GraphTFTSetup.ViewLength ) {
+							_render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+						} else {
+								  title_text = text.substr(0, GraphTFTSetup.ViewLength) + "...";
+								  _render->text(title_text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+						}
+						break;
+			// Marquee Modus
+			case 2:	if( (int)text.length() <= (int)GraphTFTSetup.ViewLength ) {
+							_render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+						} else {
+							if( _marquee_active == false) {
+								_marquee_active = true;
+								_marquee_left   = false;
+								_marquee_idx    = 0;
+								_marquee_count  = 0;
+							} else {
+								if(GraphTFTSetup.ScrollCount == 0){
+									if((int)(_marquee_idx + GraphTFTSetup.ViewLength) < (int)text.length() && _marquee_left==false){
+										_marquee_idx ++;
+									} else {
+										_marquee_left = true;
+										if( _marquee_idx > 0 ) {
+											_marquee_idx --;
+										} else {
+											_marquee_left = false;
+										}
+									}
+								}
+								else if(_marquee_count < GraphTFTSetup.ScrollCount) {
+									if((int)(_marquee_idx + GraphTFTSetup.ViewLength) < (int)text.length() && _marquee_left==false){
+										_marquee_idx ++;
+									} else {
+										_marquee_left = true;
+										if( _marquee_idx > 0 ) {
+											_marquee_idx --;
+											if(_marquee_idx == 0){
+												_marquee_left = false;
+												_marquee_count++;
+											}
+										}
+									}
+								} else {
+									_marquee_active = false;
+							   }
+							}
+							title_text = text.substr(_marquee_idx, GraphTFTSetup.ViewLength);
+							_render->text(title_text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+							if( _marquee_idx == 1 ) {
+								usleep(GraphTFTSetup.ViewLength * 40000);
+							}
+						}
+						break;
+			// Ticker Modus
+			case 3:	if( (int)text.length() <= (int)GraphTFTSetup.ViewLength ) {
+							_render->text(text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+						} else {
+							if( _marquee_active == false) {
+								_marquee_active = true;
+								_marquee_idx    = 0;
+								_marquee_count  = 0;
+								_marquee_strip  = 0;
+							} else {
+								// endlos tickern
+								if(GraphTFTSetup.ScrollCount == 0){
+									if((int)(_marquee_idx + GraphTFTSetup.ViewLength) < (int)text.length()){
+										_marquee_idx ++;
+									} else {
+										if( _marquee_idx < (int)text.length()) {
+											_marquee_idx ++;
+											_marquee_strip ++;
+										} else {
+											_marquee_active = false;
+										}
+									}
+								} // Anzahl ScrollCount tickern
+								else if(_marquee_count < GraphTFTSetup.ScrollCount) {
+									if((int)(_marquee_idx + GraphTFTSetup.ViewLength) < (int)text.length()){
+										_marquee_idx ++;
+									} else {
+										if( _marquee_idx < (int)text.length()) {
+											_marquee_idx ++;
+											_marquee_strip ++;
+										} else {
+											_marquee_idx    = 0;
+											_marquee_count++;
+											_marquee_strip  = 0;
+										}
+									}
+								} else {
+									_marquee_active = false;
+								}
+							}
+							title_text = text.substr(_marquee_idx, (GraphTFTSetup.ViewLength-_marquee_strip));
+							_render->text(title_text.c_str(), font.c_str(), size, align, x, y, red, green, blue, width, height, lines);
+							if( _marquee_idx == 1 ) {
+								usleep(GraphTFTSetup.ViewLength * 40000);
+							}
+						}
+						break;
+		} // end switch
+	}
+
 }
 
 void
 cGraphTFTDisplay::DisplayChannelName(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	string text = _channelInfo != "" ? _channelInfo : _channelText;
-	DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, skipspace(text.c_str()));
+	DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, skipspace(text.c_str()), false);
 }
 
 void
 cGraphTFTDisplay::DisplayChannelNumber(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	string text = _channelInfo != "" ? _channelInfo : _channelText;
-	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, text.substr(0, text.find(' ')));
+	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, text.substr(0, text.find(' ')), false);
 }
 
 void
@@ -1051,7 +1181,7 @@
 cGraphTFTDisplay::DisplayChannelNameOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	string text = _channelInfo != "" ? _channelInfo : _channelText;
-	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, text.substr(text.find(' ') + 1));
+	DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, text.substr(text.find(' ') + 1), false);
 }
 
 void
@@ -1092,50 +1222,55 @@
 cGraphTFTDisplay::DisplayPresentTitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _presentTitle);
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _presentTitle, true);
 }
 
 void
 cGraphTFTDisplay::DisplayPresentTime(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	string presentTime = DayDateTime(_presentTime);
+	string presentTime = *DayDateTime(_presentTime);
 	presentTime = presentTime.substr(10);
 	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, presentTime);
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, presentTime, false);
 }
 
 void
 cGraphTFTDisplay::DisplayPresentSubtitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _presentSubtitle);
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _presentSubtitle, false);
 }
 
 void
 cGraphTFTDisplay::DisplayFollowingTitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _followingTitle);
+	if (_channelInfo == "" || _channelInfo == _channelText) {
+		if( (int)_presentTitle.length() <= (int)GraphTFTSetup.ViewLength ) {
+			DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _followingTitle, true);
+		} else {
+			DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _followingTitle, false);
+		}
+	}
 }
 
 void
 cGraphTFTDisplay::DisplayFollowingSubtitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _followingSubtitle);
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, _followingSubtitle, false);
 }
 
 void
 cGraphTFTDisplay::DisplayFollowingTime(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
-	string followingTime = DayDateTime(_followingTime);
+	string followingTime = *DayDateTime(_followingTime);
 	followingTime = followingTime.substr(10);
 	if (_channelInfo == "" || _channelInfo == _channelText)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, followingTime);
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, followingTime, false);
 }
 
 void
-cGraphTFTDisplay::DisplayTimebar(int x, int y ,int width, int height, int red, int green, int blue, int transperents, int sw)
+cGraphTFTDisplay::DisplayTimebar(int x, int y ,int width, int height, int red, int green, int blue, int transperents, int sw, int bg_x, int bg_y, int bg_width, int bg_heigth, int bg_red, int bg_green, int bg_blue)
 {
 	float percent;
 	int xDone;
@@ -1158,7 +1293,7 @@
 		}
 		
 		xDone = (int)(percent*(float)(width > height ? width : height));	
-		_render->rectangle(x, y, width, height, 0, 0, 0, transperents);
+		_render->rectangle(bg_x, bg_y, bg_width, bg_heigth, bg_red, bg_green, bg_blue, transperents);
 		if (width > height)
 			_render->rectangle(x, y, xDone, height, red, green, blue, transperents);
 		else
@@ -1175,13 +1310,13 @@
 	}
 
 	if (_message.length() > 0)
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align,	lines, _message);	
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align,	lines, _message, false);	
 }
 
 void cGraphTFTDisplay::DisplayRecording(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_recordings.size() > 0)
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _recordings[_showRecording].name.c_str());
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _recordings[_showRecording].name.c_str(), false);
 }
 
 void cGraphTFTDisplay::DisplaySymbols(int x, int y, int width, int height, int transperents, string path, string path2, int symbol)
@@ -1215,10 +1350,10 @@
 	} else if (_mode & NormalMask && (chan = Channels.GetByNumber(_channel))) {
 		switch (symbol) {
 		case itemSym2ch:
-			image = chan->Apid2() ? path.c_str() : path2.c_str();
+			image = chan->Apid(1) ? path.c_str() : path2.c_str();
 			break;
 		case itemSymDD:
-			image = chan->Dpid1() ? path.c_str() : path2.c_str();
+			image = chan->Dpid(0) ? path.c_str() : path2.c_str();
 			break;
 		case itemSymVTX:
 			image = chan->Tpid() ? path.c_str() : path2.c_str();
@@ -1243,13 +1378,13 @@
 
 void cGraphTFTDisplay::DisplayMenuTitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines )
 {
-	DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.title.c_str() );
+	DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.title.c_str(), false );
 }
 
 void cGraphTFTDisplay::DisplayMenuText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines )
 {
 	if (_menu.text.length() != 0) {
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.text.c_str() );
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.text.c_str(), false );
 	}
 }
 
@@ -1260,7 +1395,7 @@
 	}
 }
 
-void cGraphTFTDisplay::DisplayMenu(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int redSelect, int greenSelect, int blueSelect, int transperentsSelect, string fontSelect, int sizeSelect, int alignSelect, int linesSelect, string imageItem, string imageItemSelectFront, string imageItemSelectBack  )
+void cGraphTFTDisplay::DisplayMenu(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int redSelect, int greenSelect, int blueSelect, int transperentsSelect, string fontSelect, int sizeSelect, int alignSelect, int linesSelect, string imageItem, string imageItemSelectFront, string imageItemSelectBack, int stat_pic, int stat_x, int stat_y )
 {
 	int lineHeight = size * 5 / 3;
 	int lineHeightSelect = sizeSelect * 5 / 3;
@@ -1339,8 +1474,13 @@
 					
 				string temp2 =  _menuImageMap[temp].c_str();
 				d(6,"MenuImageMap: %s, %s\n", temp.c_str(), temp2.c_str());
-				if ( temp2 != "" )
-					 DisplayImage(720-128, y - 20 + (i - _menu.topPos ) * lineHeight, 128, 128, 255, temp2);
+				if ( temp2 != "" ) {
+					if( stat_pic == 0 ){
+						DisplayImage(720-128, y - 20 + (i - _menu.topPos ) * lineHeight, 128, 128, 255, temp2);
+					}else{
+						DisplayImage(stat_x, stat_y , 128, 128, 255, temp2);
+					}
+				}
 				if (imageItemSelectFront != "")
 					_render->image(imageItemSelectFront.c_str(), x, y + (i - _menu.topPos ) * lineHeight);
 			}else{	
@@ -1363,7 +1503,7 @@
 void cGraphTFTDisplay::DisplayMenuButton(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int buttonNumber)
 {
 	if (_menu.buttons[buttonNumber].length() > 0)
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.buttons[buttonNumber].c_str());
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _menu.buttons[buttonNumber].c_str(), false);
 }
 
 void cGraphTFTDisplay::DisplayMenuButtonBackground(int x, int y, int width, int height, int transperent, string image, string imageOff, int buttonNumber)
@@ -1389,16 +1529,16 @@
 void cGraphTFTDisplay::DisplayReplayName(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_replay.name.length() > 0)
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _replay.name);
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _replay.name, false);
 }
 
 void cGraphTFTDisplay::DisplayReplayFolder(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines)
 {
 	if (_replay.folder.length() > 0)
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _replay.folder);
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, _replay.folder, false);
 }
 
-void cGraphTFTDisplay::DisplayReplayProcessBar(int x, int y ,int width, int height, int red, int green, int blue, int transperents)
+void cGraphTFTDisplay::DisplayReplayProcessBar(int x, int y ,int width, int height, int red, int green, int blue, int transperents, int bg_x, int bg_y, int bg_width, int bg_height, int bg_red, int bg_green, int bg_blue, int bg_transperents )
 {
 	int current, total;
 	if (_replay.control && _replay.control->GetIndex(current, total)) {
@@ -1407,7 +1547,14 @@
 		else if (total == 0)
 			total = current;
 		int xDone= (int)(((float)current / (float)total)*(float)(width > height ? width : height));
-		_render->rectangle(x, y, width, height, 0, 0, 0, transperents);
+
+		if(bg_x == 0) bg_x = x;
+		if(bg_y == 0) bg_y = y;
+		if(bg_width == 0) bg_width = width;
+		if(bg_height == 0) bg_height = height;
+
+		_render->rectangle(bg_x, bg_y, bg_width, bg_height, bg_red, bg_green, bg_blue, bg_transperents);
+
 		if (width > height)
 			_render->rectangle(x, y, xDone, height, red, green, blue, transperents);
 		else
@@ -1421,7 +1568,7 @@
 	if (_replay.control && _replay.control->GetIndex(current, total)) {
 		if (total == 0 && current == 0)
 			current = total = 1;
-		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, IndexToHMSF(current));
+		DisplayText(x, y, width, height, red, green, blue, transperents, font, size, align, lines, *IndexToHMSF(current), false);
 	}
 }
 
@@ -1433,7 +1580,7 @@
 			current = total = 1;
 		else if (total == 0)
 			total = current;
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, IndexToHMSF(total));
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, *IndexToHMSF(total), false);
 	}
 }
 
@@ -1445,6 +1592,6 @@
 			current = total = 1;
 		else if (total == 0)
 			total = current;
-		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, (string)"-" + IndexToHMSF(total - current));
+		DisplayText( x, y, width, height, red, green, blue, transperents, font, size, align, lines, (string)"-" + *IndexToHMSF(total - current), false);
 	}
 }
diff -Nru graphtft-0.0.8-orig/display.h graphtft-0.0.8/display.h
--- graphtft-0.0.8-orig/display.h	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/display.h	2005-06-11 23:24:08.000000000 +0200
@@ -22,6 +22,7 @@
 #include "theme.h"
 #include <vdr/thread.h>
 #include <vdr/status.h>
+#include <vdr/tools.h>
 
 using std::map;
 using std::string;
@@ -44,6 +45,7 @@
 	};
 
 private:
+	cTimeMs	timeMs;
 
 	int tabs[MaxTabs+1];
 	int charInTabs[MaxTabs+1];
@@ -87,6 +89,11 @@
 
 	// update thread
 	bool _active;
+	bool _marquee_active;
+	bool _marquee_left;
+	int _marquee_idx;
+	int _marquee_count;
+	int _marquee_strip;
 	int _updateIn;
 	int _Dumped;
 	int _recordingIn;
@@ -169,7 +176,7 @@
   void DisplayDate(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayDateOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayTimeOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
-  void DisplayText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, string text);
+  void DisplayText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, string text, bool marquee);
   void DisplayChannelName(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayChannelNameOnly(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayChannelNumber(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
@@ -181,14 +188,14 @@
   void DisplayFollowingTitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayFollowingSubtitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayFollowingTime(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
-  void DisplayTimebar( int x, int y ,int width, int height,int red, int green, int blue, int transperents , int sw);
+  void DisplayTimebar( int x, int y ,int width, int height,int red, int green, int blue, int transperents , int sw, int bg_x, int bg_y, int bg_width, int bg_height, int bg_red, int bg_green, int bg_blue);
   void DisplayMessage(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayRecording(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayReplay(int Progress, int Current, int Total); 
   void DisplayMenuTitle(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines );
   void DisplayMenuText(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines );
   void DisplayMenuTextBackground(int x, int y, int width, int height, int transperent, string image);
-  void DisplayMenu(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int redSelect, int greenSelect, int blueSelect, int transperentsSelect, string fontSelect, int sizeSelect, int alignSelect, int linesSelect, string imageItem, string imageItemSelectedFront, string imageItemSelectedBack );
+  void DisplayMenu(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int redSelect, int greenSelect, int blueSelect, int transperentsSelect, string fontSelect, int sizeSelect, int alignSelect, int linesSelect, string imageItem, string imageItemSelectFront, string imageItemSelectBack, int stat_pic, int stat_x, int stat_y );
   void DisplayMenuButton(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines, int buttonNumber);
   void DisplayMenuButtonBackground(int x, int y, int width, int height, int transperent, string image, string imageOff, int buttonNumber);
   void DisplayVolumebar( int x, int y ,int width, int height, int red, int green, int blue, int transperent  );
@@ -196,7 +203,7 @@
   void DisplayRecordingSymbol(int x, int y, int width, int height, int transperent, string path, string path2);
   void DisplayReplayName(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayReplayFolder(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
-  void DisplayReplayProcessBar(int x, int y ,int width, int height, int red, int green, int blue, int transperents);
+  void DisplayReplayProcessBar(int x, int y ,int width, int height, int red, int green, int blue, int transperents, int bg_x, int bg_y ,int bg_width, int bg_height, int bg_red, int bg_green, int bg_blue, int bg_transperents);
   void DisplayReplayCurrent(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayReplayTotal(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
   void DisplayReplayRemaining(int x, int y, int width, int height,int red, int green, int blue, int transperents, string font, int size, int align, int lines);
diff -Nru graphtft-0.0.8-orig/graphtft.c graphtft-0.0.8/graphtft.c
--- graphtft-0.0.8-orig/graphtft.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/graphtft.c	2005-06-11 23:24:09.000000000 +0200
@@ -203,7 +203,8 @@
 	free(buffer);
 	if (p) {
 		char *s;
-		while ((s = readline(p)) != NULL && index < MAXTHEME ){
+		cReadLine ReadLine;
+		while ((s = ReadLine.Read(p)) != NULL && index < MAXTHEME ){
 			//Try to load the themes
 			GraphTFTTheme.Load(s);
 			cGraphTFTThemeItem *item = GraphTFTTheme.Get(itemTheme);
diff -Nru graphtft-0.0.8-orig/imlibrenderer/dvbrenderer/dvbrenderer.c graphtft-0.0.8/imlibrenderer/dvbrenderer/dvbrenderer.c
--- graphtft-0.0.8-orig/imlibrenderer/dvbrenderer/dvbrenderer.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/imlibrenderer/dvbrenderer/dvbrenderer.c	2005-06-11 23:24:08.000000000 +0200
@@ -154,7 +154,7 @@
 
 int DvbRenderer::playVideo(const uchar *Data, int Length)
 {
-	return _devTo ? _devTo->PlayVideo(Data, Length) : 0;
+	return _devTo ? _devTo->PlayPes(Data, Length) : 0;
 }
 
 bool DvbRenderer::devicePoll(cPoller &Poller, int TimeoutMs)
diff -Nru graphtft-0.0.8-orig/imlibrenderer/dvbrenderer/player.c graphtft-0.0.8/imlibrenderer/dvbrenderer/player.c
--- graphtft-0.0.8-orig/imlibrenderer/dvbrenderer/player.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/imlibrenderer/dvbrenderer/player.c	2005-06-11 23:24:08.000000000 +0200
@@ -97,7 +97,7 @@
 		}
 
 	    fast_memcpy(&pes_header[6 + ptslen], data, payload_size);
-	    PlayVideo(pes_header, 6 + ptslen + payload_size);
+	    PlayPes(pes_header, 6 + ptslen + payload_size);
 
 	    len -= payload_size;
 	    data += payload_size;
diff -Nru graphtft-0.0.8-orig/setup.c graphtft-0.0.8/setup.c
--- graphtft-0.0.8-orig/setup.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/setup.c	2005-06-11 23:24:08.000000000 +0200
@@ -57,6 +57,10 @@
     OSDMessageTime = 30;
     PluginConfPath = strdup("/tmp");
     CoverImage = NULL;
+    ViewType = 0;
+    ViewLength = 0;
+    ScrollTime = 50;
+    ScrollCount = 0;
 
     for (int i = 0; i < MAXTHEME; i++)  //FIXME: see graphtft.c the theme and item 
 										//should get own classes. so items should be
@@ -97,6 +101,10 @@
     else if (!strcasecmp(Name, "OSDMessageTime"))  OSDMessageTime  = atoi(Value);
     else if (!strcasecmp(Name, "Logger"))  Logger  = atoi(Value);
     else if (!strcasecmp(Name, "Level"))  Level  = atoi(Value);
+    else if (!strcasecmp(Name, "ViewType"))  ViewType  = atoi(Value);
+    else if (!strcasecmp(Name, "ViewLength"))  ViewLength  = atoi(Value);
+    else if (!strcasecmp(Name, "ScrollTime"))  ScrollTime  = atoi(Value);
+    else if (!strcasecmp(Name, "ScrollCount"))  ScrollCount  = atoi(Value);
     else
 	return false;
     return true;
@@ -119,6 +127,10 @@
     Add(new cMenuEditStraItem(tr("Theme"), &_data.Theme,  _data.ThemesFound, _data.Themes));
     Add(new cMenuEditBoolItem(tr("Hide Mainmenu Entry"),        &_data.HideMainMenu));
     Add(new cMenuEditBoolItem(tr("Show Mute Symbol permanent"), &_data.ShowMutePermanent));
+    Add(new cMenuEditIntItem(tr("Title view type"),        	&_data.ViewType,0,3));
+    Add(new cMenuEditIntItem(tr("Title view length"),        	&_data.ViewLength,10,50));
+    Add(new cMenuEditIntItem(tr("Scroll Time (ms)"),        	&_data.ScrollTime,10,1000));
+    Add(new cMenuEditIntItem(tr("Scroll Count"),        	&_data.ScrollCount,0,1000));
     Add(new cMenuEditBoolItem(tr("Dump image to file"),        &_data.DumpImage));
     Add(new cMenuEditIntItem(tr("Dump Refresh"),        	&_data.DumpRefresh,0,600));
     Add(new cMenuEditIntItem(tr("Dump image width"),        &_data.DumpImageX,1,1024));
@@ -239,6 +251,10 @@
     GraphTFTTheme.Load(GraphTFTSetup.ThemesPath[GraphTFTSetup.Theme]);
     SetupStore("HideMainMenu", GraphTFTSetup.HideMainMenu );
     SetupStore("ShowMutePermanent", GraphTFTSetup.ShowMutePermanent );
+    SetupStore("ViewType", GraphTFTSetup.ViewType );
+    SetupStore("ViewLength", GraphTFTSetup.ViewLength );
+    SetupStore("ScrollTime", GraphTFTSetup.ScrollTime );
+    SetupStore("ScrollCount", GraphTFTSetup.ScrollCount );
     SetupStore("Iso2Utf", GraphTFTSetup.Iso2Utf );
     SetupStore("UseStillPicture", GraphTFTSetup.UseStillPicture );
     SetupStore("DvbRefresh", GraphTFTSetup.DvbRefresh );
diff -Nru graphtft-0.0.8-orig/setup.h graphtft-0.0.8/setup.h
--- graphtft-0.0.8-orig/setup.h	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/setup.h	2005-06-11 23:24:08.000000000 +0200
@@ -50,6 +50,10 @@
 		int Iso2Utf;
 		int DumpRefresh;
 		char* CoverImage;
+		int ViewType;
+		int ViewLength;
+		int ScrollTime;
+		int ScrollCount;
 
 		cGraphTFTSetup(void);
 		~cGraphTFTSetup(){if (CoverImage) free(CoverImage);}
diff -Nru graphtft-0.0.8-orig/theme.c graphtft-0.0.8/theme.c
--- graphtft-0.0.8-orig/theme.c	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/theme.c	2005-06-11 23:24:09.000000000 +0200
@@ -23,12 +23,23 @@
 	_section = 0;
 	_x=1;
 	_y=1;
+	_bg_x=0;
+	_bg_y=0;
+	_stat_pic=0;
+	_stat_x=570;
+	_stat_y=5;
 	_width=0;
 	_height=0;
+	_bg_width=0;
+	_bg_heigth=0;
 	_red=255;
 	_green=255;
 	_blue=255;
 	_transperents=255;
+	_bg_red=0;
+	_bg_green=0;
+	_bg_blue=0;
+	_bg_transperents=255;
 	_lines=0;
 	_size=32;
 	_sw=0;
@@ -131,7 +142,7 @@
 			
 		}else if ( tmp == "PresentSubtitle")
 		{
-            _item = itemPresentSubtitle;
+			_item = itemPresentSubtitle;
 			ParseText(toParse);
 
 		}else if ( tmp ==  "PresentTime")
@@ -146,7 +157,7 @@
 			
 		}else if ( tmp == "FollowingSubtitle")
 		{
-            _item = itemFollowingSubtitle;
+			_item = itemFollowingSubtitle;
 			ParseText(toParse);
 
 		}else if ( tmp ==  "FollowingTime")
@@ -313,6 +324,11 @@
 			_item=itemMenuSelected;
 			ParseText(toParse);
 
+		}else if (tmp=="MenuStaticPicture")
+		{
+			_item=itemMenuStaticPicture;
+			ParseText(toParse);
+
 		}else if (tmp=="MenuButtonRed")
 		{
 			_item=itemMenuButtonRed;
@@ -416,6 +432,17 @@
 	ParseVar(toParse,"animated",&_animated);
 	ParseVar(toParse,"delay",&_delay);
 	ParseVar(toParse,"count",&_count);
+	ParseVar(toParse,"stat_pic",&_stat_pic);
+	ParseVar(toParse,"stat_x",&_stat_x);
+	ParseVar(toParse,"stat_y",&_stat_y);
+	ParseVar(toParse,"bg_x",&_bg_x);
+	ParseVar(toParse,"bg_y",&_bg_y);
+	ParseVar(toParse,"bg_width",&_bg_width);
+	ParseVar(toParse,"bg_heigth",&_bg_heigth);
+	ParseVar(toParse,"bg_red",&_bg_red);
+	ParseVar(toParse,"bg_green",&_bg_green);
+	ParseVar(toParse,"bg_blue",&_bg_blue);
+	ParseVar(toParse,"bg_transperents",&_bg_transperents);
 	return true;
 }
 
diff -Nru graphtft-0.0.8-orig/theme.h graphtft-0.0.8/theme.h
--- graphtft-0.0.8-orig/theme.h	2004-11-29 12:33:30.000000000 +0100
+++ graphtft-0.0.8/theme.h	2005-06-11 23:24:09.000000000 +0200
@@ -67,6 +67,9 @@
 		itemMenuTitle,
 		itemMenu,
 		itemMenuSelected,
+		itemMenuStaticPicture,
+		itemMenuStaticX,
+		itemMenuStaticY,
 		itemMenuButtonRed,
 		itemMenuButtonGreen,
 		itemMenuButtonBlue,
@@ -99,6 +102,8 @@
 	private:	
 		int _item, _section;
 		int _x,_y,_width,_height,_red,_green,_blue,_transperents,_lines,_size,_sw;
+		int _bg_x,_bg_y,_bg_width,_bg_heigth,_bg_red,_bg_green,_bg_blue,_bg_transperents;
+		int _stat_pic,_stat_x,_stat_y;
 		int _align, _animated, _delay, _count;
 		std::string _name;
 		std::string _version;
@@ -126,13 +131,24 @@
 		std::string Version(void) const {return _version; }
 
 		int X(void) const { return _x; }
+		int BgX(void) const { return _bg_x; }
 		int Y(void) const { return _y; }
+		int BgY(void) const { return _bg_y; }
+		int MenuStaticPicture(void) const { return _stat_pic; }
+		int MenuStaticX(void) const { return _stat_x; }
+		int MenuStaticY(void) const { return _stat_y; }
 		int Width(void) const { return _width; }
+		int BgWidth(void) const { return _bg_width; }
 		int Height(void) const { return _height; }
+		int BgHeight(void) const { return _bg_heigth; }
 		int Red(void) const { return _red; }
+		int BgRed(void) const { return _bg_red; }
 		int Green(void) const { return _green; }
+		int BgGreen(void) const { return _bg_green; }
 		int Blue(void) const { return _blue; }
+		int BgBlue(void) const { return _bg_blue; }
 		int Transperents(void) const { return _transperents; }
+		int BgTransperents(void) const { return _bg_transperents; }
 		int Lines(void) const { return _lines; }
 		int Size(void) const { return _size; }  
 		int Switch(void) const { return _sw; }

