Updates to fix Watcom C/C++ 11.0 compiler warning problems. Now compiles
clean with this compiler. Hopefully I did this without breaking other compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -561,7 +561,7 @@ public:
|
|||||||
wxDateTime_t millisec = 0);
|
wxDateTime_t millisec = 0);
|
||||||
// from separate values for each component with explicit date
|
// from separate values for each component with explicit date
|
||||||
inline wxDateTime(wxDateTime_t day, // day of the month
|
inline wxDateTime(wxDateTime_t day, // day of the month
|
||||||
Month month = Inv_Month,
|
Month month,
|
||||||
int year = Inv_Year, // 1999, not 99 please!
|
int year = Inv_Year, // 1999, not 99 please!
|
||||||
wxDateTime_t hour = 0,
|
wxDateTime_t hour = 0,
|
||||||
wxDateTime_t minute = 0,
|
wxDateTime_t minute = 0,
|
||||||
@@ -604,7 +604,7 @@ public:
|
|||||||
// from separate values for each component with explicit date
|
// from separate values for each component with explicit date
|
||||||
// (defaults for month and year are the current values)
|
// (defaults for month and year are the current values)
|
||||||
wxDateTime& Set(wxDateTime_t day,
|
wxDateTime& Set(wxDateTime_t day,
|
||||||
Month month = Inv_Month,
|
Month month,
|
||||||
int year = Inv_Year, // 1999, not 99 please!
|
int year = Inv_Year, // 1999, not 99 please!
|
||||||
wxDateTime_t hour = 0,
|
wxDateTime_t hour = 0,
|
||||||
wxDateTime_t minute = 0,
|
wxDateTime_t minute = 0,
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
virtual ~wxDrawObject() { }
|
virtual ~wxDrawObject() { }
|
||||||
|
|
||||||
virtual void Draw(wxDCBase& dc) const { }
|
virtual void Draw(wxDCBase&) const { }
|
||||||
|
|
||||||
virtual void CalcBoundingBox(wxCoord x, wxCoord y)
|
virtual void CalcBoundingBox(wxCoord x, wxCoord y)
|
||||||
{
|
{
|
||||||
|
@@ -119,7 +119,6 @@
|
|||||||
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
||||||
#define __BORLANDC__
|
#define __BORLANDC__
|
||||||
#elif defined(__WATCOMC__)
|
#elif defined(__WATCOMC__)
|
||||||
//#define __WATCOMC__
|
|
||||||
#elif defined(__SC__)
|
#elif defined(__SC__)
|
||||||
#define __SYMANTECC__
|
#define __SYMANTECC__
|
||||||
#endif // compiler
|
#endif // compiler
|
||||||
@@ -148,6 +147,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif // __VISUALC__
|
#endif // __VISUALC__
|
||||||
|
|
||||||
|
// suppress some Watcom C++ warnings
|
||||||
|
#ifdef __WATCOMC__
|
||||||
|
# pragma warning 849 9 // Disable 'virtual function hidden'
|
||||||
|
# pragma warning 549 9 // Disable 'operand contains compiler generated information'
|
||||||
|
#endif // __VISUALC__
|
||||||
|
|
||||||
// suppress some Salford C++ warnings
|
// suppress some Salford C++ warnings
|
||||||
#ifdef __SALFORDC__
|
#ifdef __SALFORDC__
|
||||||
# pragma suppress 353 // Possible nested comments
|
# pragma suppress 353 // Possible nested comments
|
||||||
@@ -414,8 +419,8 @@ typedef int wxWindowID;
|
|||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
|
||||||
// __declspec works in BC++ 5 and later, as well as VC++ and gcc
|
// __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well as VC++ and gcc
|
||||||
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__)
|
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
|
||||||
# ifdef WXMAKINGDLL
|
# ifdef WXMAKINGDLL
|
||||||
# define WXDLLEXPORT __declspec( dllexport )
|
# define WXDLLEXPORT __declspec( dllexport )
|
||||||
# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
|
# define WXDLLEXPORT_DATA(type) __declspec( dllexport ) type
|
||||||
@@ -477,8 +482,10 @@ typedef int wxWindowID;
|
|||||||
# define WXDLLIMPORT
|
# define WXDLLIMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
class WXDLLEXPORT wxObject;
|
class WXDLLEXPORT wxObject;
|
||||||
class WXDLLEXPORT wxEvent;
|
class WXDLLEXPORT wxEvent;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** symbolic constant used by all Find()-like functions returning positive
|
/** symbolic constant used by all Find()-like functions returning positive
|
||||||
integer on success as failure indicator */
|
integer on success as failure indicator */
|
||||||
@@ -489,7 +496,9 @@ class WXDLLEXPORT wxEvent;
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// everybody gets the assert and other debug macros
|
// everybody gets the assert and other debug macros
|
||||||
|
#ifdef __cplusplus
|
||||||
#include "wx/debug.h"
|
#include "wx/debug.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/// delete pointer if it is not NULL and NULL it afterwards
|
/// delete pointer if it is not NULL and NULL it afterwards
|
||||||
@@ -558,7 +567,9 @@ class WXDLLEXPORT wxEvent;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Callback function type definition
|
// Callback function type definition
|
||||||
|
#ifdef __cplusplus
|
||||||
typedef void (*wxFunction) (wxObject&, wxEvent&);
|
typedef void (*wxFunction) (wxObject&, wxEvent&);
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// OS mnemonics -- Identify the running OS (useful for Windows)
|
// OS mnemonics -- Identify the running OS (useful for Windows)
|
||||||
|
@@ -1575,7 +1575,7 @@ public:
|
|||||||
wxObject *userData = (wxObject *) NULL )
|
wxObject *userData = (wxObject *) NULL )
|
||||||
{ Connect(id, -1, eventType, func, userData); }
|
{ Connect(id, -1, eventType, func, userData); }
|
||||||
|
|
||||||
bool Disconnect( int id, int lastId = -1, wxEventType eventType = wxEVT_NULL,
|
bool Disconnect( int id, int lastId, wxEventType eventType,
|
||||||
wxObjectEventFunction func = NULL,
|
wxObjectEventFunction func = NULL,
|
||||||
wxObject *userData = (wxObject *) NULL );
|
wxObject *userData = (wxObject *) NULL );
|
||||||
|
|
||||||
|
@@ -190,7 +190,7 @@ public:
|
|||||||
|
|
||||||
// Create a drag image from a bitmap and optional cursor
|
// Create a drag image from a bitmap and optional cursor
|
||||||
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
|
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor);
|
||||||
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||||
return Create(image, cursor);
|
return Create(image, cursor);
|
||||||
@@ -198,7 +198,7 @@ public:
|
|||||||
|
|
||||||
// Create a drag image from an icon and optional cursor
|
// Create a drag image from an icon and optional cursor
|
||||||
bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
|
bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor);
|
||||||
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||||
return Create(image, cursor);
|
return Create(image, cursor);
|
||||||
@@ -206,7 +206,7 @@ public:
|
|||||||
|
|
||||||
// Create a drag image from a string and optional cursor
|
// Create a drag image from a string and optional cursor
|
||||||
bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
|
bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor);
|
||||||
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot)
|
bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot))
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument."));
|
||||||
return Create(str, cursor);
|
return Create(str, cursor);
|
||||||
|
@@ -55,7 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
long style = 0,
|
long style,
|
||||||
const wxString& name = wxPanelNameStr);
|
const wxString& name = wxPanelNameStr);
|
||||||
|
|
||||||
// Create status line
|
// Create status line
|
||||||
|
@@ -38,8 +38,8 @@ public:
|
|||||||
|
|
||||||
// Optional redefinition
|
// Optional redefinition
|
||||||
void Initialize(void);
|
void Initialize(void);
|
||||||
inline virtual void SetNodeName(long id, const wxString& name) {}
|
inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
|
||||||
inline virtual wxString GetNodeName(long id) { return wxString(""); }
|
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(""); }
|
||||||
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
||||||
virtual void Draw(wxDC& dc);
|
virtual void Draw(wxDC& dc);
|
||||||
virtual void DrawNodes(wxDC& dc);
|
virtual void DrawNodes(wxDC& dc);
|
||||||
|
@@ -104,10 +104,10 @@ public:
|
|||||||
|
|
||||||
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
||||||
|
|
||||||
// these are NOPs under Windows
|
// this are NOPs under Windows
|
||||||
bool ReadMailcap(const wxString& filename, bool fallback = TRUE)
|
bool ReadMailcap(const wxString& WXUNUSED(filename), bool WXUNUSED(fallback) = TRUE)
|
||||||
{ return TRUE; }
|
{ return TRUE; }
|
||||||
bool ReadMimeTypes(const wxString& filename)
|
bool ReadMimeTypes(const wxString& WXUNUSED(filename))
|
||||||
{ return TRUE; }
|
{ return TRUE; }
|
||||||
|
|
||||||
// create a new filetype association
|
// create a new filetype association
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
class WXDLLEXPORT wxDataFormat
|
class WXDLLEXPORT wxDataFormat
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// the clipboard formats under Win32 are WORDs
|
// the clipboard formats under Win32 are WORD's
|
||||||
typedef unsigned short NativeFormat;
|
typedef unsigned short NativeFormat;
|
||||||
|
|
||||||
wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
|
wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; }
|
||||||
|
@@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
virtual void SetFocus();
|
virtual void SetFocus();
|
||||||
|
|
||||||
virtual bool Reparent( wxWindow *newParent );
|
virtual bool Reparent( wxWindowBase *newParent );
|
||||||
|
|
||||||
virtual void WarpPointer(int x, int y);
|
virtual void WarpPointer(int x, int y);
|
||||||
virtual void CaptureMouse();
|
virtual void CaptureMouse();
|
||||||
@@ -328,9 +328,9 @@ public:
|
|||||||
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
|
bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
|
||||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
bool HandleMouseMove(int x, int y, WXUINT flags);
|
||||||
|
|
||||||
bool HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
||||||
bool HandleKeyDown(WXWORD wParam, WXLPARAM lParam);
|
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
||||||
bool HandleKeyUp(WXWORD wParam, WXLPARAM lParam);
|
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
bool HandleQueryDragIcon(WXHICON *hIcon);
|
bool HandleQueryDragIcon(WXHICON *hIcon);
|
||||||
|
|
||||||
|
@@ -175,6 +175,13 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
|
|||||||
? (className *)(obj) \
|
? (className *)(obj) \
|
||||||
: (className *)0)
|
: (className *)0)
|
||||||
|
|
||||||
|
// The 'this' pointer is always true, so use this version to cast the this
|
||||||
|
// pointer and avoid compiler warnings.
|
||||||
|
#define wxDynamicThisCast(obj, className) \
|
||||||
|
(((obj)->IsKindOf(&className::sm_class##className)) \
|
||||||
|
? (className *)(obj) \
|
||||||
|
: (className *)0)
|
||||||
|
|
||||||
#define wxConstCast(obj, className) ((className *)(obj))
|
#define wxConstCast(obj, className) ((className *)(obj))
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
|
@@ -236,7 +236,7 @@ public:
|
|||||||
// between the two states.
|
// between the two states.
|
||||||
wxToolBarToolBase *AddTool(int id,
|
wxToolBarToolBase *AddTool(int id,
|
||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxBitmap& pushedBitmap = wxNullBitmap,
|
const wxBitmap& pushedBitmap,
|
||||||
bool toggle = FALSE,
|
bool toggle = FALSE,
|
||||||
wxObject *clientData = NULL,
|
wxObject *clientData = NULL,
|
||||||
const wxString& shortHelpString = wxEmptyString,
|
const wxString& shortHelpString = wxEmptyString,
|
||||||
|
@@ -915,11 +915,11 @@ void wxPrintDialogData::ConvertToNative()
|
|||||||
m_printData.SetNativeDataDevNames((void*) NULL);
|
m_printData.SetNativeDataDevNames((void*) NULL);
|
||||||
|
|
||||||
pd->hDC = (HDC) NULL;
|
pd->hDC = (HDC) NULL;
|
||||||
pd->nFromPage = (UINT)m_printFromPage;
|
pd->nFromPage = (WORD)m_printFromPage;
|
||||||
pd->nToPage = (UINT)m_printToPage;
|
pd->nToPage = (WORD)m_printToPage;
|
||||||
pd->nMinPage = (UINT)m_printMinPage;
|
pd->nMinPage = (WORD)m_printMinPage;
|
||||||
pd->nMaxPage = (UINT)m_printMaxPage;
|
pd->nMaxPage = (WORD)m_printMaxPage;
|
||||||
pd->nCopies = (UINT)m_printNoCopies;
|
pd->nCopies = (WORD)m_printNoCopies;
|
||||||
|
|
||||||
pd->Flags = PD_RETURNDC ;
|
pd->Flags = PD_RETURNDC ;
|
||||||
|
|
||||||
|
@@ -251,7 +251,7 @@ wxContextHelpButton::wxContextHelpButton(wxWindow* parent,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxContextHelpButton::OnContextHelp(wxCommandEvent& event)
|
void wxContextHelpButton::OnContextHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxContextHelp contextHelp(GetParent());
|
wxContextHelp contextHelp(GetParent());
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ int _read( int , void * , size_t ) ;
|
|||||||
#define read _read
|
#define read _read
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
int fileno( FILE* ) ;
|
//int fileno( FILE* ) ; This is defined in watcom
|
||||||
#else
|
#else
|
||||||
#if __MSL__ < 0x6000
|
#if __MSL__ < 0x6000
|
||||||
int fileno( void* ) ;
|
int fileno( void* ) ;
|
||||||
|
@@ -1249,7 +1249,7 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
time += (time_t)tz.GetOffset();
|
time += (time_t)tz.GetOffset();
|
||||||
#ifdef __VMS__ // time is unsigned so avoid warning
|
#if defined(__VMS__) || defined(__WATCOMC__) // time is unsigned so avoid warning
|
||||||
int time2 = (int) time;
|
int time2 = (int) time;
|
||||||
if ( time2 >= 0 )
|
if ( time2 >= 0 )
|
||||||
#else
|
#else
|
||||||
@@ -1816,7 +1816,7 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
|
|||||||
{
|
{
|
||||||
time += (int)tz.GetOffset();
|
time += (int)tz.GetOffset();
|
||||||
|
|
||||||
#ifdef __VMS__ // time is unsigned so avoid the warning
|
#if defined(__VMS__) || defined(__WATCOMC__) // time is unsigned so avoid warning
|
||||||
int time2 = (int) time;
|
int time2 = (int) time;
|
||||||
if ( time2 >= 0 )
|
if ( time2 >= 0 )
|
||||||
#else
|
#else
|
||||||
@@ -3251,7 +3251,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
|||||||
|
|
||||||
haveDay = TRUE;
|
haveDay = TRUE;
|
||||||
|
|
||||||
day = n + 1;
|
day = (wxDateTime_t)(n + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -363,8 +363,7 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
|
|||||||
if (node != NULL)
|
if (node != NULL)
|
||||||
return ((wxLibrary *)node->Data());
|
return ((wxLibrary *)node->Data());
|
||||||
#else // !OS/2
|
#else // !OS/2
|
||||||
node = m_loaded.Find(name.GetData());
|
if ( (node = m_loaded.Find(name.GetData())) != NULL)
|
||||||
if ( node )
|
|
||||||
return ((wxLibrary *)node->Data());
|
return ((wxLibrary *)node->Data());
|
||||||
#endif
|
#endif
|
||||||
// If DLL shares data, this is necessary.
|
// If DLL shares data, this is necessary.
|
||||||
|
@@ -54,7 +54,7 @@ wxEffects::wxEffects(const wxColour& highlightColour, const wxColour& lightShado
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw a sunken edge
|
// Draw a sunken edge
|
||||||
void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize)
|
void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(borderSize))
|
||||||
{
|
{
|
||||||
wxPen highlightPen(m_highlightColour, 1, wxSOLID);
|
wxPen highlightPen(m_highlightColour, 1, wxSOLID);
|
||||||
wxPen lightShadowPen(m_lightShadow, 1, wxSOLID);
|
wxPen lightShadowPen(m_lightShadow, 1, wxSOLID);
|
||||||
|
@@ -138,7 +138,8 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CharsetItem *rev = BuildReverseTable(out_tbl);
|
CharsetItem *rev = BuildReverseTable(out_tbl);
|
||||||
CharsetItem *item, key;
|
CharsetItem *item;
|
||||||
|
CharsetItem key;
|
||||||
|
|
||||||
for (i = 0; i < 128; i++)
|
for (i = 0; i < 128; i++)
|
||||||
{
|
{
|
||||||
@@ -150,7 +151,11 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
|||||||
if (item)
|
if (item)
|
||||||
m_Table[128 + i] = (tchar)item -> c;
|
m_Table[128 + i] = (tchar)item -> c;
|
||||||
else
|
else
|
||||||
m_Table[128 + i] = 128 + i; // don't know => don't touch
|
#if wxUSE_WCHAR_T
|
||||||
|
m_Table[128 + i] = (wchar_t)(128 + i);
|
||||||
|
#else
|
||||||
|
m_Table[128 + i] = (char)(128 + i);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] rev;
|
delete[] rev;
|
||||||
|
@@ -500,7 +500,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#else
|
#else
|
||||||
while ((*d++ = *s)) {
|
while ((*d++ = *s) != NULL) {
|
||||||
# ifndef __WXMSW__
|
# ifndef __WXMSW__
|
||||||
if (*s == wxT('\\')) {
|
if (*s == wxT('\\')) {
|
||||||
if ((*(d - 1) = *++s)) {
|
if ((*(d - 1) = *++s)) {
|
||||||
@@ -520,13 +520,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
register wxChar *start = d;
|
register wxChar *start = d;
|
||||||
register int braces = (*s == wxT('{') || *s == wxT('('));
|
register int braces = (*s == wxT('{') || *s == wxT('('));
|
||||||
register wxChar *value;
|
register wxChar *value;
|
||||||
#ifdef __VISAGECPP__
|
while ((*d++ = *s) != NULL)
|
||||||
// VA gives assignment in logical expr warning
|
|
||||||
while (*d)
|
|
||||||
*d++ = *s;
|
|
||||||
#else
|
|
||||||
while ((*d++ = *s))
|
|
||||||
#endif
|
|
||||||
if (braces ? (*s == wxT('}') || *s == wxT(')')) : !(wxIsalnum(*s) || *s == wxT('_')) )
|
if (braces ? (*s == wxT('}') || *s == wxT(')')) : !(wxIsalnum(*s) || *s == wxT('_')) )
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
@@ -534,12 +528,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
*--d = 0;
|
*--d = 0;
|
||||||
value = wxGetenv(braces ? start + 1 : start);
|
value = wxGetenv(braces ? start + 1 : start);
|
||||||
if (value) {
|
if (value) {
|
||||||
#ifdef __VISAGECPP__
|
for ((d = start - 1); (*d++ = *value++) != NULL;);
|
||||||
// VA gives assignment in logical expr warning
|
|
||||||
for ((d = start - 1); (*d); *d++ = *value++);
|
|
||||||
#else
|
|
||||||
for ((d = start - 1); (*d++ = *value++););
|
|
||||||
#endif
|
|
||||||
d--;
|
d--;
|
||||||
if (braces && *s)
|
if (braces && *s)
|
||||||
s++;
|
s++;
|
||||||
@@ -591,13 +580,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
*(d - 1) = SEP;
|
*(d - 1) = SEP;
|
||||||
}
|
}
|
||||||
s = nm;
|
s = nm;
|
||||||
#ifdef __VISAGECPP__
|
while ((*d++ = *s++) != NULL);
|
||||||
// VA gives assignment in logical expr warning
|
|
||||||
while (*d)
|
|
||||||
*d++ = *s++;
|
|
||||||
#else
|
|
||||||
while ((*d++ = *s++));
|
|
||||||
#endif
|
|
||||||
delete[] nm_tmp; // clean up alloc
|
delete[] nm_tmp; // clean up alloc
|
||||||
/* Now clean up the buffer */
|
/* Now clean up the buffer */
|
||||||
return wxRealPath(buf);
|
return wxRealPath(buf);
|
||||||
@@ -1127,6 +1110,7 @@ bool wxMkdir(const wxString& dir, int perm)
|
|||||||
#elif defined(__WXPM__)
|
#elif defined(__WXPM__)
|
||||||
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
|
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
|
||||||
#else // !MSW and !OS/2 VAC++
|
#else // !MSW and !OS/2 VAC++
|
||||||
|
(void)perm;
|
||||||
if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 )
|
if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 )
|
||||||
#endif // !MSW/MSW
|
#endif // !MSW/MSW
|
||||||
{
|
{
|
||||||
@@ -1952,7 +1936,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
|||||||
pattern++;
|
pattern++;
|
||||||
ret_code = FALSE;
|
ret_code = FALSE;
|
||||||
while ((*str!=wxT('\0'))
|
while ((*str!=wxT('\0'))
|
||||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
&& ((ret_code=wxMatchWild(pattern, str++, FALSE)) == 0))
|
||||||
/*loop*/;
|
/*loop*/;
|
||||||
if (ret_code) {
|
if (ret_code) {
|
||||||
while (*str != wxT('\0'))
|
while (*str != wxT('\0'))
|
||||||
|
@@ -464,6 +464,7 @@ bool wxFileName::IsWild( wxPathFormat format )
|
|||||||
{
|
{
|
||||||
// FIXME: this is probably false for Mac and this is surely wrong for most
|
// FIXME: this is probably false for Mac and this is surely wrong for most
|
||||||
// of Unix shells (think about "[...]")
|
// of Unix shells (think about "[...]")
|
||||||
|
(void)format;
|
||||||
return m_name.find_first_of(_T("*?")) != wxString::npos;
|
return m_name.find_first_of(_T("*?")) != wxString::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,6 +530,7 @@ wxString wxFileName::GetPath( bool add_separator, wxPathFormat format ) const
|
|||||||
|
|
||||||
wxString wxFileName::GetFullPath( wxPathFormat format ) const
|
wxString wxFileName::GetFullPath( wxPathFormat format ) const
|
||||||
{
|
{
|
||||||
|
(void)format;
|
||||||
return GetPathWithSep() + GetFullName();
|
return GetPathWithSep() + GetFullName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,17 +573,16 @@ wxString wxFileName::GetLongPath() const
|
|||||||
typedef DWORD (*GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD);
|
typedef DWORD (*GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD);
|
||||||
|
|
||||||
static bool s_triedToLoad = FALSE;
|
static bool s_triedToLoad = FALSE;
|
||||||
static GET_LONG_PATH_NAME s_pfnGetLongPathName = NULL;
|
|
||||||
|
|
||||||
if ( !s_triedToLoad )
|
if ( !s_triedToLoad )
|
||||||
{
|
{
|
||||||
s_triedToLoad = TRUE;
|
s_triedToLoad = TRUE;
|
||||||
|
#if 0
|
||||||
wxDllType dllKernel = wxDllLoader::LoadLibrary(_T("kernel32"));
|
wxDllType dllKernel = wxDllLoader::LoadLibrary(_T("kernel32"));
|
||||||
short avoidCompilerWarning = 0;
|
if ( dllKernel )
|
||||||
if ( avoidCompilerWarning ) // dllKernel )
|
|
||||||
{
|
{
|
||||||
// may succeed or fail depending on the Windows version
|
// may succeed or fail depending on the Windows version
|
||||||
|
static GET_LONG_PATH_NAME s_pfnGetLongPathName = NULL;
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) wxDllLoader::GetSymbol(dllKernel, _T("GetLongPathNameW"));
|
s_pfnGetLongPathName = (GET_LONG_PATH_NAME) wxDllLoader::GetSymbol(dllKernel, _T("GetLongPathNameW"));
|
||||||
#else
|
#else
|
||||||
@@ -614,6 +615,7 @@ wxString wxFileName::GetLongPath() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (success)
|
if (success)
|
||||||
return pathOut;
|
return pathOut;
|
||||||
|
@@ -104,6 +104,8 @@ void wxFontBase::SetNativeFontInfo(const wxNativeFontInfo& info)
|
|||||||
SetUnderlined(info.underlined);
|
SetUnderlined(info.underlined);
|
||||||
SetFaceName(info.faceName);
|
SetFaceName(info.faceName);
|
||||||
SetEncoding(info.encoding);
|
SetEncoding(info.encoding);
|
||||||
|
#else
|
||||||
|
(void)info;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -504,7 +504,8 @@ int wxGIFDecoder::ReadGIF()
|
|||||||
unsigned char type = 0;
|
unsigned char type = 0;
|
||||||
unsigned char pal[768];
|
unsigned char pal[768];
|
||||||
unsigned char buf[16];
|
unsigned char buf[16];
|
||||||
GIFImage **ppimg, *pimg, *pprev;
|
GIFImage **ppimg;
|
||||||
|
GIFImage *pimg, *pprev;
|
||||||
|
|
||||||
/* check GIF signature */
|
/* check GIF signature */
|
||||||
if (!CanRead())
|
if (!CanRead())
|
||||||
|
@@ -185,8 +185,8 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
|
|||||||
int rshift = 0, gshift = 0, bshift = 0;
|
int rshift = 0, gshift = 0, bshift = 0;
|
||||||
wxUint8 aByte;
|
wxUint8 aByte;
|
||||||
wxUint16 aWord;
|
wxUint16 aWord;
|
||||||
wxInt32 dbuf[4], aDword,
|
wxInt32 dbuf[4];
|
||||||
rmask = 0, gmask = 0, bmask = 0;
|
wxInt32 aDword, rmask = 0, gmask = 0, bmask = 0;
|
||||||
wxInt8 bbuf[4];
|
wxInt8 bbuf[4];
|
||||||
struct _cmap {
|
struct _cmap {
|
||||||
unsigned char r, g, b;
|
unsigned char r, g, b;
|
||||||
@@ -201,7 +201,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
|
|||||||
* Read the BMP header
|
* Read the BMP header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
stream.Read( &bbuf, 2 );
|
stream.Read( bbuf, 2 );
|
||||||
stream.Read( dbuf, 4 * 4 );
|
stream.Read( dbuf, 4 * 4 );
|
||||||
|
|
||||||
#if 0 // unused
|
#if 0 // unused
|
||||||
@@ -487,7 +487,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
|
|||||||
}
|
}
|
||||||
else if (bpp == 24)
|
else if (bpp == 24)
|
||||||
{
|
{
|
||||||
stream.Read( &bbuf, 3 );
|
stream.Read( bbuf, 3 );
|
||||||
linepos += 3;
|
linepos += 3;
|
||||||
ptr[poffset ] = (unsigned char)bbuf[2];
|
ptr[poffset ] = (unsigned char)bbuf[2];
|
||||||
ptr[poffset + 1] = (unsigned char)bbuf[1];
|
ptr[poffset + 1] = (unsigned char)bbuf[1];
|
||||||
@@ -543,7 +543,7 @@ bool wxBMPHandler::DoCanRead( wxInputStream& stream )
|
|||||||
{
|
{
|
||||||
unsigned char hdr[2];
|
unsigned char hdr[2];
|
||||||
|
|
||||||
stream.Read(&hdr, 2);
|
stream.Read(hdr, 2);
|
||||||
stream.SeekI(-2, wxFromCurrent);
|
stream.SeekI(-2, wxFromCurrent);
|
||||||
return (hdr[0] == 'B' && hdr[1] == 'M');
|
return (hdr[0] == 'B' && hdr[1] == 'M');
|
||||||
}
|
}
|
||||||
|
@@ -1140,7 +1140,8 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
|||||||
{
|
{
|
||||||
wxHashTable h;
|
wxHashTable h;
|
||||||
wxObject dummy;
|
wxObject dummy;
|
||||||
unsigned char r, g, b, *p;
|
unsigned char r, g, b;
|
||||||
|
unsigned char *p;
|
||||||
unsigned long size, nentries, key;
|
unsigned long size, nentries, key;
|
||||||
|
|
||||||
p = GetData();
|
p = GetData();
|
||||||
@@ -1174,7 +1175,8 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
|||||||
//
|
//
|
||||||
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
|
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
|
||||||
{
|
{
|
||||||
unsigned char r, g, b, *p;
|
unsigned char r, g, b;
|
||||||
|
unsigned char *p;
|
||||||
unsigned long size, nentries, key;
|
unsigned long size, nentries, key;
|
||||||
wxHNode *hnode;
|
wxHNode *hnode;
|
||||||
|
|
||||||
|
@@ -29,9 +29,6 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#ifdef __WATCOMC__
|
|
||||||
#define HAVE_BOOLEAN
|
|
||||||
#endif
|
|
||||||
#include "jpeglib.h"
|
#include "jpeglib.h"
|
||||||
}
|
}
|
||||||
#include "wx/filefn.h"
|
#include "wx/filefn.h"
|
||||||
@@ -357,7 +354,7 @@ bool wxJPEGHandler::DoCanRead( wxInputStream& stream )
|
|||||||
{
|
{
|
||||||
unsigned char hdr[2];
|
unsigned char hdr[2];
|
||||||
|
|
||||||
stream.Read(&hdr, 2);
|
stream.Read(hdr, 2);
|
||||||
stream.SeekI(-2, wxFromCurrent);
|
stream.SeekI(-2, wxFromCurrent);
|
||||||
return (hdr[0] == 0xFF && hdr[1] == 0xD8);
|
return (hdr[0] == 0xFF && hdr[1] == 0xD8);
|
||||||
}
|
}
|
||||||
|
@@ -102,7 +102,7 @@ void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s)
|
|||||||
//
|
//
|
||||||
if ((data & 0xC0) != 0xC0)
|
if ((data & 0xC0) != 0xC0)
|
||||||
{
|
{
|
||||||
*(p++) = data;
|
*(p++) = (unsigned char)data;
|
||||||
size--;
|
size--;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -110,7 +110,7 @@ void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s)
|
|||||||
cont = data & 0x3F;
|
cont = data & 0x3F;
|
||||||
data = (unsigned char)s.GetC();
|
data = (unsigned char)s.GetC();
|
||||||
for (i = 1; i <= cont; i++)
|
for (i = 1; i <= cont; i++)
|
||||||
*(p++) = data;
|
*(p++) = (unsigned char)data;
|
||||||
size -= cont;
|
size -= cont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -349,12 +349,12 @@ int SavePCX(wxImage *image, wxOutputStream& stream)
|
|||||||
hdr[HDR_ENCODING] = 1;
|
hdr[HDR_ENCODING] = 1;
|
||||||
hdr[HDR_NPLANES] = nplanes;
|
hdr[HDR_NPLANES] = nplanes;
|
||||||
hdr[HDR_BITSPERPIXEL] = 8;
|
hdr[HDR_BITSPERPIXEL] = 8;
|
||||||
hdr[HDR_BYTESPERLINE] = bytesperline % 256;
|
hdr[HDR_BYTESPERLINE] = (unsigned char)(bytesperline % 256);
|
||||||
hdr[HDR_BYTESPERLINE + 1] = bytesperline / 256;
|
hdr[HDR_BYTESPERLINE + 1] = (unsigned char)(bytesperline / 256);
|
||||||
hdr[HDR_XMAX] = (width - 1) % 256;
|
hdr[HDR_XMAX] = (unsigned char)((width - 1) % 256);
|
||||||
hdr[HDR_XMAX + 1] = (width - 1) / 256;
|
hdr[HDR_XMAX + 1] = (unsigned char)((width - 1) / 256);
|
||||||
hdr[HDR_YMAX] = (height - 1) % 256;
|
hdr[HDR_YMAX] = (unsigned char)((height - 1) % 256);
|
||||||
hdr[HDR_YMAX + 1] = (height - 1) / 256;
|
hdr[HDR_YMAX + 1] = (unsigned char)((height - 1) / 256);
|
||||||
hdr[HDR_PALETTEINFO] = 1;
|
hdr[HDR_PALETTEINFO] = 1;
|
||||||
|
|
||||||
stream.Write(hdr, 128);
|
stream.Write(hdr, 128);
|
||||||
|
@@ -57,17 +57,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
|
|||||||
#if wxUSE_LIBPNG
|
#if wxUSE_LIBPNG
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
#if defined(__VISAGECPP__)
|
||||||
#define LINKAGEMODE _Optlink
|
#define PNGLINKAGEMODE _Optlink
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
#define PNGLINKAGEMODE _cdecl
|
||||||
#else
|
#else
|
||||||
#define LINKAGEMODE
|
#define PNGLINKAGEMODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void LINKAGEMODE _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length )
|
static void PNGLINKAGEMODE _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length )
|
||||||
{
|
{
|
||||||
((wxInputStream*) png_get_io_ptr( png_ptr )) -> Read(data, length);
|
((wxInputStream*) png_get_io_ptr( png_ptr )) -> Read(data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data, png_size_t length )
|
static void PNGLINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data, png_size_t length )
|
||||||
{
|
{
|
||||||
((wxOutputStream*) png_get_io_ptr( png_ptr )) -> Write(data, length);
|
((wxOutputStream*) png_get_io_ptr( png_ptr )) -> Write(data, length);
|
||||||
}
|
}
|
||||||
@@ -75,7 +77,7 @@ static void LINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data,
|
|||||||
// from pngerror.c
|
// from pngerror.c
|
||||||
// so that the libpng doesn't send anything on stderr
|
// so that the libpng doesn't send anything on stderr
|
||||||
void
|
void
|
||||||
LINKAGEMODE png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(message))
|
PNGLINKAGEMODE png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(message))
|
||||||
{
|
{
|
||||||
#ifdef USE_FAR_KEYWORD
|
#ifdef USE_FAR_KEYWORD
|
||||||
{
|
{
|
||||||
@@ -89,7 +91,7 @@ LINKAGEMODE png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(messa
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LINKAGEMODE png_silent_warning(png_structp WXUNUSED(png_ptr), png_const_charp WXUNUSED(message))
|
PNGLINKAGEMODE png_silent_warning(png_structp WXUNUSED(png_ptr), png_const_charp WXUNUSED(message))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,7 +361,7 @@ bool wxPNGHandler::DoCanRead( wxInputStream& stream )
|
|||||||
{
|
{
|
||||||
unsigned char hdr[4];
|
unsigned char hdr[4];
|
||||||
|
|
||||||
stream.Read(&hdr, 4);
|
stream.Read(hdr, 4);
|
||||||
stream.SeekI(-4, wxFromCurrent);
|
stream.SeekI(-4, wxFromCurrent);
|
||||||
return (hdr[0] == 0x89 && hdr[1] == 'P' && hdr[2] == 'N' && hdr[3] == 'G');
|
return (hdr[0] == 0x89 && hdr[1] == 'P' && hdr[2] == 'N' && hdr[3] == 'G');
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ bool wxXPMHandler::LoadFile(wxImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxXPMHandler::SaveFile(wxImage * image,
|
bool wxXPMHandler::SaveFile(wxImage * image,
|
||||||
wxOutputStream& stream, bool verbose)
|
wxOutputStream& stream, bool WXUNUSED(verbose))
|
||||||
{
|
{
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
char tmp_c;
|
char tmp_c;
|
||||||
|
@@ -711,6 +711,7 @@ bool wxDebugContext::Dump(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __WXDEBUG__
|
||||||
struct wxDebugStatsStruct
|
struct wxDebugStatsStruct
|
||||||
{
|
{
|
||||||
long instanceCount;
|
long instanceCount;
|
||||||
@@ -735,6 +736,7 @@ static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugSt
|
|||||||
st->next = head;
|
st->next = head;
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool wxDebugContext::PrintStatistics(bool detailed)
|
bool wxDebugContext::PrintStatistics(bool detailed)
|
||||||
{
|
{
|
||||||
@@ -832,6 +834,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#else
|
#else
|
||||||
|
(void)detailed;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1051,7 +1054,7 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Trace: send output to the current debugging stream
|
// Trace: send output to the current debugging stream
|
||||||
void wxTrace(const wxChar *fmt ...)
|
void wxTrace(const wxChar * ...)
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
||||||
@@ -1088,7 +1091,7 @@ void wxTrace(const wxChar *fmt ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Trace with level
|
// Trace with level
|
||||||
void wxTraceLevel(int level, const wxChar *fmt ...)
|
void wxTraceLevel(int, const wxChar * ...)
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
||||||
|
@@ -388,7 +388,6 @@ bool wxFileType::Unassociate()
|
|||||||
#elif defined(__UNIX__)
|
#elif defined(__UNIX__)
|
||||||
return m_impl->Unassociate(this);
|
return m_impl->Unassociate(this);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
wxFAIL_MSG( _T("not implemented") ); // TODO
|
wxFAIL_MSG( _T("not implemented") ); // TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
@@ -401,7 +400,6 @@ bool overwriteprompt)
|
|||||||
return m_impl->SetCommand(cmd, verb, overwriteprompt);
|
return m_impl->SetCommand(cmd, verb, overwriteprompt);
|
||||||
#else
|
#else
|
||||||
wxFAIL_MSG(_T("not implemented"));
|
wxFAIL_MSG(_T("not implemented"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -587,6 +585,9 @@ void wxMimeTypesManager::Initialize(int mcapStyle,
|
|||||||
EnsureImpl();
|
EnsureImpl();
|
||||||
|
|
||||||
m_impl->Initialize(mcapStyle, sExtraDir);
|
m_impl->Initialize(mcapStyle, sExtraDir);
|
||||||
|
#else
|
||||||
|
(void)mcapStyle;
|
||||||
|
(void)sExtraDir;
|
||||||
#endif // Unix
|
#endif // Unix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1055,8 +1055,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
{
|
{
|
||||||
wxExpr *valueList = (wxExpr *) NULL;
|
wxExpr *valueList = (wxExpr *) NULL;
|
||||||
|
|
||||||
valueList = expr->Nth(count);
|
if (((valueList = expr->Nth(count)) != 0) && (valueList->Type() == PrologList))
|
||||||
if (valueList && (valueList->Type() == PrologList))
|
|
||||||
{
|
{
|
||||||
wxStringList stringList;
|
wxStringList stringList;
|
||||||
wxExpr *stringExpr = valueList->GetFirst();
|
wxExpr *stringExpr = valueList->GetFirst();
|
||||||
@@ -1073,8 +1072,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
/*
|
/*
|
||||||
controlItem->SetValue1(wxLB_SINGLE);
|
controlItem->SetValue1(wxLB_SINGLE);
|
||||||
*/
|
*/
|
||||||
mult = expr->Nth(count);
|
if (((mult = expr->Nth(count)) != 0) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord)))
|
||||||
if (mult && ((mult->Type() == PrologString)||(mult->Type() == PrologWord)))
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
wxString m(mult->StringValue());
|
wxString m(mult->StringValue());
|
||||||
@@ -1099,8 +1097,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
{
|
{
|
||||||
wxExpr *valueList = (wxExpr *) NULL;
|
wxExpr *valueList = (wxExpr *) NULL;
|
||||||
// Check for default value list
|
// Check for default value list
|
||||||
valueList = expr->Nth(count);
|
if (((valueList = expr->Nth(count)) != 0) && (valueList->Type() == PrologList))
|
||||||
if (valueList && (valueList->Type() == PrologList))
|
|
||||||
{
|
{
|
||||||
wxStringList stringList;
|
wxStringList stringList;
|
||||||
wxExpr *stringExpr = valueList->GetFirst();
|
wxExpr *stringExpr = valueList->GetFirst();
|
||||||
@@ -1135,8 +1132,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
|
|
||||||
wxExpr *valueList = (wxExpr *) NULL;
|
wxExpr *valueList = (wxExpr *) NULL;
|
||||||
// Check for default value list
|
// Check for default value list
|
||||||
valueList = expr->Nth(count);
|
if (((valueList = expr->Nth(count)) != 0) && (valueList->Type() == PrologList))
|
||||||
if (valueList && (valueList->Type() == PrologList))
|
|
||||||
{
|
{
|
||||||
wxStringList stringList;
|
wxStringList stringList;
|
||||||
wxExpr *stringExpr = valueList->GetFirst();
|
wxExpr *stringExpr = valueList->GetFirst();
|
||||||
@@ -1165,8 +1161,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
{
|
{
|
||||||
wxExpr *valueList = (wxExpr *) NULL;
|
wxExpr *valueList = (wxExpr *) NULL;
|
||||||
// Check for default value list
|
// Check for default value list
|
||||||
valueList = expr->Nth(count);
|
if (((valueList = expr->Nth(count)) != 0) && (valueList->Type() == PrologList))
|
||||||
if (valueList && (valueList->Type() == PrologList))
|
|
||||||
{
|
{
|
||||||
wxStringList stringList;
|
wxStringList stringList;
|
||||||
wxExpr *stringExpr = valueList->GetFirst();
|
wxExpr *stringExpr = valueList->GetFirst();
|
||||||
|
@@ -376,7 +376,7 @@ void wxSizer::SetSizeHints( wxWindow *window )
|
|||||||
window->SetSizeHints( size.x, size.y );
|
window->SetSizeHints( size.x, size.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxSizer::GetMaxWindowSize( wxWindow *window )
|
wxSize wxSizer::GetMaxWindowSize( wxWindow *WXUNUSED(window) )
|
||||||
{
|
{
|
||||||
wxSize sizeMax = wxGetDisplaySize();
|
wxSize sizeMax = wxGetDisplaySize();
|
||||||
// make the max size a bit smaller than the screen, a window which takes
|
// make the max size a bit smaller than the screen, a window which takes
|
||||||
@@ -1004,7 +1004,7 @@ static void GetStaticBoxBorders(wxStaticBox *box,
|
|||||||
else
|
else
|
||||||
#endif // __WXGTK__
|
#endif // __WXGTK__
|
||||||
*borderTop = 15;
|
*borderTop = 15;
|
||||||
|
(void)box;
|
||||||
*borderOther = 5;
|
*borderOther = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -220,7 +220,8 @@ long wxGetLocalTime()
|
|||||||
// Get UTC time as seconds since 00:00:00, Jan 1st 1970
|
// Get UTC time as seconds since 00:00:00, Jan 1st 1970
|
||||||
long wxGetUTCTime()
|
long wxGetUTCTime()
|
||||||
{
|
{
|
||||||
struct tm tm, *ptm;
|
struct tm tm;
|
||||||
|
struct tm *ptm;
|
||||||
time_t t0, t1;
|
time_t t0, t1;
|
||||||
|
|
||||||
// This cannot be made static because mktime can overwrite it
|
// This cannot be made static because mktime can overwrite it
|
||||||
|
@@ -1345,7 +1345,7 @@ void wxWindowBase::UpdateWindowUI()
|
|||||||
|
|
||||||
if ( event.GetSetText() )
|
if ( event.GetSetText() )
|
||||||
{
|
{
|
||||||
wxControl *control = wxDynamicCast(this, wxControl);
|
wxControl *control = wxDynamicThisCast(this, wxControl);
|
||||||
if ( control )
|
if ( control )
|
||||||
{
|
{
|
||||||
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
|
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
|
||||||
@@ -1357,7 +1357,7 @@ void wxWindowBase::UpdateWindowUI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CHECKBOX
|
#if wxUSE_CHECKBOX
|
||||||
wxCheckBox *checkbox = wxDynamicCast(this, wxCheckBox);
|
wxCheckBox *checkbox = wxDynamicThisCast(this, wxCheckBox);
|
||||||
if ( checkbox )
|
if ( checkbox )
|
||||||
{
|
{
|
||||||
if ( event.GetSetChecked() )
|
if ( event.GetSetChecked() )
|
||||||
@@ -1366,7 +1366,7 @@ void wxWindowBase::UpdateWindowUI()
|
|||||||
#endif // wxUSE_CHECKBOX
|
#endif // wxUSE_CHECKBOX
|
||||||
|
|
||||||
#if wxUSE_RADIOBTN
|
#if wxUSE_RADIOBTN
|
||||||
wxRadioButton *radiobtn = wxDynamicCast(this, wxRadioButton);
|
wxRadioButton *radiobtn = wxDynamicThisCast(this, wxRadioButton);
|
||||||
if ( radiobtn )
|
if ( radiobtn )
|
||||||
{
|
{
|
||||||
if ( event.GetSetChecked() )
|
if ( event.GetSetChecked() )
|
||||||
|
@@ -308,6 +308,21 @@ static const int ID_NEW = 1004;
|
|||||||
//static const int ID_CHECK = 1005;
|
//static const int ID_CHECK = 1005;
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
|
int setdrive(int drive)
|
||||||
|
{
|
||||||
|
char newdrive[3];
|
||||||
|
|
||||||
|
if (drive < 1 || drive > 31)
|
||||||
|
return -1;
|
||||||
|
newdrive[0] = (char)('A' + (char)drive - (char)1);
|
||||||
|
newdrive[1] = ':';
|
||||||
|
newdrive[2] = '\0';
|
||||||
|
if (SetCurrentDirectory((LPSTR)newdrive))
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static bool wxIsDriveAvailable(const wxString dirName)
|
static bool wxIsDriveAvailable(const wxString dirName)
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
@@ -325,8 +340,8 @@ static bool wxIsDriveAvailable(const wxString dirName)
|
|||||||
#else
|
#else
|
||||||
int currentDrive = _getdrive();
|
int currentDrive = _getdrive();
|
||||||
int thisDrive = (int) (dirNameLower[(size_t)0] - 'a' + 1) ;
|
int thisDrive = (int) (dirNameLower[(size_t)0] - 'a' + 1) ;
|
||||||
int err = _chdrive( thisDrive ) ;
|
int err = setdrive( thisDrive ) ;
|
||||||
_chdrive( currentDrive );
|
setdrive( currentDrive );
|
||||||
|
|
||||||
if (err == -1)
|
if (err == -1)
|
||||||
{
|
{
|
||||||
@@ -1107,7 +1122,7 @@ void wxGenericDirCtrl::DoResize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxGenericDirCtrl::OnSize(wxSizeEvent &event)
|
void wxGenericDirCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
DoResize();
|
DoResize();
|
||||||
}
|
}
|
||||||
@@ -1136,7 +1151,7 @@ void wxDirFilterListCtrl::Init()
|
|||||||
m_dirCtrl = NULL;
|
m_dirCtrl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDirFilterListCtrl::OnSelFilter(wxCommandEvent& event)
|
void wxDirFilterListCtrl::OnSelFilter(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
int sel = GetSelection();
|
int sel = GetSelection();
|
||||||
|
|
||||||
@@ -1236,12 +1251,12 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title,
|
|||||||
Centre( wxBOTH );
|
Centre( wxBOTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericDirDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxGenericDirDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
EndModal(wxID_CANCEL);
|
EndModal(wxID_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericDirDialog::OnOK(wxCommandEvent& event)
|
void wxGenericDirDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
m_path = m_input->GetValue();
|
m_path = m_input->GetValue();
|
||||||
// Does the path exist? (User may have typed anything in m_input)
|
// Does the path exist? (User may have typed anything in m_input)
|
||||||
|
@@ -6043,7 +6043,7 @@ void wxGrid::DrawHighlight(wxDC& dc)
|
|||||||
// This is used to redraw all grid lines e.g. when the grid line colour
|
// This is used to redraw all grid lines e.g. when the grid line colour
|
||||||
// has been changed
|
// has been changed
|
||||||
//
|
//
|
||||||
void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED_GTK(reg) )
|
void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) )
|
||||||
{
|
{
|
||||||
if ( !m_gridLinesEnabled ||
|
if ( !m_gridLinesEnabled ||
|
||||||
!m_numRows ||
|
!m_numRows ||
|
||||||
|
@@ -77,12 +77,12 @@ wxSplashScreen::~wxSplashScreen()
|
|||||||
m_timer.Stop();
|
m_timer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSplashScreen::OnNotify(wxTimerEvent& event)
|
void wxSplashScreen::OnNotify(wxTimerEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close(TRUE);
|
Close(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSplashScreen::OnCloseWindow(wxCloseEvent& event)
|
void wxSplashScreen::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
m_timer.Stop();
|
m_timer.Stop();
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
@@ -105,14 +105,14 @@ wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* par
|
|||||||
m_bitmap = bitmap;
|
m_bitmap = bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSplashScreenWindow::OnPaint(wxPaintEvent& event)
|
void wxSplashScreenWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
dc.DrawBitmap(m_bitmap, 0, 0);
|
dc.DrawBitmap(m_bitmap, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wxDrawSplashBitmap(wxDC& dc, const wxBitmap& bitmap, int x, int y)
|
static void wxDrawSplashBitmap(wxDC& dc, const wxBitmap& bitmap, int WXUNUSED(x), int WXUNUSED(y))
|
||||||
{
|
{
|
||||||
wxMemoryDC dcMem;
|
wxMemoryDC dcMem;
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ void wxSplashScreenWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
GetParent()->Close(TRUE);
|
GetParent()->Close(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSplashScreenWindow::OnChar(wxKeyEvent& event)
|
void wxSplashScreenWindow::OnChar(wxKeyEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
GetParent()->Close(TRUE);
|
GetParent()->Close(TRUE);
|
||||||
}
|
}
|
||||||
|
@@ -127,7 +127,7 @@ wxTipWindow::~wxTipWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTipWindow::OnMouseClick(wxMouseEvent& event)
|
void wxTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ void wxTipWindow::OnActivate(wxActivateEvent& event)
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTipWindow::OnKillFocus(wxFocusEvent& event)
|
void wxTipWindow::OnKillFocus(wxFocusEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Under Windows at least, we will get this immediately
|
// Under Windows at least, we will get this immediately
|
||||||
// because when the view window is focussed, the
|
// because when the view window is focussed, the
|
||||||
@@ -231,7 +231,7 @@ void wxTipWindowView::Adjust(const wxString& text, wxCoord maxLength)
|
|||||||
2*(TEXT_MARGIN_Y + 1) + parent->m_textLines.GetCount()*parent->m_heightLine);
|
2*(TEXT_MARGIN_Y + 1) + parent->m_textLines.GetCount()*parent->m_heightLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTipWindowView::OnPaint(wxPaintEvent& event)
|
void wxTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxTipWindow* parent = (wxTipWindow*) GetParent();
|
wxTipWindow* parent = (wxTipWindow*) GetParent();
|
||||||
if (!parent)
|
if (!parent)
|
||||||
@@ -270,14 +270,15 @@ void wxTipWindowView::OnPaint(wxPaintEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTipWindowView::OnMouseClick(wxMouseEvent& event)
|
void wxTipWindowView::OnMouseClick(wxMouseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
GetParent()->Close();
|
GetParent()->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTipWindowView::OnKillFocus(wxFocusEvent& event)
|
void wxTipWindowView::OnKillFocus(wxFocusEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Workaround the kill focus event happening just after creation in wxGTK
|
// Workaround the kill focus event happening just after creation in wxGTK
|
||||||
if (wxGetLocalTime() > m_creationTime + 1)
|
if (wxGetLocalTime() > m_creationTime + 1)
|
||||||
GetParent()->Close();
|
GetParent()->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2252,7 +2252,7 @@ wxTreeItemId wxGenericTreeCtrl::HitTest(const wxPoint& point, int& flags)
|
|||||||
// get the bounding rectangle of the item (or of its label only)
|
// get the bounding rectangle of the item (or of its label only)
|
||||||
bool wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
|
bool wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
|
||||||
wxRect& rect,
|
wxRect& rect,
|
||||||
bool textOnly) const
|
bool WXUNUSED(textOnly)) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid item in wxGenericTreeCtrl::GetBoundingRect") );
|
wxCHECK_MSG( item.IsOk(), FALSE, _T("invalid item in wxGenericTreeCtrl::GetBoundingRect") );
|
||||||
|
|
||||||
|
@@ -211,11 +211,8 @@ bool wxHtmlHelpController::DisplayTextPopup(const wxString& text, const wxPoint&
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
#endif
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxHtmlHelpController::SetFrameParameters(const wxString& title,
|
void wxHtmlHelpController::SetFrameParameters(const wxString& title,
|
||||||
|
@@ -198,7 +198,7 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data)
|
|||||||
// moreover, if no contents, index or searchpage is needed, m_Splitter and
|
// moreover, if no contents, index or searchpage is needed, m_Splitter and
|
||||||
// m_NavigPan will be NULL too (with m_HtmlWin directly connected to the frame)
|
// m_NavigPan will be NULL too (with m_HtmlWin directly connected to the frame)
|
||||||
|
|
||||||
bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& title,
|
bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(title),
|
||||||
int style)
|
int style)
|
||||||
{
|
{
|
||||||
wxImageList *ContentsImageList = new wxImageList(16, 16);
|
wxImageList *ContentsImageList = new wxImageList(16, 16);
|
||||||
@@ -1000,7 +1000,7 @@ Normal face<br>(and <u>underlined</u>. <i>Italic face.</i> \
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnUpdate(wxCommandEvent& event)
|
void OnUpdate(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
UpdateTestWin();
|
UpdateTestWin();
|
||||||
}
|
}
|
||||||
@@ -1321,7 +1321,8 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
wxBusyCursor bcur;
|
wxBusyCursor bcur;
|
||||||
const wxChar *cstr = sr.c_str();
|
const wxChar *cstr = sr.c_str();
|
||||||
wxChar mybuff[512], *ptr;
|
wxChar mybuff[512];
|
||||||
|
wxChar *ptr;
|
||||||
bool first = TRUE;
|
bool first = TRUE;
|
||||||
|
|
||||||
m_IndexList->Clear();
|
m_IndexList->Clear();
|
||||||
|
@@ -550,7 +550,7 @@ void wxHtmlWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlWindow::OnIdle(wxIdleEvent& event)
|
void wxHtmlWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (s_cur_hand == NULL)
|
if (s_cur_hand == NULL)
|
||||||
{
|
{
|
||||||
|
@@ -49,7 +49,9 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
|||||||
wxColour clr;
|
wxColour clr;
|
||||||
if (tag.ScanParam(wxT("COLOR"), wxT("#%lX"), &tmp) == 1)
|
if (tag.ScanParam(wxT("COLOR"), wxT("#%lX"), &tmp) == 1)
|
||||||
{
|
{
|
||||||
clr = wxColour((tmp & 0xFF0000) >> 16 , (tmp & 0x00FF00) >> 8, (tmp & 0x0000FF));
|
clr = wxColour((unsigned char)((tmp & 0xFF0000) >> 16),
|
||||||
|
(unsigned char)((tmp & 0x00FF00) >> 8),
|
||||||
|
(unsigned char)(tmp & 0x0000FF));
|
||||||
m_WParser->SetActualColor(clr);
|
m_WParser->SetActualColor(clr);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
|
||||||
}
|
}
|
||||||
|
@@ -181,7 +181,9 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
|
|||||||
{
|
{
|
||||||
if (tag.ScanParam(wxT("TEXT"), wxT("#%lX"), &tmp) == 1)
|
if (tag.ScanParam(wxT("TEXT"), wxT("#%lX"), &tmp) == 1)
|
||||||
{
|
{
|
||||||
clr = wxColour((tmp & 0xFF0000) >> 16 , (tmp & 0x00FF00) >> 8, (tmp & 0x0000FF));
|
clr = wxColour((unsigned char)((tmp & 0xFF0000) >> 16),
|
||||||
|
(unsigned char)((tmp & 0x00FF00) >> 8),
|
||||||
|
(unsigned char)(tmp & 0x0000FF));
|
||||||
m_WParser->SetActualColor(clr);
|
m_WParser->SetActualColor(clr);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr));
|
||||||
}
|
}
|
||||||
@@ -191,7 +193,9 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
|
|||||||
{
|
{
|
||||||
if (tag.ScanParam(wxT("LINK"), wxT("#%lX"), &tmp) == 1)
|
if (tag.ScanParam(wxT("LINK"), wxT("#%lX"), &tmp) == 1)
|
||||||
{
|
{
|
||||||
clr = wxColour((tmp & 0xFF0000) >> 16 , (tmp & 0x00FF00) >> 8, (tmp & 0x0000FF));
|
clr = wxColour((unsigned char)((tmp & 0xFF0000) >> 16),
|
||||||
|
(unsigned char)((tmp & 0x00FF00) >> 8),
|
||||||
|
(unsigned char)(tmp & 0x0000FF));
|
||||||
m_WParser->SetLinkColor(clr);
|
m_WParser->SetLinkColor(clr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,7 +204,9 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
|
|||||||
{
|
{
|
||||||
if (tag.ScanParam(wxT("BGCOLOR"), wxT("#%lX"), &tmp) == 1)
|
if (tag.ScanParam(wxT("BGCOLOR"), wxT("#%lX"), &tmp) == 1)
|
||||||
{
|
{
|
||||||
clr = wxColour((tmp & 0xFF0000) >> 16 , (tmp & 0x00FF00) >> 8, (tmp & 0x0000FF));
|
clr = wxColour((unsigned char)((tmp & 0xFF0000) >> 16),
|
||||||
|
(unsigned char)((tmp & 0x00FF00) >> 8),
|
||||||
|
(unsigned char)(tmp & 0x0000FF));
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND));
|
||||||
if (m_WParser->GetWindow() != NULL)
|
if (m_WParser->GetWindow() != NULL)
|
||||||
m_WParser->GetWindow()->SetBackgroundColour(clr);
|
m_WParser->GetWindow()->SetBackgroundColour(clr);
|
||||||
|
@@ -1341,6 +1341,7 @@ bool wxHandleFatalExceptions(bool doit)
|
|||||||
#else
|
#else
|
||||||
wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to sue this function"));
|
wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to sue this function"));
|
||||||
|
|
||||||
|
(void)doit;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -352,6 +352,7 @@ void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, in
|
|||||||
if ( sel )
|
if ( sel )
|
||||||
OffsetRect( &rect, 1, 1 );
|
OffsetRect( &rect, 1, 1 );
|
||||||
*/
|
*/
|
||||||
|
(void)sel;
|
||||||
DrawFocusRect( (HDC) dc, &rect );
|
DrawFocusRect( (HDC) dc, &rect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -255,7 +255,7 @@ void wxButton::Command(wxCommandEvent & event)
|
|||||||
// event/message handlers
|
// event/message handlers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxButton::MSWCommand(WXUINT param, WXWORD id)
|
bool wxButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||||
{
|
{
|
||||||
bool processed = FALSE;
|
bool processed = FALSE;
|
||||||
switch ( param )
|
switch ( param )
|
||||||
|
@@ -207,7 +207,7 @@ void wxCheckBox::Command (wxCommandEvent & event)
|
|||||||
// wxBitmapCheckBox
|
// wxBitmapCheckBox
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *WXUNUSED(label),
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
@@ -262,7 +262,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapCheckBox::SetLabel(const wxBitmap& bitmap)
|
void wxBitmapCheckBox::SetLabel(const wxBitmap& WXUNUSED(bitmap))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("not implemented"));
|
wxFAIL_MSG(wxT("not implemented"));
|
||||||
}
|
}
|
||||||
|
@@ -185,7 +185,7 @@ int wxChoice::FindString(const wxString& s) const
|
|||||||
#endif // Watcom/!Watcom
|
#endif // Watcom/!Watcom
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxChoice::SetString(int n, const wxString& s)
|
void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("not implemented"));
|
wxFAIL_MSG(wxT("not implemented"));
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ wxClientData* wxChoice::DoGetItemClientObject( int n ) const
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxChoice::DoSetSize(int x, int y,
|
void wxChoice::DoSetSize(int x, int y,
|
||||||
int width, int height,
|
int width, int WXUNUSED(height),
|
||||||
int sizeFlags)
|
int sizeFlags)
|
||||||
{
|
{
|
||||||
// Ignore height parameter because height doesn't mean 'initially
|
// Ignore height parameter because height doesn't mean 'initially
|
||||||
@@ -338,10 +338,10 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
|
@@ -433,7 +433,7 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
|
|
||||||
wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
|
wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
|
||||||
{
|
{
|
||||||
return ::EnumClipboardFormats(dataFormat);
|
return (wxDataFormat::NativeFormat)::EnumClipboardFormats(dataFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxRegisterClipboardFormat(wxChar *formatName)
|
int wxRegisterClipboardFormat(wxChar *formatName)
|
||||||
@@ -627,7 +627,8 @@ bool wxClipboard::GetData( wxDataObject& data )
|
|||||||
|
|
||||||
// build the list of supported formats
|
// build the list of supported formats
|
||||||
size_t nFormats = data.GetFormatCount(wxDataObject::Set);
|
size_t nFormats = data.GetFormatCount(wxDataObject::Set);
|
||||||
wxDataFormat format, *formats;
|
wxDataFormat format;
|
||||||
|
wxDataFormat *formats;
|
||||||
if ( nFormats == 1 )
|
if ( nFormats == 1 )
|
||||||
{
|
{
|
||||||
// the most common case
|
// the most common case
|
||||||
|
@@ -72,7 +72,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
|
|||||||
|
|
||||||
UINT CALLBACK wxColourDialogHookProc(HWND hwnd,
|
UINT CALLBACK wxColourDialogHookProc(HWND hwnd,
|
||||||
UINT uiMsg,
|
UINT uiMsg,
|
||||||
WPARAM wParam,
|
WPARAM WXUNUSED(wParam),
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
if ( uiMsg == WM_INITDIALOG )
|
if ( uiMsg == WM_INITDIALOG )
|
||||||
|
@@ -141,10 +141,10 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
|
|||||||
return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam);
|
return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
@@ -373,7 +373,7 @@ void wxComboBox::Paste()
|
|||||||
SendMessage(hWnd, WM_PASTE, 0, 0L);
|
SendMessage(hWnd, WM_PASTE, 0, 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxComboBox::SetEditable(bool editable)
|
void wxComboBox::SetEditable(bool WXUNUSED(editable))
|
||||||
{
|
{
|
||||||
// Can't implement in MSW?
|
// Can't implement in MSW?
|
||||||
// HWND hWnd = GetHwnd();
|
// HWND hWnd = GetHwnd();
|
||||||
|
@@ -223,10 +223,10 @@ void wxControl::OnEraseBackground(wxEraseEvent& event)
|
|||||||
::SetMapMode(hdc, mode);
|
::SetMapMode(hdc, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
|
@@ -88,7 +88,7 @@ HICON CursorToIcon( wxChar *szFileName, HINSTANCE hInst, int *W, int *H)
|
|||||||
HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
|
HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
|
||||||
{ ICONFILEHEADER iconFileHead; // ICON file header structure
|
{ ICONFILEHEADER iconFileHead; // ICON file header structure
|
||||||
ICONFILERES iconFileRes; // ICON file resource
|
ICONFILERES iconFileRes; // ICON file resource
|
||||||
WORD cbHead,
|
UINT cbHead,
|
||||||
cbRes,
|
cbRes,
|
||||||
cbBits; // Used for reading in file
|
cbBits; // Used for reading in file
|
||||||
int hFile; // File handle
|
int hFile; // File handle
|
||||||
@@ -253,8 +253,8 @@ HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst)
|
|||||||
szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits;
|
szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits;
|
||||||
|
|
||||||
// 8) Use the XOR and AND bits and create an icon with CreateIcon.
|
// 8) Use the XOR and AND bits and create an icon with CreateIcon.
|
||||||
hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, bmpXor.bmPlanes,
|
hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, (BYTE)bmpXor.bmPlanes,
|
||||||
bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB);
|
(BYTE)bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB);
|
||||||
|
|
||||||
// Clean up before exiting.
|
// Clean up before exiting.
|
||||||
DeleteObject( hbmXor);
|
DeleteObject( hbmXor);
|
||||||
@@ -335,7 +335,7 @@ HCURSOR IconToCursor( wxChar *szFileName, HINSTANCE hInst, int XHot, int YHot,
|
|||||||
HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H)
|
HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H)
|
||||||
{ CURFILEHEADER curFileHead; // CURSOR file header structure
|
{ CURFILEHEADER curFileHead; // CURSOR file header structure
|
||||||
CURFILERES curFileRes; // CURSOR file resource
|
CURFILERES curFileRes; // CURSOR file resource
|
||||||
WORD cbHead,
|
UINT cbHead,
|
||||||
cbRes,
|
cbRes,
|
||||||
cbBits; // Used for reading in file
|
cbBits; // Used for reading in file
|
||||||
LPBITMAPINFO lpDIB; // Pointer to DIB memory
|
LPBITMAPINFO lpDIB; // Pointer to DIB memory
|
||||||
@@ -644,9 +644,9 @@ WORD PaletteSize( LPSTR pv)
|
|||||||
NumColors = DIBNumColors((LPSTR )lpbi);
|
NumColors = DIBNumColors((LPSTR )lpbi);
|
||||||
|
|
||||||
if(lpbi->biSize == sizeof( BITMAPCOREHEADER)) // OS/2 style DIBs
|
if(lpbi->biSize == sizeof( BITMAPCOREHEADER)) // OS/2 style DIBs
|
||||||
return NumColors * sizeof( RGBTRIPLE);
|
return (WORD)(NumColors * sizeof( RGBTRIPLE));
|
||||||
else
|
else
|
||||||
return NumColors * sizeof( RGBQUAD);
|
return (WORD)(NumColors * sizeof( RGBQUAD));
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
@@ -1171,7 +1171,7 @@ void wxDC::SetRop(WXHDC dc)
|
|||||||
SetROP2(GetHdc(), rop);
|
SetROP2(GetHdc(), rop);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDC::StartDoc(const wxString& message)
|
bool wxDC::StartDoc(const wxString& WXUNUSED(message))
|
||||||
{
|
{
|
||||||
// We might be previewing, so return TRUE to let it continue.
|
// We might be previewing, so return TRUE to let it continue.
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -472,7 +472,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
wxCoord width, wxCoord height,
|
wxCoord width, wxCoord height,
|
||||||
wxDC *source,
|
wxDC *source,
|
||||||
wxCoord xsrc, wxCoord ysrc,
|
wxCoord xsrc, wxCoord ysrc,
|
||||||
int rop, bool useMask)
|
int WXUNUSED(rop), bool useMask)
|
||||||
{
|
{
|
||||||
bool success = TRUE;
|
bool success = TRUE;
|
||||||
|
|
||||||
|
@@ -476,7 +476,7 @@ void wxDialog::EndModal(int retCode)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Standard buttons
|
// Standard buttons
|
||||||
void wxDialog::OnOK(wxCommandEvent& event)
|
void wxDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( Validate() && TransferDataFromWindow() )
|
if ( Validate() && TransferDataFromWindow() )
|
||||||
{
|
{
|
||||||
@@ -484,7 +484,7 @@ void wxDialog::OnOK(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnApply(wxCommandEvent& event)
|
void wxDialog::OnApply(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( Validate() )
|
if ( Validate() )
|
||||||
TransferDataFromWindow();
|
TransferDataFromWindow();
|
||||||
@@ -492,12 +492,12 @@ void wxDialog::OnApply(wxCommandEvent& event)
|
|||||||
// TODO probably need to disable the Apply button until things change again
|
// TODO probably need to disable the Apply button until things change again
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnCancel(wxCommandEvent& event)
|
void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
EndModal(wxID_CANCEL);
|
EndModal(wxID_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// We'll send a Cancel message by default, which may close the dialog.
|
// We'll send a Cancel message by default, which may close the dialog.
|
||||||
// Check for looping if the Cancel event handler calls Close().
|
// Check for looping if the Cancel event handler calls Close().
|
||||||
@@ -538,7 +538,7 @@ bool wxDialog::Destroy()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
|
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
Ctl3dColorChange();
|
Ctl3dColorChange();
|
||||||
|
@@ -159,9 +159,9 @@ WORD wxPaletteSize(VOID FAR * pv)
|
|||||||
NumColors = DibNumColors(lpbi);
|
NumColors = DibNumColors(lpbi);
|
||||||
|
|
||||||
if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
|
if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
|
||||||
return NumColors * sizeof(RGBTRIPLE);
|
return (WORD)(NumColors * sizeof(RGBTRIPLE));
|
||||||
else
|
else
|
||||||
return NumColors * sizeof(RGBQUAD);
|
return (WORD)(NumColors * sizeof(RGBQUAD));
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -528,7 +528,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* offset to the bits from start of DIB header */
|
/* offset to the bits from start of DIB header */
|
||||||
offBits = (WORD)lpbi->biSize + nNumColors * sizeof(RGBQUAD);
|
offBits = (WORD)(lpbi->biSize + nNumColors * sizeof(RGBQUAD));
|
||||||
|
|
||||||
if (bf.bfOffBits != 0L)
|
if (bf.bfOffBits != 0L)
|
||||||
{
|
{
|
||||||
|
@@ -321,8 +321,8 @@ PDIB wxDibReadBitmapInfo(HFILE fh)
|
|||||||
bi.biSize = sizeof(BITMAPINFOHEADER);
|
bi.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
bi.biWidth = (DWORD)bc.bcWidth;
|
bi.biWidth = (DWORD)bc.bcWidth;
|
||||||
bi.biHeight = (DWORD)bc.bcHeight;
|
bi.biHeight = (DWORD)bc.bcHeight;
|
||||||
bi.biPlanes = (UINT)bc.bcPlanes;
|
bi.biPlanes = (WORD)bc.bcPlanes;
|
||||||
bi.biBitCount = (UINT)bc.bcBitCount;
|
bi.biBitCount = (WORD)bc.bcBitCount;
|
||||||
bi.biCompression = BI_RGB;
|
bi.biCompression = BI_RGB;
|
||||||
bi.biSizeImage = 0;
|
bi.biSizeImage = 0;
|
||||||
bi.biXPelsPerMeter = 0;
|
bi.biXPelsPerMeter = 0;
|
||||||
@@ -549,7 +549,7 @@ static void xlatClut4(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat)
|
|||||||
#define RLE_EOF 1
|
#define RLE_EOF 1
|
||||||
#define RLE_JMP 2
|
#define RLE_JMP 2
|
||||||
|
|
||||||
static void xlatRle8(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat)
|
static void xlatRle8(BYTE FAR *pb, DWORD WXUNUSED(dwSize), BYTE FAR *xlat)
|
||||||
{
|
{
|
||||||
BYTE cnt;
|
BYTE cnt;
|
||||||
BYTE b;
|
BYTE b;
|
||||||
@@ -595,7 +595,7 @@ static void xlatRle8(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xlatRle4(BYTE FAR *pb, DWORD dwSize, BYTE FAR *xlat)
|
static void xlatRle4(BYTE FAR *WXUNUSED(pb), DWORD WXUNUSED(dwSize), BYTE FAR *WXUNUSED(xlat))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,7 +708,7 @@ HPALETTE wxMakePalette(const BITMAPINFO FAR* Info, UINT flags)
|
|||||||
HPALETTE hPalette;
|
HPALETTE hPalette;
|
||||||
const RGBQUAD FAR* rgb = Info->bmiColors;
|
const RGBQUAD FAR* rgb = Info->bmiColors;
|
||||||
|
|
||||||
WORD nColors = Info->bmiHeader.biClrUsed;
|
WORD nColors = (WORD)Info->bmiHeader.biClrUsed;
|
||||||
if (nColors) {
|
if (nColors) {
|
||||||
LOGPALETTE* logPal = (LOGPALETTE*)
|
LOGPALETTE* logPal = (LOGPALETTE*)
|
||||||
new BYTE[sizeof(LOGPALETTE) + (nColors-1)*sizeof(PALETTEENTRY)];
|
new BYTE[sizeof(LOGPALETTE) + (nColors-1)*sizeof(PALETTEENTRY)];
|
||||||
|
@@ -183,8 +183,8 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
|
|||||||
const wxString& description)
|
const wxString& description)
|
||||||
{
|
{
|
||||||
ScreenHDC hdcRef;
|
ScreenHDC hdcRef;
|
||||||
|
RECT rect;
|
||||||
RECT rect, *pRect;
|
RECT *pRect;
|
||||||
if ( width && height )
|
if ( width && height )
|
||||||
{
|
{
|
||||||
rect.top =
|
rect.top =
|
||||||
|
@@ -193,7 +193,7 @@ wxString wxFileSelectorEx(const wxChar *title,
|
|||||||
|
|
||||||
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||||
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard,
|
||||||
long style, const wxPoint& pos)
|
long style, const wxPoint& WXUNUSED(pos))
|
||||||
{
|
{
|
||||||
m_message = message;
|
m_message = message;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
|
@@ -290,42 +290,42 @@ bool wxNativeFontInfo::FromString(const wxString& s)
|
|||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfItalic = l;
|
lf.lfItalic = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfUnderline = l;
|
lf.lfUnderline = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfStrikeOut = l;
|
lf.lfStrikeOut = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfCharSet = l;
|
lf.lfCharSet = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfOutPrecision = l;
|
lf.lfOutPrecision = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfClipPrecision = l;
|
lf.lfClipPrecision = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfQuality = l;
|
lf.lfQuality = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
lf.lfPitchAndFamily = l;
|
lf.lfPitchAndFamily = (BYTE)l;
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if(!token)
|
if(!token)
|
||||||
@@ -450,7 +450,7 @@ bool wxFont::RealizeResource()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::FreeResource(bool force)
|
bool wxFont::FreeResource(bool WXUNUSED(force))
|
||||||
{
|
{
|
||||||
if ( GetResourceHandle() )
|
if ( GetResourceHandle() )
|
||||||
{
|
{
|
||||||
|
@@ -137,11 +137,11 @@ bool wxGauge95::Create(wxWindow *parent, wxWindowID id,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGauge95::SetShadowWidth(int w)
|
void wxGauge95::SetShadowWidth(int WXUNUSED(w))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGauge95::SetBezelFace(int w)
|
void wxGauge95::SetBezelFace(int WXUNUSED(w))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -391,7 +391,7 @@ bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap,
|
|||||||
|
|
||||||
bool wxICOFileHandler::LoadIcon(wxIcon *icon,
|
bool wxICOFileHandler::LoadIcon(wxIcon *icon,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
long flags,
|
long WXUNUSED(flags),
|
||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
#if wxUSE_RESOURCE_LOADING_IN_MSW
|
#if wxUSE_RESOURCE_LOADING_IN_MSW
|
||||||
@@ -475,7 +475,7 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon,
|
|||||||
|
|
||||||
bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
|
bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
long flags,
|
long WXUNUSED(flags),
|
||||||
int desiredWidth, int desiredHeight)
|
int desiredWidth, int desiredHeight)
|
||||||
{
|
{
|
||||||
HICON hicon;
|
HICON hicon;
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
|
# include "wx/defs.h"
|
||||||
# include "wx/setup.h"
|
# include "wx/setup.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
|
#include "wx/defs.h"
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ wxListBoxItem::wxListBoxItem(const wxString& str) : wxOwnerDrawn(str, FALSE)
|
|||||||
SetMarginWidth(0);
|
SetMarginWidth(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxOwnerDrawn *wxListBox::CreateItem(size_t n)
|
wxOwnerDrawn *wxListBox::CreateItem(size_t WXUNUSED(n))
|
||||||
{
|
{
|
||||||
return new wxListBoxItem();
|
return new wxListBoxItem();
|
||||||
}
|
}
|
||||||
|
@@ -730,7 +730,7 @@ bool wxListCtrl::SetItemState(long item, long state, long stateMask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item image
|
// Sets the item image
|
||||||
bool wxListCtrl::SetItemImage(long item, int image, int selImage)
|
bool wxListCtrl::SetItemImage(long item, int image, int WXUNUSED(selImage))
|
||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
|
|
||||||
@@ -1058,7 +1058,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// End label editing, optionally cancelling the edit
|
// End label editing, optionally cancelling the edit
|
||||||
bool wxListCtrl::EndEditLabel(bool cancel)
|
bool wxListCtrl::EndEditLabel(bool WXUNUSED(cancel))
|
||||||
{
|
{
|
||||||
wxFAIL;
|
wxFAIL;
|
||||||
|
|
||||||
@@ -1844,7 +1844,7 @@ void wxListItem::ClearAttributes()
|
|||||||
m_attr = NULL;
|
m_attr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& lvItem, HWND getFullInfo)
|
static void wxConvertFromMSWListItem(const wxListCtrl *WXUNUSED(ctrl), wxListItem& info, LV_ITEM& lvItem, HWND getFullInfo)
|
||||||
{
|
{
|
||||||
info.m_data = lvItem.lParam;
|
info.m_data = lvItem.lParam;
|
||||||
info.m_mask = 0;
|
info.m_mask = 0;
|
||||||
|
@@ -114,8 +114,11 @@ BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
|
|||||||
wxEntryCleanup();
|
wxEntryCleanup();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)hModule;
|
||||||
|
(void)fdwReason;
|
||||||
#endif // !WXMAKINGDLL
|
#endif // !WXMAKINGDLL
|
||||||
|
(void)lpReserved;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -654,7 +654,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
|||||||
|
|
||||||
bool wxFileTypeImpl::SetCommand(const wxString& cmd,
|
bool wxFileTypeImpl::SetCommand(const wxString& cmd,
|
||||||
const wxString& verb,
|
const wxString& verb,
|
||||||
bool overwriteprompt)
|
bool WXUNUSED(overwriteprompt))
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( !m_ext.IsEmpty() && !verb.IsEmpty(), FALSE,
|
wxCHECK_MSG( !m_ext.IsEmpty() && !verb.IsEmpty(), FALSE,
|
||||||
_T("SetCommand() needs an extension and a verb") );
|
_T("SetCommand() needs an extension and a verb") );
|
||||||
|
@@ -73,13 +73,7 @@ class wxIEnumFORMATETC : public IEnumFORMATETC
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxIEnumFORMATETC(const wxDataFormat* formats, ULONG nCount);
|
wxIEnumFORMATETC(const wxDataFormat* formats, ULONG nCount);
|
||||||
|
virtual ~wxIEnumFORMATETC() { delete [] m_formats; }
|
||||||
// to suppress the gcc warning about "class has virtual functions but non
|
|
||||||
// virtual dtor"
|
|
||||||
#ifdef __GNUG__
|
|
||||||
virtual
|
|
||||||
#endif
|
|
||||||
~wxIEnumFORMATETC() { delete [] m_formats; }
|
|
||||||
|
|
||||||
DECLARE_IUNKNOWN_METHODS;
|
DECLARE_IUNKNOWN_METHODS;
|
||||||
|
|
||||||
@@ -103,13 +97,7 @@ class wxIDataObject : public IDataObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxIDataObject(wxDataObject *pDataObject);
|
wxIDataObject(wxDataObject *pDataObject);
|
||||||
|
virtual ~wxIDataObject();
|
||||||
// to suppress the gcc warning about "class has virtual functions but non
|
|
||||||
// virtual dtor"
|
|
||||||
#ifdef __GNUG__
|
|
||||||
virtual
|
|
||||||
#endif
|
|
||||||
~wxIDataObject();
|
|
||||||
|
|
||||||
// normally, wxDataObject controls our lifetime (i.e. we're deleted when it
|
// normally, wxDataObject controls our lifetime (i.e. we're deleted when it
|
||||||
// is), but in some cases, the situation is inversed, that is we delete it
|
// is), but in some cases, the situation is inversed, that is we delete it
|
||||||
@@ -145,7 +133,7 @@ private:
|
|||||||
|
|
||||||
void wxDataFormat::SetId(const wxChar *format)
|
void wxDataFormat::SetId(const wxChar *format)
|
||||||
{
|
{
|
||||||
m_format = ::RegisterClipboardFormat(format);
|
m_format = (wxDataFormat::NativeFormat)::RegisterClipboardFormat(format);
|
||||||
if ( !m_format )
|
if ( !m_format )
|
||||||
{
|
{
|
||||||
wxLogError(_("Couldn't register clipboard format '%s'."), format);
|
wxLogError(_("Couldn't register clipboard format '%s'."), format);
|
||||||
@@ -196,7 +184,7 @@ wxIEnumFORMATETC::wxIEnumFORMATETC(const wxDataFormat *formats, ULONG nCount)
|
|||||||
|
|
||||||
STDMETHODIMP wxIEnumFORMATETC::Next(ULONG celt,
|
STDMETHODIMP wxIEnumFORMATETC::Next(ULONG celt,
|
||||||
FORMATETC *rgelt,
|
FORMATETC *rgelt,
|
||||||
ULONG *pceltFetched)
|
ULONG *WXUNUSED(pceltFetched))
|
||||||
{
|
{
|
||||||
wxLogTrace(wxTRACE_OleCalls, wxT("wxIEnumFORMATETC::Next"));
|
wxLogTrace(wxTRACE_OleCalls, wxT("wxIEnumFORMATETC::Next"));
|
||||||
|
|
||||||
@@ -611,7 +599,7 @@ STDMETHODIMP wxIDataObject::QueryGetData(FORMATETC *pformatetc)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *pFormatetcIn,
|
STDMETHODIMP wxIDataObject::GetCanonicalFormatEtc(FORMATETC *WXUNUSED(pFormatetcIn),
|
||||||
FORMATETC *pFormatetcOut)
|
FORMATETC *pFormatetcOut)
|
||||||
{
|
{
|
||||||
wxLogTrace(wxTRACE_OleCalls, wxT("wxIDataObject::GetCanonicalFormatEtc"));
|
wxLogTrace(wxTRACE_OleCalls, wxT("wxIDataObject::GetCanonicalFormatEtc"));
|
||||||
@@ -632,7 +620,8 @@ STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDir,
|
|||||||
: wxDataObject::Set;
|
: wxDataObject::Set;
|
||||||
|
|
||||||
size_t nFormatCount = m_pDataObject->GetFormatCount(dir);
|
size_t nFormatCount = m_pDataObject->GetFormatCount(dir);
|
||||||
wxDataFormat format, *formats;
|
wxDataFormat format;
|
||||||
|
wxDataFormat *formats;
|
||||||
formats = nFormatCount == 1 ? &format : new wxDataFormat[nFormatCount];
|
formats = nFormatCount == 1 ? &format : new wxDataFormat[nFormatCount];
|
||||||
m_pDataObject->GetAllFormats(formats, dir);
|
m_pDataObject->GetAllFormats(formats, dir);
|
||||||
|
|
||||||
@@ -651,20 +640,20 @@ STDMETHODIMP wxIDataObject::EnumFormatEtc(DWORD dwDir,
|
|||||||
// advise sink functions (not implemented)
|
// advise sink functions (not implemented)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
STDMETHODIMP wxIDataObject::DAdvise(FORMATETC *pformatetc,
|
STDMETHODIMP wxIDataObject::DAdvise(FORMATETC *WXUNUSED(pformatetc),
|
||||||
DWORD advf,
|
DWORD WXUNUSED(advf),
|
||||||
IAdviseSink *pAdvSink,
|
IAdviseSink *WXUNUSED(pAdvSink),
|
||||||
DWORD *pdwConnection)
|
DWORD *WXUNUSED(pdwConnection))
|
||||||
{
|
{
|
||||||
return OLE_E_ADVISENOTSUPPORTED;
|
return OLE_E_ADVISENOTSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP wxIDataObject::DUnadvise(DWORD dwConnection)
|
STDMETHODIMP wxIDataObject::DUnadvise(DWORD WXUNUSED(dwConnection))
|
||||||
{
|
{
|
||||||
return OLE_E_ADVISENOTSUPPORTED;
|
return OLE_E_ADVISENOTSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP wxIDataObject::EnumDAdvise(IEnumSTATDATA **ppenumAdvise)
|
STDMETHODIMP wxIDataObject::EnumDAdvise(IEnumSTATDATA **WXUNUSED(ppenumAdvise))
|
||||||
{
|
{
|
||||||
return OLE_E_ADVISENOTSUPPORTED;
|
return OLE_E_ADVISENOTSUPPORTED;
|
||||||
}
|
}
|
||||||
@@ -752,7 +741,7 @@ bool wxBitmapDataObject::GetDataHere(void *buf) const
|
|||||||
return wxConvertBitmapToDIB((LPBITMAPINFO)buf, GetBitmap()) != 0;
|
return wxConvertBitmapToDIB((LPBITMAPINFO)buf, GetBitmap()) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxBitmapDataObject::SetData(size_t len, const void *buf)
|
bool wxBitmapDataObject::SetData(size_t WXUNUSED(len), const void *buf)
|
||||||
{
|
{
|
||||||
wxBitmap bitmap(wxConvertDIBToBitmap((const LPBITMAPINFO)buf));
|
wxBitmap bitmap(wxConvertDIBToBitmap((const LPBITMAPINFO)buf));
|
||||||
|
|
||||||
@@ -1099,7 +1088,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap)
|
|||||||
// calculate the number of bits per pixel and the number of items in
|
// calculate the number of bits per pixel and the number of items in
|
||||||
// bmiColors array (whose meaning depends on the bitmap format)
|
// bmiColors array (whose meaning depends on the bitmap format)
|
||||||
WORD biBits = bm.bmPlanes * bm.bmBitsPixel;
|
WORD biBits = bm.bmPlanes * bm.bmBitsPixel;
|
||||||
WORD biColors = wxGetNumOfBitmapColors(biBits);
|
WORD biColors = (WORD)wxGetNumOfBitmapColors(biBits);
|
||||||
|
|
||||||
BITMAPINFO bi2;
|
BITMAPINFO bi2;
|
||||||
|
|
||||||
|
@@ -61,11 +61,7 @@ class wxIDropTarget : public IDropTarget
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxIDropTarget(wxDropTarget *p);
|
wxIDropTarget(wxDropTarget *p);
|
||||||
// suppress gcc warning
|
virtual ~wxIDropTarget();
|
||||||
#ifdef __GNUG__
|
|
||||||
virtual
|
|
||||||
#endif
|
|
||||||
~wxIDropTarget();
|
|
||||||
|
|
||||||
// accessors for wxDropTarget
|
// accessors for wxDropTarget
|
||||||
void SetHwnd(HWND hwnd) { m_hwnd = hwnd; }
|
void SetHwnd(HWND hwnd) { m_hwnd = hwnd; }
|
||||||
@@ -425,7 +421,8 @@ wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const
|
|||||||
|
|
||||||
// get the list of supported formats
|
// get the list of supported formats
|
||||||
size_t nFormats = m_dataObject->GetFormatCount(wxDataObject::Set);
|
size_t nFormats = m_dataObject->GetFormatCount(wxDataObject::Set);
|
||||||
wxDataFormat format, *formats;
|
wxDataFormat format;
|
||||||
|
wxDataFormat *formats;
|
||||||
formats = nFormats == 1 ? &format : new wxDataFormat[nFormats];
|
formats = nFormats == 1 ? &format : new wxDataFormat[nFormats];
|
||||||
|
|
||||||
m_dataObject->GetAllFormats(formats, wxDataObject::Set);
|
m_dataObject->GetAllFormats(formats, wxDataObject::Set);
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
// ctor
|
// ctor
|
||||||
// ----
|
// ----
|
||||||
wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
|
wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
|
||||||
bool bCheckable, bool bMenuItem)
|
bool bCheckable, bool WXUNUSED(bMenuItem))
|
||||||
: m_strName(str)
|
: m_strName(str)
|
||||||
{
|
{
|
||||||
m_bCheckable = bCheckable;
|
m_bCheckable = bCheckable;
|
||||||
|
@@ -62,7 +62,7 @@ wxPalette::~wxPalette(void)
|
|||||||
// FreeResource(TRUE);
|
// FreeResource(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::FreeResource(bool force)
|
bool wxPalette::FreeResource(bool WXUNUSED(force))
|
||||||
{
|
{
|
||||||
if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
|
if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
|
||||||
{
|
{
|
||||||
|
@@ -295,7 +295,7 @@ WXHANDLE wxPen::GetResourceHandle()
|
|||||||
return (WXHANDLE)M_PENDATA->m_hPen;
|
return (WXHANDLE)M_PENDATA->m_hPen;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPen::FreeResource(bool force)
|
bool wxPen::FreeResource(bool WXUNUSED(force))
|
||||||
{
|
{
|
||||||
if (M_PENDATA && (M_PENDATA->m_hPen != 0))
|
if (M_PENDATA && (M_PENDATA->m_hPen != 0))
|
||||||
{
|
{
|
||||||
|
@@ -87,9 +87,9 @@ wxWindowsPrinter::wxWindowsPrinter(wxPrintDialogData *data)
|
|||||||
|
|
||||||
wxWindowsPrinter::~wxWindowsPrinter()
|
wxWindowsPrinter::~wxWindowsPrinter()
|
||||||
{
|
{
|
||||||
// avoids mingw warning about statement with no effect (FreeProcInstance
|
// avoids warning about statement with no effect (FreeProcInstance
|
||||||
// doesn't do anything under Win32)
|
// doesn't do anything under Win32)
|
||||||
#ifndef __GNUWIN32__
|
#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
|
||||||
FreeProcInstance((FARPROC) m_lpAbortProc);
|
FreeProcInstance((FARPROC) m_lpAbortProc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -329,7 +329,7 @@ void wxRadioBox::SetLabel(int item, const wxString& label)
|
|||||||
SetWindowText((HWND)m_radioButtons[item], label.c_str());
|
SetWindowText((HWND)m_radioButtons[item], label.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetLabel(int item, wxBitmap *bitmap)
|
void wxRadioBox::SetLabel(int WXUNUSED(item), wxBitmap *WXUNUSED(bitmap))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
m_radioWidth[item] = bitmap->GetWidth() + FB_MARGIN;
|
m_radioWidth[item] = bitmap->GetWidth() + FB_MARGIN;
|
||||||
@@ -836,10 +836,10 @@ long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
|
||||||
// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
|
// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
|
||||||
|
|
||||||
bool wxRadioButton::MSWCommand(WXUINT param, WXWORD id)
|
bool wxRadioButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||||
{
|
{
|
||||||
if (param == BN_CLICKED)
|
if (param == BN_CLICKED)
|
||||||
{
|
{
|
||||||
@@ -172,10 +172,10 @@ void wxRadioButton::Command (wxCommandEvent & event)
|
|||||||
ProcessCommand (event);
|
ProcessCommand (event);
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
|
@@ -464,7 +464,7 @@ bool wxRegConfig::GetNextEntry(wxString& str, long& lIndex) const
|
|||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxRegConfig::GetNumberOfEntries(bool bRecursive) const
|
size_t wxRegConfig::GetNumberOfEntries(bool WXUNUSED(bRecursive)) const
|
||||||
{
|
{
|
||||||
size_t nEntries = 0;
|
size_t nEntries = 0;
|
||||||
|
|
||||||
@@ -481,7 +481,7 @@ size_t wxRegConfig::GetNumberOfEntries(bool bRecursive) const
|
|||||||
return nEntries;
|
return nEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxRegConfig::GetNumberOfGroups(bool bRecursive) const
|
size_t wxRegConfig::GetNumberOfGroups(bool WXUNUSED(bRecursive)) const
|
||||||
{
|
{
|
||||||
size_t nGroups = 0;
|
size_t nGroups = 0;
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@ bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// deleting
|
// deleting
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso)
|
bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmptyAlso))
|
||||||
{
|
{
|
||||||
wxConfigPathChanger path(this, value);
|
wxConfigPathChanger path(this, value);
|
||||||
|
|
||||||
|
@@ -326,8 +326,8 @@ void wxScrollBar::GetValues(int *viewStart, int *viewLength, int *objectLength,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WXHBRUSH wxScrollBar::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxScrollBar::OnCtlColor(WXHDC WXUNUSED(pDC), WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
WXUINT WXUNUSED(message), WXWPARAM WXUNUSED(wParam), WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -192,7 +192,7 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
|
|||||||
(LPARAM) MAKELONG((short)maxVal, (short)minVal));
|
(LPARAM) MAKELONG((short)maxVal, (short)minVal));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSpinButton::MSWOnScroll(int orientation, WXWORD wParam,
|
bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||||
WXWORD pos, WXHWND control)
|
WXWORD pos, WXHWND control)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( control, FALSE, wxT("scrolling what?") )
|
wxCHECK_MSG( control, FALSE, wxT("scrolling what?") )
|
||||||
@@ -210,7 +210,7 @@ bool wxSpinButton::MSWOnScroll(int orientation, WXWORD wParam,
|
|||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result)
|
||||||
{
|
{
|
||||||
#ifndef __GNUWIN32__
|
#ifndef __GNUWIN32__
|
||||||
#if defined(__BORLANDC__) || defined(__WATCOMC__)
|
#if defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||||
@@ -240,7 +240,7 @@ bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id)
|
bool wxSpinButton::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD WXUNUSED(id))
|
||||||
{
|
{
|
||||||
// No command messages
|
// No command messages
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -197,7 +197,7 @@ void wxStatusBar95::SetFieldsCount(int nFields, const int *widths)
|
|||||||
SetFieldsWidth();
|
SetFieldsWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBar95::SetStatusWidths(int n, const int widths[])
|
void wxStatusBar95::SetStatusWidths(int WXUNUSED(n), const int widths[])
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( n == m_nFields, _T("field number mismatch") );
|
wxASSERT_MSG( n == m_nFields, _T("field number mismatch") );
|
||||||
|
|
||||||
|
@@ -717,7 +717,7 @@ bool wxToolBar::Realize()
|
|||||||
// message handlers
|
// message handlers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxToolBar::MSWCommand(WXUINT cmd, WXWORD id)
|
bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
|
||||||
{
|
{
|
||||||
wxToolBarToolBase *tool = FindById((int)id);
|
wxToolBarToolBase *tool = FindById((int)id);
|
||||||
if ( !tool )
|
if ( !tool )
|
||||||
@@ -747,7 +747,7 @@ bool wxToolBar::MSWCommand(WXUINT cmd, WXWORD id)
|
|||||||
|
|
||||||
bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
|
bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
|
||||||
WXLPARAM lParam,
|
WXLPARAM lParam,
|
||||||
WXLPARAM *result)
|
WXLPARAM *WXUNUSED(result))
|
||||||
{
|
{
|
||||||
// First check if this applies to us
|
// First check if this applies to us
|
||||||
NMHDR *hdr = (NMHDR *)lParam;
|
NMHDR *hdr = (NMHDR *)lParam;
|
||||||
@@ -912,7 +912,7 @@ void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle)
|
|||||||
(WPARAM)tool->GetId(), (LPARAM)MAKELONG(toggle, 0));
|
(WPARAM)tool->GetId(), (LPARAM)MAKELONG(toggle, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::DoSetToggle(wxToolBarToolBase *tool, bool toggle)
|
void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle))
|
||||||
{
|
{
|
||||||
// VZ: AFAIK, the button has to be created either with TBSTYLE_CHECK or
|
// VZ: AFAIK, the button has to be created either with TBSTYLE_CHECK or
|
||||||
// without, so we really need to delete the button and recreate it here
|
// without, so we really need to delete the button and recreate it here
|
||||||
@@ -1155,3 +1155,4 @@ m_hBitmap = (WXHBITMAP) newBitmap;
|
|||||||
|
|
||||||
|
|
||||||
#endif // wxUSE_TOOLBAR && Win95
|
#endif // wxUSE_TOOLBAR && Win95
|
||||||
|
|
||||||
|
@@ -827,7 +827,7 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
|||||||
wxString str;
|
wxString str;
|
||||||
wxChar *buf = str.GetWriteBuf(len);
|
wxChar *buf = str.GetWriteBuf(len);
|
||||||
|
|
||||||
*(WORD *)buf = len;
|
*(WORD *)buf = (WORD)len;
|
||||||
len = (size_t)::SendMessage(GetHwnd(), EM_GETLINE, lineNo, (LPARAM)buf);
|
len = (size_t)::SendMessage(GetHwnd(), EM_GETLINE, lineNo, (LPARAM)buf);
|
||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
|
|
||||||
@@ -967,10 +967,10 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
if ( m_useCtl3D )
|
if ( m_useCtl3D )
|
||||||
|
@@ -369,7 +369,7 @@ public:
|
|||||||
DoTraverse(root, recursively);
|
DoTraverse(root, recursively);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool OnVisit(const wxTreeItemId& item)
|
virtual bool OnVisit(const wxTreeItemId& WXUNUSED(item))
|
||||||
{
|
{
|
||||||
m_count++;
|
m_count++;
|
||||||
|
|
||||||
@@ -1643,7 +1643,7 @@ wxTextCtrl* wxTreeCtrl::EditLabel(const wxTreeItemId& item,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// End label editing, optionally cancelling the edit
|
// End label editing, optionally cancelling the edit
|
||||||
void wxTreeCtrl::EndEditLabel(const wxTreeItemId& item, bool discardChanges)
|
void wxTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), bool discardChanges)
|
||||||
{
|
{
|
||||||
TreeView_EndEditLabelNow(GetHwnd(), discardChanges);
|
TreeView_EndEditLabelNow(GetHwnd(), discardChanges);
|
||||||
|
|
||||||
@@ -2344,7 +2344,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
case TVN_GETDISPINFO:
|
case TVN_GETDISPINFO:
|
||||||
// NB: so far the user can't set the image himself anyhow, so do it
|
// NB: so far the user can't set the image himself anyhow, so do it
|
||||||
// anyway - but this may change later
|
// anyway - but this may change later
|
||||||
if ( /* !processed && */ 1 )
|
// if ( /* !processed && */ 1 )
|
||||||
{
|
{
|
||||||
wxTreeItemId item = event.m_item;
|
wxTreeItemId item = event.m_item;
|
||||||
TV_DISPINFO *info = (TV_DISPINFO *)lParam;
|
TV_DISPINFO *info = (TV_DISPINFO *)lParam;
|
||||||
|
@@ -423,7 +423,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
|
|||||||
return strDir.c_str();
|
return strDir.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxChar *wxGetUserHome(const wxString& user)
|
wxChar *wxGetUserHome(const wxString& WXUNUSED(user))
|
||||||
{
|
{
|
||||||
// VZ: the old code here never worked for user != "" anyhow! Moreover, it
|
// VZ: the old code here never worked for user != "" anyhow! Moreover, it
|
||||||
// returned sometimes a malloc()'d pointer, sometimes a pointer to a
|
// returned sometimes a malloc()'d pointer, sometimes a pointer to a
|
||||||
@@ -502,7 +502,7 @@ bool wxSetEnv(const wxString& var, const wxChar *value)
|
|||||||
// process management
|
// process management
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
int wxKill(long pid, int sig)
|
int wxKill(long WXUNUSED(pid), int WXUNUSED(sig))
|
||||||
{
|
{
|
||||||
// TODO use SendMessage(WM_QUIT) and TerminateProcess() if needed
|
// TODO use SendMessage(WM_QUIT) and TerminateProcess() if needed
|
||||||
|
|
||||||
@@ -1105,9 +1105,9 @@ wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
|
|||||||
WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
|
WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
|
||||||
{
|
{
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
return GetWindowWord((HWND)hWnd, GWW_ID);
|
return (WXWORD)GetWindowWord((HWND)hWnd, GWW_ID);
|
||||||
#else // Win32
|
#else // Win32
|
||||||
return GetWindowLong((HWND)hWnd, GWL_ID);
|
return (WXWORD)GetWindowLong((HWND)hWnd, GWL_ID);
|
||||||
#endif // Win16/32
|
#endif // Win16/32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -421,9 +421,9 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler)
|
|||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
// the first elements are reading ends, the second are the writing ones
|
// the first elements are reading ends, the second are the writing ones
|
||||||
HANDLE hpipeStdin[2],
|
HANDLE hpipeStdin[2],
|
||||||
hpipeStdinWrite = INVALID_HANDLE_VALUE,
|
|
||||||
hpipeStdout[2],
|
hpipeStdout[2],
|
||||||
hpipeStderr[2];
|
hpipeStderr[2];
|
||||||
|
HANDLE hpipeStdinWrite = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
// open the pipes to which child process IO will be redirected if needed
|
// open the pipes to which child process IO will be redirected if needed
|
||||||
if ( handler && handler->IsRedirected() )
|
if ( handler && handler->IsRedirected() )
|
||||||
|
@@ -167,7 +167,7 @@ END_EVENT_TABLE()
|
|||||||
// Find an item given the MS Windows id
|
// Find an item given the MS Windows id
|
||||||
wxWindow *wxWindow::FindItem(long id) const
|
wxWindow *wxWindow::FindItem(long id) const
|
||||||
{
|
{
|
||||||
wxControl *item = wxDynamicCast(this, wxControl);
|
wxControl *item = wxDynamicThisCast(this, wxControl);
|
||||||
if ( item )
|
if ( item )
|
||||||
{
|
{
|
||||||
// i it we or one of our "internal" children?
|
// i it we or one of our "internal" children?
|
||||||
@@ -976,7 +976,7 @@ void wxWindow::SetupColours()
|
|||||||
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::OnIdle(wxIdleEvent& event)
|
void wxWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Check if we need to send a LEAVE event
|
// Check if we need to send a LEAVE event
|
||||||
if ( m_mouseInWindow )
|
if ( m_mouseInWindow )
|
||||||
@@ -1014,7 +1014,7 @@ void wxWindow::OnIdle(wxIdleEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set this window to be the child of 'parent'.
|
// Set this window to be the child of 'parent'.
|
||||||
bool wxWindow::Reparent(wxWindow *parent)
|
bool wxWindow::Reparent(wxWindowBase *parent)
|
||||||
{
|
{
|
||||||
if ( !wxWindowBase::Reparent(parent) )
|
if ( !wxWindowBase::Reparent(parent) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1580,7 +1580,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxPanel *panel = wxDynamicCast(this, wxPanel);
|
wxPanel *panel = wxDynamicThisCast(this, wxPanel);
|
||||||
wxButton *btn = NULL;
|
wxButton *btn = NULL;
|
||||||
if ( panel )
|
if ( panel )
|
||||||
{
|
{
|
||||||
@@ -2228,7 +2228,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
// Dialog window proc
|
// Dialog window proc
|
||||||
LONG APIENTRY _EXPORT
|
LONG APIENTRY _EXPORT
|
||||||
wxDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
wxDlgProc(HWND WXUNUSED(hWnd), UINT message, WPARAM WXUNUSED(wParam), LPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
if ( message == WM_INITDIALOG )
|
if ( message == WM_INITDIALOG )
|
||||||
{
|
{
|
||||||
@@ -2333,7 +2333,7 @@ void wxWindow::MSWDetachWindowMenu()
|
|||||||
bool wxWindow::MSWCreate(int id,
|
bool wxWindow::MSWCreate(int id,
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
const wxChar *wclass,
|
const wxChar *wclass,
|
||||||
wxWindow *wx_win,
|
wxWindow *WXUNUSED(wx_win),
|
||||||
const wxChar *title,
|
const wxChar *title,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -2619,7 +2619,7 @@ bool wxWindow::HandleEndSession(bool endSession, long logOff)
|
|||||||
// window creation/destruction
|
// window creation/destruction
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxWindow::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
|
bool wxWindow::HandleCreate(WXLPCREATESTRUCT WXUNUSED(cs), bool *mayCreate)
|
||||||
{
|
{
|
||||||
// TODO: should generate this event from WM_NCCREATE
|
// TODO: should generate this event from WM_NCCREATE
|
||||||
wxWindowCreateEvent event(this);
|
wxWindowCreateEvent event(this);
|
||||||
@@ -2729,7 +2729,7 @@ bool wxWindow::HandleKillFocus(WXHWND WXUNUSED(hwnd))
|
|||||||
// miscellaneous
|
// miscellaneous
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxWindow::HandleShow(bool show, int status)
|
bool wxWindow::HandleShow(bool show, int WXUNUSED(status))
|
||||||
{
|
{
|
||||||
wxShowEvent event(GetId(), show);
|
wxShowEvent event(GetId(), show);
|
||||||
event.m_eventObject = this;
|
event.m_eventObject = this;
|
||||||
@@ -2780,7 +2780,7 @@ bool wxWindow::HandleDropFiles(WXWPARAM wParam)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::HandleSetCursor(WXHWND hWnd,
|
bool wxWindow::HandleSetCursor(WXHWND WXUNUSED(hWnd),
|
||||||
short nHitTest,
|
short nHitTest,
|
||||||
int WXUNUSED(mouseMsg))
|
int WXUNUSED(mouseMsg))
|
||||||
{
|
{
|
||||||
@@ -2969,12 +2969,12 @@ bool wxWindow::HandleCtlColor(WXHBRUSH *brush,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define for each class of dialog and control
|
// Define for each class of dialog and control
|
||||||
WXHBRUSH wxWindow::OnCtlColor(WXHDC hDC,
|
WXHBRUSH wxWindow::OnCtlColor(WXHDC WXUNUSED(hDC),
|
||||||
WXHWND hWnd,
|
WXHWND WXUNUSED(hWnd),
|
||||||
WXUINT nCtlColor,
|
WXUINT WXUNUSED(nCtlColor),
|
||||||
WXUINT message,
|
WXUINT WXUNUSED(message),
|
||||||
WXWPARAM wParam,
|
WXWPARAM WXUNUSED(wParam),
|
||||||
WXLPARAM lParam)
|
WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
return (WXHBRUSH)0;
|
return (WXHBRUSH)0;
|
||||||
}
|
}
|
||||||
@@ -3250,7 +3250,7 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::HandleSysCommand(WXWPARAM wParam, WXLPARAM lParam)
|
bool wxWindow::HandleSysCommand(WXWPARAM wParam, WXLPARAM WXUNUSED(lParam))
|
||||||
{
|
{
|
||||||
// 4 bits are reserved
|
// 4 bits are reserved
|
||||||
switch ( wParam & 0xFFFFFFF0 )
|
switch ( wParam & 0xFFFFFFF0 )
|
||||||
@@ -3383,7 +3383,7 @@ wxKeyEvent wxWindow::CreateKeyEvent(wxEventType evType,
|
|||||||
|
|
||||||
// isASCII is TRUE only when we're called from WM_CHAR handler and not from
|
// isASCII is TRUE only when we're called from WM_CHAR handler and not from
|
||||||
// WM_KEYDOWN one
|
// WM_KEYDOWN one
|
||||||
bool wxWindow::HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII)
|
bool wxWindow::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
||||||
{
|
{
|
||||||
bool ctrlDown = FALSE;
|
bool ctrlDown = FALSE;
|
||||||
|
|
||||||
@@ -3436,7 +3436,7 @@ bool wxWindow::HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::HandleKeyDown(WXWORD wParam, WXLPARAM lParam)
|
bool wxWindow::HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
int id = wxCharCodeMSWToWX(wParam);
|
int id = wxCharCodeMSWToWX(wParam);
|
||||||
|
|
||||||
@@ -3458,7 +3458,7 @@ bool wxWindow::HandleKeyDown(WXWORD wParam, WXLPARAM lParam)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::HandleKeyUp(WXWORD wParam, WXLPARAM lParam)
|
bool wxWindow::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
int id = wxCharCodeMSWToWX(wParam);
|
int id = wxCharCodeMSWToWX(wParam);
|
||||||
|
|
||||||
@@ -3916,9 +3916,9 @@ void wxSetKeyboardHook(bool doIt)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
UnhookWindowsHookEx(wxTheKeyboardHook);
|
UnhookWindowsHookEx(wxTheKeyboardHook);
|
||||||
// avoids mingw warning about statement with no effect (FreeProcInstance
|
// avoids warning about statement with no effect (FreeProcInstance
|
||||||
// doesn't do anything under Win32)
|
// doesn't do anything under Win32)
|
||||||
#ifndef __GNUC__
|
#if !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32__) && !defined(__NT__) && !defined(__GNUWIN32__)
|
||||||
FreeProcInstance(wxTheKeyboardHookProc);
|
FreeProcInstance(wxTheKeyboardHookProc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -4439,7 +4439,7 @@ static TEXTMETRIC wxGetTextMetrics(const wxWindow *win)
|
|||||||
|
|
||||||
// Find the wxWindow at the current mouse position, returning the mouse
|
// Find the wxWindow at the current mouse position, returning the mouse
|
||||||
// position.
|
// position.
|
||||||
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
|
wxWindow* wxFindWindowAtPointer(wxPoint& WXUNUSED(pt))
|
||||||
{
|
{
|
||||||
return wxFindWindowAtPoint(wxGetMousePosition());
|
return wxFindWindowAtPoint(wxGetMousePosition());
|
||||||
}
|
}
|
||||||
|
@@ -88,8 +88,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
|
|||||||
|
|
||||||
bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap,
|
bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
long flags,
|
long WXUNUSED(flags),
|
||||||
int desiredWidth, int desiredHeight)
|
int WXUNUSED(desiredWidth),
|
||||||
|
int WXUNUSED(desiredHeight))
|
||||||
{
|
{
|
||||||
#if wxUSE_XPM_IN_MSW
|
#if wxUSE_XPM_IN_MSW
|
||||||
XImage *ximage = NULL;
|
XImage *ximage = NULL;
|
||||||
@@ -131,8 +132,8 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap,
|
|||||||
|
|
||||||
bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap,
|
bool wxXPMFileHandler::SaveFile(wxBitmap *bitmap,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
int type,
|
int WXUNUSED(type),
|
||||||
const wxPalette *palette)
|
const wxPalette *WXUNUSED(palette))
|
||||||
{
|
{
|
||||||
#if wxUSE_XPM_IN_MSW
|
#if wxUSE_XPM_IN_MSW
|
||||||
XImage ximage;
|
XImage ximage;
|
||||||
@@ -184,10 +185,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler)
|
|||||||
|
|
||||||
bool wxXPMDataHandler::Create(wxBitmap *bitmap,
|
bool wxXPMDataHandler::Create(wxBitmap *bitmap,
|
||||||
void *data,
|
void *data,
|
||||||
long flags,
|
long WXUNUSED(flags),
|
||||||
int width,
|
int WXUNUSED(width),
|
||||||
int height,
|
int WXUNUSED(height),
|
||||||
int depth)
|
int WXUNUSED(depth))
|
||||||
{
|
{
|
||||||
#if wxUSE_XPM_IN_MSW
|
#if wxUSE_XPM_IN_MSW
|
||||||
XImage *ximage = NULL;
|
XImage *ximage = NULL;
|
||||||
|
@@ -221,20 +221,15 @@ typedef struct {
|
|||||||
long closeness;
|
long closeness;
|
||||||
} CloseColor;
|
} CloseColor;
|
||||||
|
|
||||||
#ifdef __OS2__
|
#ifndef FOR_MSW
|
||||||
/* Visual Age cannot deal with old, non-ansi, code */
|
|
||||||
static int closeness_cmp(Const void* a, Const void* b)
|
static int closeness_cmp(Const void* a, Const void* b)
|
||||||
#else
|
|
||||||
static int
|
|
||||||
closeness_cmp(a, b)
|
|
||||||
Const void *a, *b;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
|
CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
|
||||||
|
|
||||||
/* cast to int as qsort requires */
|
/* cast to int as qsort requires */
|
||||||
return (int) (x->closeness - y->closeness);
|
return (int) (x->closeness - y->closeness);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* default AllocColor function:
|
/* default AllocColor function:
|
||||||
|
@@ -33,12 +33,6 @@
|
|||||||
\*****************************************************************************/
|
\*****************************************************************************/
|
||||||
|
|
||||||
#ifndef CXPMPROG
|
#ifndef CXPMPROG
|
||||||
/* Official version number */
|
|
||||||
static char *RCS_Version = "$XpmVersion: 3.4k $";
|
|
||||||
|
|
||||||
/* Internal version number */
|
|
||||||
static char *RCS_Id = "$Id$";
|
|
||||||
|
|
||||||
#include "XpmI.h"
|
#include "XpmI.h"
|
||||||
#endif
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
Reference in New Issue
Block a user