Browse Source

Remove using namespace std; from C++ code

This prevents us from providing our atomic types definitions, as they
would conflict with the ones in std::
pull/33/head
Hugo Beauzée-Luyssen 11 years ago
parent
commit
e026c01889
  1. 11
      modules/access/dcp/dcp.cpp
  2. 1
      modules/access/dshow/access.h
  3. 40
      modules/access/dshow/dshow.cpp
  4. 2
      modules/access/dshow/filter.cpp
  5. 5
      modules/access/dshow/filter.h
  6. 2
      modules/access/dtv/bdagraph.hpp
  7. 2
      modules/access/live555.cpp
  8. 9
      modules/demux/adaptative/playlist/SegmentInformation.cpp
  9. 6
      modules/demux/mkv/matroska_segment.cpp
  10. 10
      modules/demux/mkv/matroska_segment_parse.cpp
  11. 2
      modules/demux/mkv/mkv.cpp
  12. 1
      modules/demux/mkv/mkv.hpp
  13. 2
      modules/gui/qt4/menus.hpp
  14. 2
      modules/gui/skins2/commands/async_queue.cpp
  15. 2
      modules/gui/skins2/commands/async_queue.hpp
  16. 6
      modules/gui/skins2/commands/cmd_add_item.hpp
  17. 2
      modules/gui/skins2/commands/cmd_audio.hpp
  18. 8
      modules/gui/skins2/commands/cmd_callbacks.hpp
  19. 6
      modules/gui/skins2/commands/cmd_change_skin.hpp
  20. 4
      modules/gui/skins2/commands/cmd_dialogs.hpp
  21. 6
      modules/gui/skins2/commands/cmd_generic.hpp
  22. 2
      modules/gui/skins2/commands/cmd_layout.hpp
  23. 4
      modules/gui/skins2/commands/cmd_minimize.hpp
  24. 4
      modules/gui/skins2/commands/cmd_muxer.hpp
  25. 2
      modules/gui/skins2/commands/cmd_on_top.hpp
  26. 6
      modules/gui/skins2/commands/cmd_playlist.cpp
  27. 20
      modules/gui/skins2/commands/cmd_playlist.hpp
  28. 2
      modules/gui/skins2/commands/cmd_playtree.hpp
  29. 6
      modules/gui/skins2/commands/cmd_resize.hpp
  30. 8
      modules/gui/skins2/commands/cmd_show_window.hpp
  31. 16
      modules/gui/skins2/commands/cmd_vars.hpp
  32. 2
      modules/gui/skins2/controls/ctrl_button.hpp
  33. 2
      modules/gui/skins2/controls/ctrl_checkbox.hpp
  34. 4
      modules/gui/skins2/controls/ctrl_generic.cpp
  35. 2
      modules/gui/skins2/controls/ctrl_generic.hpp
  36. 4
      modules/gui/skins2/controls/ctrl_image.cpp
  37. 2
      modules/gui/skins2/controls/ctrl_image.hpp
  38. 16
      modules/gui/skins2/controls/ctrl_list.cpp
  39. 2
      modules/gui/skins2/controls/ctrl_list.hpp
  40. 2
      modules/gui/skins2/controls/ctrl_move.hpp
  41. 2
      modules/gui/skins2/controls/ctrl_radialslider.hpp
  42. 2
      modules/gui/skins2/controls/ctrl_resize.hpp
  43. 4
      modules/gui/skins2/controls/ctrl_slider.cpp
  44. 4
      modules/gui/skins2/controls/ctrl_slider.hpp
  45. 6
      modules/gui/skins2/controls/ctrl_text.cpp
  46. 2
      modules/gui/skins2/controls/ctrl_text.hpp
  47. 22
      modules/gui/skins2/controls/ctrl_tree.cpp
  48. 2
      modules/gui/skins2/controls/ctrl_tree.hpp
  49. 2
      modules/gui/skins2/controls/ctrl_video.hpp
  50. 16
      modules/gui/skins2/events/evt_dragndrop.hpp
  51. 2
      modules/gui/skins2/events/evt_enter.hpp
  52. 2
      modules/gui/skins2/events/evt_focus.hpp
  53. 2
      modules/gui/skins2/events/evt_generic.hpp
  54. 4
      modules/gui/skins2/events/evt_input.cpp
  55. 2
      modules/gui/skins2/events/evt_input.hpp
  56. 6
      modules/gui/skins2/events/evt_key.cpp
  57. 2
      modules/gui/skins2/events/evt_key.hpp
  58. 2
      modules/gui/skins2/events/evt_leave.hpp
  59. 2
      modules/gui/skins2/events/evt_menu.hpp
  60. 2
      modules/gui/skins2/events/evt_motion.hpp
  61. 4
      modules/gui/skins2/events/evt_mouse.cpp
  62. 2
      modules/gui/skins2/events/evt_mouse.hpp
  63. 2
      modules/gui/skins2/events/evt_refresh.hpp
  64. 4
      modules/gui/skins2/events/evt_scroll.cpp
  65. 2
      modules/gui/skins2/events/evt_scroll.hpp
  66. 4
      modules/gui/skins2/events/evt_special.cpp
  67. 2
      modules/gui/skins2/events/evt_special.hpp
  68. 66
      modules/gui/skins2/parser/builder.cpp
  69. 16
      modules/gui/skins2/parser/builder.hpp
  70. 412
      modules/gui/skins2/parser/builder_data.hpp
  71. 18
      modules/gui/skins2/parser/expr_evaluator.cpp
  72. 8
      modules/gui/skins2/parser/expr_evaluator.hpp
  73. 70
      modules/gui/skins2/parser/interpreter.cpp
  74. 14
      modules/gui/skins2/parser/interpreter.hpp
  75. 46
      modules/gui/skins2/parser/skin_parser.cpp
  76. 48
      modules/gui/skins2/parser/skin_parser.hpp
  77. 14
      modules/gui/skins2/parser/xmlparser.cpp
  78. 8
      modules/gui/skins2/parser/xmlparser.hpp
  79. 6
      modules/gui/skins2/src/art_manager.cpp
  80. 10
      modules/gui/skins2/src/art_manager.hpp
  81. 2
      modules/gui/skins2/src/bitmap_font.cpp
  82. 2
      modules/gui/skins2/src/bitmap_font.hpp
  83. 2
      modules/gui/skins2/src/dialogs.cpp
  84. 2
      modules/gui/skins2/src/dialogs.hpp
  85. 2
      modules/gui/skins2/src/file_bitmap.cpp
  86. 2
      modules/gui/skins2/src/file_bitmap.hpp
  87. 2
      modules/gui/skins2/src/ft2_font.cpp
  88. 6
      modules/gui/skins2/src/ft2_font.hpp
  89. 14
      modules/gui/skins2/src/generic_layout.cpp
  90. 10
      modules/gui/skins2/src/generic_layout.hpp
  91. 2
      modules/gui/skins2/src/generic_window.hpp
  92. 16
      modules/gui/skins2/src/ini_file.cpp
  93. 8
      modules/gui/skins2/src/ini_file.hpp
  94. 4
      modules/gui/skins2/src/logger.cpp
  95. 4
      modules/gui/skins2/src/logger.hpp
  96. 6
      modules/gui/skins2/src/os_factory.hpp
  97. 2
      modules/gui/skins2/src/os_popup.hpp
  98. 2
      modules/gui/skins2/src/popup.cpp
  99. 4
      modules/gui/skins2/src/popup.hpp
  100. 9
      modules/gui/skins2/src/skin_common.hpp

11
modules/access/dcp/dcp.cpp

@ -59,7 +59,6 @@
#include "dcpparser.h"
using namespace ASDCP;
using namespace std;
#define FRAME_BUFFER_SIZE 1302083 /* maximum frame length, in bytes, after
"Digital Cinema System Specification Version 1.2
@ -124,10 +123,10 @@ class demux_sys_t
EssenceType_t PictureEssType;
/* ASDCP Video MXF Reader */
vector<videoReader_t> v_videoReader;
std::vector<videoReader_t> v_videoReader;
/* ASDCP Audio MXF Reader */
vector<audioReader_t> v_audioReader;
std::vector<audioReader_t> v_audioReader;
/* audio buffer size */
uint32_t i_audio_buffer;
@ -953,12 +952,12 @@ int dcpInit ( demux_t *p_demux )
* Function to retrieve the path to the ASSETMAP file.
* @param p_demux DCP access_demux.
*/
static string assetmapPath( demux_t * p_demux )
static std::string assetmapPath( demux_t * p_demux )
{
DIR *dir = NULL;
struct dirent *ent = NULL;
dcp_t *p_dcp = p_demux->p_sys->p_dcp;
string result;
std::string result;
if( ( dir = opendir (p_dcp->path.c_str() ) ) != NULL )
{
@ -995,7 +994,7 @@ int parseXML ( demux_t * p_demux )
{
int retval;
string assetmap_path = assetmapPath( p_demux );
std::string assetmap_path = assetmapPath( p_demux );
/* We get the ASSETMAP file path */
if( assetmap_path.empty() )
return VLC_EGENERIC;

1
modules/access/dshow/access.h

@ -25,7 +25,6 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
using namespace std;
#include <dshow.h>

40
modules/access/dshow/dshow.cpp

@ -63,9 +63,9 @@ static int AccessControl ( access_t *, int, va_list );
static int Demux ( demux_t * );
static int DemuxControl( demux_t *, int, va_list );
static int OpenDevice( vlc_object_t *, access_sys_t *, string, bool );
static IBaseFilter *FindCaptureDevice( vlc_object_t *, string *,
list<string> *, bool );
static int OpenDevice( vlc_object_t *, access_sys_t *, std::string, bool );
static IBaseFilter *FindCaptureDevice( vlc_object_t *, std::string *,
std::list<std::string> *, bool );
static size_t EnumDeviceCaps( vlc_object_t *, IBaseFilter *,
int, int, int, int, int, int,
AM_MEDIA_TYPE *mt, size_t );
@ -305,7 +305,7 @@ vlc_module_end ()
*****************************************************************************/
typedef struct dshow_stream_t
{
string devicename;
std::string devicename;
IBaseFilter *p_device_filter;
CaptureFilter *p_capture_filter;
AM_MEDIA_TYPE mt;
@ -322,7 +322,7 @@ typedef struct dshow_stream_t
bool b_pts;
deque<VLCMediaSample> samples_queue;
std::deque<VLCMediaSample> samples_queue;
} dshow_stream_t;
/*****************************************************************************
@ -397,7 +397,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
char *psz_val;
/* Get/parse options and open device(s) */
string vdevname, adevname;
std::string vdevname, adevname;
int i_width = 0, i_height = 0;
vlc_fourcc_t i_chroma = 0;
bool b_use_audio = true;
@ -415,7 +415,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
msg_Dbg( p_this, "dshow-vdev: %s", psz_val ) ;
/* skip none device */
if ( strncasecmp( psz_val, "none", 4 ) != 0 )
vdevname = string( psz_val );
vdevname = std::string( psz_val );
else
b_use_video = false ;
}
@ -427,7 +427,7 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
msg_Dbg( p_this, "dshow-adev: %s", psz_val ) ;
/* skip none device */
if ( strncasecmp( psz_val, "none", 4 ) != 0 )
adevname = string( psz_val );
adevname = std::string( psz_val );
else
b_use_audio = false ;
}
@ -989,7 +989,7 @@ static int GetFourCCPriority( int i_fourcc )
#define MAX_MEDIA_TYPES 32
static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
string devicename, bool b_audio )
std::string devicename, bool b_audio )
{
/* See if device is already opened */
for( int i = 0; i < p_sys->i_streams; i++ )
@ -1002,14 +1002,14 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
}
}
list<string> list_devices;
std::list<std::string> list_devices;
/* Enumerate devices and display their names */
FindCaptureDevice( p_this, NULL, &list_devices, b_audio );
if( list_devices.empty() )
return VLC_EGENERIC;
list<string>::iterator iter;
std::list<std::string>::iterator iter;
for( iter = list_devices.begin(); iter != list_devices.end(); ++iter )
msg_Dbg( p_this, "found device: %s", iter->c_str() );
@ -1203,14 +1203,14 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
These actions *may* be requested whith a single call.
*/
static IBaseFilter *
FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
list<string> *p_listdevices, bool b_audio )
FindCaptureDevice( vlc_object_t *p_this, std::string *p_devicename,
std::list<std::string> *p_listdevices, bool b_audio )
{
IBaseFilter *p_base_filter = NULL;
IMoniker *p_moniker = NULL;
ULONG i_fetched;
HRESULT hr;
list<string> devicelist;
std::list<std::string> devicelist;
/* Create the system device enumerator */
ICreateDevEnum *p_dev_enum = NULL;
@ -1267,14 +1267,14 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename,
if( SUCCEEDED(hr) )
{
char *p_buf = FromWide( var.bstrVal );
string devname = string(p_buf);
std::string devname(p_buf);
free( p_buf) ;
int dup = 0;
/* find out if this name is already used by a previously found device */
list<string>::const_iterator iter = devicelist.begin();
list<string>::const_iterator end = devicelist.end();
string ordevname = devname ;
std::list<std::string>::const_iterator iter = devicelist.begin();
std::list<std::string>::const_iterator end = devicelist.end();
std::string ordevname = devname ;
while ( iter != end )
{
if( 0 == (*iter).compare( devname ) )
@ -1982,7 +1982,7 @@ static int FindDevices( vlc_object_t *p_this, const char *psz_name,
char ***vp, char ***tp )
{
/* Find list of devices */
list<string> list_devices;
std::list<std::string> list_devices;
if( SUCCEEDED(CoInitializeEx( NULL, COINIT_MULTITHREADED ))
|| SUCCEEDED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
{
@ -2001,7 +2001,7 @@ static int FindDevices( vlc_object_t *p_this, const char *psz_name,
values[1] = strdup( "none" );
texts[1] = strdup( N_("None") );
for( list<string>::iterator iter = list_devices.begin();
for( std::list<std::string>::iterator iter = list_devices.begin();
iter != list_devices.end();
++iter )
{

2
modules/access/dshow/filter.cpp

@ -236,7 +236,7 @@ CapturePin::~CapturePin()
* @return S_OK if a sample was available, S_FALSE if no sample was
* available
*/
HRESULT CapturePin::CustomGetSamples( deque<VLCMediaSample> &external_queue )
HRESULT CapturePin::CustomGetSamples( std::deque<VLCMediaSample> &external_queue )
{
#if 0 //def DEBUG_DSHOW
msg_Dbg( p_input, "CapturePin::CustomGetSamples: %d samples in the queue", samples_queue.size());

5
modules/access/dshow/filter.h

@ -27,7 +27,6 @@
*****************************************************************************/
#include <deque>
using namespace std;
typedef struct VLCMediaSample
{
@ -62,7 +61,7 @@ class CapturePin: public IPin, public IMemInputPin
AM_MEDIA_TYPE cx_media_type;
deque<VLCMediaSample> samples_queue;
std::deque<VLCMediaSample> samples_queue;
long i_ref;
@ -108,7 +107,7 @@ class CapturePin: public IPin, public IMemInputPin
/* Custom methods */
HRESULT CustomGetSample( VLCMediaSample * );
HRESULT CustomGetSamples( deque<VLCMediaSample> &external_queue );
HRESULT CustomGetSamples( std::deque<VLCMediaSample> &external_queue );
AM_MEDIA_TYPE &CustomGetMediaType();
};

2
modules/access/dtv/bdagraph.hpp

@ -24,8 +24,6 @@
* Preamble
*****************************************************************************/
using namespace std;
#include <wtypes.h>
#include <unknwn.h>
#include <ole2.h>

2
modules/access/live555.cpp

@ -61,8 +61,6 @@ extern "C" {
#include "../access/mms/asf.h" /* Who said ugly ? */
}
using namespace std;
/*****************************************************************************
* Module descriptor
*****************************************************************************/

9
modules/demux/adaptative/playlist/SegmentInformation.cpp

@ -27,7 +27,6 @@
#include "AbstractPlaylist.hpp"
using namespace adaptative::playlist;
using namespace std;
SegmentInformation::SegmentInformation(SegmentInformation *parent_) :
ICanonicalUrl( parent_ ),
@ -69,7 +68,7 @@ AbstractPlaylist * SegmentInformation::getPlaylist() const
return NULL;
}
std::size_t SegmentInformation::getSegments(SegmentInfoType type, vector<ISegment *> &retSegments,
std::size_t SegmentInformation::getSegments(SegmentInfoType type, std::vector<ISegment *> &retSegments,
std::size_t *offset) const
{
std::size_t off = 0;
@ -148,11 +147,11 @@ std::size_t SegmentInformation::getSegments(SegmentInfoType type, vector<ISegmen
}
}
std::size_t SegmentInformation::getAllSegments(vector<ISegment *> &retSegments) const
std::size_t SegmentInformation::getAllSegments(std::vector<ISegment *> &retSegments) const
{
for(int i=0; i<InfoTypeCount; i++)
{
vector<ISegment *> segs;
std::vector<ISegment *> segs;
if( getSegments(static_cast<SegmentInfoType>(i), segs) )
retSegments.insert( retSegments.end(), segs.begin(), segs.end() );
}
@ -163,7 +162,7 @@ ISegment * SegmentInformation::getSegment(SegmentInfoType type, uint64_t pos) co
{
ISegment *segment = NULL;
vector<ISegment *> retSegments;
std::vector<ISegment *> retSegments;
std::size_t offset = 0;
const size_t size = getSegments( type, retSegments, &offset );
if( size )

6
modules/demux/mkv/matroska_segment.cpp

@ -321,7 +321,7 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
{
KaxTagLangue &language = *(KaxTagLangue*) el;
language.ReadData( es.I_O(), SCOPE_ALL_DATA );
p_simple->psz_lang = strdup( string( language ).c_str());
p_simple->psz_lang = strdup( std::string( language ).c_str());
}
else if( MKV_IS_ID( el, KaxTagDefault ) )
{
@ -1268,7 +1268,7 @@ void matroska_segment_c::EnsureDuration()
{
KaxSimpleBlock *block = (KaxSimpleBlock*)l;
block->SetParent( *p_last_cluster );
i_last_timecode = max(i_last_timecode, block->GlobalTimecode());
i_last_timecode = std::max(i_last_timecode, block->GlobalTimecode());
}
else if( MKV_IS_ID( l, KaxBlockGroup ) )
{
@ -1290,7 +1290,7 @@ void matroska_segment_c::EnsureDuration()
i_group_timecode += uint64( dur );
}
}
i_last_timecode = max(i_last_timecode, i_group_timecode);
i_last_timecode = std::max(i_last_timecode, i_group_timecode);
}
}

10
modules/demux/mkv/matroska_segment_parse.cpp

@ -366,7 +366,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
KaxTrackLanguage &lang = *(KaxTrackLanguage*)l;
free( tk->fmt.psz_language );
tk->fmt.psz_language = strdup( string( lang ).c_str() );
tk->fmt.psz_language = strdup( std::string( lang ).c_str() );
msg_Dbg( &sys.demuxer,
"| | | + Track Language=`%s'", tk->fmt.psz_language );
}
@ -374,8 +374,8 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
{
KaxCodecID &codecid = *(KaxCodecID*)l;
tk->psz_codec = strdup( string( codecid ).c_str() );
msg_Dbg( &sys.demuxer, "| | | + Track CodecId=%s", string( codecid ).c_str() );
tk->psz_codec = strdup( std::string( codecid ).c_str() );
msg_Dbg( &sys.demuxer, "| | | + Track CodecId=%s", std::string( codecid ).c_str() );
}
else if( MKV_IS_ID( l, KaxCodecPrivate ) )
{
@ -1042,13 +1042,13 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
{
KaxChapterLanguage &lang =*(KaxChapterLanguage*)l;
msg_Dbg( &sys.demuxer, "| | | | | + ChapterLanguage '%s'",
string( lang ).c_str() );
std::string( lang ).c_str() );
}
else if( MKV_IS_ID( l, KaxChapterCountry ) )
{
KaxChapterCountry &ct =*(KaxChapterCountry*)l;
msg_Dbg( &sys.demuxer, "| | | | | + ChapterCountry '%s'",
string( ct ).c_str() );
std::string( ct ).c_str() );
}
}
}

2
modules/demux/mkv/mkv.cpp

@ -667,7 +667,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
else if ( tk->i_last_dts == VLC_TS_INVALID )
p_block->i_dts = i_pts;
else
p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )tk->i_default_duration );
p_block->i_dts = std::min( i_pts, tk->i_last_dts + ( mtime_t )tk->i_default_duration );
}
}

1
modules/demux/mkv/mkv.hpp

@ -115,7 +115,6 @@ enum
using namespace LIBMATROSKA_NAMESPACE;
using namespace std;
void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock,
mtime_t i_pts, mtime_t i_duration, bool b_key_picture,

2
modules/gui/qt4/menus.hpp

@ -31,8 +31,6 @@
#include <QMenu>
#include <QVector>
using namespace std;
class MenuItemData : public QObject
{
Q_OBJECT

2
modules/gui/skins2/commands/async_queue.cpp

@ -87,7 +87,7 @@ void AsyncQueue::push( const CmdGenericPtr &rcCommand, bool removePrev )
}
void AsyncQueue::remove( const string &rType, const CmdGenericPtr &rcCommand )
void AsyncQueue::remove( const std::string &rType, const CmdGenericPtr &rcCommand )
{
cmdList_t::iterator it;
for( it = m_cmdList.begin(); it != m_cmdList.end(); /* nothing */ )

2
modules/gui/skins2/commands/async_queue.hpp

@ -49,7 +49,7 @@ public:
void push( const CmdGenericPtr &rcCommand, bool removePrev = true );
/// Remove the commands of the given type
void remove( const string &rType , const CmdGenericPtr &rcCommand );
void remove( const std::string &rType , const CmdGenericPtr &rcCommand );
/// Flush the queue and execute the commands
void flush();

6
modules/gui/skins2/commands/cmd_add_item.hpp

@ -33,15 +33,15 @@
class CmdAddItem: public CmdGeneric
{
public:
CmdAddItem( intf_thread_t *pIntf, const string &rName, bool playNow )
CmdAddItem( intf_thread_t *pIntf, const std::string &rName, bool playNow )
: CmdGeneric( pIntf ), m_name( rName ), m_playNow( playNow ) { }
virtual ~CmdAddItem() { }
virtual void execute();
virtual string getType() const { return "add item"; }
virtual std::string getType() const { return "add item"; }
private:
/// Name of the item to enqueue
string m_name;
std::string m_name;
/// Should we play the item immediately?
bool m_playNow;
};

2
modules/gui/skins2/commands/cmd_audio.hpp

@ -34,7 +34,7 @@ public:
: CmdGeneric( pIntf ), m_enable( iEnable ) { }
virtual ~CmdSetEqualizer() { }
virtual void execute();
virtual string getType() const { return "set equalizer"; }
virtual std::string getType() const { return "set equalizer"; }
private:
/// Enable or disable the equalizer

8
modules/gui/skins2/commands/cmd_callbacks.hpp

@ -34,7 +34,7 @@ class CmdCallback : public CmdGeneric
public:
CmdCallback( intf_thread_t *pIntf, vlc_object_t *pObj, vlc_value_t newVal,
void (VlcProc::*func)(vlc_object_t *,vlc_value_t),
string label )
std::string label )
: CmdGeneric( pIntf ), m_pObj( pObj ), m_newVal( newVal ),
m_label( label ), m_pfExecute( func )
{
@ -56,12 +56,12 @@ public:
vlc_object_release( m_pObj );
m_pObj = NULL;
}
virtual string getType() const { return m_label; }
virtual std::string getType() const { return m_label; }
private:
vlc_object_t* m_pObj;
vlc_value_t m_newVal;
string m_label;
std::string m_label;
void (VlcProc::*m_pfExecute)(vlc_object_t *,vlc_value_t);
};
@ -122,7 +122,7 @@ public:
vlc_cond_signal( &m_wait );
}
virtual string getType() const { return "CmdExecuteBlock"; }
virtual std::string getType() const { return "CmdExecuteBlock"; }
private:
vlc_object_t* m_pObj;

6
modules/gui/skins2/commands/cmd_change_skin.hpp

@ -32,15 +32,15 @@
class CmdChangeSkin: public CmdGeneric
{
public:
CmdChangeSkin( intf_thread_t *pIntf, const string &rFile ):
CmdChangeSkin( intf_thread_t *pIntf, const std::string &rFile ):
CmdGeneric( pIntf ), m_file( rFile ) { }
virtual ~CmdChangeSkin() { }
virtual void execute();
virtual string getType() const { return "change skin"; }
virtual std::string getType() const { return "change skin"; }
private:
/// Skin file to load
string m_file;
std::string m_file;
};
#endif

4
modules/gui/skins2/commands/cmd_dialogs.hpp

@ -42,7 +42,7 @@ class CmdDlg##a: public CmdGeneric \
Dialogs *dlg = Dialogs::instance( getIntf() ); \
if( dlg ) dlg->c; \
} \
virtual string getType() const { return #a" dialog"; } \
virtual std::string getType() const { return #a" dialog"; } \
};
DEFC( ChangeSkin, showChangeSkin() )
@ -85,7 +85,7 @@ public:
if( pDialogs != NULL )
pDialogs->showInteraction( m_pDialog );
}
virtual string getType() const { return "interaction"; }
virtual std::string getType() const { return "interaction"; }
private:
interaction_dialog_t *m_pDialog;
};

6
modules/gui/skins2/commands/cmd_generic.hpp

@ -38,7 +38,7 @@ class Cmd##name: public CmdGeneric \
Cmd##name( intf_thread_t *pIntf ): CmdGeneric( pIntf ) { } \
virtual ~Cmd##name() { } \
virtual void execute(); \
virtual string getType() const { return type; } \
virtual std::string getType() const { return type; } \
};
@ -51,7 +51,7 @@ public: \
CmdGeneric( pParent->getIntf() ), m_pParent( pParent ) { } \
virtual ~Cmd##action() { } \
virtual void execute(); \
virtual string getType() const { return "Cmd" #parent #action; } \
virtual std::string getType() const { return "Cmd" #parent #action; } \
private: \
parent *m_pParent; \
} m_cmd##action; \
@ -68,7 +68,7 @@ public:
virtual void execute() = 0;
/// Return the type of the command
virtual string getType() const { return ""; }
virtual std::string getType() const { return ""; }
/// During queue reductions, check if we really want to remove
/// this command.

2
modules/gui/skins2/commands/cmd_layout.hpp

@ -38,7 +38,7 @@ public:
GenericLayout &rLayout );
virtual ~CmdLayout() { }
virtual void execute();
virtual string getType() const { return "change layout"; }
virtual std::string getType() const { return "change layout"; }
private:
TopWindow &m_rWindow;

4
modules/gui/skins2/commands/cmd_minimize.hpp

@ -42,7 +42,7 @@ public:
TopWindow &rWindow );
virtual ~CmdMaximize() { }
virtual void execute();
virtual string getType() const { return "maximize"; }
virtual std::string getType() const { return "maximize"; }
private:
WindowManager &m_rWindowManager;
@ -59,7 +59,7 @@ public:
TopWindow &rWindow );
virtual ~CmdUnmaximize() { }
virtual void execute();
virtual string getType() const { return "unmaximize"; }
virtual std::string getType() const { return "unmaximize"; }
private:
WindowManager &m_rWindowManager;

4
modules/gui/skins2/commands/cmd_muxer.hpp

@ -32,11 +32,11 @@
class CmdMuxer: public CmdGeneric
{
public:
CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList )
CmdMuxer( intf_thread_t *pIntf, const std::list<CmdGeneric*> &rList )
: CmdGeneric( pIntf ), m_list( rList ) { }
virtual ~CmdMuxer() { }
virtual void execute();
virtual string getType() const { return "muxer"; }
virtual std::string getType() const { return "muxer"; }
private:
/// List of commands we will execute sequentially

2
modules/gui/skins2/commands/cmd_on_top.hpp

@ -38,7 +38,7 @@ public:
: CmdGeneric( pIntf ), m_ontop( b_ontop ) { }
virtual ~CmdSetOnTop() { }
virtual void execute();
virtual string getType() const { return "set on top"; }
virtual std::string getType() const { return "set on top"; }
private:
bool m_ontop;

6
modules/gui/skins2/commands/cmd_playlist.cpp

@ -86,11 +86,11 @@ void CmdPlaylistSave::execute()
if( pPlaylist != NULL )
{
const char *psz_module;
if( m_file.find( ".xsp", 0 ) != string::npos )
if( m_file.find( ".xsp", 0 ) != std::string::npos )
psz_module = "export-xspf";
else if( m_file.find( "m3u", 0 ) != string::npos )
else if( m_file.find( "m3u", 0 ) != std::string::npos )
psz_module = "export-m3u";
else if( m_file.find( "html", 0 ) != string::npos )
else if( m_file.find( "html", 0 ) != std::string::npos )
psz_module = "export-html";
else
{

20
modules/gui/skins2/commands/cmd_playlist.hpp

@ -37,7 +37,7 @@ public:
: CmdGeneric( pIntf ), m_rList( rList ) { }
virtual ~CmdPlaylistDel() { }
virtual void execute();
virtual string getType() const { return "playlist del"; }
virtual std::string getType() const { return "playlist del"; }
private:
/// List
@ -66,7 +66,7 @@ public:
: CmdGeneric( pIntf ), m_value( value ) { }
virtual ~CmdPlaylistRandom() { }
virtual void execute();
virtual string getType() const { return "playlist random"; }
virtual std::string getType() const { return "playlist random"; }
private:
/// Random state
@ -82,7 +82,7 @@ public:
: CmdGeneric( pIntf ), m_value( value ) { }
virtual ~CmdPlaylistLoop() { }
virtual void execute();
virtual string getType() const { return "playlist loop"; }
virtual std::string getType() const { return "playlist loop"; }
private:
/// Loop state
@ -98,7 +98,7 @@ public:
: CmdGeneric( pIntf ), m_value( value ) { }
virtual ~CmdPlaylistRepeat() { }
virtual void execute();
virtual string getType() const { return "playlist repeat"; }
virtual std::string getType() const { return "playlist repeat"; }
private:
/// Repeat state
@ -110,15 +110,15 @@ private:
class CmdPlaylistLoad: public CmdGeneric
{
public:
CmdPlaylistLoad( intf_thread_t *pIntf, const string& rFile )
CmdPlaylistLoad( intf_thread_t *pIntf, const std::string& rFile )
: CmdGeneric( pIntf ), m_file( rFile ) { }
virtual ~CmdPlaylistLoad() { }
virtual void execute();
virtual string getType() const { return "playlist load"; }
virtual std::string getType() const { return "playlist load"; }
private:
/// Playlist file to load
string m_file;
std::string m_file;
};
@ -126,15 +126,15 @@ private:
class CmdPlaylistSave: public CmdGeneric
{
public:
CmdPlaylistSave( intf_thread_t *pIntf, const string& rFile )
CmdPlaylistSave( intf_thread_t *pIntf, const std::string& rFile )
: CmdGeneric( pIntf ), m_file( rFile ) { }
virtual ~CmdPlaylistSave() { }
virtual void execute();
virtual string getType() const { return "playlist save"; }
virtual std::string getType() const { return "playlist save"; }
private:
/// Playlist file to save
string m_file;
std::string m_file;
};

2
modules/gui/skins2/commands/cmd_playtree.hpp

@ -38,7 +38,7 @@ public:
: CmdGeneric( pIntf ), m_rTree( rTree ) { }
virtual ~CmdPlaytreeDel() { }
virtual void execute();
virtual string getType() const { return "playtree del"; }
virtual std::string getType() const { return "playtree del"; }
private:
/// Tree

6
modules/gui/skins2/commands/cmd_resize.hpp

@ -42,7 +42,7 @@ public:
GenericLayout &rLayout, int width, int height );
virtual ~CmdResize() { }
virtual void execute();
virtual string getType() const { return "resize"; }
virtual std::string getType() const { return "resize"; }
private:
const WindowManager &m_rWindowManager;
@ -60,7 +60,7 @@ public:
int width, int height );
virtual ~CmdResizeVout() { }
virtual void execute();
virtual string getType() const { return "resize vout"; }
virtual std::string getType() const { return "resize vout"; }
private:
vout_window_t* m_pWnd;
@ -77,7 +77,7 @@ public:
bool fullscreen );
virtual ~CmdSetFullscreen() { }
virtual void execute();
virtual string getType() const { return "toogle fullscreen"; }
virtual std::string getType() const { return "toogle fullscreen"; }
private:
vout_window_t* m_pWnd;

8
modules/gui/skins2/commands/cmd_show_window.hpp

@ -41,7 +41,7 @@ public:
CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) { }
virtual ~CmdShowWindow() { }
virtual void execute() { m_rWinManager.show( m_rWin ); }
virtual string getType() const { return "show window"; }
virtual std::string getType() const { return "show window"; }
private:
/// Reference to the window manager
@ -60,7 +60,7 @@ public:
CmdGeneric( pIntf ), m_rWinManager( rWinManager ), m_rWin( rWin ) { }
virtual ~CmdHideWindow() { }
virtual void execute() { m_rWinManager.hide( m_rWin ); }
virtual string getType() const { return "hide window"; }
virtual std::string getType() const { return "hide window"; }
private:
/// Reference to the window manager
@ -78,7 +78,7 @@ public:
CmdGeneric( pIntf ), m_rWinManager( rWinManager ) { }
virtual ~CmdRaiseAll() { }
virtual void execute() { m_rWinManager.raiseAll(); }
virtual string getType() const { return "raise all windows"; }
virtual std::string getType() const { return "raise all windows"; }
private:
/// Reference to the window manager
@ -101,7 +101,7 @@ public:
m_rPopup.show( x, y );
}
virtual string getType() const { return "show popup"; }
virtual std::string getType() const { return "show popup"; }
private:
/// Reference to the popup

16
modules/gui/skins2/commands/cmd_vars.hpp

@ -55,7 +55,7 @@ public:
vlc_gc_decref( m_pItem );
}
virtual void execute();
virtual string getType() const { return "playtree update"; }
virtual std::string getType() const { return "playtree update"; }
/// Only accept removal of command if they concern the same item
virtual bool checkRemove( CmdGeneric * ) const;
@ -83,7 +83,7 @@ public:
delete m_pAdd;
}
virtual void execute();
virtual string getType() const { return "playtree append"; }
virtual std::string getType() const { return "playtree append"; }
private:
playlist_add_t * m_pAdd;
@ -97,7 +97,7 @@ public:
CmdGeneric( pIntf ), m_id( i_id ) { }
virtual ~CmdPlaytreeDelete() { }
virtual void execute();
virtual string getType() const { return "playtree append"; }
virtual std::string getType() const { return "playtree append"; }
private:
int m_id;
@ -112,7 +112,7 @@ public:
CmdGeneric( pIntf ), m_rText( rText ), m_value( rValue ) { }
virtual ~CmdSetText() { }
virtual void execute();
virtual string getType() const { return "set text"; }
virtual std::string getType() const { return "set text"; }
private:
/// Text variable to set
@ -130,7 +130,7 @@ public:
: CmdGeneric( I ), m_rPreamp( P ), m_value( v ) { }
virtual ~CmdSetEqPreamp() { }
virtual void execute();
virtual string getType() const { return "set equalizer preamp"; }
virtual std::string getType() const { return "set equalizer preamp"; }
private:
/// Preamp variable to set
@ -144,17 +144,17 @@ private:
class CmdSetEqBands: public CmdGeneric
{
public:
CmdSetEqBands( intf_thread_t *I, EqualizerBands &B, const string &V )
CmdSetEqBands( intf_thread_t *I, EqualizerBands &B, const std::string &V )
: CmdGeneric( I ), m_rEqBands( B ), m_value( V ) { }
virtual ~CmdSetEqBands() { }
virtual void execute();
virtual string getType() const { return "set equalizer bands"; }
virtual std::string getType() const { return "set equalizer bands"; }
private:
/// Equalizer variable to set
EqualizerBands &m_rEqBands;
/// Value to set
const string m_value;
const std::string m_value;
};

2
modules/gui/skins2/controls/ctrl_button.hpp

@ -63,7 +63,7 @@ public:
virtual UString getTooltipText() const { return m_tooltip; }
/// Get the type of control (custom RTTI)
virtual string getType() const { return "button"; }
virtual std::string getType() const { return "button"; }
private:
/// Finite state machine of the control

2
modules/gui/skins2/controls/ctrl_checkbox.hpp

@ -67,7 +67,7 @@ public:
virtual UString getTooltipText() const { return *m_pTooltip; }
/// Get the type of control (custom RTTI)
virtual string getType() const { return "checkbox"; }
virtual std::string getType() const { return "checkbox"; }
private:
/// Finite state machine of the control

4
modules/gui/skins2/controls/ctrl_generic.cpp

@ -108,8 +108,8 @@ void CtrlGeneric::notifyLayoutMaxSize( const Box *pImg1, const Box *pImg2 )
}
else
{
notifyLayout( max( pImg1->getWidth(), pImg2->getWidth() ),
max( pImg1->getHeight(), pImg2->getHeight() ) );
notifyLayout( std::max( pImg1->getWidth(), pImg2->getWidth() ),
std::max( pImg1->getHeight(), pImg2->getHeight() ) );
}
}
}

2
modules/gui/skins2/controls/ctrl_generic.hpp

@ -88,7 +88,7 @@ public:
virtual bool isVisible() const;
/// Get the type of control (custom RTTI)
virtual string getType() const { return ""; }
virtual std::string getType() const { return ""; }
protected:
// If pVisible is NULL, the control is always visible

4
modules/gui/skins2/controls/ctrl_image.cpp

@ -51,7 +51,7 @@ CtrlImage::CtrlImage( intf_thread_t *pIntf, GenericBitmap &rBitmap,
pVlcProc->getStreamArtVar().addObserver( this );
// retrieve initial state of art file
string str = pVlcProc->getStreamArtVar().get();
std::string str = pVlcProc->getStreamArtVar().get();
GenericBitmap* pArt = (GenericBitmap*) pArtManager->getArtBitmap( str );
if( pArt )
{
@ -258,7 +258,7 @@ void CtrlImage::onUpdate( Subject<VarString> &rVariable, void* arg )
if( &rVariable == &pVlcProc->getStreamArtVar() )
{
string str = ((VarString&)rVariable).get();
std::string str = ((VarString&)rVariable).get();
ArtManager* pArtManager = ArtManager::instance( getIntf() );
GenericBitmap* pArt = (GenericBitmap*) pArtManager->getArtBitmap( str );

2
modules/gui/skins2/controls/ctrl_image.hpp

@ -63,7 +63,7 @@ public:
virtual void draw( OSGraphics &rImage, int xDest, int yDest, int w, int h );
/// Get the type of control (custom RTTI)
virtual string getType() const { return "image"; }
virtual std::string getType() const { return "image"; }
private:
/// Bitmap

16
modules/gui/skins2/controls/ctrl_list.cpp

@ -153,7 +153,7 @@ void CtrlList::onPositionChange()
void CtrlList::handleEvent( EvtGeneric &rEvent )
{
if( rEvent.getAsString().find( "key:down" ) != string::npos )
if( rEvent.getAsString().find( "key:down" ) != std::string::npos )
{
int key = ((EvtKey&)rEvent).getKey();
VarList::Iterator it = m_rList.begin();
@ -200,7 +200,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
notifyLayout();
}
else if( rEvent.getAsString().find( "mouse:left" ) != string::npos )
else if( rEvent.getAsString().find( "mouse:left" ) != std::string::npos )
{
EvtMouse &rEvtMouse = (EvtMouse&)rEvent;
const Position *pos = getPosition();
@ -210,7 +210,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
int index = 0;
if( rEvent.getAsString().find( "mouse:left:down:ctrl,shift" ) !=
string::npos )
std::string::npos )
{
// Flag to know if the current item must be selected
bool select = false;
@ -236,7 +236,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
}
else if( rEvent.getAsString().find( "mouse:left:down:ctrl" ) !=
string::npos )
std::string::npos )
{
for( it = m_rList.begin(); it != m_rList.end(); ++it )
{
@ -251,7 +251,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
}
else if( rEvent.getAsString().find( "mouse:left:down:shift" ) !=
string::npos )
std::string::npos )
{
// Flag to know if the current item must be selected
bool select = false;
@ -277,7 +277,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
}
else if( rEvent.getAsString().find( "mouse:left:down" ) !=
string::npos )
std::string::npos )
{
for( it = m_rList.begin(); it != m_rList.end(); ++it )
{
@ -295,7 +295,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
}
else if( rEvent.getAsString().find( "mouse:left:dblclick" ) !=
string::npos )
std::string::npos )
{
for( it = m_rList.begin(); it != m_rList.end(); ++it )
{
@ -319,7 +319,7 @@ void CtrlList::handleEvent( EvtGeneric &rEvent )
notifyLayout();
}
else if( rEvent.getAsString().find( "scroll" ) != string::npos )
else if( rEvent.getAsString().find( "scroll" ) != std::string::npos )
{
int direction = ((EvtScroll&)rEvent).getDirection();

2
modules/gui/skins2/controls/ctrl_list.hpp

@ -65,7 +65,7 @@ public:
virtual bool isScrollable() const { return true; }
/// Get the type of control (custom RTTI)
virtual string getType() const { return "list"; }
virtual std::string getType() const { return "list"; }
private:
/// List associated to the control

2
modules/gui/skins2/controls/ctrl_move.hpp

@ -63,7 +63,7 @@ public:
virtual void onResize();
/// Get the type of control (custom RTTI)
virtual string getType() const { return m_rCtrl.getType(); }
virtual std::string getType() const { return m_rCtrl.getType(); }
private:
FSM m_fsm;

2
modules/gui/skins2/controls/ctrl_radialslider.hpp

@ -58,7 +58,7 @@ public:
virtual void draw( OSGraphics &rImage, int xDest, int yDest, int w, int h );
/// Get the type of control (custom RTTI)
virtual string getType() const { return "radial_slider"; }
virtual std::string getType() const { return "radial_slider"; }
private:
/// Finite state machine of the control

2
modules/gui/skins2/controls/ctrl_resize.hpp

@ -64,7 +64,7 @@ public:
virtual void onResize();
/// Get the type of control (custom RTTI)
virtual string getType() const { return m_rCtrl.getType(); }
virtual std::string getType() const { return m_rCtrl.getType(); }
private:
FSM m_fsm;

4
modules/gui/skins2/controls/ctrl_slider.cpp

@ -413,7 +413,7 @@ void CtrlSliderBg::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h
void CtrlSliderBg::handleEvent( EvtGeneric &rEvent )
{
if( rEvent.getAsString().find( "mouse:left:down" ) != string::npos )
if( rEvent.getAsString().find( "mouse:left:down" ) != std::string::npos )
{
// Compute the resize factors
float factorX, factorY;
@ -441,7 +441,7 @@ void CtrlSliderBg::handleEvent( EvtGeneric &rEvent )
pWin->forwardEvent( evt, *m_pCursor );
}
}
else if( rEvent.getAsString().find( "scroll" ) != string::npos )
else if( rEvent.getAsString().find( "scroll" ) != std::string::npos )
{
int dir = static_cast<EvtScroll*>(&rEvent)->getDirection();
m_rVariable.set( scroll( EvtScroll::kUp == dir,

4
modules/gui/skins2/controls/ctrl_slider.hpp

@ -79,7 +79,7 @@ public:
virtual UString getTooltipText() const { return m_tooltip; }
/// Get the type of control (custom RTTI)
virtual string getType() const { return "slider_cursor"; }
virtual std::string getType() const { return "slider_cursor"; }
private:
/// Finite state machine of the control
@ -162,7 +162,7 @@ public:
int xOffSet = 0, int yOffSet = 0 );
/// Get the type of control (custom RTTI)
virtual string getType() const { return "slider_bg"; }
virtual std::string getType() const { return "slider_bg"; }
/// Associate a cursor to this background
void associateCursor( CtrlSliderCursor &rCursor );

6
modules/gui/skins2/controls/ctrl_text.cpp

@ -161,9 +161,9 @@ void CtrlText::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h )
if( m_pCurrImg )
{
// Compute the dimensions to draw
int width = min( m_pCurrImg->getWidth() + m_xPos,
int width = std::min( m_pCurrImg->getWidth() + m_xPos,
getPosition()->getWidth() );
int height = min( m_pCurrImg->getHeight(), getPosition()->getHeight() );
int height = std::min( m_pCurrImg->getHeight(), getPosition()->getHeight() );
// Draw the current image
if( width > 0 && height > 0 )
{
@ -281,7 +281,7 @@ void CtrlText::updateContext()
// If the control is in the moving state,
// automatically start or stop the timer accordingly
const string &rState = m_fsm.getState();
const std::string &rState = m_fsm.getState();
if( rState == "moving" || rState == "outMoving" )
{
if( m_pCurrImg == m_pImgDouble )

2
modules/gui/skins2/controls/ctrl_text.hpp

@ -81,7 +81,7 @@ public:
void setText( const UString &rText, uint32_t color = 0xFFFFFFFF );
/// Get the type of control (custom RTTI)
virtual string getType() const { return "text"; }
virtual std::string getType() const { return "text"; }
private:
/// Finite state machine of the control

22
modules/gui/skins2/controls/ctrl_tree.cpp

@ -229,7 +229,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
bool needShow = false;
bool needRefresh = false;
Iterator toShow = m_firstPos;
if( rEvent.getAsString().find( "key:down" ) != string::npos )
if( rEvent.getAsString().find( "key:down" ) != std::string::npos )
{
int key = ((EvtKey&)rEvent).getKey();
@ -387,7 +387,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
else if( rEvent.getAsString().find( "mouse:left" ) != string::npos )
else if( rEvent.getAsString().find( "mouse:left" ) != std::string::npos )
{
EvtMouse &rEvtMouse = (EvtMouse&)rEvent;
const Position *pos = getPosition();
@ -398,7 +398,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
if( itClicked != m_rTree.end() )
{
if( rEvent.getAsString().find( "mouse:left:down:ctrl,shift" ) !=
string::npos )
std::string::npos )
{
// Flag to know if the current item must be selected
bool select = false;
@ -424,7 +424,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
else if( rEvent.getAsString().find( "mouse:left:down:ctrl" ) !=
string::npos )
std::string::npos )
{
// Invert the selection of the item
itClicked->toggleSelected();
@ -432,7 +432,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
needRefresh = true;
}
else if( rEvent.getAsString().find( "mouse:left:down:shift" ) !=
string::npos )
std::string::npos )
{
bool select = false;
for( Iterator it = m_firstPos; it != m_rTree.end(); ++it )
@ -457,7 +457,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
needRefresh = true;
}
else if( rEvent.getAsString().find( "mouse:left:down" ) !=
string::npos )
std::string::npos )
{
if( !m_flat &&
itClicked->size() &&
@ -478,7 +478,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
needRefresh = true;
}
else if( rEvent.getAsString().find( "mouse:left:dblclick" ) !=
string::npos )
std::string::npos )
{
// Execute the action associated to this item
m_rTree.action( &*itClicked );
@ -486,7 +486,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
else if( rEvent.getAsString().find( "scroll" ) != string::npos )
else if( rEvent.getAsString().find( "scroll" ) != std::string::npos )
{
int direction = static_cast<EvtScroll&>(rEvent).getDirection();
if( direction == EvtScroll::kUp )
@ -495,7 +495,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
m_rTree.getPositionVar().increment( -1 );
}
else if( rEvent.getAsString().find( "drag:over" ) != string::npos )
else if( rEvent.getAsString().find( "drag:over" ) != std::string::npos )
{
EvtDragOver& evt = static_cast<EvtDragOver&>(rEvent);
const Position *pos = getPosition();
@ -509,7 +509,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
}
}
else if( rEvent.getAsString().find( "drag:drop" ) != string::npos )
else if( rEvent.getAsString().find( "drag:drop" ) != std::string::npos )
{
EvtDragDrop& evt = static_cast<EvtDragDrop&>(rEvent);
Playtree& rPlaytree = static_cast<Playtree&>(m_rTree);
@ -519,7 +519,7 @@ void CtrlTree::handleEvent( EvtGeneric &rEvent )
needRefresh = true;
}
else if( rEvent.getAsString().find( "drag:leave" ) != string::npos )
else if( rEvent.getAsString().find( "drag:leave" ) != std::string::npos )
{
m_itOver = m_rTree.end();
needRefresh = true;

2
modules/gui/skins2/controls/ctrl_tree.hpp

@ -75,7 +75,7 @@ public:
virtual bool isScrollable() const { return true; }
/// Get the type of control (custom RTTI)
virtual string getType() const { return "tree"; }
virtual std::string getType() const { return "tree"; }
/// Make sure an item is visible
/// \param item an iterator to a tree item

2
modules/gui/skins2/controls/ctrl_video.hpp

@ -54,7 +54,7 @@ public:
virtual void draw( OSGraphics &rImage, int xDest, int yDest, int w, int h );
/// Get the type of control (custom RTTI)
virtual string getType() const { return "video"; }
virtual std::string getType() const { return "video"; }
/// Method called when visibility or ActiveLayout is updated
virtual void onUpdate( Subject<VarBool> &rVariable , void* );

16
modules/gui/skins2/events/evt_dragndrop.hpp

@ -34,7 +34,7 @@ class EvtDrag: public EvtGeneric
public:
EvtDrag( intf_thread_t *pIntf ): EvtGeneric( pIntf ) { }
virtual ~EvtDrag() { }
virtual const string getAsString() const { return "drag"; }
virtual const std::string getAsString() const { return "drag"; }
};
@ -43,7 +43,7 @@ class EvtDragEnter: public EvtDrag
public:
EvtDragEnter( intf_thread_t *pIntf ): EvtDrag( pIntf ) { }
virtual ~EvtDragEnter() { }
virtual const string getAsString() const { return "drag:enter"; }
virtual const std::string getAsString() const { return "drag:enter"; }
};
@ -52,7 +52,7 @@ class EvtDragLeave: public EvtDrag
public:
EvtDragLeave( intf_thread_t *pIntf ): EvtDrag( pIntf ) { }
virtual ~EvtDragLeave() { }
virtual const string getAsString() const { return "drag:leave"; }
virtual const std::string getAsString() const { return "drag:leave"; }
};
@ -62,7 +62,7 @@ public:
EvtDragOver( intf_thread_t *pIntf, int x, int y )
: EvtDrag( pIntf ), m_xPos( x ), m_yPos( y ) { }
virtual ~EvtDragOver() { }
virtual const string getAsString() const { return "drag:over"; }
virtual const std::string getAsString() const { return "drag:over"; }
// Return the event coordinates
int getXPos() const { return m_xPos; }
int getYPos() const { return m_yPos; }
@ -74,16 +74,16 @@ private:
class EvtDragDrop: public EvtDrag
{
public:
EvtDragDrop( intf_thread_t *pIntf, int x, int y, const list<string>& files )
EvtDragDrop( intf_thread_t *pIntf, int x, int y, const std::list<std::string>& files )
: EvtDrag( pIntf ), m_files( files ), m_xPos( x ), m_yPos( y ) { }
virtual ~EvtDragDrop() { }
virtual const string getAsString() const { return "drag:drop"; }
virtual const std::string getAsString() const { return "drag:drop"; }
// Return the event coordinates
int getXPos() const { return m_xPos; }
int getYPos() const { return m_yPos; }
const list<string>& getFiles() const { return m_files; }
const std::list<std::string>& getFiles() const { return m_files; }
private:
list<string> m_files;
std::list<std::string> m_files;
int m_xPos;
int m_yPos;
};

2
modules/gui/skins2/events/evt_enter.hpp

@ -34,7 +34,7 @@ class EvtEnter: public EvtInput
public:
EvtEnter( intf_thread_t *pIntf ): EvtInput( pIntf ) { }
virtual ~EvtEnter() { }
virtual const string getAsString() const { return "enter"; }
virtual const std::string getAsString() const { return "enter"; }
};

2
modules/gui/skins2/events/evt_focus.hpp

@ -36,7 +36,7 @@ public:
: EvtGeneric( pIntf ), m_focus( focus ) { }
virtual ~EvtFocus() { }
virtual const string getAsString() const
virtual const std::string getAsString() const
{
return ( m_focus ? "focus:in" : "focus:out" );
}

2
modules/gui/skins2/events/evt_generic.hpp

@ -36,7 +36,7 @@ public:
virtual ~EvtGeneric() { }
/// Return the type of the event
virtual const string getAsString() const = 0;
virtual const std::string getAsString() const = 0;
protected:
EvtGeneric( intf_thread_t *pIntf ): SkinObject( pIntf ) { }

4
modules/gui/skins2/events/evt_input.cpp

@ -37,7 +37,7 @@ EvtInput::EvtInput( intf_thread_t *pIntf, int mod )
: EvtGeneric( pIntf), m_mod( mod ) { }
void EvtInput::addModifier( string &rEvtString ) const
void EvtInput::addModifier( std::string &rEvtString ) const
{
if( m_mod == kModNone )
{
@ -45,7 +45,7 @@ void EvtInput::addModifier( string &rEvtString ) const
}
else
{
string m = ":";
std::string m = ":";
if( m_mod & kModAlt )
m += "alt,";
if( m_mod & kModCtrl )

2
modules/gui/skins2/events/evt_input.hpp

@ -44,7 +44,7 @@ protected:
EvtInput( intf_thread_t *pIntf, int mod = kModNone );
/// Add the modifier to the event string
void addModifier( string &rEvtString ) const;
void addModifier( std::string &rEvtString ) const;
private:
/// Modifiers (special key(s) pressed during the mouse event)

6
modules/gui/skins2/events/evt_key.cpp

@ -26,9 +26,9 @@
#include <vlc_keys.h>
const string EvtKey::getAsString() const
const std::string EvtKey::getAsString() const
{
string event = "key";
std::string event = "key";
// Add the action
if( m_action == kDown )
@ -42,7 +42,7 @@ const string EvtKey::getAsString() const
char *keyName = vlc_keycode2str( m_key & ~KEY_MODIFIER, true );
if( keyName )
{
event += (string)":" + keyName;
event += std::string(":") + keyName;
free( keyName );
}
else

2
modules/gui/skins2/events/evt_key.hpp

@ -41,7 +41,7 @@ public:
EvtKey( intf_thread_t *I, int key, ActionType_t actn, int mod = kModNone )
: EvtInput( I, mod ), m_key( key ), m_action( actn ) { }
virtual ~EvtKey() { }
virtual const string getAsString() const;
virtual const std::string getAsString() const;
int getKey() const { return m_key; }
int getModKey() const { return m_key | getMod(); }

2
modules/gui/skins2/events/evt_leave.hpp

@ -34,7 +34,7 @@ class EvtLeave: public EvtInput
public:
EvtLeave( intf_thread_t *pIntf ): EvtInput( pIntf ) { }
virtual ~EvtLeave() { }
virtual const string getAsString() const { return "leave"; }
virtual const std::string getAsString() const { return "leave"; }
};

2
modules/gui/skins2/events/evt_menu.hpp

@ -34,7 +34,7 @@ public:
EvtMenu( intf_thread_t *pIntf, int itemId )
: EvtGeneric( pIntf ), m_itemId( itemId ) { }
virtual ~EvtMenu() { }
virtual const string getAsString() const { return "menu"; }
virtual const std::string getAsString() const { return "menu"; }
int getItemId() const { return m_itemId; }

2
modules/gui/skins2/events/evt_motion.hpp

@ -35,7 +35,7 @@ public:
EvtMotion( intf_thread_t *pIntf, int xPos, int yPos )
: EvtInput( pIntf ), m_xPos( xPos ), m_yPos( yPos ) { }
virtual ~EvtMotion() { }
virtual const string getAsString() const { return "motion"; }
virtual const std::string getAsString() const { return "motion"; }
// Getters
int getXPos() const { return m_xPos; }

4
modules/gui/skins2/events/evt_mouse.cpp

@ -25,9 +25,9 @@
#include "evt_mouse.hpp"
const string EvtMouse::getAsString() const
const std::string EvtMouse::getAsString() const
{
string event = "mouse";
std::string event = "mouse";
// Add the button
if( m_button == kLeft )

2
modules/gui/skins2/events/evt_mouse.hpp

@ -51,7 +51,7 @@ public:
: EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
m_button( button ), m_action( action ) { }
virtual ~EvtMouse() { }
virtual const string getAsString() const;
virtual const std::string getAsString() const;
// Return the event coordinates
int getXPos() const { return m_xPos; }

2
modules/gui/skins2/events/evt_refresh.hpp

@ -39,7 +39,7 @@ public:
m_width( width ), m_height( height ) { }
virtual ~EvtRefresh() { }
virtual const string getAsString() const { return "refresh"; }
virtual const std::string getAsString() const { return "refresh"; }
/// Getters
int getXStart() const { return m_xStart; }

4
modules/gui/skins2/events/evt_scroll.cpp

@ -25,9 +25,9 @@
#include "evt_scroll.hpp"
const string EvtScroll::getAsString() const
const std::string EvtScroll::getAsString() const
{
string event = "scroll";
std::string event = "scroll";
// Add the direction
if( m_direction == kUp )

2
modules/gui/skins2/events/evt_scroll.hpp

@ -43,7 +43,7 @@ public:
: EvtInput( pIntf, mod ), m_xPos( xPos ), m_yPos( yPos ),
m_direction( direction ) { }
virtual ~EvtScroll() { }
virtual const string getAsString() const;
virtual const std::string getAsString() const;
// Return the event coordinates
int getXPos() const { return m_xPos; }

4
modules/gui/skins2/events/evt_special.cpp

@ -25,9 +25,9 @@
#include "evt_special.hpp"
const string EvtSpecial::getAsString() const
const std::string EvtSpecial::getAsString() const
{
string event = "special";
std::string event = "special";
// Add the action
if( m_action == kShow )

2
modules/gui/skins2/events/evt_special.hpp

@ -43,7 +43,7 @@ public:
EvtSpecial( intf_thread_t *pIntf, ActionType_t action )
: EvtGeneric( pIntf ), m_action( action ) { }
virtual ~EvtSpecial() { }
virtual const string getAsString() const;
virtual const std::string getAsString() const;
private:
/// Type of action

66
modules/gui/skins2/parser/builder.cpp

@ -63,7 +63,7 @@
Builder::Builder( intf_thread_t *pIntf, const BuilderData &rData,
const string &rPath ):
const std::string &rPath ):
SkinObject( pIntf ), m_rData( rData ), m_path( rPath ), m_pTheme( NULL )
{
m_pImageHandler = image_HandlerCreate( pIntf );
@ -74,7 +74,7 @@ Builder::~Builder()
if( m_pImageHandler ) image_HandlerDelete( m_pImageHandler );
}
CmdGeneric *Builder::parseAction( const string &rAction )
CmdGeneric *Builder::parseAction( const std::string &rAction )
{
return Interpreter::instance( getIntf() )->parseAction( rAction, m_pTheme );
}
@ -210,7 +210,7 @@ void Builder::addTheme( const BuilderData::Theme &rData )
void Builder::addIniFile( const BuilderData::IniFile &rData )
{
// Parse the INI file
string full_path = getFilePath( rData.m_file );
std::string full_path = getFilePath( rData.m_file );
if( !full_path.size() )
return;
@ -221,7 +221,7 @@ void Builder::addIniFile( const BuilderData::IniFile &rData )
void Builder::addBitmap( const BuilderData::Bitmap &rData )
{
string full_path = getFilePath( rData.m_fileName );
std::string full_path = getFilePath( rData.m_fileName );
if( !full_path.size() )
return;
@ -276,7 +276,7 @@ void Builder::addBitmapFont( const BuilderData::BitmapFont &rData )
return;
}
string full_path = getFilePath( rData.m_file );
std::string full_path = getFilePath( rData.m_file );
if( !full_path.size() )
return;
@ -306,7 +306,7 @@ void Builder::addBitmapFont( const BuilderData::BitmapFont &rData )
void Builder::addFont( const BuilderData::Font &rData )
{
// Try to load the font from the theme directory
string full_path = getFilePath( rData.m_fontFile );
std::string full_path = getFilePath( rData.m_fontFile );
if( full_path.size() )
{
GenericFont *pFont = new FT2Font( getIntf(), full_path, rData.m_size );
@ -320,13 +320,13 @@ void Builder::addFont( const BuilderData::Font &rData )
// Font not found; try in the resource path
OSFactory *pOSFactory = OSFactory::instance( getIntf() );
const list<string> &resPath = pOSFactory->getResourcePath();
const string &sep = pOSFactory->getDirSeparator();
const std::list<std::string> &resPath = pOSFactory->getResourcePath();
const std::string &sep = pOSFactory->getDirSeparator();
list<string>::const_iterator it;
std::list<std::string>::const_iterator it;
for( it = resPath.begin(); it != resPath.end(); ++it )
{
string path = (*it) + sep + "fonts" + sep + rData.m_fontFile;
std::string path = (*it) + sep + "fonts" + sep + rData.m_fontFile;
GenericFont *pFont = new FT2Font( getIntf(), path, rData.m_size );
if( pFont->init() )
{
@ -499,8 +499,8 @@ void Builder::addButton( const BuilderData::Button &rData )
int height = pBmpUp->getHeight() / pBmpUp->getNbFrames();
bool xkeepratio = rData.m_xKeepRatio;
bool ykeepratio = rData.m_yKeepRatio;
string lefttop( rData.m_leftTop );
string rightbottom( rData.m_rightBottom );
std::string lefttop( rData.m_leftTop );
std::string rightbottom( rData.m_rightBottom );
// various checks to help skin developers debug their skin
CHECK_BMP( pBmpDown, pBmpUp, rData.m_id );
@ -580,8 +580,8 @@ void Builder::addCheckbox( const BuilderData::Checkbox &rData )
int height = pBmpUp1->getHeight() / pBmpUp1->getNbFrames();
bool xkeepratio = rData.m_xKeepRatio;
bool ykeepratio = rData.m_yKeepRatio;
string lefttop( rData.m_leftTop );
string rightbottom( rData.m_rightBottom );
std::string lefttop( rData.m_leftTop );
std::string rightbottom( rData.m_rightBottom );
// various checks to help skin developers debug their skin
@ -1121,8 +1121,8 @@ void Builder::addVideo( const BuilderData::Video &rData )
}
const Position Builder::makePosition( const string &rLeftTop,
const string &rRightBottom,
const Position Builder::makePosition( const std::string &rLeftTop,
const std::string &rRightBottom,
int xPos, int yPos, int width,
int height, const GenericRect &rRect,
bool xKeepRatio, bool yKeepRatio ) const
@ -1206,20 +1206,20 @@ const Position Builder::makePosition( const string &rLeftTop,
}
GenericFont *Builder::getFont( const string &fontId )
GenericFont *Builder::getFont( const std::string &fontId )
{
GenericFont *pFont = m_pTheme->getFontById(fontId);
if( !pFont && fontId == "defaultfont" )
{
// Get the resource path and try to load the default font
OSFactory *pOSFactory = OSFactory::instance( getIntf() );
const list<string> &resPath = pOSFactory->getResourcePath();
const string &sep = pOSFactory->getDirSeparator();
const std::list<std::string> &resPath = pOSFactory->getResourcePath();
const std::string &sep = pOSFactory->getDirSeparator();
list<string>::const_iterator it;
std::list<std::string>::const_iterator it;
for( it = resPath.begin(); it != resPath.end(); ++it )
{
string path = (*it) + sep + "fonts" + sep + "FreeSans.ttf";
std::string path = (*it) + sep + "fonts" + sep + "FreeSans.ttf";
pFont = new FT2Font( getIntf(), path, 12 );
if( pFont->init() )
{
@ -1242,29 +1242,29 @@ GenericFont *Builder::getFont( const string &fontId )
}
string Builder::getFilePath( const string &rFileName ) const
std::string Builder::getFilePath( const std::string &rFileName ) const
{
OSFactory *pFactory = OSFactory::instance( getIntf() );
const string &sep = pFactory->getDirSeparator();
const std::string &sep = pFactory->getDirSeparator();
string file = rFileName;
if( file.find( "\\" ) != string::npos )
std::string file = rFileName;
if( file.find( "\\" ) != std::string::npos )
{
// For skins to be valid on both Linux and Win32,
// slash should be used as path separator for both OSs.
msg_Warn( getIntf(), "use of '/' is preferred to '\\' for paths" );
string::size_type pos;
while( ( pos = file.find( "\\" ) ) != string::npos )
std::string::size_type pos;
while( ( pos = file.find( "\\" ) ) != std::string::npos )
file[pos] = '/';
}
#if defined( _WIN32 ) || defined( __OS2__ )
string::size_type pos;
while( ( pos = file.find( "/" ) ) != string::npos )
std::string::size_type pos;
while( ( pos = file.find( "/" ) ) != std::string::npos )
file.replace( pos, 1, sep );
#endif
string full_path = m_path + sep + file;
std::string full_path = m_path + sep + file;
// check that the file exists
struct stat stat;
@ -1281,7 +1281,7 @@ string Builder::getFilePath( const string &rFileName ) const
Bezier *Builder::getPoints( const char *pTag ) const
{
vector<float> xBez, yBez;
std::vector<float> xBez, yBez;
int x, y, n;
while( 1 )
{
@ -1308,11 +1308,11 @@ Bezier *Builder::getPoints( const char *pTag ) const
}
uint32_t Builder::getColor( const string &rVal ) const
uint32_t Builder::getColor( const std::string &rVal ) const
{
// Check it the value is a registered constant
Interpreter *pInterpreter = Interpreter::instance( getIntf() );
string val = pInterpreter->getConstant( rVal );
std::string val = pInterpreter->getConstant( rVal );
// Convert to an int value
return SkinParser::convertColor( val.c_str() );

16
modules/gui/skins2/parser/builder.hpp

@ -49,7 +49,7 @@ class Builder: public SkinObject
{
public:
Builder( intf_thread_t *pIntf, const BuilderData &rData,
const string &rPath );
const std::string &rPath );
virtual ~Builder();
/// Create a Theme object, ready to use.
@ -57,13 +57,13 @@ public:
Theme *build();
/// Parse an action tag and returns a command
CmdGeneric *parseAction( const string &rAction );
CmdGeneric *parseAction( const std::string &rAction );
private:
/// Data from the XML
const BuilderData &m_rData;
/// Path of the theme
const string m_path;
const std::string m_path;
/// Theme under construction
Theme *m_pTheme;
@ -96,24 +96,24 @@ private:
void (Builder::*addfn)(const T &));
/// Compute the position of a control
const Position makePosition( const string &rLeftTop,
const string &rRightBottom,
const Position makePosition( const std::string &rLeftTop,
const std::string &rRightBottom,
int xPos, int yPos, int width, int height,
const GenericRect &rRect,
bool xKeepRatio = false,
bool yKeepRatio = false ) const;
// Build the full path of a file
string getFilePath( const string &fileName ) const;
std::string getFilePath( const std::string &fileName ) const;
/// Get a font from its id
GenericFont *getFont( const string &fontId );
GenericFont *getFont( const std::string &fontId );
/// Function to parse "points" tags
Bezier *getPoints( const char *pTag ) const;
/// Compute a color value
uint32_t getColor( const string &rVal ) const;
uint32_t getColor( const std::string &rVal ) const;
/// Image handler (used to load image files)
image_handler_t *m_pImageHandler;

412
modules/gui/skins2/parser/builder_data.hpp

@ -33,8 +33,6 @@
#include <map>
#include <string>
using namespace std;
/// Structure for mapping data from XML file
struct BuilderData
{
@ -42,41 +40,41 @@ struct BuilderData
/// Type definition
struct Theme
{
Theme( const string & tooltipfont, int magnet, uint32_t alpha, uint32_t moveAlpha ):
Theme( const std::string & tooltipfont, int magnet, uint32_t alpha, uint32_t moveAlpha ):
m_tooltipfont( tooltipfont ), m_magnet( magnet ), m_alpha( alpha ), m_moveAlpha( moveAlpha ) {}
string m_tooltipfont;
std::string m_tooltipfont;
int m_magnet;
uint32_t m_alpha;
uint32_t m_moveAlpha;
};
/// List
list<Theme> m_listTheme;
std::list<Theme> m_listTheme;
/// Type definition
struct Bitmap
{
Bitmap( const string & id, const string & fileName, uint32_t alphaColor, int nbFrames, int fps, int nbLoops ):
Bitmap( const std::string & id, const std::string & fileName, uint32_t alphaColor, int nbFrames, int fps, int nbLoops ):
m_id( id ), m_fileName( fileName ), m_alphaColor( alphaColor ), m_nbFrames( nbFrames ), m_fps( fps ), m_nbLoops( nbLoops ) {}
string m_id;
string m_fileName;
std::string m_id;
std::string m_fileName;
uint32_t m_alphaColor;
int m_nbFrames;
int m_fps;
int m_nbLoops;
};
/// List
list<Bitmap> m_listBitmap;
std::list<Bitmap> m_listBitmap;
/// Type definition
struct SubBitmap
{
SubBitmap( const string & id, const string & parent, int x, int y, int width, int height, int nbFrames, int fps, int nbLoops ):
SubBitmap( const std::string & id, const std::string & parent, int x, int y, int width, int height, int nbFrames, int fps, int nbLoops ):
m_id( id ), m_parent( parent ), m_x( x ), m_y( y ), m_width( width ), m_height( height ), m_nbFrames( nbFrames ), m_fps( fps ), m_nbLoops( nbLoops ) {}
string m_id;
string m_parent;
std::string m_id;
std::string m_parent;
int m_x;
int m_y;
int m_width;
@ -86,445 +84,445 @@ m_id( id ), m_parent( parent ), m_x( x ), m_y( y ), m_width( width ), m_height(
int m_nbLoops;
};
/// List
list<SubBitmap> m_listSubBitmap;
std::list<SubBitmap> m_listSubBitmap;
/// Type definition
struct BitmapFont
{
BitmapFont( const string & id, const string & file, const string & type ):
BitmapFont( const std::string & id, const std::string & file, const std::string & type ):
m_id( id ), m_file( file ), m_type( type ) {}
string m_id;
string m_file;
string m_type;
std::string m_id;
std::string m_file;
std::string m_type;
};
/// List
list<BitmapFont> m_listBitmapFont;
std::list<BitmapFont> m_listBitmapFont;
/// Type definition
struct Font
{
Font( const string & id, const string & fontFile, int size ):
Font( const std::string & id, const std::string & fontFile, int size ):
m_id( id ), m_fontFile( fontFile ), m_size( size ) {}
string m_id;
string m_fontFile;
std::string m_id;
std::string m_fontFile;
int m_size;
};
/// List
list<Font> m_listFont;
std::list<Font> m_listFont;
/// Type definition
struct PopupMenu
{
PopupMenu( const string & id ):
PopupMenu( const std::string & id ):
m_id( id ) {}
string m_id;
std::string m_id;
};
/// List
list<PopupMenu> m_listPopupMenu;
std::list<PopupMenu> m_listPopupMenu;
/// Type definition
struct MenuItem
{
MenuItem( const string & label, const string & action, int pos, const string & popupId ):
MenuItem( const std::string & label, const std::string & action, int pos, const std::string & popupId ):
m_label( label ), m_action( action ), m_pos( pos ), m_popupId( popupId ) {}
string m_label;
string m_action;
std::string m_label;
std::string m_action;
int m_pos;
string m_popupId;
std::string m_popupId;
};
/// List
list<MenuItem> m_listMenuItem;
std::list<MenuItem> m_listMenuItem;
/// Type definition
struct MenuSeparator
{
MenuSeparator( int pos, const string & popupId ):
MenuSeparator( int pos, const std::string & popupId ):
m_pos( pos ), m_popupId( popupId ) {}
int m_pos;
string m_popupId;
std::string m_popupId;
};
/// List
list<MenuSeparator> m_listMenuSeparator;
std::list<MenuSeparator> m_listMenuSeparator;
/// Type definition
struct Window
{
Window( const string & id, int xPos, int yPos, const string & position, const string & xOffset, const string & yOffset, const string & xMargin, const string & yMargin, bool visible, bool dragDrop, bool playOnDrop ):
Window( const std::string & id, int xPos, int yPos, const std::string & position, const std::string & xOffset, const std::string & yOffset, const std::string & xMargin, const std::string & yMargin, bool visible, bool dragDrop, bool playOnDrop ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_position( position ), m_xOffset( xOffset ), m_yOffset( yOffset ), m_xMargin( xMargin ), m_yMargin( yMargin ), m_visible( visible ), m_dragDrop( dragDrop ), m_playOnDrop( playOnDrop ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_position;
string m_xOffset;
string m_yOffset;
string m_xMargin;
string m_yMargin;
std::string m_position;
std::string m_xOffset;
std::string m_yOffset;
std::string m_xMargin;
std::string m_yMargin;
bool m_visible;
bool m_dragDrop;
bool m_playOnDrop;
};
/// List
list<Window> m_listWindow;
std::list<Window> m_listWindow;
/// Type definition
struct Layout
{
Layout( const string & id, int width, int height, int minWidth, int maxWidth, int minHeight, int maxHeight, const string & windowId ):
Layout( const std::string & id, int width, int height, int minWidth, int maxWidth, int minHeight, int maxHeight, const std::string & windowId ):
m_id( id ), m_width( width ), m_height( height ), m_minWidth( minWidth ), m_maxWidth( maxWidth ), m_minHeight( minHeight ), m_maxHeight( maxHeight ), m_windowId( windowId ) {}
string m_id;
std::string m_id;
int m_width;
int m_height;
int m_minWidth;
int m_maxWidth;
int m_minHeight;
int m_maxHeight;
string m_windowId;
std::string m_windowId;
};
/// List
list<Layout> m_listLayout;
std::list<Layout> m_listLayout;
/// Type definition
struct Anchor
{
Anchor( int xPos, int yPos, const string & leftTop, int range, int priority, const string & points, const string & layoutId ):
Anchor( int xPos, int yPos, const std::string & leftTop, int range, int priority, const std::string & points, const std::string & layoutId ):
m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_range( range ), m_priority( priority ), m_points( points ), m_layoutId( layoutId ) {}
int m_xPos;
int m_yPos;
string m_leftTop;
std::string m_leftTop;
int m_range;
int m_priority;
string m_points;
string m_layoutId;
std::string m_points;
std::string m_layoutId;
};
/// List
list<Anchor> m_listAnchor;
std::list<Anchor> m_listAnchor;
/// Type definition
struct Button
{
Button( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & upId, const string & downId, const string & overId, const string & actionId, const string & tooltip, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Button( const std::string & id, int xPos, int yPos, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & visible, const std::string & upId, const std::string & downId, const std::string & overId, const std::string & actionId, const std::string & tooltip, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_upId( upId ), m_downId( downId ), m_overId( overId ), m_actionId( actionId ), m_tooltip( tooltip ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_visible;
string m_upId;
string m_downId;
string m_overId;
string m_actionId;
string m_tooltip;
string m_help;
std::string m_visible;
std::string m_upId;
std::string m_downId;
std::string m_overId;
std::string m_actionId;
std::string m_tooltip;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Button> m_listButton;
std::list<Button> m_listButton;
/// Type definition
struct Checkbox
{
Checkbox( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & up1Id, const string & down1Id, const string & over1Id, const string & up2Id, const string & down2Id, const string & over2Id, const string & state, const string & action1, const string & action2, const string & tooltip1, const string & tooltip2, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Checkbox( const std::string & id, int xPos, int yPos, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & visible, const std::string & up1Id, const std::string & down1Id, const std::string & over1Id, const std::string & up2Id, const std::string & down2Id, const std::string & over2Id, const std::string & state, const std::string & action1, const std::string & action2, const std::string & tooltip1, const std::string & tooltip2, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_up1Id( up1Id ), m_down1Id( down1Id ), m_over1Id( over1Id ), m_up2Id( up2Id ), m_down2Id( down2Id ), m_over2Id( over2Id ), m_state( state ), m_action1( action1 ), m_action2( action2 ), m_tooltip1( tooltip1 ), m_tooltip2( tooltip2 ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_visible;
string m_up1Id;
string m_down1Id;
string m_over1Id;
string m_up2Id;
string m_down2Id;
string m_over2Id;
string m_state;
string m_action1;
string m_action2;
string m_tooltip1;
string m_tooltip2;
string m_help;
std::string m_visible;
std::string m_up1Id;
std::string m_down1Id;
std::string m_over1Id;
std::string m_up2Id;
std::string m_down2Id;
std::string m_over2Id;
std::string m_state;
std::string m_action1;
std::string m_action2;
std::string m_tooltip1;
std::string m_tooltip2;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Checkbox> m_listCheckbox;
std::list<Checkbox> m_listCheckbox;
/// Type definition
struct Image
{
Image( const string & id, int xPos, int yPos, int width, int height, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, const string & bmpId, const string & actionId, const string & action2Id, const string & resize, const string & help, bool art, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Image( const std::string & id, int xPos, int yPos, int width, int height, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & visible, const std::string & bmpId, const std::string & actionId, const std::string & action2Id, const std::string & resize, const std::string & help, bool art, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_width( width ), m_height( height ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_bmpId( bmpId ), m_actionId( actionId ), m_action2Id( action2Id ), m_resize( resize ), m_help( help ), m_art( art ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
int m_width;
int m_height;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_visible;
string m_bmpId;
string m_actionId;
string m_action2Id;
string m_resize;
string m_help;
std::string m_visible;
std::string m_bmpId;
std::string m_actionId;
std::string m_action2Id;
std::string m_resize;
std::string m_help;
bool m_art;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Image> m_listImage;
std::list<Image> m_listImage;
/// Type definition
struct IniFile
{
IniFile( const string & id, const string & file ):
IniFile( const std::string & id, const std::string & file ):
m_id( id ), m_file( file ) {}
string m_id;
string m_file;
std::string m_id;
std::string m_file;
};
/// List
list<IniFile> m_listIniFile;
std::list<IniFile> m_listIniFile;
/// Type definition
struct Panel
{
Panel( const string & id, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, int width, int height, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Panel( const std::string & id, int xPos, int yPos, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, int width, int height, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_width( width ), m_height( height ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
int m_width;
int m_height;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Panel> m_listPanel;
std::list<Panel> m_listPanel;
/// Type definition
struct Text
{
Text( const string & id, int xPos, int yPos, const string & visible, const string & fontId, const string & text, int width, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, uint32_t color, const string & scrolling, const string & alignment, const string & focus, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Text( const std::string & id, int xPos, int yPos, const std::string & visible, const std::string & fontId, const std::string & text, int width, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, uint32_t color, const std::string & scrolling, const std::string & alignment, const std::string & focus, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_visible( visible ), m_fontId( fontId ), m_text( text ), m_width( width ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_color( color ), m_scrolling( scrolling ), m_alignment( alignment ), m_focus( focus ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_visible;
string m_fontId;
string m_text;
std::string m_visible;
std::string m_fontId;
std::string m_text;
int m_width;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
uint32_t m_color;
string m_scrolling;
string m_alignment;
string m_focus;
string m_help;
std::string m_scrolling;
std::string m_alignment;
std::string m_focus;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Text> m_listText;
std::list<Text> m_listText;
/// Type definition
struct RadialSlider
{
RadialSlider( const string & id, const string & visible, int xPos, int yPos, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & sequence, int nbImages, float minAngle, float maxAngle, const string & value, const string & tooltip, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
RadialSlider( const std::string & id, const std::string & visible, int xPos, int yPos, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & sequence, int nbImages, float minAngle, float maxAngle, const std::string & value, const std::string & tooltip, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_visible( visible ), m_xPos( xPos ), m_yPos( yPos ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_sequence( sequence ), m_nbImages( nbImages ), m_minAngle( minAngle ), m_maxAngle( maxAngle ), m_value( value ), m_tooltip( tooltip ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
string m_visible;
std::string m_id;
std::string m_visible;
int m_xPos;
int m_yPos;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_sequence;
std::string m_sequence;
int m_nbImages;
float m_minAngle;
float m_maxAngle;
string m_value;
string m_tooltip;
string m_help;
std::string m_value;
std::string m_tooltip;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<RadialSlider> m_listRadialSlider;
std::list<RadialSlider> m_listRadialSlider;
/// Type definition
struct Slider
{
Slider( const string & id, const string & visible, int xPos, int yPos, int width, int height, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & upId, const string & downId, const string & overId, const string & points, int thickness, const string & value, const string & imageId, int nbHoriz, int nbVert, int padHoriz, int padVert, const string & tooltip, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Slider( const std::string & id, const std::string & visible, int xPos, int yPos, int width, int height, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & upId, const std::string & downId, const std::string & overId, const std::string & points, int thickness, const std::string & value, const std::string & imageId, int nbHoriz, int nbVert, int padHoriz, int padVert, const std::string & tooltip, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_visible( visible ), m_xPos( xPos ), m_yPos( yPos ), m_width( width ), m_height( height ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_upId( upId ), m_downId( downId ), m_overId( overId ), m_points( points ), m_thickness( thickness ), m_value( value ), m_imageId( imageId ), m_nbHoriz( nbHoriz ), m_nbVert( nbVert ), m_padHoriz( padHoriz ), m_padVert( padVert ), m_tooltip( tooltip ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
string m_visible;
std::string m_id;
std::string m_visible;
int m_xPos;
int m_yPos;
int m_width;
int m_height;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_upId;
string m_downId;
string m_overId;
string m_points;
std::string m_upId;
std::string m_downId;
std::string m_overId;
std::string m_points;
int m_thickness;
string m_value;
string m_imageId;
std::string m_value;
std::string m_imageId;
int m_nbHoriz;
int m_nbVert;
int m_padHoriz;
int m_padVert;
string m_tooltip;
string m_help;
std::string m_tooltip;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Slider> m_listSlider;
std::list<Slider> m_listSlider;
/// Type definition
struct List
{
List( const string & id, int xPos, int yPos, const string & visible, int width, int height, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & fontId, const string & var, const string & bgImageId, const string & fgColor, const string & playColor, const string & bgColor1, const string & bgColor2, const string & selColor, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
List( const std::string & id, int xPos, int yPos, const std::string & visible, int width, int height, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & fontId, const std::string & var, const std::string & bgImageId, const std::string & fgColor, const std::string & playColor, const std::string & bgColor1, const std::string & bgColor2, const std::string & selColor, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_visible( visible ), m_width( width ), m_height( height ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_fontId( fontId ), m_var( var ), m_bgImageId( bgImageId ), m_fgColor( fgColor ), m_playColor( playColor ), m_bgColor1( bgColor1 ), m_bgColor2( bgColor2 ), m_selColor( selColor ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_visible;
std::string m_visible;
int m_width;
int m_height;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_fontId;
string m_var;
string m_bgImageId;
string m_fgColor;
string m_playColor;
string m_bgColor1;
string m_bgColor2;
string m_selColor;
string m_help;
std::string m_fontId;
std::string m_var;
std::string m_bgImageId;
std::string m_fgColor;
std::string m_playColor;
std::string m_bgColor1;
std::string m_bgColor2;
std::string m_selColor;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<List> m_listList;
std::list<List> m_listList;
/// Type definition
struct Tree
{
Tree( const string & id, int xPos, int yPos, const string & visible, const string & flat, int width, int height, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & fontId, const string & var, const string & bgImageId, const string & itemImageId, const string & openImageId, const string & closedImageId, const string & fgColor, const string & playColor, const string & bgColor1, const string & bgColor2, const string & selColor, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Tree( const std::string & id, int xPos, int yPos, const std::string & visible, const std::string & flat, int width, int height, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & fontId, const std::string & var, const std::string & bgImageId, const std::string & itemImageId, const std::string & openImageId, const std::string & closedImageId, const std::string & fgColor, const std::string & playColor, const std::string & bgColor1, const std::string & bgColor2, const std::string & selColor, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_visible( visible ), m_flat( flat ), m_width( width ), m_height( height ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_fontId( fontId ), m_var( var ), m_bgImageId( bgImageId ), m_itemImageId( itemImageId ), m_openImageId( openImageId ), m_closedImageId( closedImageId ), m_fgColor( fgColor ), m_playColor( playColor ), m_bgColor1( bgColor1 ), m_bgColor2( bgColor2 ), m_selColor( selColor ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
string m_visible;
string m_flat;
std::string m_visible;
std::string m_flat;
int m_width;
int m_height;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_fontId;
string m_var;
string m_bgImageId;
string m_itemImageId;
string m_openImageId;
string m_closedImageId;
string m_fgColor;
string m_playColor;
string m_bgColor1;
string m_bgColor2;
string m_selColor;
string m_help;
std::string m_fontId;
std::string m_var;
std::string m_bgImageId;
std::string m_itemImageId;
std::string m_openImageId;
std::string m_closedImageId;
std::string m_fgColor;
std::string m_playColor;
std::string m_bgColor1;
std::string m_bgColor2;
std::string m_selColor;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Tree> m_listTree;
std::list<Tree> m_listTree;
/// Type definition
struct Video
{
Video( const string & id, int xPos, int yPos, int width, int height, const string & leftTop, const string & rightBottom, bool xKeepRatio, bool yKeepRatio, const string & visible, bool autoResize, const string & help, int layer, const string & windowId, const string & layoutId, const string & panelId ):
Video( const std::string & id, int xPos, int yPos, int width, int height, const std::string & leftTop, const std::string & rightBottom, bool xKeepRatio, bool yKeepRatio, const std::string & visible, bool autoResize, const std::string & help, int layer, const std::string & windowId, const std::string & layoutId, const std::string & panelId ):
m_id( id ), m_xPos( xPos ), m_yPos( yPos ), m_width( width ), m_height( height ), m_leftTop( leftTop ), m_rightBottom( rightBottom ), m_xKeepRatio( xKeepRatio ), m_yKeepRatio( yKeepRatio ), m_visible( visible ), m_autoResize( autoResize ), m_help( help ), m_layer( layer ), m_windowId( windowId ), m_layoutId( layoutId ), m_panelId( panelId ) {}
string m_id;
std::string m_id;
int m_xPos;
int m_yPos;
int m_width;
int m_height;
string m_leftTop;
string m_rightBottom;
std::string m_leftTop;
std::string m_rightBottom;
bool m_xKeepRatio;
bool m_yKeepRatio;
string m_visible;
std::string m_visible;
bool m_autoResize;
string m_help;
std::string m_help;
int m_layer;
string m_windowId;
string m_layoutId;
string m_panelId;
std::string m_windowId;
std::string m_layoutId;
std::string m_panelId;
};
/// List
list<Video> m_listVideo;
std::list<Video> m_listVideo;
};

18
modules/gui/skins2/parser/expr_evaluator.cpp

@ -24,13 +24,13 @@
#include "expr_evaluator.hpp"
void ExprEvaluator::parse( const string &rExpr )
void ExprEvaluator::parse( const std::string &rExpr )
{
m_stack.clear();
const char *pString = rExpr.c_str();
list<string> opStack; // operator stack
string token;
std::list<std::string> opStack; // operator stack
std::string token;
// Tokenize the expression
int begin = 0, end = 0;
@ -54,7 +54,7 @@ void ExprEvaluator::parse( const string &rExpr )
while( !opStack.empty() )
{
// Pop the stack
string lastOp = opStack.back();
std::string lastOp = opStack.back();
opStack.pop_back();
if( lastOp == "(" )
{
@ -86,7 +86,7 @@ void ExprEvaluator::parse( const string &rExpr )
hasPrecedency( token, opStack.back() ) )
{
// Pop the stack
string lastOp = opStack.back();
std::string lastOp = opStack.back();
opStack.pop_back();
m_stack.push_back( lastOp );
}
@ -101,18 +101,18 @@ void ExprEvaluator::parse( const string &rExpr )
// Finish popping the operator stack
while( !opStack.empty() )
{
string lastOp = opStack.back();
std::string lastOp = opStack.back();
opStack.pop_back();
m_stack.push_back( lastOp );
}
}
string ExprEvaluator::getToken()
std::string ExprEvaluator::getToken()
{
if( !m_stack.empty() )
{
string token = m_stack.front();
std::string token = m_stack.front();
m_stack.pop_front();
return token;
}
@ -120,7 +120,7 @@ string ExprEvaluator::getToken()
}
bool ExprEvaluator::hasPrecedency( const string &op1, const string &op2 ) const
bool ExprEvaluator::hasPrecedency( const std::string &op1, const std::string &op2 ) const
{
// FIXME
if( op1 == "(" )

8
modules/gui/skins2/parser/expr_evaluator.hpp

@ -36,18 +36,18 @@ public:
~ExprEvaluator() { }
/// Clear the RPN stack and parse an expression
void parse( const string &rExpr );
void parse( const std::string &rExpr );
/// Pop the first token from the RPN stack.
/// Return NULL when the stack is empty.
string getToken();
std::string getToken();
private:
/// RPN stack
list<string> m_stack;
std::list<std::string> m_stack;
/// Returns true if op1 has precedency over op2
bool hasPrecedency( const string &op1, const string &op2 ) const;
bool hasPrecedency( const std::string &op1, const std::string &op2 ) const;
};
#endif

70
modules/gui/skins2/parser/interpreter.cpp

@ -140,7 +140,7 @@ void Interpreter::destroy( intf_thread_t *pIntf )
}
CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
CmdGeneric *Interpreter::parseAction( const std::string &rAction, Theme *pTheme )
{
// Try to find the command in the global command map
if( m_commandMap.find( rAction ) != m_commandMap.end() )
@ -150,15 +150,15 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
CmdGeneric *pCommand = NULL;
if( rAction.find( ";" ) != string::npos )
if( rAction.find( ";" ) != std::string::npos )
{
// Several actions are defined...
list<CmdGeneric *> actionList;
string rightPart = rAction;
string::size_type pos = rightPart.find( ";" );
while( pos != string::npos )
std::list<CmdGeneric *> actionList;
std::string rightPart = rAction;
std::string::size_type pos = rightPart.find( ";" );
while( pos != std::string::npos )
{
string leftPart = rightPart.substr( 0, pos );
std::string leftPart = rightPart.substr( 0, pos );
// Remove any whitespace at the end of the left part, and parse it
leftPart =
leftPart.substr( 0, leftPart.find_last_not_of( " \t" ) + 1 );
@ -166,7 +166,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
// Now remove any whitespace at the beginning of the right part,
// and go on checking for further actions in it...
rightPart = rightPart.substr( pos, rightPart.size() );
if ( rightPart.find_first_not_of( " \t;" ) == string::npos )
if ( rightPart.find_first_not_of( " \t;" ) == std::string::npos )
{
// The right part is completely buggy, it's time to leave the
// loop...
@ -186,13 +186,13 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
pCommand = new CmdMuxer( getIntf(), actionList );
}
else if( rAction.find( ".setLayout(" ) != string::npos )
else if( rAction.find( ".setLayout(" ) != std::string::npos )
{
int leftPos = rAction.find( ".setLayout(" );
string windowId = rAction.substr( 0, leftPos );
std::string windowId = rAction.substr( 0, leftPos );
// 11 is the size of ".setLayout("
int rightPos = rAction.find( ")", windowId.size() + 11 );
string layoutId = rAction.substr( windowId.size() + 11,
std::string layoutId = rAction.substr( windowId.size() + 11,
rightPos - (windowId.size() + 11) );
TopWindow *pWin = pTheme->getWindowById( windowId );
@ -216,10 +216,10 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
pCommand = new CmdLayout( getIntf(), *pWin, *pLayout );
}
}
else if( rAction.find( ".maximize()" ) != string::npos )
else if( rAction.find( ".maximize()" ) != std::string::npos )
{
int leftPos = rAction.find( ".maximize()" );
string windowId = rAction.substr( 0, leftPos );
std::string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( !pWin )
@ -233,10 +233,10 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
*pWin );
}
}
else if( rAction.find( ".unmaximize()" ) != string::npos )
else if( rAction.find( ".unmaximize()" ) != std::string::npos )
{
int leftPos = rAction.find( ".unmaximize()" );
string windowId = rAction.substr( 0, leftPos );
std::string windowId = rAction.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( !pWin )
@ -250,15 +250,15 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
*pWin );
}
}
else if( rAction.find( ".show()" ) != string::npos )
else if( rAction.find( ".show()" ) != std::string::npos )
{
int leftPos = rAction.find( ".show()" );
string windowId = rAction.substr( 0, leftPos );
std::string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
!var_InheritBool( getIntf(), "skinned-playlist") )
{
list<CmdGeneric *> list;
std::list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
@ -292,14 +292,14 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
}
}
}
else if( rAction.find( ".hide()" ) != string::npos )
else if( rAction.find( ".hide()" ) != std::string::npos )
{
int leftPos = rAction.find( ".hide()" );
string windowId = rAction.substr( 0, leftPos );
std::string windowId = rAction.substr( 0, leftPos );
if( windowId == "playlist_window" &&
!var_InheritBool( getIntf(), "skinned-playlist") )
{
list<CmdGeneric *> list;
std::list<CmdGeneric *> list;
list.push_back( new CmdDlgPlaylist( getIntf() ) );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
@ -338,7 +338,7 @@ CmdGeneric *Interpreter::parseAction( const string &rAction, Theme *pTheme )
}
VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
VarBool *Interpreter::getVarBool( const std::string &rName, Theme *pTheme )
{
VarManager *pVarManager = VarManager::instance( getIntf() );
@ -346,10 +346,10 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
ExprEvaluator evaluator( getIntf() );
evaluator.parse( rName );
list<VarBool*> varStack;
std::list<VarBool*> varStack;
// Get the first token from the RPN stack
string token = evaluator.getToken();
std::string token = evaluator.getToken();
while( !token.empty() )
{
if( token == "and" )
@ -433,10 +433,10 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
{
varStack.push_back( pVar );
}
else if( token.find( ".isVisible" ) != string::npos )
else if( token.find( ".isVisible" ) != std::string::npos )
{
int leftPos = token.find( ".isVisible" );
string windowId = token.substr( 0, leftPos );
std::string windowId = token.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
@ -450,10 +450,10 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
return NULL;
}
}
else if( token.find( ".isMaximized" ) != string::npos )
else if( token.find( ".isMaximized" ) != std::string::npos )
{
int leftPos = token.find( ".isMaximized" );
string windowId = token.substr( 0, leftPos );
std::string windowId = token.substr( 0, leftPos );
TopWindow *pWin = pTheme->getWindowById( windowId );
if( pWin )
{
@ -467,10 +467,10 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
return NULL;
}
}
else if( token.find( ".isActive" ) != string::npos )
else if( token.find( ".isActive" ) != std::string::npos )
{
int leftPos = token.find( ".isActive" );
string layoutId = token.substr( 0, leftPos );
std::string layoutId = token.substr( 0, leftPos );
GenericLayout *pLayout = pTheme->getLayoutById( layoutId );
if( pLayout )
{
@ -505,7 +505,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
}
VarPercent *Interpreter::getVarPercent( const string &rName, Theme *pTheme )
VarPercent *Interpreter::getVarPercent( const std::string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
@ -513,7 +513,7 @@ VarPercent *Interpreter::getVarPercent( const string &rName, Theme *pTheme )
}
VarList *Interpreter::getVarList( const string &rName, Theme *pTheme )
VarList *Interpreter::getVarList( const std::string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
@ -521,7 +521,7 @@ VarList *Interpreter::getVarList( const string &rName, Theme *pTheme )
}
VarTree *Interpreter::getVarTree( const string &rName, Theme *pTheme )
VarTree *Interpreter::getVarTree( const std::string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
@ -529,10 +529,10 @@ VarTree *Interpreter::getVarTree( const string &rName, Theme *pTheme )
}
string Interpreter::getConstant( const string &rValue )
std::string Interpreter::getConstant( const std::string &rValue )
{
// Check if the value is a registered constant; if not, keep as is.
string val = VarManager::instance( getIntf() )->getConst( rValue );
std::string val = VarManager::instance( getIntf() )->getConst( rValue );
return val.empty() ? rValue : val;
}

14
modules/gui/skins2/parser/interpreter.hpp

@ -48,27 +48,27 @@ public:
/// Parse an action tag and returns a pointer on a command
/// (the intepreter takes care of deleting it, don't do it
/// yourself !)
CmdGeneric *parseAction( const string &rAction, Theme *pTheme );
CmdGeneric *parseAction( const std::string &rAction, Theme *pTheme );
/// Returns the boolean variable corresponding to the given name
VarBool *getVarBool( const string &rName, Theme *pTheme );
VarBool *getVarBool( const std::string &rName, Theme *pTheme );
/// Returns the percent variable corresponding to the given name
VarPercent *getVarPercent( const string &rName, Theme *pTheme );
VarPercent *getVarPercent( const std::string &rName, Theme *pTheme );
/// Returns the list variable corresponding to the given name
VarList *getVarList( const string &rName, Theme *pTheme );
VarList *getVarList( const std::string &rName, Theme *pTheme );
/// Returns the tree variable corresponding to the given name
VarTree *getVarTree( const string &rName, Theme *pTheme );
VarTree *getVarTree( const std::string &rName, Theme *pTheme );
/// Get a constant value
string getConstant( const string &rValue );
std::string getConstant( const std::string &rValue );
private:
/// Map of global commands
map<string, CmdGenericPtr> m_commandMap;
std::map<std::string, CmdGenericPtr> m_commandMap;
// Private because it is a singleton
Interpreter( intf_thread_t *pIntf );

46
modules/gui/skins2/parser/skin_parser.cpp

@ -26,8 +26,8 @@
#include "interpreter.hpp"
#include <math.h>
SkinParser::SkinParser( intf_thread_t *pIntf, const string &rFileName,
const string &rPath, BuilderData *pData ):
SkinParser::SkinParser( intf_thread_t *pIntf, const std::string &rFileName,
const std::string &rPath, BuilderData *pData ):
XMLParser( pIntf, rFileName ), m_path( rPath ), m_pData( pData ),
m_ownData( pData == NULL ), m_xOffset( 0 ), m_yOffset( 0 )
{
@ -52,7 +52,7 @@ SkinParser::~SkinParser()
}
}
inline bool SkinParser::MissingAttr( AttrList_t &attr, const string &name,
inline bool SkinParser::MissingAttr( AttrList_t &attr, const std::string &name,
const char *a )
{
if( attr.find(a) == attr.end() )
@ -64,7 +64,7 @@ inline bool SkinParser::MissingAttr( AttrList_t &attr, const string &name,
return false;
}
void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
void SkinParser::handleBeginElement( const std::string &rName, AttrList_t &attr )
{
#define RequireAttr( attr, name, a ) \
if( MissingAttr( attr, name, a ) ) return;
@ -74,7 +74,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
RequireAttr( attr, rName, "file" );
OSFactory *pFactory = OSFactory::instance( getIntf() );
string fullPath = m_path + pFactory->getDirSeparator() + attr["file"];
std::string fullPath = m_path + pFactory->getDirSeparator() + attr["file"];
msg_Dbg( getIntf(), "opening included XML file: %s", fullPath.c_str() );
SkinParser subParser( getIntf(), fullPath.c_str(), m_path, m_pData );
subParser.parse();
@ -377,7 +377,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
attr["xmargin"], attr["ymargin"],
width, height, refWidth, refHeight, &x, &y );
string panelId = uniqueId( "none" );
std::string panelId = uniqueId( "none" );
const BuilderData::Panel panel( panelId,
x + m_xOffset, y + m_yOffset,
attr["lefttop"], attr["rightbottom"],
@ -569,7 +569,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
DefaultAttr( attr, "tooltiptext", "" );
DefaultAttr( attr, "help", "" );
string newValue = attr["value"];
std::string newValue = attr["value"];
if( m_curTreeId != "" )
{
// Slider associated to a tree
@ -765,7 +765,7 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
}
void SkinParser::handleEndElement( const string &rName )
void SkinParser::handleEndElement( const std::string &rName )
{
if( rName == "Group" )
{
@ -807,7 +807,7 @@ int SkinParser::convertColor( const char *transcolor )
int SkinParser::convertInRange( const char *value, int minValue, int maxValue,
const string &rAttribute ) const
const std::string &rAttribute ) const
{
int intValue = atoi( value );
@ -832,22 +832,22 @@ int SkinParser::convertInRange( const char *value, int minValue, int maxValue,
}
const string SkinParser::generateId() const
const std::string SkinParser::generateId() const
{
static int i = 1;
char genId[5];
snprintf( genId, 4, "%i", i++ );
string base = "_ReservedId_" + (string)genId;
std::string base = "_ReservedId_" + (std::string)genId;
return base;
}
const string SkinParser::uniqueId( const string &id )
const std::string SkinParser::uniqueId( const std::string &id )
{
string newId;
std::string newId;
if( m_idSet.find( id ) != m_idSet.end() )
{
@ -880,10 +880,10 @@ void SkinParser::getRefDimensions( int &rWidth, int &rHeight, bool toScreen )
return;
}
string panelId = m_panelStack.back();
std::string panelId = m_panelStack.back();
if( panelId != "none" )
{
list<BuilderData::Panel>::const_iterator it;
std::list<BuilderData::Panel>::const_iterator it;
for( it = m_pData->m_listPanel.begin();
it != m_pData->m_listPanel.end(); ++it )
{
@ -906,19 +906,19 @@ void SkinParser::getRefDimensions( int &rWidth, int &rHeight, bool toScreen )
}
int SkinParser::getDimension( string value, int refDimension )
int SkinParser::getDimension( std::string value, int refDimension )
{
string::size_type leftPos;
std::string::size_type leftPos;
leftPos = value.find( "%" );
if( leftPos != string::npos )
if( leftPos != std::string::npos )
{
int val = atoi( value.substr( 0, leftPos ).c_str() );
return val * refDimension / 100;
}
leftPos = value.find( "px" );
if( leftPos != string::npos )
if( leftPos != std::string::npos )
{
int val = atoi( value.substr( 0, leftPos ).c_str() );
return val;
@ -928,7 +928,7 @@ int SkinParser::getDimension( string value, int refDimension )
}
int SkinParser::getPosition( string position )
int SkinParser::getPosition( std::string position )
{
if( position == "-1" )
return POS_UNDEF;
@ -957,9 +957,9 @@ int SkinParser::getPosition( string position )
}
void SkinParser::convertPosition( string position, string xOffset,
string yOffset, string xMargin,
string yMargin, int width, int height,
void SkinParser::convertPosition( std::string position, std::string xOffset,
std::string yOffset, std::string xMargin,
std::string yMargin, int width, int height,
int refWidth, int refHeight, int* p_x, int* p_y )
{
int iPosition = getPosition( position );

48
modules/gui/skins2/parser/skin_parser.hpp

@ -43,8 +43,8 @@ public:
POS_BOTTOM = 16,
};
SkinParser( intf_thread_t *pIntf, const string &rFileName,
const string &rPath, BuilderData *pData = NULL );
SkinParser( intf_thread_t *pIntf, const std::string &rFileName,
const std::string &rPath, BuilderData *pData = NULL );
virtual ~SkinParser();
const BuilderData &getData() const { return *m_pData; }
@ -53,34 +53,34 @@ public:
private:
/// Path of the theme
const string m_path;
const std::string m_path;
/// Container for mapping data from the XML
BuilderData *m_pData;
/// Indicate whether the class owns the data
bool m_ownData;
/// Current IDs
string m_curBitmapId;
string m_curWindowId;
string m_curLayoutId;
string m_curPopupId;
string m_curListId;
string m_curTreeId;
std::string m_curBitmapId;
std::string m_curWindowId;
std::string m_curLayoutId;
std::string m_curPopupId;
std::string m_curListId;
std::string m_curTreeId;
/// Current position of menu items in the popups
list<int> m_popupPosList;
std::list<int> m_popupPosList;
/// Current offset of the controls
int m_xOffset, m_yOffset;
list<int> m_xOffsetList, m_yOffsetList;
std::list<int> m_xOffsetList, m_yOffsetList;
/// Stack of panel ids
list<string> m_panelStack;
std::list<std::string> m_panelStack;
/// Layer of the current control in the layout
int m_curLayer;
/// Set of used id
set<string> m_idSet;
std::set<std::string> m_idSet;
/// Callbacks
virtual void handleBeginElement( const string &rName,
virtual void handleBeginElement( const std::string &rName,
AttrList_t &attr );
virtual void handleEndElement( const string &rName );
virtual void handleEndElement( const std::string &rName );
/// Helper functions
//@{
@ -88,24 +88,24 @@ private:
/// Transform to int, and check that it is in the given range (if not,
/// the closest range boundary will be used)
int convertInRange( const char *value, int minValue, int maxValue,
const string &rAttribute ) const;
const std::string &rAttribute ) const;
//@}
/// Generate a new id
const string generateId() const;
const std::string generateId() const;
/// Check if the id is unique, and if not generate a new one
const string uniqueId( const string &id );
const std::string uniqueId( const std::string &id );
/// Management of relative positions
void getRefDimensions( int &rWidth, int &rHeight, bool toScreen );
int getDimension( string value, int refDimension );
int getPosition( string value );
int getDimension( std::string value, int refDimension );
int getPosition( std::string value );
void updateWindowPos( int width, int height );
void convertPosition( string position,
string xOffset, string yOffset,
string xMargin, string yMargin,
void convertPosition( std::string position,
std::string xOffset, std::string yOffset,
std::string xMargin, std::string yMargin,
int width, int height, int refWidth, int refHeight,
int* p_x, int* p_y );
@ -115,7 +115,7 @@ private:
if( attr.find(a) == attr.end() ) attr[strdup(a)] = strdup(b);
}
/// Helper for handleBeginElement: Complain if a named attribute is missing.
bool MissingAttr( AttrList_t &attr, const string &name, const char *a );
bool MissingAttr( AttrList_t &attr, const std::string &name, const char *a );
};

14
modules/gui/skins2/parser/xmlparser.cpp

@ -28,7 +28,7 @@
#include <sys/stat.h>
#include <vlc_fs.h>
XMLParser::XMLParser( intf_thread_t *pIntf, const string &rFileName )
XMLParser::XMLParser( intf_thread_t *pIntf, const std::string &rFileName )
: SkinObject( pIntf ), m_pXML( NULL ), m_pReader( NULL ), m_pStream( NULL )
{
m_pXML = xml_Create( pIntf );
@ -74,9 +74,9 @@ void XMLParser::LoadCatalog()
{
// Get the resource path and look for the DTD
OSFactory *pOSFactory = OSFactory::instance( getIntf() );
const list<string> &resPath = pOSFactory->getResourcePath();
const string &sep = pOSFactory->getDirSeparator();
list<string>::const_iterator it;
const std::list<std::string> &resPath = pOSFactory->getResourcePath();
const std::string &sep = pOSFactory->getDirSeparator();
std::list<std::string>::const_iterator it;
struct stat statBuf;
@ -84,7 +84,7 @@ void XMLParser::LoadCatalog()
// we don't have a default catalog)
for( it = resPath.begin(); it != resPath.end(); ++it )
{
string catalog_path = (*it) + sep + "skin.catalog";
std::string catalog_path = (*it) + sep + "skin.catalog";
if( !vlc_stat( catalog_path.c_str(), &statBuf ) )
{
msg_Dbg( getIntf(), "Using catalog %s", catalog_path.c_str() );
@ -100,7 +100,7 @@ void XMLParser::LoadCatalog()
for( it = resPath.begin(); it != resPath.end(); ++it )
{
string path = (*it) + sep + "skin.dtd";
std::string path = (*it) + sep + "skin.dtd";
if( !vlc_stat( path.c_str(), &statBuf ) )
{
// DTD found
@ -144,7 +144,7 @@ bool XMLParser::parse()
handleBeginElement( node, attributes );
map<const char*, const char*, ltstr> ::iterator it =
std::map<const char*, const char*, ltstr> ::iterator it =
attributes.begin();
while( it != attributes.end() )
{

8
modules/gui/skins2/parser/xmlparser.hpp

@ -37,7 +37,7 @@
class XMLParser: public SkinObject
{
public:
XMLParser( intf_thread_t *pIntf, const string &rFileName );
XMLParser( intf_thread_t *pIntf, const std::string &rFileName );
virtual ~XMLParser();
/// Parse the file. Returns true on success
@ -53,15 +53,15 @@ protected:
}
};
/// Type for attribute lists
typedef map<const char*, const char*, ltstr> AttrList_t;
typedef std::map<const char*, const char*, ltstr> AttrList_t;
/// Flag for validation errors
bool m_errors;
/// Callbacks
virtual void handleBeginElement( const string &rName, AttrList_t &attr )
virtual void handleBeginElement( const std::string &rName, AttrList_t &attr )
{ (void)rName; (void)attr; }
virtual void handleEndElement( const string &rName ) { (void)rName; }
virtual void handleEndElement( const std::string &rName ) { (void)rName; }
private:
void LoadCatalog();

6
modules/gui/skins2/src/art_manager.cpp

@ -67,14 +67,14 @@ ArtManager::~ArtManager( )
m_pImageHandler = NULL;
}
list<ArtBitmap*>::const_iterator it;
std::list<ArtBitmap*>::const_iterator it;
for( it = m_listBitmap.begin(); it != m_listBitmap.end(); ++it )
delete *it;
m_listBitmap.clear();
}
ArtBitmap* ArtManager::getArtBitmap( string uriName )
ArtBitmap* ArtManager::getArtBitmap( std::string uriName )
{
if( !uriName.size() )
return NULL;
@ -83,7 +83,7 @@ ArtBitmap* ArtManager::getArtBitmap( string uriName )
return NULL;
// check whether art is already loaded
list<ArtBitmap*>::const_iterator it;
std::list<ArtBitmap*>::const_iterator it;
for( it = m_listBitmap.begin(); it != m_listBitmap.end(); ++it )
{
if( (*it)->getUriName() == uriName )

10
modules/gui/skins2/src/art_manager.hpp

@ -34,18 +34,18 @@ class ArtBitmap: public FileBitmap
{
public:
string getUriName() { return m_uriName; }
std::string getUriName() { return m_uriName; }
/// Constructor/destructor
ArtBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
string uriName ) :
std::string uriName ) :
FileBitmap( pIntf, pImageHandler, uriName, -1 ),
m_uriName( uriName ) {}
virtual ~ArtBitmap() {}
private:
/// uriName
string m_uriName;
std::string m_uriName;
};
@ -61,7 +61,7 @@ public:
static void destroy( intf_thread_t *pIntf );
/// Retrieve for the art file from uri name
ArtBitmap* getArtBitmap( string uriName );
ArtBitmap* getArtBitmap( std::string uriName );
protected:
// Protected because it is a singleton
@ -73,7 +73,7 @@ private:
image_handler_t *m_pImageHandler;
// keep a cache of art already open
list<ArtBitmap*> m_listBitmap;
std::list<ArtBitmap*> m_listBitmap;
};
#endif

2
modules/gui/skins2/src/bitmap_font.cpp

@ -27,7 +27,7 @@
BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
const string &rType ):
const std::string &rType ):
GenericFont( pIntf ), m_rBitmap( rBitmap )
{
int i;

2
modules/gui/skins2/src/bitmap_font.hpp

@ -35,7 +35,7 @@ class BitmapFont: public GenericFont
{
public:
BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
const string &rType );
const std::string &rType );
virtual ~BitmapFont() { }
virtual bool init() { return true; }

2
modules/gui/skins2/src/dialogs.cpp

@ -178,7 +178,7 @@ bool Dialogs::init()
}
void Dialogs::showFileGeneric( const string &rTitle, const string &rExtensions,
void Dialogs::showFileGeneric( const std::string &rTitle, const std::string &rExtensions,
DlgCallback callback, int flags )
{
if( m_pProvider && m_pProvider->pf_show_dialog )

2
modules/gui/skins2/src/dialogs.hpp

@ -121,7 +121,7 @@ private:
* parameters
* The 'flags' parameter is a logical or of the flags_t values
*/
void showFileGeneric( const string &rTitle, const string &rExtensions,
void showFileGeneric( const std::string &rTitle, const std::string &rExtensions,
DlgCallback callback, int flags );
/// Callback for the Change Skin dialog

2
modules/gui/skins2/src/file_bitmap.cpp

@ -32,7 +32,7 @@
#include "file_bitmap.hpp"
FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
string fileName, uint32_t aColor, int nbFrames,
std::string fileName, uint32_t aColor, int nbFrames,
int fps, int nbLoops ):
GenericBitmap( pIntf, nbFrames, fps, nbLoops ), m_width( 0 ), m_height( 0 ),
m_pData( NULL )

2
modules/gui/skins2/src/file_bitmap.hpp

@ -36,7 +36,7 @@ public:
/// Load a bitmap from a file. aColor is the transparency
/// color, in the format 0xRRGGBB
FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
string fileName, uint32_t aColor, int nbFrames = 1,
std::string fileName, uint32_t aColor, int nbFrames = 1,
int fps = 0, int nbLoops = 0 );
virtual ~FileBitmap();

2
modules/gui/skins2/src/ft2_font.cpp

@ -33,7 +33,7 @@
#endif
FT2Font::FT2Font( intf_thread_t *pIntf, const string &rName, int size ):
FT2Font::FT2Font( intf_thread_t *pIntf, const std::string &rName, int size ):
GenericFont( pIntf ), m_name( rName ), m_buffer( NULL ), m_size( size ),
m_lib( NULL ), m_face( NULL )
{

6
modules/gui/skins2/src/ft2_font.hpp

@ -40,7 +40,7 @@ class UString;
class FT2Font: public GenericFont
{
public:
FT2Font( intf_thread_t *pIntf, const string &rName, int size );
FT2Font( intf_thread_t *pIntf, const std::string &rName, int size );
virtual ~FT2Font();
/// Initialize the object. Returns false if it failed
@ -62,10 +62,10 @@ private:
int m_index;
int m_advance;
} Glyph_t;
typedef map<uint32_t,Glyph_t> GlyphMap_t;
typedef std::map<uint32_t,Glyph_t> GlyphMap_t;
/// File name
const string m_name;
const std::string m_name;
/// Buffer to store the font
char *m_buffer;
/// Pixel size of the font

14
modules/gui/skins2/src/generic_layout.cpp

@ -59,13 +59,13 @@ GenericLayout::~GenericLayout()
{
delete m_pImage;
list<Anchor*>::const_iterator it;
std::list<Anchor*>::const_iterator it;
for( it = m_anchorList.begin(); it != m_anchorList.end(); ++it )
{
delete *it;
}
list<LayeredControl>::const_iterator iter;
std::list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); ++iter )
{
CtrlGeneric *pCtrl = (*iter).m_pControl;
@ -113,7 +113,7 @@ void GenericLayout::addControl( CtrlGeneric *pControl,
// Add the control in the list.
// This list must remain sorted by layer order
list<LayeredControl>::iterator it;
std::list<LayeredControl>::iterator it;
for( it = m_controlList.begin(); it != m_controlList.end(); ++it )
{
if( layer < (*it).m_layer )
@ -141,7 +141,7 @@ void GenericLayout::addControl( CtrlGeneric *pControl,
}
const list<LayeredControl> &GenericLayout::getControlList() const
const std::list<LayeredControl> &GenericLayout::getControlList() const
{
return m_controlList;
}
@ -190,7 +190,7 @@ void GenericLayout::resize( int width, int height )
}
// Notify all the controls that the size has changed and redraw them
list<LayeredControl>::const_iterator iter;
std::list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); ++iter )
{
iter->m_pControl->onResize();
@ -214,7 +214,7 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
m_pImage->clear( x, y, width, height );
// Draw all the controls of the layout
list<LayeredControl>::const_iterator iter;
std::list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); ++iter )
{
CtrlGeneric *pCtrl = (*iter).m_pControl;
@ -235,7 +235,7 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
}
const list<Anchor*>& GenericLayout::getAnchorList() const
const std::list<Anchor*>& GenericLayout::getAnchorList() const
{
return m_anchorList;
}

10
modules/gui/skins2/src/generic_layout.hpp

@ -122,7 +122,7 @@ public:
int layer );
/// Get the list of the controls in this layout, by layer order
virtual const list<LayeredControl> &getControlList() const;
virtual const std::list<LayeredControl> &getControlList() const;
/// Called by a control when its image has changed
/**
@ -135,7 +135,7 @@ public:
int xOffSet, int yOffSet );
/// Get the list of the anchors of this layout
virtual const list<Anchor*>& getAnchorList() const;
virtual const std::list<Anchor*>& getAnchorList() const;
/// Add an anchor to this layout
virtual void addAnchor( Anchor *pAnchor );
@ -163,11 +163,11 @@ private:
/// Image of the layout
OSGraphics *m_pImage;
/// List of the controls in the layout
list<LayeredControl> m_controlList;
std::list<LayeredControl> m_controlList;
/// Video control(s)
set<CtrlVideo *> m_pVideoCtrlSet;
std::set<CtrlVideo *> m_pVideoCtrlSet;
/// List of the anchors in the layout
list<Anchor*> m_anchorList;
std::list<Anchor*> m_anchorList;
/// Flag to know if the layout is visible
bool m_visible;
/// Variable for the "active state" of the layout

2
modules/gui/skins2/src/generic_window.hpp

@ -109,7 +109,7 @@ public:
VarBool &getVisibleVar() { return *m_pVarVisible; }
/// Window type, mainly useful when overloaded (for VoutWindow)
virtual string getType() const { return "Generic"; }
virtual std::string getType() const { return "Generic"; }
/// windows handle
vlc_wnd_type getOSHandle() const;

16
modules/gui/skins2/src/ini_file.cpp

@ -26,8 +26,8 @@
#include <fstream>
IniFile::IniFile( intf_thread_t *pIntf, const string &rName,
const string &rPath ):
IniFile::IniFile( intf_thread_t *pIntf, const std::string &rName,
const std::string &rPath ):
SkinObject( pIntf ), m_name( rName ), m_path( rPath )
{
}
@ -38,11 +38,11 @@ void IniFile::parseFile()
VarManager *pVarManager = VarManager::instance( getIntf() );
// Open the file
fstream fs( m_path.c_str(), fstream::in );
std::fstream fs( m_path.c_str(), std::fstream::in );
if( fs.is_open() )
{
string section;
string line;
std::string section;
std::string line;
while( !fs.eof() )
{
// Read the next line
@ -63,10 +63,10 @@ void IniFile::parseFile()
// Variable declaration
default:
size_t eqPos = line.find( '=' );
string var = line.substr( 0, eqPos );
string val = line.substr( eqPos + 1, line.size() - eqPos - 1);
std::string var = line.substr( 0, eqPos );
std::string val = line.substr( eqPos + 1, line.size() - eqPos - 1);
string name = m_name + "." + section + "." + var;
std::string name = m_name + "." + section + "." + var;
// Convert to lower case because of some buggy winamp2 skins
for( size_t i = 0; i < name.size(); i++ )

8
modules/gui/skins2/src/ini_file.hpp

@ -33,16 +33,16 @@
class IniFile: public SkinObject
{
public:
IniFile( intf_thread_t *pIntf, const string &rName,
const string &rPath );
IniFile( intf_thread_t *pIntf, const std::string &rName,
const std::string &rPath );
virtual ~IniFile() { }
/// Parse the INI file and fill the VarManager
void parseFile();
private:
string m_name;
string m_path;
std::string m_name;
std::string m_path;
};

4
modules/gui/skins2/src/logger.cpp

@ -57,13 +57,13 @@ void Logger::destroy( intf_thread_t *pIntf )
}
void Logger::error( const string &rMsg )
void Logger::error( const std::string &rMsg )
{
msg_Err( getIntf(), "%s", rMsg.c_str() );
}
void Logger::warn( const string &rMsg )
void Logger::warn( const std::string &rMsg )
{
msg_Warn( getIntf(), "%s", rMsg.c_str() );
}

4
modules/gui/skins2/src/logger.hpp

@ -46,10 +46,10 @@ public:
static void destroy( intf_thread_t *pIntf );
/// Print an error message
void error( const string &rMsg );
void error( const std::string &rMsg );
/// Print a warning
void warn( const string &rMsg );
void warn( const std::string &rMsg );
private:
// Private because it's a singleton

6
modules/gui/skins2/src/os_factory.hpp

@ -111,10 +111,10 @@ public:
virtual OSPopup *createOSPopup() = 0;
/// Get the directory separator
virtual const string &getDirSeparator() const = 0;
virtual const std::string &getDirSeparator() const = 0;
/// Get the resource path
virtual const list<string> &getResourcePath() const = 0;
virtual const std::list<std::string> &getResourcePath() const = 0;
/// Get the screen size
virtual int getScreenWidth() const = 0;
@ -139,7 +139,7 @@ public:
virtual void changeCursor( CursorType_t type ) const = 0;
/// Delete a directory recursively
virtual void rmDir( const string &rPath ) = 0;
virtual void rmDir( const std::string &rPath ) = 0;
protected:
// Protected because it's a singleton

2
modules/gui/skins2/src/os_popup.hpp

@ -44,7 +44,7 @@ public:
virtual void hide() = 0;
/// Append a new menu item with the given label to the popup menu
virtual void addItem( const string &rLabel, int pos ) = 0;
virtual void addItem( const std::string &rLabel, int pos ) = 0;
/// Create a dummy menu item to separate sections
virtual void addSeparator( int pos ) = 0;

2
modules/gui/skins2/src/popup.cpp

@ -56,7 +56,7 @@ void Popup::hide()
}
void Popup::addItem( const string &rLabel, CmdGeneric &rCmd, int pos )
void Popup::addItem( const std::string &rLabel, CmdGeneric &rCmd, int pos )
{
m_pOsPopup->addItem( rLabel, pos );
m_actions[pos] = &rCmd;

4
modules/gui/skins2/src/popup.hpp

@ -49,7 +49,7 @@ public:
// XXX: it would be nice to use a UString here, if X11 supports it for
// its menu items (Windows doesn't, unfortunately)
/// Insert a new menu item to the popup menu, at the position pos
void addItem( const string &rLabel, CmdGeneric &rCmd, int pos );
void addItem( const std::string &rLabel, CmdGeneric &rCmd, int pos );
/// Create a dummy menu item to separate sections
void addSeparator( int pos );
@ -65,7 +65,7 @@ private:
WindowManager &m_rWindowManager;
/// Actions for the menu items, indexed by the position in the menu
map<int, CmdGeneric *> m_actions;
std::map<int, CmdGeneric *> m_actions;
};
typedef CountedPtr<Popup> PopupPtr;

9
modules/gui/skins2/src/skin_common.hpp

@ -35,7 +35,6 @@
#include <vlc_fs.h>
#include <string>
using namespace std;
class AsyncQueue;
class Logger;
@ -68,20 +67,20 @@ typedef void* vlc_wnd_type;
#endif
/// Wrapper around FromLocale, to avoid the need to call LocaleFree()
static inline string sFromLocale( const string &rLocale )
static inline std::string sFromLocale( const std::string &rLocale )
{
const char *s = FromLocale( rLocale.c_str() );
string res = s;
std::string res = s;
LocaleFree( s );
return res;
}
#ifdef _WIN32
/// Wrapper around FromWide, to avoid the need to call free()
static inline string sFromWide( const wstring &rWide )
static inline std::string sFromWide( const std::wstring &rWide )
{
char *s = FromWide( rWide.c_str() );
string res = s;
std::string res = s;
free( s );
return res;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save