Warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -72,29 +72,29 @@ class MMBoardSoundFile: public MMBoardFile {
|
|||||||
public:
|
public:
|
||||||
MMBoardSoundFile(const wxString& filename);
|
MMBoardSoundFile(const wxString& filename);
|
||||||
~MMBoardSoundFile();
|
~MMBoardSoundFile();
|
||||||
|
|
||||||
bool NeedWindow();
|
bool NeedWindow();
|
||||||
|
|
||||||
void SetWindow(wxWindow *window);
|
void SetWindow(wxWindow *window);
|
||||||
|
|
||||||
void Play();
|
void Play();
|
||||||
void Pause();
|
void Pause();
|
||||||
void Resume();
|
void Resume();
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
MMBoardTime GetPosition();
|
MMBoardTime GetPosition();
|
||||||
MMBoardTime GetLength();
|
MMBoardTime GetLength();
|
||||||
void SetPosition(MMBoardTime btime);
|
void SetPosition(MMBoardTime btime);
|
||||||
|
|
||||||
bool IsStopped();
|
bool IsStopped();
|
||||||
bool IsPaused();
|
bool IsPaused();
|
||||||
|
|
||||||
wxString GetStringType();
|
wxString GetStringType();
|
||||||
wxString GetStringInformation();
|
wxString GetStringInformation();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxSoundFileStream *GetDecoder();
|
wxSoundFileStream *GetDecoder();
|
||||||
|
|
||||||
wxSoundStream *m_output_stream;
|
wxSoundStream *m_output_stream;
|
||||||
wxInputStream *m_input_stream;
|
wxInputStream *m_input_stream;
|
||||||
wxSoundFileStream *m_file_stream;
|
wxSoundFileStream *m_file_stream;
|
||||||
@@ -107,26 +107,26 @@ class MMBoardVideoFile: public MMBoardFile {
|
|||||||
public:
|
public:
|
||||||
MMBoardVideoFile(const wxString& filename);
|
MMBoardVideoFile(const wxString& filename);
|
||||||
~MMBoardVideoFile();
|
~MMBoardVideoFile();
|
||||||
|
|
||||||
bool NeedWindow();
|
bool NeedWindow();
|
||||||
|
|
||||||
void SetWindow(wxWindow *window);
|
void SetWindow(wxWindow *window);
|
||||||
|
|
||||||
void Play();
|
void Play();
|
||||||
void Pause();
|
void Pause();
|
||||||
void Resume();
|
void Resume();
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
MMBoardTime GetPosition();
|
MMBoardTime GetPosition();
|
||||||
MMBoardTime GetLength();
|
MMBoardTime GetLength();
|
||||||
void SetPosition(MMBoardTime btime);
|
void SetPosition(MMBoardTime btime);
|
||||||
|
|
||||||
bool IsStopped();
|
bool IsStopped();
|
||||||
bool IsPaused();
|
bool IsPaused();
|
||||||
|
|
||||||
wxString GetStringType();
|
wxString GetStringType();
|
||||||
wxString GetStringInformation();
|
wxString GetStringInformation();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxWindow *m_output_window;
|
wxWindow *m_output_window;
|
||||||
wxVideoBaseDriver *m_video_driver;
|
wxVideoBaseDriver *m_video_driver;
|
||||||
@@ -148,14 +148,14 @@ MMBoardSoundFile::MMBoardSoundFile(const wxString& filename)
|
|||||||
{
|
{
|
||||||
m_input_stream = new wxFileInputStream(filename);
|
m_input_stream = new wxFileInputStream(filename);
|
||||||
m_output_stream = MMBoardManager::OpenSoundStream();
|
m_output_stream = MMBoardManager::OpenSoundStream();
|
||||||
|
|
||||||
m_file_stream = GetDecoder();
|
m_file_stream = GetDecoder();
|
||||||
|
|
||||||
if (!m_file_stream) {
|
if (!m_file_stream) {
|
||||||
SetError(MMBoard_UnknownFile);
|
SetError(MMBoard_UnknownFile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute length
|
// Compute length
|
||||||
wxUint32 length, seconds;
|
wxUint32 length, seconds;
|
||||||
|
|
||||||
@@ -177,25 +177,25 @@ MMBoardSoundFile::~MMBoardSoundFile()
|
|||||||
wxSoundFileStream *MMBoardSoundFile::GetDecoder()
|
wxSoundFileStream *MMBoardSoundFile::GetDecoder()
|
||||||
{
|
{
|
||||||
wxSoundFileStream *f_stream;
|
wxSoundFileStream *f_stream;
|
||||||
|
|
||||||
// First, we try a Wave decoder
|
// First, we try a Wave decoder
|
||||||
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
|
f_stream = new wxSoundWave(*m_input_stream, *m_output_stream);
|
||||||
m_file_type = MMBoard_WAVE;
|
m_file_type = MMBoard_WAVE;
|
||||||
if (f_stream->CanRead())
|
if (f_stream->CanRead())
|
||||||
return f_stream;
|
return f_stream;
|
||||||
delete f_stream;
|
delete f_stream;
|
||||||
|
|
||||||
// Then, a AIFF decoder
|
// Then, a AIFF decoder
|
||||||
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
|
f_stream = new wxSoundAiff(*m_input_stream, *m_output_stream);
|
||||||
m_file_type = MMBoard_AIFF;
|
m_file_type = MMBoard_AIFF;
|
||||||
if (f_stream->CanRead())
|
if (f_stream->CanRead())
|
||||||
return f_stream;
|
return f_stream;
|
||||||
delete f_stream;
|
delete f_stream;
|
||||||
|
|
||||||
m_file_type = MMBoard_UNKNOWNTYPE;
|
m_file_type = MMBoard_UNKNOWNTYPE;
|
||||||
|
|
||||||
// TODO: automate
|
// TODO: automate
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,17 +218,17 @@ MMBoardTime MMBoardSoundFile::GetPosition()
|
|||||||
{
|
{
|
||||||
wxUint32 length, seconds;
|
wxUint32 length, seconds;
|
||||||
MMBoardTime file_time;
|
MMBoardTime file_time;
|
||||||
|
|
||||||
file_time.seconds = file_time.minutes = file_time.hours = 0;
|
file_time.seconds = file_time.minutes = file_time.hours = 0;
|
||||||
if (m_file_stream->IsStopped())
|
if (m_file_stream->IsStopped())
|
||||||
return file_time;
|
return file_time;
|
||||||
|
|
||||||
length = m_file_stream->GetPosition();
|
length = m_file_stream->GetPosition();
|
||||||
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
|
seconds = m_file_stream->GetSoundFormat().GetTimeFromBytes(length);
|
||||||
file_time.seconds = seconds % 60;
|
file_time.seconds = seconds % 60;
|
||||||
file_time.minutes = (seconds / 60) % 60;
|
file_time.minutes = (seconds / 60) % 60;
|
||||||
file_time.hours = seconds / 3600;
|
file_time.hours = seconds / 3600;
|
||||||
|
|
||||||
return file_time;
|
return file_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,14 +302,14 @@ wxString MMBoardSoundFile::GetStringInformation()
|
|||||||
{
|
{
|
||||||
wxString info;
|
wxString info;
|
||||||
wxSoundFormatBase *format;
|
wxSoundFormatBase *format;
|
||||||
|
|
||||||
format = &(m_file_stream->GetSoundFormat());
|
format = &(m_file_stream->GetSoundFormat());
|
||||||
|
|
||||||
info = wxT("Data encoding: ");
|
info = wxT("Data encoding: ");
|
||||||
switch (format->GetType()) {
|
switch (format->GetType()) {
|
||||||
case wxSOUND_PCM: {
|
case wxSOUND_PCM: {
|
||||||
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
|
wxSoundFormatPcm *pcm_format = (wxSoundFormatPcm *)format;
|
||||||
|
|
||||||
info += wxString::Format(wxT("PCM %s %s\n"),
|
info += wxString::Format(wxT("PCM %s %s\n"),
|
||||||
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
|
pcm_format->Signed() ? wxT("signed") : wxT("unsigned"),
|
||||||
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
|
pcm_format->GetOrder() == wxLITTLE_ENDIAN ? wxT("little endian") : wxT("big endian"));
|
||||||
@@ -354,7 +354,7 @@ wxString MMBoardSoundFile::GetStringInformation()
|
|||||||
MMBoardVideoFile::MMBoardVideoFile(const wxString& filename)
|
MMBoardVideoFile::MMBoardVideoFile(const wxString& filename)
|
||||||
{
|
{
|
||||||
m_output_window = NULL;
|
m_output_window = NULL;
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
#if defined(__UNIX__)
|
||||||
m_video_driver = new wxVideoXANIM(filename);
|
m_video_driver = new wxVideoXANIM(filename);
|
||||||
#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
|
#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
|
||||||
@@ -362,6 +362,7 @@ MMBoardVideoFile::MMBoardVideoFile(const wxString& filename)
|
|||||||
// deliver "digitalv.h" required in this feature
|
// deliver "digitalv.h" required in this feature
|
||||||
m_video_driver = new wxVideoWindows(filename);
|
m_video_driver = new wxVideoWindows(filename);
|
||||||
#else
|
#else
|
||||||
|
wxUnusedVar(filename);
|
||||||
m_video_driver = NULL;
|
m_video_driver = NULL;
|
||||||
SetError(MMBoard_UnknownFile);
|
SetError(MMBoard_UnknownFile);
|
||||||
#endif
|
#endif
|
||||||
@@ -425,7 +426,7 @@ MMBoardTime MMBoardVideoFile::GetLength()
|
|||||||
int frameTime;
|
int frameTime;
|
||||||
|
|
||||||
frameTime = (int)( m_video_driver->GetNbFrames() / m_video_driver->GetFrameRate());
|
frameTime = (int)( m_video_driver->GetNbFrames() / m_video_driver->GetFrameRate());
|
||||||
|
|
||||||
btime.seconds = frameTime % 60;
|
btime.seconds = frameTime % 60;
|
||||||
btime.minutes = (frameTime / 60) % 60;
|
btime.minutes = (frameTime / 60) % 60;
|
||||||
btime.hours = frameTime / 3600;
|
btime.hours = frameTime / 3600;
|
||||||
|
@@ -71,10 +71,10 @@ void wxPolygonShape::Create(wxList *the_points)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_originalPoints = the_points;
|
m_originalPoints = the_points;
|
||||||
|
|
||||||
// Duplicate the list of points
|
// Duplicate the list of points
|
||||||
m_points = new wxList;
|
m_points = new wxList;
|
||||||
|
|
||||||
wxObjectList::compatibility_iterator node = the_points->GetFirst();
|
wxObjectList::compatibility_iterator node = the_points->GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
@@ -1774,7 +1774,7 @@ wxShapeRegion::wxShapeRegion()
|
|||||||
m_actualPenObject = NULL;
|
m_actualPenObject = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxShapeRegion::wxShapeRegion(wxShapeRegion& region)
|
wxShapeRegion::wxShapeRegion(wxShapeRegion& region):wxObject()
|
||||||
{
|
{
|
||||||
m_regionText = region.m_regionText;
|
m_regionText = region.m_regionText;
|
||||||
m_regionName = region.m_regionName;
|
m_regionName = region.m_regionName;
|
||||||
|
@@ -1363,7 +1363,7 @@ wxPseudoMetaFile::wxPseudoMetaFile()
|
|||||||
m_outlineOp = -1;
|
m_outlineOp = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPseudoMetaFile::wxPseudoMetaFile(wxPseudoMetaFile& mf)
|
wxPseudoMetaFile::wxPseudoMetaFile(wxPseudoMetaFile& mf):wxObject()
|
||||||
{
|
{
|
||||||
mf.Copy(*this);
|
mf.Copy(*this);
|
||||||
}
|
}
|
||||||
|
@@ -2355,7 +2355,7 @@ wxArrowHead::wxArrowHead(WXTYPE type, int end, double size, double dist, const w
|
|||||||
m_id = wxNewId();
|
m_id = wxNewId();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrowHead::wxArrowHead(wxArrowHead& toCopy)
|
wxArrowHead::wxArrowHead(wxArrowHead& toCopy):wxObject()
|
||||||
{
|
{
|
||||||
m_arrowType = toCopy.m_arrowType; m_arrowEnd = toCopy.GetArrowEnd();
|
m_arrowType = toCopy.m_arrowType; m_arrowEnd = toCopy.GetArrowEnd();
|
||||||
m_arrowSize = toCopy.m_arrowSize;
|
m_arrowSize = toCopy.m_arrowSize;
|
||||||
|
@@ -842,7 +842,7 @@ void rc2xml::ParseListBox(wxString varname)
|
|||||||
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
|
CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
|
||||||
WS_TABSTOP,103,110,40,14
|
WS_TABSTOP,103,110,40,14
|
||||||
*/
|
*/
|
||||||
void rc2xml::ParseRichEdit(wxString label, wxString varname)
|
void rc2xml::ParseRichEdit(wxString WXUNUSED(label), wxString varname)
|
||||||
{
|
{
|
||||||
wxString token;
|
wxString token;
|
||||||
//while (ReadOrs(token));
|
//while (ReadOrs(token));
|
||||||
@@ -1013,7 +1013,7 @@ void rc2xml::WriteToolButton(wxString name,int index, int width, int height, wxB
|
|||||||
little.SaveFile(m_targetpath+name,wxBITMAP_TYPE_BMP);
|
little.SaveFile(m_targetpath+name,wxBITMAP_TYPE_BMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rc2xml::ParseStringTable(wxString varname)
|
void rc2xml::ParseStringTable(wxString WXUNUSED(varname))
|
||||||
{
|
{
|
||||||
wxString token;
|
wxString token;
|
||||||
token=GetToken();
|
token=GetToken();
|
||||||
@@ -1023,13 +1023,12 @@ void rc2xml::ParseStringTable(wxString varname)
|
|||||||
wxString *msg;
|
wxString *msg;
|
||||||
|
|
||||||
while ((token!=_T("END"))&(token!=_T("}")))
|
while ((token!=_T("END"))&(token!=_T("}")))
|
||||||
{
|
{
|
||||||
msg=new wxString;
|
msg=new wxString;
|
||||||
*msg=GetStringQuote();
|
*msg=GetStringQuote();
|
||||||
m_stringtable->Append(token,msg);
|
m_stringtable->Append(token,msg);
|
||||||
token=GetToken();
|
token=GetToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rc2xml::LookUpString(wxString strid,wxString & st)
|
bool rc2xml::LookUpString(wxString strid,wxString & st)
|
||||||
|
Reference in New Issue
Block a user