* text.cpp: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: text.cpp,v 1.7 2003/04/21 21:51:16 asmax Exp $
+ * $Id: text.cpp,v 1.10 2003/06/05 22:16:15 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
+ * Cyril Deguet <asmax@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "../os_window.h"
#include "../src/skin_common.h"
+#ifdef X11_SKINS
+#include "../x11/x11_timer.h"
+extern intf_thread_t *g_pIntf;
+#endif
+
//---------------------------------------------------------------------------
}
//-----------------------------------------------------------------------
- #else
+ #elif defined GTK2_SKINS
//-----------------------------------------------------------------------
// Gtk2 methods
}
//-----------------------------------------------------------------------
+ #elif defined X11_SKINS
+
+ //-----------------------------------------------------------------------
+ // X11 methods
+ //-----------------------------------------------------------------------
+ void ScrollingTextTimer( void *data )
+ {
+ if( (ControlText *)data != NULL
+ && !( (ControlText *)data )->GetSelected() )
+ {
+ ( (ControlText *)data )->DoScroll();
+ }
+ }
+
+ //-----------------------------------------------------------------------
+ void ControlText::StartScrolling()
+ {
+ X11Timer *timer = new X11Timer( g_pIntf, 100000, ScrollingTextTimer,
+ (void*)this );
+ X11TimerManager *timerManager = X11TimerManager::Instance( g_pIntf );
+ timerManager->addTimer( timer );
+ }
+ //-----------------------------------------------------------------------
+ void ControlText::StopScrolling()
+ {
+ }
+ //-----------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
if( TextClipRgn != NULL )
delete TextClipRgn;
- TextClipRgn = (Region *)new OSRegion( Left, Top, Width, Height );
+ TextClipRgn = (SkinRegion *)new OSRegion( Left, Top, Width, Height );
}
//---------------------------------------------------------------------------
}
// Reset clipping region to old region
- Region *destClipRgn = (Region *)new OSRegion( 0, 0, w, h );
+ SkinRegion *destClipRgn = (SkinRegion *)new OSRegion( 0, 0, w, h );
dest->SetClipRegion( destClipRgn );
delete destClipRgn;
TextClipRgn->Move( x, y );