Commit 1ddde2be authored by Cyril Deguet's avatar Cyril Deguet

* changed "Font" into "SkinFont" (see previous commit)

parent 05af5dd8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.cpp: Playlist control * playlist.cpp: Playlist control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.8 2003/04/21 21:51:16 asmax Exp $ * $Id: playlist.cpp,v 1.9 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -323,7 +323,7 @@ void ControlPlayList::DrawCase( Graphics *dest, int i, int x, int y, int w, ...@@ -323,7 +323,7 @@ void ControlPlayList::DrawCase( Graphics *dest, int i, int x, int y, int w,
} }
// Choose font // Choose font
Font *F; SkinFont *F;
if( PlayList->i_index == i ) if( PlayList->i_index == i )
F = PlayFont; F = PlayFont;
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.h: Playlist control * playlist.h: Playlist control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: playlist.h,v 1.3 2003/04/21 21:51:16 asmax Exp $ * $Id: playlist.h,v 1.4 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -35,7 +35,7 @@ using namespace std; ...@@ -35,7 +35,7 @@ using namespace std;
class Event; class Event;
class Graphics; class Graphics;
class SkinWindow; class SkinWindow;
class Font; class SkinFont;
class Bezier; class Bezier;
class Region; class Region;
...@@ -47,8 +47,8 @@ class ControlPlayList : public GenericControl ...@@ -47,8 +47,8 @@ class ControlPlayList : public GenericControl
{ {
private: private:
Event *UpdateEvent; Event *UpdateEvent;
Font *TextFont; SkinFont *TextFont;
Font *PlayFont; SkinFont *PlayFont;
string FontName; string FontName;
string PlayFontName; string PlayFontName;
bool Enabled; bool Enabled;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* text.h: Text control * text.h: Text control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: text.h,v 1.3 2003/04/21 21:51:16 asmax Exp $ * $Id: text.h,v 1.4 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -37,7 +37,7 @@ class BitmapBank; ...@@ -37,7 +37,7 @@ class BitmapBank;
class Graphics; class Graphics;
class SkinWindow; class SkinWindow;
class Region; class Region;
class Font; class SkinFont;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class ControlText : public GenericControl class ControlText : public GenericControl
...@@ -62,7 +62,7 @@ class ControlText : public GenericControl ...@@ -62,7 +62,7 @@ class ControlText : public GenericControl
// General parameters // General parameters
string Text; string Text;
int Align; int Align;
Font *TextFont; SkinFont *TextFont;
string FontName; string FontName;
list<string> DisplayList; list<string> DisplayList;
list<string>::const_iterator Display; list<string>::const_iterator Display;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_font.cpp: GTK2 implementation of the Font class * gtk2_font.cpp: GTK2 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.cpp,v 1.12 2003/04/21 18:39:38 asmax Exp $ * $Id: gtk2_font.cpp,v 1.13 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
GTK2Font::GTK2Font( intf_thread_t *_p_intf, string fontname, int size, GTK2Font::GTK2Font( intf_thread_t *_p_intf, string fontname, int size,
int color, int weight, bool italic, bool underline ) int color, int weight, bool italic, bool underline )
: Font( _p_intf, fontname, size, color, weight, italic, underline ) : SkinFont( _p_intf, fontname, size, color, weight, italic, underline )
{ {
Context = gdk_pango_context_get(); Context = gdk_pango_context_get();
Layout = pango_layout_new( Context ); Layout = pango_layout_new( Context );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_font.h: GTK2 implementation of the Font class * gtk2_font.h: GTK2 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.h,v 1.5 2003/04/17 15:43:29 karibu Exp $ * $Id: gtk2_font.h,v 1.6 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -38,7 +38,7 @@ struct intf_thread_t; ...@@ -38,7 +38,7 @@ struct intf_thread_t;
class Graphics; class Graphics;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class GTK2Font : Font class GTK2Font : SkinFont
{ {
private: private:
PangoContext *Context; PangoContext *Context;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class * gtk2_theme.cpp: GTK2 implementation of the Theme class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.23 2003/04/21 21:51:16 asmax Exp $ * $Id: gtk2_theme.cpp,v 1.24 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
//--- GTK2 ----------------------------------------------------------------- //--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf.h>
#include <X11/Xlib.h>
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
#include <vlc/intf.h> #include <vlc/intf.h>
...@@ -110,6 +111,9 @@ void GTK2Theme::OnLoadTheme() ...@@ -110,6 +111,9 @@ void GTK2Theme::OnLoadTheme()
msg_Err( p_intf, "gdk_window_new failed" ); msg_Err( p_intf, "gdk_window_new failed" );
return; return;
} }
Display *display = XOpenDisplay( NULL );
Window root = DefaultRootWindow( display );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void GTK2Theme::AddSystemMenu( string name, Event *event ) void GTK2Theme::AddSystemMenu( string name, Event *event )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* banks.cpp: Bitmap bank, Event, bank, Font bank and OffSet bank * banks.cpp: Bitmap bank, Event, bank, Font bank and OffSet bank
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: banks.cpp,v 1.4 2003/04/21 00:54:26 ipkiss Exp $ * $Id: banks.cpp,v 1.5 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -99,7 +99,7 @@ FontBank::FontBank( intf_thread_t *_p_intf ) ...@@ -99,7 +99,7 @@ FontBank::FontBank( intf_thread_t *_p_intf )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
FontBank::~FontBank() FontBank::~FontBank()
{ {
for( map<string,Font *>::iterator iter = Bank.begin(); for( map<string,SkinFont *>::iterator iter = Bank.begin();
iter != Bank.end(); iter++ ) iter != Bank.end(); iter++ )
{ {
delete (OSFont *)iter->second; delete (OSFont *)iter->second;
...@@ -115,12 +115,12 @@ bool FontBank::Add( string name, string fontname, int size, ...@@ -115,12 +115,12 @@ bool FontBank::Add( string name, string fontname, int size,
return false; return false;
} }
Bank[name] = (Font *)new OSFont( p_intf, fontname, size, color, Bank[name] = (SkinFont *)new OSFont( p_intf, fontname, size, color,
weight, italic, underline ); weight, italic, underline );
return true; return true;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
Font * FontBank::Get( string Id ) SkinFont * FontBank::Get( string Id )
{ {
// If the specified font doesn't exist, use the default one // If the specified font doesn't exist, use the default one
if( Bank[Id] == NULL ) if( Bank[Id] == NULL )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* banks.h: Bitmap bank, Event bank, Font bank and OffSet bank * banks.h: Bitmap bank, Event bank, Font bank and OffSet bank
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: banks.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: banks.h,v 1.2 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulière <ipkiss@via.ecp.fr> * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -42,7 +42,7 @@ using namespace std; ...@@ -42,7 +42,7 @@ using namespace std;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
struct intf_thread_t; struct intf_thread_t;
class Bitmap; class Bitmap;
class Font; class SkinFont;
class Event; class Event;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -61,14 +61,14 @@ class BitmapBank ...@@ -61,14 +61,14 @@ class BitmapBank
class FontBank class FontBank
{ {
private: private:
map<string,Font *> Bank; map<string,SkinFont *> Bank;
intf_thread_t *p_intf; intf_thread_t *p_intf;
public: public:
FontBank( intf_thread_t *_p_intf ); FontBank( intf_thread_t *_p_intf );
~FontBank(); ~FontBank();
bool Add( string name, string fontname, int size, bool Add( string name, string fontname, int size,
int color, int weight, bool italic, bool underline ); int color, int weight, bool italic, bool underline );
Font * Get( string Id ); // Return the font with matching ID SkinFont * Get( string Id ); // Return the font with matching ID
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class EventBank class EventBank
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* event.h: Event class * event.h: Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: event.h,v 1.7 2003/04/21 00:54:26 ipkiss Exp $ * $Id: event.h,v 1.8 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -132,7 +132,7 @@ using namespace std; ...@@ -132,7 +132,7 @@ using namespace std;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
struct intf_thread_t; struct intf_thread_t;
class GenericControl; class GenericControl;
class Window; class SkinWindow;
class Event; class Event;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* font.cpp: Font class * font.cpp: Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: font.cpp,v 1.2 2003/04/16 21:40:07 ipkiss Exp $ * $Id: font.cpp,v 1.3 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Font object // Font object
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
Font::Font( intf_thread_t *_p_intf, string fontname, int size, int color, SkinFont::SkinFont( intf_thread_t *_p_intf, string fontname, int size, int color,
int weight, bool italic, bool underline ) int weight, bool italic, bool underline )
{ {
p_intf = _p_intf; p_intf = _p_intf;
...@@ -53,7 +53,7 @@ Font::Font( intf_thread_t *_p_intf, string fontname, int size, int color, ...@@ -53,7 +53,7 @@ Font::Font( intf_thread_t *_p_intf, string fontname, int size, int color,
Weight = 1; Weight = 1;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
Font::~Font() SkinFont::~SkinFont()
{ {
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* font.h: Font class * font.h: Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: font.h,v 1.3 2003/04/17 19:56:31 karibu Exp $ * $Id: font.h,v 1.4 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulière <ipkiss@via.ecp.fr> * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -36,7 +36,7 @@ struct intf_thread_t; ...@@ -36,7 +36,7 @@ struct intf_thread_t;
class Graphics; class Graphics;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class Font class SkinFont
{ {
private: private:
// Assign font to Device Context // Assign font to Device Context
...@@ -56,11 +56,11 @@ class Font ...@@ -56,11 +56,11 @@ class Font
public: public:
// Constructor // Constructor
Font( intf_thread_t *_p_intf, string fontname, int size, int color, SkinFont( intf_thread_t *_p_intf, string fontname, int size, int color,
int weight, bool italic, bool underline ); int weight, bool italic, bool underline );
// Destructor // Destructor
virtual ~Font(); virtual ~SkinFont();
// Get size of text // Get size of text
virtual void GetSize( string text, int &w, int &h ) = 0; virtual void GetSize( string text, int &w, int &h ) = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_font.cpp: Win32 implementation of the Font class * win32_font.cpp: Win32 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_font.cpp,v 1.3 2003/04/16 21:40:07 ipkiss Exp $ * $Id: win32_font.cpp,v 1.4 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
Win32Font::Win32Font( intf_thread_t *_p_intf, string fontname, int size, Win32Font::Win32Font( intf_thread_t *_p_intf, string fontname, int size,
int color, int weight, bool italic, bool underline ) int color, int weight, bool italic, bool underline )
: Font( _p_intf, fontname, size, color, weight, italic, underline ) : SkinFont( _p_intf, fontname, size, color, weight, italic, underline )
{ {
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_font.h: Win32 implementation of the Font class * win32_font.h: Win32 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_font.h,v 1.2 2003/04/12 21:43:27 asmax Exp $ * $Id: win32_font.h,v 1.3 2003/04/21 22:12:37 asmax Exp $
* *
* Authors: Olivier Teulière <ipkiss@via.ecp.fr> * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -37,7 +37,7 @@ struct intf_thread_t; ...@@ -37,7 +37,7 @@ struct intf_thread_t;
class Graphics; class Graphics;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class Win32Font : Font class Win32Font : SkinFont
{ {
private: private:
// Assign font to Device Context // Assign font to Device Context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment