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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: treelay.h
|
// Name: treelay.h
|
||||||
// Purpose: wxTreeLayout class
|
// Purpose: wxTreeLayout class
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 7/4/98
|
// Created: 7/4/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Julian Smart
|
// Copyright: (c) 1998 Julian Smart
|
||||||
@@ -24,7 +24,7 @@ class WXDLLEXPORT wxTreeLayout: public wxObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
wxTreeLayout();
|
wxTreeLayout();
|
||||||
|
|
||||||
// Redefine these
|
// Redefine these
|
||||||
virtual void GetChildren(long id, wxList& list) = 0;
|
virtual void GetChildren(long id, wxList& list) = 0;
|
||||||
virtual long GetNextNode(long id) = 0;
|
virtual long GetNextNode(long id) = 0;
|
||||||
@@ -35,21 +35,21 @@ public:
|
|||||||
virtual void SetNodeY(long id, long y) = 0;
|
virtual void SetNodeY(long id, long y) = 0;
|
||||||
virtual void ActivateNode(long id, bool active) = 0;
|
virtual void ActivateNode(long id, bool active) = 0;
|
||||||
virtual bool NodeActive(long id) = 0;
|
virtual bool NodeActive(long id) = 0;
|
||||||
|
|
||||||
// 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);
|
||||||
virtual void DrawBranches(wxDC& dc);
|
virtual void DrawBranches(wxDC& dc);
|
||||||
virtual void DrawNode(long id, wxDC& dc);
|
virtual void DrawNode(long id, wxDC& dc);
|
||||||
virtual void DrawBranch(long from, long to, wxDC& dc);
|
virtual void DrawBranch(long from, long to, wxDC& dc);
|
||||||
|
|
||||||
// Don't redefine
|
// Don't redefine
|
||||||
virtual void DoLayout(wxDC& dc, long topNode = -1);
|
virtual void DoLayout(wxDC& dc, long topNode = -1);
|
||||||
|
|
||||||
// Accessors -- don't redefine
|
// Accessors -- don't redefine
|
||||||
inline void SetTopNode(long id) { m_parentNode = id; }
|
inline void SetTopNode(long id) { m_parentNode = id; }
|
||||||
inline long GetTopNode(void) const { return m_parentNode; }
|
inline long GetTopNode(void) const { return m_parentNode; }
|
||||||
@@ -59,15 +59,15 @@ public:
|
|||||||
inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; }
|
inline void SetMargins(long x, long y) { m_leftMargin = x; m_topMargin = y; }
|
||||||
inline long GetTopMargin(void) const { return m_topMargin; }
|
inline long GetTopMargin(void) const { return m_topMargin; }
|
||||||
inline long GetLeftMargin(void) const { return m_leftMargin; }
|
inline long GetLeftMargin(void) const { return m_leftMargin; }
|
||||||
|
|
||||||
inline bool GetOrientation(void) const { return m_orientation; }
|
inline bool GetOrientation(void) const { return m_orientation; }
|
||||||
inline void SetOrientation(bool orient) { m_orientation = orient; }
|
inline void SetOrientation(bool orient) { m_orientation = orient; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CalcLayout(long node_id, int level, wxDC& dc);
|
void CalcLayout(long node_id, int level, wxDC& dc);
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long m_parentNode;
|
long m_parentNode;
|
||||||
long m_lastY;
|
long m_lastY;
|
||||||
@@ -100,12 +100,12 @@ public:
|
|||||||
wxTreeLayoutStored(int noNodes = 200);
|
wxTreeLayoutStored(int noNodes = 200);
|
||||||
~wxTreeLayoutStored(void);
|
~wxTreeLayoutStored(void);
|
||||||
void Initialize(int n);
|
void Initialize(int n);
|
||||||
|
|
||||||
wxString HitTest(wxMouseEvent& event, wxDC& dc);
|
wxString HitTest(wxMouseEvent& event, wxDC& dc);
|
||||||
wxStoredNode* GetNode(long id) const;
|
wxStoredNode* GetNode(long id) const;
|
||||||
inline int GetNumNodes() const { return m_maxNodes; };
|
inline int GetNumNodes() const { return m_maxNodes; };
|
||||||
inline int GetNodeCount() const { return m_num; };
|
inline int GetNodeCount() const { return m_num; };
|
||||||
|
|
||||||
virtual void GetChildren(long id, wxList& list);
|
virtual void GetChildren(long id, wxList& list);
|
||||||
virtual long GetNextNode(long id);
|
virtual long GetNextNode(long id);
|
||||||
virtual long GetNodeParent(long id);
|
virtual long GetNodeParent(long id);
|
||||||
@@ -119,10 +119,10 @@ public:
|
|||||||
virtual bool NodeActive(long id);
|
virtual bool NodeActive(long id);
|
||||||
virtual void SetClientData(long id, long clientData);
|
virtual void SetClientData(long id, long clientData);
|
||||||
virtual long GetClientData(long id) const;
|
virtual long GetClientData(long id) const;
|
||||||
|
|
||||||
virtual long AddChild(const wxString& name, const wxString& parent = "");
|
virtual long AddChild(const wxString& name, const wxString& parent = "");
|
||||||
virtual long NameToId(const wxString& name);
|
virtual long NameToId(const wxString& name);
|
||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
private:
|
private:
|
||||||
wxStoredNode* m_nodes;
|
wxStoredNode* m_nodes;
|
||||||
@@ -135,4 +135,4 @@ private:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_TREELAY_H_
|
// _WX_TREELAY_H_
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
* Project: GSocket (Generic Socket)
|
* Project: GSocket (Generic Socket)
|
||||||
* Name: gsocket.h
|
* Name: gsocket.h
|
||||||
* Author: Guilhem Lavaux
|
* Author: Guilhem Lavaux
|
||||||
* Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
|
* Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
|
||||||
* Purpose: GSocket include file (system independent)
|
* Purpose: GSocket include file (system independent)
|
||||||
* CVSID: $Id$
|
* CVSID: $Id$
|
||||||
@@ -126,11 +126,11 @@ GAddress *GSocket_GetPeer(GSocket *socket);
|
|||||||
* Sets up this socket as a server. The local address must have been
|
* Sets up this socket as a server. The local address must have been
|
||||||
* set with GSocket_SetLocal() before GSocket_SetServer() is called.
|
* set with GSocket_SetLocal() before GSocket_SetServer() is called.
|
||||||
* Returns GSOCK_NOERROR on success, one of the following otherwise:
|
* Returns GSOCK_NOERROR on success, one of the following otherwise:
|
||||||
*
|
*
|
||||||
* Error codes:
|
* Error codes:
|
||||||
* GSOCK_INVSOCK - the socket is in use.
|
* GSOCK_INVSOCK - the socket is in use.
|
||||||
* GSOCK_INVADDR - the local address has not been set.
|
* GSOCK_INVADDR - the local address has not been set.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_SetServer(GSocket *socket);
|
GSocketError GSocket_SetServer(GSocket *socket);
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ GSocketError GSocket_SetServer(GSocket *socket);
|
|||||||
* GSOCK_TIMEDOUT - timeout, no incoming connections.
|
* GSOCK_TIMEDOUT - timeout, no incoming connections.
|
||||||
* GSOCK_WOULDBLOCK - the call would block and the socket is nonblocking.
|
* GSOCK_WOULDBLOCK - the call would block and the socket is nonblocking.
|
||||||
* GSOCK_MEMERR - couldn't allocate memory.
|
* GSOCK_MEMERR - couldn't allocate memory.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocket *GSocket_WaitConnection(GSocket *socket);
|
GSocket *GSocket_WaitConnection(GSocket *socket);
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ GSocket *GSocket_WaitConnection(GSocket *socket);
|
|||||||
* GSOCK_TIMEDOUT - timeout, the connection failed.
|
* GSOCK_TIMEDOUT - timeout, the connection failed.
|
||||||
* GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
|
* GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
|
||||||
* GSOCK_MEMERR - couldn't allocate memory.
|
* GSOCK_MEMERR - couldn't allocate memory.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
|
GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
|
|||||||
* Error codes:
|
* Error codes:
|
||||||
* GSOCK_INVSOCK - the socket is in use.
|
* GSOCK_INVSOCK - the socket is in use.
|
||||||
* GSOCK_INVADDR - the local address has not been set.
|
* GSOCK_INVADDR - the local address has not been set.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_SetNonOriented(GSocket *socket);
|
GSocketError GSocket_SetNonOriented(GSocket *socket);
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ GSocketError GSocket_GetError(GSocket *socket);
|
|||||||
* operation, there is still data available, the callback function will
|
* operation, there is still data available, the callback function will
|
||||||
* be called again.
|
* be called again.
|
||||||
* GSOCK_OUTPUT:
|
* GSOCK_OUTPUT:
|
||||||
* The socket is available for writing. That is, the next write call
|
* The socket is available for writing. That is, the next write call
|
||||||
* won't block. This event is generated only once, when the connection is
|
* won't block. This event is generated only once, when the connection is
|
||||||
* first established, and then only if a call failed with GSOCK_WOULDBLOCK,
|
* first established, and then only if a call failed with GSOCK_WOULDBLOCK,
|
||||||
* when the output buffer empties again. This means that the app should
|
* when the output buffer empties again. This means that the app should
|
||||||
|
@@ -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,
|
||||||
|
@@ -181,7 +181,7 @@ wxPrintData::wxPrintData()
|
|||||||
m_macPrintSettings = kPMNoPrintSettings;
|
m_macPrintSettings = kPMNoPrintSettings;
|
||||||
#else
|
#else
|
||||||
m_macPrintInfo = (THPrint) NewHandleClear( sizeof( TPrint ) ) ;
|
m_macPrintInfo = (THPrint) NewHandleClear( sizeof( TPrint ) ) ;
|
||||||
(**m_macPrintInfo).iPrVersion = 0; // something invalid
|
(**m_macPrintInfo).iPrVersion = 0; // something invalid
|
||||||
|
|
||||||
(**m_macPrintInfo).prInfo.iHRes = 72;
|
(**m_macPrintInfo).prInfo.iHRes = 72;
|
||||||
(**m_macPrintInfo).prInfo.iVRes = 72;
|
(**m_macPrintInfo).prInfo.iVRes = 72;
|
||||||
@@ -190,8 +190,8 @@ wxPrintData::wxPrintData()
|
|||||||
|
|
||||||
Rect r2 = { -18, -36, 8*72 - 18, 11*72 - 36 } ;
|
Rect r2 = { -18, -36, 8*72 - 18, 11*72 - 36 } ;
|
||||||
(**m_macPrintInfo).rPaper = r2;
|
(**m_macPrintInfo).rPaper = r2;
|
||||||
(**m_macPrintInfo).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
|
(**m_macPrintInfo).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
|
||||||
(**m_macPrintInfo).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
|
(**m_macPrintInfo).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
m_printOrientation = wxPORTRAIT;
|
m_printOrientation = wxPORTRAIT;
|
||||||
@@ -259,7 +259,7 @@ wxPrintData::~wxPrintData()
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
wxASSERT( m_macPrintInfo ) ;
|
wxASSERT( m_macPrintInfo ) ;
|
||||||
// we should perhaps delete
|
// we should perhaps delete
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -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 ;
|
||||||
|
|
||||||
|
@@ -167,7 +167,7 @@ bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
m_contextHelp->EndContextHelp();
|
m_contextHelp->EndContextHelp();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event.GetEventType() == wxEVT_CHAR) ||
|
if ((event.GetEventType() == wxEVT_CHAR) ||
|
||||||
(event.GetEventType() == wxEVT_KEY_DOWN) ||
|
(event.GetEventType() == wxEVT_KEY_DOWN) ||
|
||||||
(event.GetEventType() == wxEVT_ACTIVATE) ||
|
(event.GetEventType() == wxEVT_ACTIVATE) ||
|
||||||
@@ -177,14 +177,14 @@ bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
|
|||||||
m_contextHelp->EndContextHelp();
|
m_contextHelp->EndContextHelp();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event.GetEventType() == wxEVT_PAINT) ||
|
if ((event.GetEventType() == wxEVT_PAINT) ||
|
||||||
(event.GetEventType() == wxEVT_ERASE_BACKGROUND))
|
(event.GetEventType() == wxEVT_ERASE_BACKGROUND))
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
|||||||
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
|
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
|
||||||
helpEvent.SetEventObject(this);
|
helpEvent.SetEventObject(this);
|
||||||
eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent);
|
eventProcessed = win->GetEventHandler()->ProcessEvent(helpEvent);
|
||||||
|
|
||||||
// Go up the window hierarchy until the event is handled (or not).
|
// Go up the window hierarchy until the event is handled (or not).
|
||||||
// I.e. keep submitting ancestor windows until one is recognised
|
// I.e. keep submitting ancestor windows until one is recognised
|
||||||
// by the app code that processes the ids and displays help.
|
// by the app code that processes the ids and displays help.
|
||||||
@@ -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);
|
||||||
@@ -93,9 +93,9 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap)
|
|||||||
|
|
||||||
int w = bitmap.GetWidth();
|
int w = bitmap.GetWidth();
|
||||||
int h = bitmap.GetHeight();
|
int h = bitmap.GetHeight();
|
||||||
|
|
||||||
wxMemoryDC dcMem;
|
wxMemoryDC dcMem;
|
||||||
|
|
||||||
if (bitmap.GetPalette() && !hiColour)
|
if (bitmap.GetPalette() && !hiColour)
|
||||||
{
|
{
|
||||||
dc.SetPalette(* bitmap.GetPalette());
|
dc.SetPalette(* bitmap.GetPalette());
|
||||||
|
@@ -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;
|
||||||
|
@@ -444,7 +444,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
{
|
{
|
||||||
register wxChar *d, *s, *nm;
|
register wxChar *d, *s, *nm;
|
||||||
wxChar lnm[_MAXPATHLEN];
|
wxChar lnm[_MAXPATHLEN];
|
||||||
int q;
|
int q;
|
||||||
|
|
||||||
// Some compilers don't like this line.
|
// Some compilers don't like this line.
|
||||||
// const wxChar trimchars[] = wxT("\n \t");
|
// const wxChar trimchars[] = wxT("\n \t");
|
||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -1708,7 +1692,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
|||||||
pb.ioRefNum = LMGetCurApRefNum();
|
pb.ioRefNum = LMGetCurApRefNum();
|
||||||
pb.ioFCBIndx = 0;
|
pb.ioFCBIndx = 0;
|
||||||
error = PBGetFCBInfoSync(&pb);
|
error = PBGetFCBInfoSync(&pb);
|
||||||
if ( error == noErr )
|
if ( error == noErr )
|
||||||
{
|
{
|
||||||
cwdSpec.vRefNum = pb.ioFCBVRefNum;
|
cwdSpec.vRefNum = pb.ioFCBVRefNum;
|
||||||
cwdSpec.parID = pb.ioFCBParID;
|
cwdSpec.parID = pb.ioFCBParID;
|
||||||
@@ -1722,9 +1706,9 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
|
|||||||
buf[0] = 0 ;
|
buf[0] = 0 ;
|
||||||
/*
|
/*
|
||||||
this version will not always give back the application directory on mac
|
this version will not always give back the application directory on mac
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SFSaveDisk = 0x214, CurDirStore = 0x398
|
SFSaveDisk = 0x214, CurDirStore = 0x398
|
||||||
};
|
};
|
||||||
FSSpec cwdSpec ;
|
FSSpec cwdSpec ;
|
||||||
|
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +214,7 @@ bool wxNativeFontInfo::FromString(const wxString& s)
|
|||||||
//
|
//
|
||||||
// Ignore the version for now
|
// Ignore the version for now
|
||||||
//
|
//
|
||||||
|
|
||||||
token = tokenizer.GetNextToken();
|
token = tokenizer.GetNextToken();
|
||||||
if ( !token.ToLong(&l) )
|
if ( !token.ToLong(&l) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -465,9 +465,9 @@ int wxGIFDecoder::dgif(GIFImage *img, int interl, int bits)
|
|||||||
while (code != ab_fin);
|
while (code != ab_fin);
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
delete [] ab_prefix ;
|
delete [] ab_prefix ;
|
||||||
delete [] ab_tail ;
|
delete [] ab_tail ;
|
||||||
delete [] stack ;
|
delete [] stack ;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -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())
|
||||||
|
@@ -68,9 +68,9 @@ bool wxBMPHandler::SaveFile(wxImage *image,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned width = image->GetWidth();
|
unsigned width = image->GetWidth();
|
||||||
unsigned row_width = width * 3 +
|
unsigned row_width = width * 3 +
|
||||||
(((width % 4) == 0) ? 0 : (4 - (width * 3) % 4));
|
(((width % 4) == 0) ? 0 : (4 - (width * 3) % 4));
|
||||||
// each row must be aligned to dwords
|
// each row must be aligned to dwords
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
// BitmapHeader:
|
// BitmapHeader:
|
||||||
@@ -78,7 +78,7 @@ bool wxBMPHandler::SaveFile(wxImage *image,
|
|||||||
wxUint32 filesize; // total file size, inc. headers
|
wxUint32 filesize; // total file size, inc. headers
|
||||||
wxUint32 reserved; // for future use
|
wxUint32 reserved; // for future use
|
||||||
wxUint32 data_offset; // image data offset in the file
|
wxUint32 data_offset; // image data offset in the file
|
||||||
|
|
||||||
// BitmapInfoHeader:
|
// BitmapInfoHeader:
|
||||||
wxUint32 bih_size; // 2nd part's size
|
wxUint32 bih_size; // 2nd part's size
|
||||||
wxUint32 width, height; // bitmap's dimensions
|
wxUint32 width, height; // bitmap's dimensions
|
||||||
@@ -94,19 +94,19 @@ bool wxBMPHandler::SaveFile(wxImage *image,
|
|||||||
|
|
||||||
hdr.magic = wxUINT16_SWAP_ON_BE(0x4D42/*'BM'*/);
|
hdr.magic = wxUINT16_SWAP_ON_BE(0x4D42/*'BM'*/);
|
||||||
hdr.filesize = wxUINT32_SWAP_ON_BE(
|
hdr.filesize = wxUINT32_SWAP_ON_BE(
|
||||||
hdr_size +
|
hdr_size +
|
||||||
row_width * image->GetHeight()
|
row_width * image->GetHeight()
|
||||||
);
|
);
|
||||||
hdr.reserved = 0;
|
hdr.reserved = 0;
|
||||||
hdr.data_offset = wxUINT32_SWAP_ON_BE(hdr_size);
|
hdr.data_offset = wxUINT32_SWAP_ON_BE(hdr_size);
|
||||||
|
|
||||||
hdr.bih_size = wxUINT32_SWAP_ON_BE(hdr_size - 14);
|
hdr.bih_size = wxUINT32_SWAP_ON_BE(hdr_size - 14);
|
||||||
hdr.width = wxUINT32_SWAP_ON_BE(image->GetWidth());
|
hdr.width = wxUINT32_SWAP_ON_BE(image->GetWidth());
|
||||||
hdr.height = wxUINT32_SWAP_ON_BE(image->GetHeight());
|
hdr.height = wxUINT32_SWAP_ON_BE(image->GetHeight());
|
||||||
hdr.planes = wxUINT16_SWAP_ON_BE(1); // always 1 plane
|
hdr.planes = wxUINT16_SWAP_ON_BE(1); // always 1 plane
|
||||||
hdr.bpp = wxUINT16_SWAP_ON_BE(24); // always TrueColor
|
hdr.bpp = wxUINT16_SWAP_ON_BE(24); // always TrueColor
|
||||||
hdr.compression = 0; // RGB uncompressed
|
hdr.compression = 0; // RGB uncompressed
|
||||||
hdr.size_of_bmp = wxUINT32_SWAP_ON_BE(row_width * image->GetHeight());
|
hdr.size_of_bmp = wxUINT32_SWAP_ON_BE(row_width * image->GetHeight());
|
||||||
hdr.h_res = hdr.v_res = wxUINT32_SWAP_ON_BE(72); // 72dpi is standard
|
hdr.h_res = hdr.v_res = wxUINT32_SWAP_ON_BE(72); // 72dpi is standard
|
||||||
hdr.num_clrs = 0; // maximal possible = 2^24
|
hdr.num_clrs = 0; // maximal possible = 2^24
|
||||||
hdr.num_signif_clrs = 0; // all colors are significant
|
hdr.num_signif_clrs = 0; // all colors are significant
|
||||||
@@ -129,7 +129,7 @@ bool wxBMPHandler::SaveFile(wxImage *image,
|
|||||||
!stream.Write(&hdr.v_res, 4) ||
|
!stream.Write(&hdr.v_res, 4) ||
|
||||||
!stream.Write(&hdr.num_clrs, 4) ||
|
!stream.Write(&hdr.num_clrs, 4) ||
|
||||||
!stream.Write(&hdr.num_signif_clrs, 4)
|
!stream.Write(&hdr.num_signif_clrs, 4)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
wxLogError(_("BMP: Couldn't write the file header."));
|
wxLogError(_("BMP: Couldn't write the file header."));
|
||||||
@@ -151,7 +151,7 @@ bool wxBMPHandler::SaveFile(wxImage *image,
|
|||||||
buffer[3 * x + 0] = buffer[3 * x + 2];
|
buffer[3 * x + 0] = buffer[3 * x + 2];
|
||||||
buffer[3 * x + 2] = tmpvar;
|
buffer[3 * x + 2] = tmpvar;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stream.Write(buffer, row_width))
|
if (!stream.Write(buffer, row_width))
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
@@ -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');
|
||||||
}
|
}
|
||||||
|
@@ -414,31 +414,31 @@ void wxImage::Paste( const wxImage &image, int x, int y )
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HasMask() && image.HasMask())
|
if (!HasMask() && image.HasMask())
|
||||||
{
|
{
|
||||||
unsigned char r = image.GetMaskRed();
|
unsigned char r = image.GetMaskRed();
|
||||||
unsigned char g = image.GetMaskGreen();
|
unsigned char g = image.GetMaskGreen();
|
||||||
unsigned char b = image.GetMaskBlue();
|
unsigned char b = image.GetMaskBlue();
|
||||||
|
|
||||||
width *= 3;
|
width *= 3;
|
||||||
unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth();
|
unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth();
|
||||||
int source_step = image.GetWidth()*3;
|
int source_step = image.GetWidth()*3;
|
||||||
|
|
||||||
unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width;
|
unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width;
|
||||||
int target_step = M_IMGDATA->m_width*3;
|
int target_step = M_IMGDATA->m_width*3;
|
||||||
|
|
||||||
for (int j = 0; j < height; j++)
|
for (int j = 0; j < height; j++)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < width; i+=3)
|
for (int i = 0; i < width; i+=3)
|
||||||
{
|
{
|
||||||
if ((source_data[i] != r) &&
|
if ((source_data[i] != r) &&
|
||||||
(source_data[i+1] != g) &&
|
(source_data[i+1] != g) &&
|
||||||
(source_data[i+2] != b))
|
(source_data[i+2] != b))
|
||||||
{
|
{
|
||||||
memcpy( target_data+i, source_data+i, 3 );
|
memcpy( target_data+i, source_data+i, 3 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
source_data += source_step;
|
source_data += source_step;
|
||||||
target_data += target_step;
|
target_data += target_step;
|
||||||
}
|
}
|
||||||
@@ -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"
|
||||||
@@ -102,7 +99,7 @@ METHODDEF(void) my_skip_input_data ( j_decompress_ptr cinfo, long num_bytes )
|
|||||||
{
|
{
|
||||||
my_src_ptr src = (my_src_ptr) cinfo->src;
|
my_src_ptr src = (my_src_ptr) cinfo->src;
|
||||||
|
|
||||||
while (num_bytes > (long)src->pub.bytes_in_buffer)
|
while (num_bytes > (long)src->pub.bytes_in_buffer)
|
||||||
{
|
{
|
||||||
num_bytes -= (long) src->pub.bytes_in_buffer;
|
num_bytes -= (long) src->pub.bytes_in_buffer;
|
||||||
src->pub.fill_input_buffer(cinfo);
|
src->pub.fill_input_buffer(cinfo);
|
||||||
@@ -198,7 +195,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos
|
|||||||
/* If we get here, the JPEG code has signaled an error.
|
/* If we get here, the JPEG code has signaled an error.
|
||||||
* We need to clean up the JPEG object, close the input file, and return.
|
* We need to clean up the JPEG object, close the input file, and return.
|
||||||
*/
|
*/
|
||||||
if (verbose)
|
if (verbose)
|
||||||
wxLogError(_("JPEG: Couldn't load - file is probably corrupted."));
|
wxLogError(_("JPEG: Couldn't load - file is probably corrupted."));
|
||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
if (image->Ok()) image->Destroy();
|
if (image->Ok()) image->Destroy();
|
||||||
@@ -306,12 +303,12 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
|||||||
if (!verbose) cinfo.err->output_message=NULL;
|
if (!verbose) cinfo.err->output_message=NULL;
|
||||||
|
|
||||||
/* Establish the setjmp return context for my_error_exit to use. */
|
/* Establish the setjmp return context for my_error_exit to use. */
|
||||||
if (setjmp(jerr.setjmp_buffer))
|
if (setjmp(jerr.setjmp_buffer))
|
||||||
{
|
{
|
||||||
/* If we get here, the JPEG code has signaled an error.
|
/* If we get here, the JPEG code has signaled an error.
|
||||||
* We need to clean up the JPEG object, close the input file, and return.
|
* We need to clean up the JPEG object, close the input file, and return.
|
||||||
*/
|
*/
|
||||||
if (verbose)
|
if (verbose)
|
||||||
wxLogError(_("JPEG: Couldn't save image."));
|
wxLogError(_("JPEG: Couldn't save image."));
|
||||||
jpeg_destroy_compress(&cinfo);
|
jpeg_destroy_compress(&cinfo);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -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');
|
||||||
}
|
}
|
||||||
|
@@ -94,7 +94,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler)
|
|||||||
|
|
||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
|
|
||||||
bool wxXPMHandler::LoadFile(wxImage *image,
|
bool wxXPMHandler::LoadFile(wxImage *image,
|
||||||
wxInputStream& stream,
|
wxInputStream& stream,
|
||||||
bool verbose, int WXUNUSED(index))
|
bool verbose, int WXUNUSED(index))
|
||||||
{
|
{
|
||||||
@@ -108,20 +108,20 @@ 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;
|
||||||
|
|
||||||
// 1. count colours:
|
// 1. count colours:
|
||||||
#define MaxCixels 92
|
#define MaxCixels 92
|
||||||
static const char Cixel[MaxCixels+1] =
|
static const char Cixel[MaxCixels+1] =
|
||||||
" .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjk"
|
" .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjk"
|
||||||
"lzxcvbnmMNBVCZASDFGHJKLPIUYTREWQ!~^/()_`'][{}|";
|
"lzxcvbnmMNBVCZASDFGHJKLPIUYTREWQ!~^/()_`'][{}|";
|
||||||
int chars_per_pixel;
|
int chars_per_pixel;
|
||||||
int cols;
|
int cols;
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
cols = image->CountColours();
|
cols = image->CountColours();
|
||||||
chars_per_pixel = 1;
|
chars_per_pixel = 1;
|
||||||
for ( k = MaxCixels; cols > k; k *= MaxCixels)
|
for ( k = MaxCixels; cols > k; k *= MaxCixels)
|
||||||
@@ -131,7 +131,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
|
|||||||
tmp.Printf("/* XPM */\n"
|
tmp.Printf("/* XPM */\n"
|
||||||
"static char *xpm_data[] = {\n"
|
"static char *xpm_data[] = {\n"
|
||||||
"/* columns rows colors chars-per-pixel */\n"
|
"/* columns rows colors chars-per-pixel */\n"
|
||||||
"\"%i %i %i %i\",\n",
|
"\"%i %i %i %i\",\n",
|
||||||
image->GetWidth(), image->GetHeight(), cols, chars_per_pixel);
|
image->GetWidth(), image->GetHeight(), cols, chars_per_pixel);
|
||||||
stream.Write(tmp.mb_str(), tmp.Length());
|
stream.Write(tmp.mb_str(), tmp.Length());
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
|
|||||||
if (image->HasMask())
|
if (image->HasMask())
|
||||||
mask_key = (image->GetMaskRed() << 16) |
|
mask_key = (image->GetMaskRed() << 16) |
|
||||||
(image->GetMaskGreen() << 8) | image->GetMaskBlue();
|
(image->GetMaskGreen() << 8) | image->GetMaskBlue();
|
||||||
|
|
||||||
// 2b. generate colour table:
|
// 2b. generate colour table:
|
||||||
table.BeginFind();
|
table.BeginFind();
|
||||||
wxNode *node = NULL;
|
wxNode *node = NULL;
|
||||||
@@ -174,7 +174,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
|
|||||||
else if (key == mask_key)
|
else if (key == mask_key)
|
||||||
tmp.Printf(wxT("\"%s c None\",\n"), sym);
|
tmp.Printf(wxT("\"%s c None\",\n"), sym);
|
||||||
else
|
else
|
||||||
tmp.Printf(wxT("\"%s c #%s%s%s\",\n"), sym,
|
tmp.Printf(wxT("\"%s c #%s%s%s\",\n"), sym,
|
||||||
wxDecToHex((unsigned char)(key >> 16)).c_str(),
|
wxDecToHex((unsigned char)(key >> 16)).c_str(),
|
||||||
wxDecToHex((unsigned char)(key >> 8)).c_str(),
|
wxDecToHex((unsigned char)(key >> 8)).c_str(),
|
||||||
wxDecToHex((unsigned char)(key)).c_str());
|
wxDecToHex((unsigned char)(key)).c_str());
|
||||||
@@ -203,7 +203,7 @@ bool wxXPMHandler::SaveFile(wxImage * image,
|
|||||||
}
|
}
|
||||||
tmp = wxT("};\n");
|
tmp = wxT("};\n");
|
||||||
stream.Write(tmp.mb_str(), 3);
|
stream.Write(tmp.mb_str(), 3);
|
||||||
|
|
||||||
delete[] symbols;
|
delete[] symbols;
|
||||||
delete[] symbols_data;
|
delete[] symbols_data;
|
||||||
|
|
||||||
|
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -196,7 +196,7 @@ void wxSizerItem::SetDimension( wxPoint pos, wxSize size )
|
|||||||
size.x = rwidth;
|
size.x = rwidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is what GetPosition() returns. Since we calculate
|
// This is what GetPosition() returns. Since we calculate
|
||||||
// borders afterwards, GetPosition() will be the left/top
|
// borders afterwards, GetPosition() will be the left/top
|
||||||
// corner of the surrounding border.
|
// corner of the surrounding border.
|
||||||
@@ -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
|
||||||
@@ -947,7 +947,7 @@ wxSize wxBoxSizer::CalcMin()
|
|||||||
wxSizerItem *item = (wxSizerItem*) node->Data();
|
wxSizerItem *item = (wxSizerItem*) node->Data();
|
||||||
|
|
||||||
m_stretchable += item->GetOption();
|
m_stretchable += item->GetOption();
|
||||||
|
|
||||||
wxSize size( item->CalcMin() );
|
wxSize size( item->CalcMin() );
|
||||||
|
|
||||||
if (m_orient == wxHORIZONTAL)
|
if (m_orient == wxHORIZONTAL)
|
||||||
@@ -969,7 +969,7 @@ wxSize wxBoxSizer::CalcMin()
|
|||||||
m_fixedWidth = wxMax( m_fixedWidth, size.x );
|
m_fixedWidth = wxMax( m_fixedWidth, size.x );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_fixedWidth += size.x;
|
m_fixedWidth += size.x;
|
||||||
m_fixedHeight = wxMax( m_fixedHeight, size.y );
|
m_fixedHeight = wxMax( m_fixedHeight, size.y );
|
||||||
}
|
}
|
||||||
@@ -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,20 +105,20 @@ 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;
|
||||||
|
|
||||||
#ifndef __WXGTK__
|
#ifndef __WXGTK__
|
||||||
bool hiColour = (wxDisplayDepth() >= 16) ;
|
bool hiColour = (wxDisplayDepth() >= 16) ;
|
||||||
|
|
||||||
if (bitmap.GetPalette() && !hiColour)
|
if (bitmap.GetPalette() && !hiColour)
|
||||||
{
|
{
|
||||||
dc.SetPalette(* bitmap.GetPalette());
|
dc.SetPalette(* bitmap.GetPalette());
|
||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -298,23 +298,23 @@ void wxTreeTextCtrl::OnChar( wxKeyEvent &event )
|
|||||||
{
|
{
|
||||||
(*m_accept) = TRUE;
|
(*m_accept) = TRUE;
|
||||||
(*m_res) = GetValue();
|
(*m_res) = GetValue();
|
||||||
|
|
||||||
if (!wxPendingDelete.Member(this))
|
if (!wxPendingDelete.Member(this))
|
||||||
wxPendingDelete.Append(this);
|
wxPendingDelete.Append(this);
|
||||||
|
|
||||||
if ((*m_accept) && ((*m_res) != m_startValue))
|
if ((*m_accept) && ((*m_res) != m_startValue))
|
||||||
m_owner->OnRenameAccept();
|
m_owner->OnRenameAccept();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.m_keyCode == WXK_ESCAPE)
|
if (event.m_keyCode == WXK_ESCAPE)
|
||||||
{
|
{
|
||||||
(*m_accept) = FALSE;
|
(*m_accept) = FALSE;
|
||||||
(*m_res) = "";
|
(*m_res) = "";
|
||||||
|
|
||||||
if (!wxPendingDelete.Member(this))
|
if (!wxPendingDelete.Member(this))
|
||||||
wxPendingDelete.Append(this);
|
wxPendingDelete.Append(this);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.Skip();
|
event.Skip();
|
||||||
@@ -331,7 +331,7 @@ void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event )
|
|||||||
if (myPos.x + sx > parentSize.x) sx = parentSize.x - myPos.x;
|
if (myPos.x + sx > parentSize.x) sx = parentSize.x - myPos.x;
|
||||||
if (mySize.x > sx) sx = mySize.x;
|
if (mySize.x > sx) sx = mySize.x;
|
||||||
SetSize(sx, -1);
|
SetSize(sx, -1);
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@ void wxGenericTreeCtrl::Init()
|
|||||||
|
|
||||||
m_imageListNormal =
|
m_imageListNormal =
|
||||||
m_imageListState = (wxImageList *) NULL;
|
m_imageListState = (wxImageList *) NULL;
|
||||||
m_ownsImageListNormal =
|
m_ownsImageListNormal =
|
||||||
m_ownsImageListState = FALSE;
|
m_ownsImageListState = FALSE;
|
||||||
|
|
||||||
m_dragCount = 0;
|
m_dragCount = 0;
|
||||||
@@ -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") );
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
|
|||||||
#if wxUSE_BUSYINFO
|
#if wxUSE_BUSYINFO
|
||||||
wxBusyInfo* busy = NULL;
|
wxBusyInfo* busy = NULL;
|
||||||
wxString info;
|
wxString info;
|
||||||
if (show_wait_msg)
|
if (show_wait_msg)
|
||||||
{
|
{
|
||||||
info.Printf(_("Adding book %s"), book.c_str());
|
info.Printf(_("Adding book %s"), book.c_str());
|
||||||
busy = new wxBusyInfo(info);
|
busy = new wxBusyInfo(info);
|
||||||
@@ -93,7 +93,7 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
|
|||||||
#if wxUSE_BUSYINFO
|
#if wxUSE_BUSYINFO
|
||||||
if (show_wait_msg)
|
if (show_wait_msg)
|
||||||
delete busy;
|
delete busy;
|
||||||
#endif
|
#endif
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ void wxHtmlHelpController::CreateHelpWindow()
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_Config == NULL)
|
if (m_Config == NULL)
|
||||||
{
|
{
|
||||||
m_Config = wxConfigBase::Get(FALSE);
|
m_Config = wxConfigBase::Get(FALSE);
|
||||||
if (m_Config != NULL)
|
if (m_Config != NULL)
|
||||||
@@ -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();
|
||||||
|
@@ -109,7 +109,7 @@ bool wxHtmlWindow::SetPage(const wxString& source)
|
|||||||
SetBackgroundColour(wxColour(0xFF, 0xFF, 0xFF));
|
SetBackgroundColour(wxColour(0xFF, 0xFF, 0xFF));
|
||||||
m_OpenedPage = m_OpenedAnchor = m_OpenedPageTitle = wxEmptyString;
|
m_OpenedPage = m_OpenedAnchor = m_OpenedPageTitle = wxEmptyString;
|
||||||
m_Parser->SetDC(dc);
|
m_Parser->SetDC(dc);
|
||||||
if (m_Cell)
|
if (m_Cell)
|
||||||
{
|
{
|
||||||
delete m_Cell;
|
delete m_Cell;
|
||||||
m_Cell = NULL;
|
m_Cell = NULL;
|
||||||
@@ -129,7 +129,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
wxFSFile *f;
|
wxFSFile *f;
|
||||||
bool rt_val;
|
bool rt_val;
|
||||||
bool needs_refresh = FALSE;
|
bool needs_refresh = FALSE;
|
||||||
|
|
||||||
SetCursor(*wxHOURGLASS_CURSOR);
|
SetCursor(*wxHOURGLASS_CURSOR);
|
||||||
wxYield(); Refresh(FALSE);
|
wxYield(); Refresh(FALSE);
|
||||||
|
|
||||||
@@ -148,15 +148,15 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
rt_val = ScrollToAnchor(anch);
|
rt_val = ScrollToAnchor(anch);
|
||||||
m_tmpCanDrawLocks++;
|
m_tmpCanDrawLocks++;
|
||||||
}
|
}
|
||||||
else if (location.Find(wxT('#')) != wxNOT_FOUND && location.BeforeFirst(wxT('#')) == m_OpenedPage)
|
else if (location.Find(wxT('#')) != wxNOT_FOUND && location.BeforeFirst(wxT('#')) == m_OpenedPage)
|
||||||
{
|
{
|
||||||
wxString anch = location.AfterFirst(wxT('#'));
|
wxString anch = location.AfterFirst(wxT('#'));
|
||||||
m_tmpCanDrawLocks--;
|
m_tmpCanDrawLocks--;
|
||||||
rt_val = ScrollToAnchor(anch);
|
rt_val = ScrollToAnchor(anch);
|
||||||
m_tmpCanDrawLocks++;
|
m_tmpCanDrawLocks++;
|
||||||
}
|
}
|
||||||
else if (location.Find(wxT('#')) != wxNOT_FOUND &&
|
else if (location.Find(wxT('#')) != wxNOT_FOUND &&
|
||||||
(m_FS->GetPath() + location.BeforeFirst(wxT('#'))) == m_OpenedPage)
|
(m_FS->GetPath() + location.BeforeFirst(wxT('#'))) == m_OpenedPage)
|
||||||
{
|
{
|
||||||
wxString anch = location.AfterFirst(wxT('#'));
|
wxString anch = location.AfterFirst(wxT('#'));
|
||||||
m_tmpCanDrawLocks--;
|
m_tmpCanDrawLocks--;
|
||||||
@@ -164,19 +164,19 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
m_tmpCanDrawLocks++;
|
m_tmpCanDrawLocks++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
needs_refresh = TRUE;
|
needs_refresh = TRUE;
|
||||||
// load&display it:
|
// load&display it:
|
||||||
if (m_RelatedStatusBar != -1)
|
if (m_RelatedStatusBar != -1)
|
||||||
{
|
{
|
||||||
m_RelatedFrame->SetStatusText(_("Connecting..."), m_RelatedStatusBar);
|
m_RelatedFrame->SetStatusText(_("Connecting..."), m_RelatedStatusBar);
|
||||||
Refresh(FALSE);
|
Refresh(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
f = m_FS->OpenFile(location);
|
f = m_FS->OpenFile(location);
|
||||||
|
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
wxString err;
|
wxString err;
|
||||||
|
|
||||||
@@ -187,12 +187,12 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxNode *node;
|
wxNode *node;
|
||||||
wxString src = wxEmptyString;
|
wxString src = wxEmptyString;
|
||||||
|
|
||||||
if (m_RelatedStatusBar != -1)
|
if (m_RelatedStatusBar != -1)
|
||||||
{
|
{
|
||||||
wxString msg = _("Loading : ") + location;
|
wxString msg = _("Loading : ") + location;
|
||||||
m_RelatedFrame->SetStatusText(msg, m_RelatedStatusBar);
|
m_RelatedFrame->SetStatusText(msg, m_RelatedStatusBar);
|
||||||
@@ -210,7 +210,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
}
|
}
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
if (src == wxEmptyString)
|
if (src == wxEmptyString)
|
||||||
{
|
{
|
||||||
if (m_DefaultFilter == NULL) m_DefaultFilter = GetDefaultFilter();
|
if (m_DefaultFilter == NULL) m_DefaultFilter = GetDefaultFilter();
|
||||||
src = m_DefaultFilter->ReadFile(*f);
|
src = m_DefaultFilter->ReadFile(*f);
|
||||||
@@ -219,7 +219,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
m_FS->ChangePathTo(f->GetLocation());
|
m_FS->ChangePathTo(f->GetLocation());
|
||||||
rt_val = SetPage(src);
|
rt_val = SetPage(src);
|
||||||
m_OpenedPage = f->GetLocation();
|
m_OpenedPage = f->GetLocation();
|
||||||
if (f->GetAnchor() != wxEmptyString)
|
if (f->GetAnchor() != wxEmptyString)
|
||||||
{
|
{
|
||||||
wxYield();
|
wxYield();
|
||||||
ScrollToAnchor(f->GetAnchor());
|
ScrollToAnchor(f->GetAnchor());
|
||||||
@@ -245,7 +245,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
|
|||||||
OnSetTitle(wxFileNameFromPath(m_OpenedPage));
|
OnSetTitle(wxFileNameFromPath(m_OpenedPage));
|
||||||
SetCursor(*wxSTANDARD_CURSOR);
|
SetCursor(*wxSTANDARD_CURSOR);
|
||||||
|
|
||||||
if (needs_refresh)
|
if (needs_refresh)
|
||||||
{
|
{
|
||||||
wxYield();
|
wxYield();
|
||||||
m_tmpCanDrawLocks--;
|
m_tmpCanDrawLocks--;
|
||||||
@@ -267,7 +267,7 @@ bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
|
|||||||
wxLogWarning(_("HTML anchor %s does not exist."), anchor.c_str());
|
wxLogWarning(_("HTML anchor %s does not exist."), anchor.c_str());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int y;
|
int y;
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
|
|||||||
|
|
||||||
void wxHtmlWindow::OnSetTitle(const wxString& title)
|
void wxHtmlWindow::OnSetTitle(const wxString& title)
|
||||||
{
|
{
|
||||||
if (m_RelatedFrame)
|
if (m_RelatedFrame)
|
||||||
{
|
{
|
||||||
wxString tit;
|
wxString tit;
|
||||||
tit.Printf(m_TitleFormat, title.c_str());
|
tit.Printf(m_TitleFormat, title.c_str());
|
||||||
@@ -300,7 +300,7 @@ void wxHtmlWindow::CreateLayout()
|
|||||||
|
|
||||||
if (!m_Cell) return;
|
if (!m_Cell) return;
|
||||||
|
|
||||||
if (m_Style & wxHW_SCROLLBAR_NEVER)
|
if (m_Style & wxHW_SCROLLBAR_NEVER)
|
||||||
{
|
{
|
||||||
SetScrollbars(wxHTML_SCROLL_STEP, 1, m_Cell->GetWidth() / wxHTML_SCROLL_STEP, 0); // always off
|
SetScrollbars(wxHTML_SCROLL_STEP, 1, m_Cell->GetWidth() / wxHTML_SCROLL_STEP, 0); // always off
|
||||||
GetClientSize(&ClientWidth, &ClientHeight);
|
GetClientSize(&ClientWidth, &ClientHeight);
|
||||||
@@ -310,7 +310,7 @@ void wxHtmlWindow::CreateLayout()
|
|||||||
else {
|
else {
|
||||||
GetClientSize(&ClientWidth, &ClientHeight);
|
GetClientSize(&ClientWidth, &ClientHeight);
|
||||||
m_Cell->Layout(ClientWidth);
|
m_Cell->Layout(ClientWidth);
|
||||||
if (ClientHeight < m_Cell->GetHeight() + GetCharHeight())
|
if (ClientHeight < m_Cell->GetHeight() + GetCharHeight())
|
||||||
{
|
{
|
||||||
SetScrollbars(
|
SetScrollbars(
|
||||||
wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP,
|
wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP,
|
||||||
@@ -336,7 +336,7 @@ void wxHtmlWindow::ReadCustomization(wxConfigBase *cfg, wxString path)
|
|||||||
int p_fontsizes[7];
|
int p_fontsizes[7];
|
||||||
wxString p_fff, p_ffn;
|
wxString p_fff, p_ffn;
|
||||||
|
|
||||||
if (path != wxEmptyString)
|
if (path != wxEmptyString)
|
||||||
{
|
{
|
||||||
oldpath = cfg->GetPath();
|
oldpath = cfg->GetPath();
|
||||||
cfg->SetPath(path);
|
cfg->SetPath(path);
|
||||||
@@ -345,7 +345,7 @@ void wxHtmlWindow::ReadCustomization(wxConfigBase *cfg, wxString path)
|
|||||||
m_Borders = cfg->Read("wxHtmlWindow/Borders", m_Borders);
|
m_Borders = cfg->Read("wxHtmlWindow/Borders", m_Borders);
|
||||||
p_fff = cfg->Read("wxHtmlWindow/FontFaceFixed", m_Parser->m_FontFaceFixed);
|
p_fff = cfg->Read("wxHtmlWindow/FontFaceFixed", m_Parser->m_FontFaceFixed);
|
||||||
p_ffn = cfg->Read("wxHtmlWindow/FontFaceNormal", m_Parser->m_FontFaceNormal);
|
p_ffn = cfg->Read("wxHtmlWindow/FontFaceNormal", m_Parser->m_FontFaceNormal);
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
|
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
|
||||||
p_fontsizes[i] = cfg->Read(tmp, m_Parser->m_FontsSizes[i]);
|
p_fontsizes[i] = cfg->Read(tmp, m_Parser->m_FontsSizes[i]);
|
||||||
@@ -363,7 +363,7 @@ void wxHtmlWindow::WriteCustomization(wxConfigBase *cfg, wxString path)
|
|||||||
wxString oldpath;
|
wxString oldpath;
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
|
|
||||||
if (path != wxEmptyString)
|
if (path != wxEmptyString)
|
||||||
{
|
{
|
||||||
oldpath = cfg->GetPath();
|
oldpath = cfg->GetPath();
|
||||||
cfg->SetPath(path);
|
cfg->SetPath(path);
|
||||||
@@ -372,7 +372,7 @@ void wxHtmlWindow::WriteCustomization(wxConfigBase *cfg, wxString path)
|
|||||||
cfg->Write("wxHtmlWindow/Borders", (long) m_Borders);
|
cfg->Write("wxHtmlWindow/Borders", (long) m_Borders);
|
||||||
cfg->Write("wxHtmlWindow/FontFaceFixed", m_Parser->m_FontFaceFixed);
|
cfg->Write("wxHtmlWindow/FontFaceFixed", m_Parser->m_FontFaceFixed);
|
||||||
cfg->Write("wxHtmlWindow/FontFaceNormal", m_Parser->m_FontFaceNormal);
|
cfg->Write("wxHtmlWindow/FontFaceNormal", m_Parser->m_FontFaceNormal);
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
|
tmp.Printf(wxT("wxHtmlWindow/FontsSize%i"), i);
|
||||||
cfg->Write(tmp, (long) m_Parser->m_FontsSizes[i]);
|
cfg->Write(tmp, (long) m_Parser->m_FontsSizes[i]);
|
||||||
@@ -498,10 +498,10 @@ void wxHtmlWindow::OnDraw(wxDC& dc)
|
|||||||
int v_y, v_h;
|
int v_y, v_h;
|
||||||
|
|
||||||
if (m_tmpCanDrawLocks > 0) return;
|
if (m_tmpCanDrawLocks > 0) return;
|
||||||
|
|
||||||
dc.SetMapMode(wxMM_TEXT);
|
dc.SetMapMode(wxMM_TEXT);
|
||||||
#if 0
|
#if 0
|
||||||
/* VS - I don't think this is neccessary any longer
|
/* VS - I don't think this is neccessary any longer
|
||||||
MSC_VER 1200 means MSVC 6.0 and it works fine */
|
MSC_VER 1200 means MSVC 6.0 and it works fine */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER == 1200)
|
#if defined(_MSC_VER) && (_MSC_VER == 1200)
|
||||||
::SetMapMode((HDC)dc.GetHDC(), MM_TEXT);
|
::SetMapMode((HDC)dc.GetHDC(), MM_TEXT);
|
||||||
@@ -510,7 +510,7 @@ void wxHtmlWindow::OnDraw(wxDC& dc)
|
|||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
ViewStart(&x, &y);
|
ViewStart(&x, &y);
|
||||||
|
|
||||||
while (upd)
|
while (upd)
|
||||||
{
|
{
|
||||||
v_y = upd.GetY();
|
v_y = upd.GetY();
|
||||||
v_h = upd.GetH();
|
v_h = upd.GetH();
|
||||||
@@ -534,7 +534,7 @@ void wxHtmlWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
{
|
{
|
||||||
m_tmpMouseMoved = TRUE;
|
m_tmpMouseMoved = TRUE;
|
||||||
|
|
||||||
if (event.ButtonDown())
|
if (event.ButtonDown())
|
||||||
{
|
{
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
@@ -550,15 +550,15 @@ 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)
|
||||||
{
|
{
|
||||||
s_cur_hand = new wxCursor(wxCURSOR_HAND);
|
s_cur_hand = new wxCursor(wxCURSOR_HAND);
|
||||||
s_cur_arrow = new wxCursor(wxCURSOR_ARROW);
|
s_cur_arrow = new wxCursor(wxCURSOR_ARROW);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_tmpMouseMoved && (m_Cell != NULL))
|
if (m_tmpMouseMoved && (m_Cell != NULL))
|
||||||
{
|
{
|
||||||
int sx, sy;
|
int sx, sy;
|
||||||
int x, y;
|
int x, y;
|
||||||
@@ -569,17 +569,17 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& event)
|
|||||||
ScreenToClient(&x, &y);
|
ScreenToClient(&x, &y);
|
||||||
lnk = m_Cell->GetLink(sx + x, sy + y);
|
lnk = m_Cell->GetLink(sx + x, sy + y);
|
||||||
|
|
||||||
if (lnk != m_tmpLastLink)
|
if (lnk != m_tmpLastLink)
|
||||||
{
|
{
|
||||||
if (lnk == NULL)
|
if (lnk == NULL)
|
||||||
{
|
{
|
||||||
SetCursor(*s_cur_arrow);
|
SetCursor(*s_cur_arrow);
|
||||||
if (m_RelatedStatusBar != -1) m_RelatedFrame->SetStatusText(wxEmptyString, m_RelatedStatusBar);
|
if (m_RelatedStatusBar != -1) m_RelatedFrame->SetStatusText(wxEmptyString, m_RelatedStatusBar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetCursor(*s_cur_hand);
|
SetCursor(*s_cur_hand);
|
||||||
if (m_RelatedStatusBar != -1)
|
if (m_RelatedStatusBar != -1)
|
||||||
m_RelatedFrame->SetStatusText(lnk->GetHref(), m_RelatedStatusBar);
|
m_RelatedFrame->SetStatusText(lnk->GetHref(), m_RelatedStatusBar);
|
||||||
}
|
}
|
||||||
m_tmpLastLink = lnk;
|
m_tmpLastLink = lnk;
|
||||||
|
@@ -43,23 +43,25 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
|||||||
int oldsize = m_WParser->GetFontSize();
|
int oldsize = m_WParser->GetFontSize();
|
||||||
wxString oldface = m_WParser->GetFontFace();
|
wxString oldface = m_WParser->GetFontFace();
|
||||||
|
|
||||||
if (tag.HasParam(wxT("COLOR")))
|
if (tag.HasParam(wxT("COLOR")))
|
||||||
{
|
{
|
||||||
unsigned long tmp = 0;
|
unsigned long tmp = 0;
|
||||||
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.HasParam(wxT("SIZE")))
|
if (tag.HasParam(wxT("SIZE")))
|
||||||
{
|
{
|
||||||
long tmp = 0;
|
long tmp = 0;
|
||||||
wxChar c = tag.GetParam(wxT("SIZE"))[(unsigned int) 0];
|
wxChar c = tag.GetParam(wxT("SIZE"))[(unsigned int) 0];
|
||||||
if (tag.ScanParam(wxT("SIZE"), wxT("%li"), &tmp) == 1)
|
if (tag.ScanParam(wxT("SIZE"), wxT("%li"), &tmp) == 1)
|
||||||
{
|
{
|
||||||
if (c == '+' || c == '-')
|
if (c == '+' || c == '-')
|
||||||
m_WParser->SetFontSize(oldsize+tmp);
|
m_WParser->SetFontSize(oldsize+tmp);
|
||||||
@@ -68,10 +70,10 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
|||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.HasParam(wxT("FACE")))
|
if (tag.HasParam(wxT("FACE")))
|
||||||
{
|
{
|
||||||
if (m_Faces.GetCount() == 0)
|
if (m_Faces.GetCount() == 0)
|
||||||
{
|
{
|
||||||
wxFontEnumerator enu;
|
wxFontEnumerator enu;
|
||||||
enu.EnumerateFacenames();
|
enu.EnumerateFacenames();
|
||||||
@@ -79,10 +81,10 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
|||||||
}
|
}
|
||||||
wxStringTokenizer tk(tag.GetParam(wxT("FACE")), ",");
|
wxStringTokenizer tk(tag.GetParam(wxT("FACE")), ",");
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
while (tk.HasMoreTokens())
|
while (tk.HasMoreTokens())
|
||||||
{
|
{
|
||||||
if ((index = m_Faces.Index(tk.GetNextToken())) != wxNOT_FOUND)
|
if ((index = m_Faces.Index(tk.GetNextToken())) != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
m_WParser->SetFontFace(m_Faces[index]);
|
m_WParser->SetFontFace(m_Faces[index]);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
||||||
@@ -93,17 +95,17 @@ TAG_HANDLER_BEGIN(FONT, "FONT")
|
|||||||
|
|
||||||
ParseInner(tag);
|
ParseInner(tag);
|
||||||
|
|
||||||
if (oldface != m_WParser->GetFontFace())
|
if (oldface != m_WParser->GetFontFace())
|
||||||
{
|
{
|
||||||
m_WParser->SetFontFace(oldface);
|
m_WParser->SetFontFace(oldface);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
||||||
}
|
}
|
||||||
if (oldsize != m_WParser->GetFontSize())
|
if (oldsize != m_WParser->GetFontSize())
|
||||||
{
|
{
|
||||||
m_WParser->SetFontSize(oldsize);
|
m_WParser->SetFontSize(oldsize);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
|
||||||
}
|
}
|
||||||
if (oldclr != m_WParser->GetActualColor())
|
if (oldclr != m_WParser->GetActualColor())
|
||||||
{
|
{
|
||||||
m_WParser->SetActualColor(oldclr);
|
m_WParser->SetActualColor(oldclr);
|
||||||
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
|
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
|
||||||
@@ -224,7 +226,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
|
|||||||
m_WParser->SetFontSize(6);
|
m_WParser->SetFontSize(6);
|
||||||
else if (tag.GetName() == wxT("H3"))
|
else if (tag.GetName() == wxT("H3"))
|
||||||
m_WParser->SetFontSize(5);
|
m_WParser->SetFontSize(5);
|
||||||
else if (tag.GetName() == wxT("H4"))
|
else if (tag.GetName() == wxT("H4"))
|
||||||
{
|
{
|
||||||
m_WParser->SetFontSize(5);
|
m_WParser->SetFontSize(5);
|
||||||
m_WParser->SetFontItalic(TRUE);
|
m_WParser->SetFontItalic(TRUE);
|
||||||
@@ -232,7 +234,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
|
|||||||
}
|
}
|
||||||
else if (tag.GetName() == wxT("H5"))
|
else if (tag.GetName() == wxT("H5"))
|
||||||
m_WParser->SetFontSize(4);
|
m_WParser->SetFontSize(4);
|
||||||
else if (tag.GetName() == wxT("H6"))
|
else if (tag.GetName() == wxT("H6"))
|
||||||
{
|
{
|
||||||
m_WParser->SetFontSize(4);
|
m_WParser->SetFontSize(4);
|
||||||
m_WParser->SetFontItalic(TRUE);
|
m_WParser->SetFontItalic(TRUE);
|
||||||
@@ -240,7 +242,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
|
|||||||
}
|
}
|
||||||
|
|
||||||
c = m_WParser->GetContainer();
|
c = m_WParser->GetContainer();
|
||||||
if (c->GetFirstCell())
|
if (c->GetFirstCell())
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
|
@@ -36,7 +36,7 @@ TAG_HANDLER_BEGIN(P, "P")
|
|||||||
|
|
||||||
TAG_HANDLER_PROC(tag)
|
TAG_HANDLER_PROC(tag)
|
||||||
{
|
{
|
||||||
if (m_WParser->GetContainer()->GetFirstCell() != NULL)
|
if (m_WParser->GetContainer()->GetFirstCell() != NULL)
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
@@ -56,7 +56,7 @@ TAG_HANDLER_BEGIN(BR, "BR")
|
|||||||
{
|
{
|
||||||
int al = m_WParser->GetContainer()->GetAlignHor();
|
int al = m_WParser->GetContainer()->GetAlignHor();
|
||||||
wxHtmlContainerCell *c;
|
wxHtmlContainerCell *c;
|
||||||
|
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
c = m_WParser->OpenContainer();
|
c = m_WParser->OpenContainer();
|
||||||
c->SetAlignHor(al);
|
c->SetAlignHor(al);
|
||||||
@@ -77,7 +77,7 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
|
|||||||
wxHtmlContainerCell *c = m_WParser->GetContainer();
|
wxHtmlContainerCell *c = m_WParser->GetContainer();
|
||||||
|
|
||||||
m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
|
m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
|
||||||
if (c->GetFirstCell() != NULL)
|
if (c->GetFirstCell() != NULL)
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
@@ -85,12 +85,12 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
|
|||||||
else
|
else
|
||||||
c->SetAlignHor(wxHTML_ALIGN_CENTER);
|
c->SetAlignHor(wxHTML_ALIGN_CENTER);
|
||||||
|
|
||||||
if (tag.HasEnding())
|
if (tag.HasEnding())
|
||||||
{
|
{
|
||||||
ParseInner(tag);
|
ParseInner(tag);
|
||||||
|
|
||||||
m_WParser->SetAlign(old);
|
m_WParser->SetAlign(old);
|
||||||
if (c->GetFirstCell() != NULL)
|
if (c->GetFirstCell() != NULL)
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
@@ -113,7 +113,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
|
|||||||
{
|
{
|
||||||
int old = m_WParser->GetAlign();
|
int old = m_WParser->GetAlign();
|
||||||
wxHtmlContainerCell *c = m_WParser->GetContainer();
|
wxHtmlContainerCell *c = m_WParser->GetContainer();
|
||||||
if (c->GetFirstCell() != NULL)
|
if (c->GetFirstCell() != NULL)
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
@@ -121,7 +121,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
|
|||||||
c->SetAlign(tag);
|
c->SetAlign(tag);
|
||||||
m_WParser->SetAlign(c->GetAlignHor());
|
m_WParser->SetAlign(c->GetAlignHor());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c->SetAlign(tag);
|
c->SetAlign(tag);
|
||||||
m_WParser->SetAlign(c->GetAlignHor());
|
m_WParser->SetAlign(c->GetAlignHor());
|
||||||
@@ -130,7 +130,7 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
|
|||||||
ParseInner(tag);
|
ParseInner(tag);
|
||||||
|
|
||||||
m_WParser->SetAlign(old);
|
m_WParser->SetAlign(old);
|
||||||
if (c->GetFirstCell() != NULL)
|
if (c->GetFirstCell() != NULL)
|
||||||
{
|
{
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
@@ -150,10 +150,10 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
|
|||||||
|
|
||||||
TAG_HANDLER_PROC(tag)
|
TAG_HANDLER_PROC(tag)
|
||||||
{
|
{
|
||||||
if (m_WParser->GetWindow())
|
if (m_WParser->GetWindow())
|
||||||
{
|
{
|
||||||
wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
|
wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
|
||||||
if (wfr)
|
if (wfr)
|
||||||
{
|
{
|
||||||
wxString title = "";
|
wxString title = "";
|
||||||
wxString *src = m_WParser->GetSource();
|
wxString *src = m_WParser->GetSource();
|
||||||
@@ -177,30 +177,36 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
|
|||||||
unsigned long tmp;
|
unsigned long tmp;
|
||||||
wxColour clr;
|
wxColour clr;
|
||||||
|
|
||||||
if (tag.HasParam(wxT("TEXT")))
|
if (tag.HasParam(wxT("TEXT")))
|
||||||
{
|
{
|
||||||
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.HasParam(wxT("LINK")))
|
if (tag.HasParam(wxT("LINK")))
|
||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.HasParam(wxT("BGCOLOR")))
|
if (tag.HasParam(wxT("BGCOLOR")))
|
||||||
{
|
{
|
||||||
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);
|
||||||
@@ -218,15 +224,15 @@ TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE")
|
|||||||
TAG_HANDLER_PROC(tag)
|
TAG_HANDLER_PROC(tag)
|
||||||
{
|
{
|
||||||
wxHtmlContainerCell *c;
|
wxHtmlContainerCell *c;
|
||||||
|
|
||||||
m_WParser->CloseContainer();
|
m_WParser->CloseContainer();
|
||||||
c = m_WParser->OpenContainer();
|
c = m_WParser->OpenContainer();
|
||||||
|
|
||||||
if (c->GetAlignHor() == wxHTML_ALIGN_RIGHT)
|
if (c->GetAlignHor() == wxHTML_ALIGN_RIGHT)
|
||||||
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_RIGHT);
|
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_RIGHT);
|
||||||
else
|
else
|
||||||
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
|
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
|
||||||
|
|
||||||
c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
|
c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
|
||||||
m_WParser->OpenContainer();
|
m_WParser->OpenContainer();
|
||||||
ParseInner(tag);
|
ParseInner(tag);
|
||||||
|
@@ -1289,11 +1289,11 @@ bool wxYield()
|
|||||||
// normally result in message boxes popping up &c
|
// normally result in message boxes popping up &c
|
||||||
wxLog::Suspend();
|
wxLog::Suspend();
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
if (gs_inYield)
|
if (gs_inYield)
|
||||||
wxFAIL_MSG( wxT("wxYield called recursively" ) );
|
wxFAIL_MSG( wxT("wxYield called recursively" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gs_inYield = TRUE;
|
gs_inYield = TRUE;
|
||||||
|
|
||||||
// we don't want to process WM_QUIT from here - it should be processed in
|
// we don't want to process WM_QUIT from here - it should be processed in
|
||||||
@@ -1327,7 +1327,7 @@ bool wxYieldIfNeeded()
|
|||||||
{
|
{
|
||||||
if (gs_inYield)
|
if (gs_inYield)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return wxYield();
|
return wxYield();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1340,7 +1340,8 @@ bool wxHandleFatalExceptions(bool doit)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
#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
|
||||||
}
|
}
|
||||||
|
@@ -94,7 +94,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit
|
|||||||
wxT("BUTTON"),
|
wxT("BUTTON"),
|
||||||
wxT(""),
|
wxT(""),
|
||||||
msStyle,
|
msStyle,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
GetWinHwnd(parent),
|
GetWinHwnd(parent),
|
||||||
(HMENU)m_windowId,
|
(HMENU)m_windowId,
|
||||||
wxGetInstance(),
|
wxGetInstance(),
|
||||||
@@ -196,7 +196,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
|||||||
wxDC dst;
|
wxDC dst;
|
||||||
dst.SetHDC((WXHDC) hDC, FALSE);
|
dst.SetHDC((WXHDC) hDC, FALSE);
|
||||||
dst.DrawBitmap(*bitmap, x1, y1, TRUE);
|
dst.DrawBitmap(*bitmap, x1, y1, TRUE);
|
||||||
|
|
||||||
// draw focus / disabled state, if auto-drawing
|
// draw focus / disabled state, if auto-drawing
|
||||||
if ( (state & ODS_DISABLED) && autoDraw )
|
if ( (state & ODS_DISABLED) && autoDraw )
|
||||||
{
|
{
|
||||||
@@ -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 )
|
||||||
|
@@ -219,7 +219,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
|
|||||||
wxBitmap *bitmap = (wxBitmap *)data;
|
wxBitmap *bitmap = (wxBitmap *)data;
|
||||||
HBITMAP hBitmap = (HBITMAP)bitmap->GetHBITMAP();
|
HBITMAP hBitmap = (HBITMAP)bitmap->GetHBITMAP();
|
||||||
// NULL palette means to use the system one
|
// NULL palette means to use the system one
|
||||||
HANDLE hDIB = wxBitmapToDIB(hBitmap, (HPALETTE)NULL);
|
HANDLE hDIB = wxBitmapToDIB(hBitmap, (HPALETTE)NULL);
|
||||||
handle = SetClipboardData(CF_DIB, hDIB);
|
handle = SetClipboardData(CF_DIB, hDIB);
|
||||||
#endif // wxUSE_IMAGE_LOADING_IN_MSW
|
#endif // wxUSE_IMAGE_LOADING_IN_MSW
|
||||||
break;
|
break;
|
||||||
@@ -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)
|
||||||
@@ -583,7 +583,7 @@ bool wxClipboard::AddData( wxDataObject *data )
|
|||||||
#if wxUSE_METAFILE
|
#if wxUSE_METAFILE
|
||||||
case wxDF_METAFILE:
|
case wxDF_METAFILE:
|
||||||
{
|
{
|
||||||
wxMetafileDataObject* metaFileDataObject =
|
wxMetafileDataObject* metaFileDataObject =
|
||||||
(wxMetafileDataObject*) data;
|
(wxMetafileDataObject*) data;
|
||||||
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
wxMetafile metaFile = metaFileDataObject->GetMetafile();
|
||||||
return wxSetClipboardData(wxDF_METAFILE, &metaFile,
|
return wxSetClipboardData(wxDF_METAFILE, &metaFile,
|
||||||
@@ -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 )
|
||||||
@@ -183,7 +183,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
{
|
{
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
return HandleChar(wParam, lParam, TRUE /* isASCII */);
|
return HandleChar(wParam, lParam, TRUE /* isASCII */);
|
||||||
|
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
return HandleKeyDown(wParam, lParam);
|
return HandleKeyDown(wParam, lParam);
|
||||||
|
|
||||||
@@ -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();
|
||||||
@@ -464,7 +464,7 @@ void wxComboBox::SetSelection(long from, long to)
|
|||||||
toChar = -1;
|
toChar = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar))
|
SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar))
|
||||||
#else // Win16
|
#else // Win16
|
||||||
|
@@ -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
|
||||||
@@ -175,7 +175,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H)
|
|||||||
//* bitmaps. So, no need to convert the AND bitmask. *
|
//* bitmaps. So, no need to convert the AND bitmask. *
|
||||||
//* 7) Since a DIB is stored upside down, flip the monochrome AND bits*
|
//* 7) Since a DIB is stored upside down, flip the monochrome AND bits*
|
||||||
//* by scanlines. *
|
//* by scanlines. *
|
||||||
//* 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 MakeIcon( HANDLE hDIB, HINSTANCE hInst)
|
HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst)
|
||||||
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
@@ -672,7 +672,7 @@ WORD DIBNumColors ( LPSTR pv)
|
|||||||
// is in biClrUsed, whereas in the BITMAPCORE - style headers, it
|
// is in biClrUsed, whereas in the BITMAPCORE - style headers, it
|
||||||
// is dependent on the bits per pixel ( = 2 raised to the power of
|
// is dependent on the bits per pixel ( = 2 raised to the power of
|
||||||
// bits/pixel).
|
// bits/pixel).
|
||||||
|
|
||||||
if(lpbi->biSize != sizeof( BITMAPCOREHEADER))
|
if(lpbi->biSize != sizeof( BITMAPCOREHEADER))
|
||||||
{
|
{
|
||||||
if(lpbi->biClrUsed != 0)
|
if(lpbi->biClrUsed != 0)
|
||||||
@@ -843,7 +843,7 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint)
|
|||||||
/*
|
/*
|
||||||
* This doesn't work: just gives us a grey square. Ideas, anyone?
|
* This doesn't work: just gives us a grey square. Ideas, anyone?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap)
|
HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap)
|
||||||
{
|
{
|
||||||
HDC hDCColor, hDCMono;
|
HDC hDCColor, hDCMono;
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
HBRUSH brush = ::CreateSolidBrush(::GetPixel(dc_src, x, y));
|
HBRUSH brush = ::CreateSolidBrush(::GetPixel(dc_src, x, y));
|
||||||
rect.left = xdest + x;
|
rect.left = xdest + x;
|
||||||
rect.right = rect.left + 1;
|
rect.right = rect.left + 1;
|
||||||
rect.top = ydest + y;
|
rect.top = ydest + y;
|
||||||
rect.bottom = rect.top + 1;
|
rect.bottom = rect.top + 1;
|
||||||
::FillRect(GetHdc(), &rect, brush);
|
::FillRect(GetHdc(), &rect, brush);
|
||||||
::DeleteObject(brush);
|
::DeleteObject(brush);
|
||||||
|
@@ -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
|
||||||
|
|
||||||
@@ -82,10 +83,10 @@ GSocket *GSocket_new(void)
|
|||||||
socket->m_cbacks[i] = NULL;
|
socket->m_cbacks[i] = NULL;
|
||||||
}
|
}
|
||||||
socket->m_detected = 0;
|
socket->m_detected = 0;
|
||||||
socket->m_local = NULL;
|
socket->m_local = NULL;
|
||||||
socket->m_peer = NULL;
|
socket->m_peer = NULL;
|
||||||
socket->m_error = GSOCK_NOERROR;
|
socket->m_error = GSOCK_NOERROR;
|
||||||
socket->m_server = FALSE;
|
socket->m_server = FALSE;
|
||||||
socket->m_stream = TRUE;
|
socket->m_stream = TRUE;
|
||||||
socket->m_non_blocking = FALSE;
|
socket->m_non_blocking = FALSE;
|
||||||
socket->m_timeout.tv_sec = 10 * 60; /* 10 minutes */
|
socket->m_timeout.tv_sec = 10 * 60; /* 10 minutes */
|
||||||
@@ -272,11 +273,11 @@ GAddress *GSocket_GetPeer(GSocket *socket)
|
|||||||
* Sets up this socket as a server. The local address must have been
|
* Sets up this socket as a server. The local address must have been
|
||||||
* set with GSocket_SetLocal() before GSocket_SetServer() is called.
|
* set with GSocket_SetLocal() before GSocket_SetServer() is called.
|
||||||
* Returns GSOCK_NOERROR on success, one of the following otherwise:
|
* Returns GSOCK_NOERROR on success, one of the following otherwise:
|
||||||
*
|
*
|
||||||
* Error codes:
|
* Error codes:
|
||||||
* GSOCK_INVSOCK - the socket is in use.
|
* GSOCK_INVSOCK - the socket is in use.
|
||||||
* GSOCK_INVADDR - the local address has not been set.
|
* GSOCK_INVADDR - the local address has not been set.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_SetServer(GSocket *sck)
|
GSocketError GSocket_SetServer(GSocket *sck)
|
||||||
{
|
{
|
||||||
@@ -344,7 +345,7 @@ GSocketError GSocket_SetServer(GSocket *sck)
|
|||||||
* GSOCK_TIMEDOUT - timeout, no incoming connections.
|
* GSOCK_TIMEDOUT - timeout, no incoming connections.
|
||||||
* GSOCK_WOULDBLOCK - the call would block and the socket is nonblocking.
|
* GSOCK_WOULDBLOCK - the call would block and the socket is nonblocking.
|
||||||
* GSOCK_MEMERR - couldn't allocate memory.
|
* GSOCK_MEMERR - couldn't allocate memory.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocket *GSocket_WaitConnection(GSocket *sck)
|
GSocket *GSocket_WaitConnection(GSocket *sck)
|
||||||
{
|
{
|
||||||
@@ -447,7 +448,7 @@ GSocket *GSocket_WaitConnection(GSocket *sck)
|
|||||||
* GSOCK_TIMEDOUT - timeout, the connection failed.
|
* GSOCK_TIMEDOUT - timeout, the connection failed.
|
||||||
* GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
|
* GSOCK_WOULDBLOCK - connection in progress (nonblocking sockets only)
|
||||||
* GSOCK_MEMERR - couldn't allocate memory.
|
* GSOCK_MEMERR - couldn't allocate memory.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
|
GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
|
||||||
{
|
{
|
||||||
@@ -552,7 +553,7 @@ GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
|
|||||||
* Error codes:
|
* Error codes:
|
||||||
* GSOCK_INVSOCK - the socket is in use.
|
* GSOCK_INVSOCK - the socket is in use.
|
||||||
* GSOCK_INVADDR - the local address has not been set.
|
* GSOCK_INVADDR - the local address has not been set.
|
||||||
* GSOCK_IOERR - low-level error.
|
* GSOCK_IOERR - low-level error.
|
||||||
*/
|
*/
|
||||||
GSocketError GSocket_SetNonOriented(GSocket *sck)
|
GSocketError GSocket_SetNonOriented(GSocket *sck)
|
||||||
{
|
{
|
||||||
@@ -754,7 +755,7 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
assert(socket != NULL);
|
assert(socket != NULL);
|
||||||
return flags & socket->m_detected;
|
return flags & socket->m_detected;
|
||||||
@@ -806,7 +807,7 @@ GSocketError GSocket_GetError(GSocket *socket)
|
|||||||
* operation, there is still data available, the callback function will
|
* operation, there is still data available, the callback function will
|
||||||
* be called again.
|
* be called again.
|
||||||
* GSOCK_OUTPUT:
|
* GSOCK_OUTPUT:
|
||||||
* The socket is available for writing. That is, the next write call
|
* The socket is available for writing. That is, the next write call
|
||||||
* won't block. This event is generated only once, when the connection is
|
* won't block. This event is generated only once, when the connection is
|
||||||
* first established, and then only if a call failed with GSOCK_WOULDBLOCK,
|
* first established, and then only if a call failed with GSOCK_WOULDBLOCK,
|
||||||
* when the output buffer empties again. This means that the app should
|
* when the output buffer empties again. This means that the app should
|
||||||
@@ -1373,7 +1374,7 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
|
|||||||
|
|
||||||
#else /* !wxUSE_SOCKETS */
|
#else /* !wxUSE_SOCKETS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translation unit shouldn't be empty, so include this typedef to make the
|
* Translation unit shouldn't be empty, so include this typedef to make the
|
||||||
* compiler (VC++ 6.0, for example) happy
|
* compiler (VC++ 6.0, for example) happy
|
||||||
*/
|
*/
|
||||||
|
@@ -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
|
||||||
|
|
||||||
@@ -278,7 +279,7 @@ void _GSocket_Disable_Events(GSocket *socket)
|
|||||||
|
|
||||||
#else /* !wxUSE_SOCKETS */
|
#else /* !wxUSE_SOCKETS */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translation unit shouldn't be empty, so include this typedef to make the
|
* Translation unit shouldn't be empty, so include this typedef to make the
|
||||||
* compiler (VC++ 6.0, for example) happy
|
* compiler (VC++ 6.0, for example) happy
|
||||||
*/
|
*/
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
@@ -302,7 +302,7 @@ wxListCtrl::~wxListCtrl()
|
|||||||
delete m_textCtrl;
|
delete m_textCtrl;
|
||||||
m_textCtrl = NULL;
|
m_textCtrl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_ownsImageListNormal) delete m_imageListNormal;
|
if (m_ownsImageListNormal) delete m_imageListNormal;
|
||||||
if (m_ownsImageListSmall) delete m_imageListSmall;
|
if (m_ownsImageListSmall) delete m_imageListSmall;
|
||||||
if (m_ownsImageListState) delete m_imageListState;
|
if (m_ownsImageListState) delete m_imageListState;
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -594,7 +594,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
|||||||
|
|
||||||
|
|
||||||
// now make other extensions have the same filetype
|
// now make other extensions have the same filetype
|
||||||
|
|
||||||
for (iExtCount=1; iExtCount < ftInfo.GetExtensionsCount(); iExtCount++ )
|
for (iExtCount=1; iExtCount < ftInfo.GetExtensionsCount(); iExtCount++ )
|
||||||
{
|
{
|
||||||
ext = ftInfo.GetExtensions()[iExtCount];
|
ext = ftInfo.GetExtensions()[iExtCount];
|
||||||
@@ -636,8 +636,8 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
|||||||
// SetCommand(), SetDefaultIcon() &c will use it later)
|
// SetCommand(), SetDefaultIcon() &c will use it later)
|
||||||
wxRegKey keyFT(wxRegKey::HKCR, filetype);
|
wxRegKey keyFT(wxRegKey::HKCR, filetype);
|
||||||
ok = keyFT.Create();
|
ok = keyFT.Create();
|
||||||
|
|
||||||
wxFileType *ft = NULL;
|
wxFileType *ft = NULL;
|
||||||
ft = CreateFileType(filetype, extWithDot);
|
ft = CreateFileType(filetype, extWithDot);
|
||||||
|
|
||||||
if (ft)
|
if (ft)
|
||||||
@@ -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);
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: msw/ownerdrw.cpp
|
// Name: msw/ownerdrw.cpp
|
||||||
// Purpose: implementation of wxOwnerDrawn class
|
// Purpose: implementation of wxOwnerDrawn class
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 13.11.97
|
// Created: 13.11.97
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
@@ -44,8 +44,8 @@
|
|||||||
|
|
||||||
// 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;
|
||||||
@@ -87,7 +87,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
|
|||||||
|
|
||||||
// Ray Gilbert's changes - Corrects the problem of a BMP
|
// Ray Gilbert's changes - Corrects the problem of a BMP
|
||||||
// being placed next to text in a menu item, and the BMP does
|
// being placed next to text in a menu item, and the BMP does
|
||||||
// not match the size expected by the system. This will
|
// not match the size expected by the system. This will
|
||||||
// resize the space so the BMP will fit. Without this, BMPs
|
// resize the space so the BMP will fit. Without this, BMPs
|
||||||
// must be no larger or smaller than 16x16.
|
// must be no larger or smaller than 16x16.
|
||||||
if (m_bmpChecked.Ok())
|
if (m_bmpChecked.Ok())
|
||||||
@@ -97,18 +97,18 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
|
|||||||
wxSystemSettings::GetSystemMetric(wxSYS_EDGE_Y);
|
wxSystemSettings::GetSystemMetric(wxSYS_EDGE_Y);
|
||||||
if (*pheight < adjustedHeight)
|
if (*pheight < adjustedHeight)
|
||||||
*pheight = adjustedHeight;
|
*pheight = adjustedHeight;
|
||||||
|
|
||||||
// Does BMP encroach on default check menu position?
|
// Does BMP encroach on default check menu position?
|
||||||
size_t adjustedWidth = m_bmpChecked.GetWidth() +
|
size_t adjustedWidth = m_bmpChecked.GetWidth() +
|
||||||
(wxSystemSettings::GetSystemMetric(wxSYS_EDGE_X) * 2);
|
(wxSystemSettings::GetSystemMetric(wxSYS_EDGE_X) * 2);
|
||||||
if (ms_nDefaultMarginWidth < adjustedWidth)
|
if (ms_nDefaultMarginWidth < adjustedWidth)
|
||||||
*pwidth += adjustedWidth - ms_nDefaultMarginWidth;
|
*pwidth += adjustedWidth - ms_nDefaultMarginWidth;
|
||||||
|
|
||||||
// Do we need to widen margin to fit BMP?
|
// Do we need to widen margin to fit BMP?
|
||||||
if ((size_t)GetMarginWidth() < adjustedWidth)
|
if ((size_t)GetMarginWidth() < adjustedWidth)
|
||||||
SetMarginWidth(adjustedWidth);
|
SetMarginWidth(adjustedWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_nHeight = *pheight; // remember height for use in OnDrawItem
|
m_nHeight = *pheight; // remember height for use in OnDrawItem
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -149,7 +149,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
colBack = m_colBack.Ok() ? ToRGB(m_colBack) : GetSysColor(COLOR_WINDOW);
|
colBack = m_colBack.Ok() ? ToRGB(m_colBack) : GetSysColor(COLOR_WINDOW);
|
||||||
colText = m_colText.Ok() ? ToRGB(m_colText) : GetSysColor(COLOR_WINDOWTEXT);
|
colText = m_colText.Ok() ? ToRGB(m_colText) : GetSysColor(COLOR_WINDOWTEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef O_DRAW_NATIVE_API
|
#ifdef O_DRAW_NATIVE_API
|
||||||
#define hdc (HDC)dc.GetHDC()
|
#define hdc (HDC)dc.GetHDC()
|
||||||
COLORREF colOldText = ::SetTextColor(hdc, colText),
|
COLORREF colOldText = ::SetTextColor(hdc, colText),
|
||||||
@@ -162,10 +162,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
// select the font and draw the text
|
// select the font and draw the text
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
|
|
||||||
// determine where to draw and leave space for a check-mark.
|
// determine where to draw and leave space for a check-mark.
|
||||||
int x = rc.x + GetMarginWidth();
|
int x = rc.x + GetMarginWidth();
|
||||||
|
|
||||||
// using native API because it reckognizes '&'
|
// using native API because it reckognizes '&'
|
||||||
#ifdef O_DRAW_NATIVE_API
|
#ifdef O_DRAW_NATIVE_API
|
||||||
int nPrevMode = SetBkMode(hdc, TRANSPARENT);
|
int nPrevMode = SetBkMode(hdc, TRANSPARENT);
|
||||||
HBRUSH hbr = CreateSolidBrush(colBack),
|
HBRUSH hbr = CreateSolidBrush(colBack),
|
||||||
@@ -187,8 +187,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont);
|
HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont);
|
||||||
DrawState(hdc, NULL, NULL,
|
DrawState(hdc, NULL, NULL,
|
||||||
(LPARAM)(const wxChar *)m_strName, m_strName.Length(),
|
(LPARAM)(const wxChar *)m_strName, m_strName.Length(),
|
||||||
x, rc.y, rc.GetWidth(), rc.GetHeight(),
|
x, rc.y, rc.GetWidth(), rc.GetHeight(),
|
||||||
DST_PREFIXTEXT | ( st & wxODDisabled ? DSS_DISABLED : 0) );
|
DST_PREFIXTEXT | ( st & wxODDisabled ? DSS_DISABLED : 0) );
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
if ( st & wxODChecked ) {
|
if ( st & wxODChecked ) {
|
||||||
// using native APIs for performance and simplicity
|
// using native APIs for performance and simplicity
|
||||||
#ifdef O_DRAW_NATIVE_API
|
#ifdef O_DRAW_NATIVE_API
|
||||||
// what goes on: DrawFrameControl creates a b/w mask,
|
// what goes on: DrawFrameControl creates a b/w mask,
|
||||||
// then we copy it to screen to have right colors
|
// then we copy it to screen to have right colors
|
||||||
|
|
||||||
// first create a monochrome bitmap in a memory DC
|
// first create a monochrome bitmap in a memory DC
|
||||||
@@ -224,7 +224,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// finally copy it to screen DC and clean up
|
// finally copy it to screen DC and clean up
|
||||||
BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight,
|
BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight,
|
||||||
hdcMem, 0, 0, SRCCOPY);
|
hdcMem, 0, 0, SRCCOPY);
|
||||||
|
|
||||||
DeleteDC(hdcMem);
|
DeleteDC(hdcMem);
|
||||||
@@ -254,15 +254,15 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
|||||||
// heightDiff = -2;
|
// heightDiff = -2;
|
||||||
|
|
||||||
//MT: blit with mask enabled.
|
//MT: blit with mask enabled.
|
||||||
dc.Blit(rc.x + (GetMarginWidth() - nBmpWidth) / 2,
|
dc.Blit(rc.x + (GetMarginWidth() - nBmpWidth) / 2,
|
||||||
rc.y + heightDiff / 2,
|
rc.y + heightDiff / 2,
|
||||||
nBmpWidth, nBmpHeight,
|
nBmpWidth, nBmpHeight,
|
||||||
&dcMem, 0, 0, wxCOPY, TRUE);
|
&dcMem, 0, 0, wxCOPY, TRUE);
|
||||||
|
|
||||||
if ( st & wxODSelected ) {
|
if ( st & wxODSelected ) {
|
||||||
#ifdef O_DRAW_NATIVE_API
|
#ifdef O_DRAW_NATIVE_API
|
||||||
RECT rectBmp = { rc.GetLeft(), rc.GetTop(),
|
RECT rectBmp = { rc.GetLeft(), rc.GetTop(),
|
||||||
rc.GetLeft() + GetMarginWidth(),
|
rc.GetLeft() + GetMarginWidth(),
|
||||||
rc.GetTop() + m_nHeight };
|
rc.GetTop() + m_nHeight };
|
||||||
SetBkColor(hdc, colBack);
|
SetBkColor(hdc, colBack);
|
||||||
DrawEdge(hdc, &rectBmp, EDGE_RAISED, BF_SOFT | BF_RECT);
|
DrawEdge(hdc, &rectBmp, EDGE_RAISED, BF_SOFT | BF_RECT);
|
||||||
|
@@ -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)
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
#ifdef __WXWINE__
|
#ifdef __WXWINE__
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
m_refData = new wxPaletteRefData;
|
m_refData = new wxPaletteRefData;
|
||||||
@@ -102,7 +102,7 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
|
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
|
||||||
LocalFree((HANDLE)npPal);
|
LocalFree((HANDLE)npPal);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
||||||
}
|
}
|
||||||
@@ -311,7 +311,7 @@ wxDC* wxWindowsPrinter::PrintDialog(wxWindow *parent)
|
|||||||
{
|
{
|
||||||
dc = dialog.GetPrintDC();
|
dc = dialog.GetPrintDC();
|
||||||
m_printDialogData = dialog.GetPrintDialogData();
|
m_printDialogData = dialog.GetPrintDialogData();
|
||||||
if (dc == NULL)
|
if (dc == NULL)
|
||||||
sm_lastError = wxPRINTER_ERROR;
|
sm_lastError = wxPRINTER_ERROR;
|
||||||
else
|
else
|
||||||
sm_lastError = wxPRINTER_NO_ERROR;
|
sm_lastError = wxPRINTER_NO_ERROR;
|
||||||
|
@@ -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);
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
|||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
#endif // wxUSE_VALIDATORS
|
#endif // wxUSE_VALIDATORS
|
||||||
|
|
||||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
@@ -262,8 +262,8 @@ In version 4.0 or later, the maximum value that a scroll bar can report
|
|||||||
If the scroll bar has a page size greater than one, the maximum scrolling position
|
If the scroll bar has a page size greater than one, the maximum scrolling position
|
||||||
is less than the maximum range value. You can use the following formula to calculate
|
is less than the maximum range value. You can use the following formula to calculate
|
||||||
the maximum scrolling position:
|
the maximum scrolling position:
|
||||||
|
|
||||||
MaxScrollPos = MaxRangeValue - (PageSize - 1)
|
MaxScrollPos = MaxRangeValue - (PageSize - 1)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY
|
#if WXWIN_COMPATIBILITY
|
||||||
@@ -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++;
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ wxTreeCtrl::~wxTreeCtrl()
|
|||||||
|
|
||||||
// delete user data to prevent memory leaks
|
// delete user data to prevent memory leaks
|
||||||
DeleteAllItems();
|
DeleteAllItems();
|
||||||
|
|
||||||
if (m_ownsImageListNormal) delete m_imageListNormal;
|
if (m_ownsImageListNormal) delete m_imageListNormal;
|
||||||
if (m_ownsImageListState) delete m_imageListState;
|
if (m_ownsImageListState) delete m_imageListState;
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
@@ -2368,7 +2368,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
: wxTreeItemIcon_Selected
|
: wxTreeItemIcon_Selected
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//default:
|
//default:
|
||||||
|
@@ -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 )
|
||||||
@@ -1002,7 +1002,7 @@ void wxWindow::OnIdle(wxIdleEvent& event)
|
|||||||
state |= MK_MBUTTON;
|
state |= MK_MBUTTON;
|
||||||
if ( GetKeyState( VK_RBUTTON ) )
|
if ( GetKeyState( VK_RBUTTON ) )
|
||||||
state |= MK_RBUTTON;
|
state |= MK_RBUTTON;
|
||||||
|
|
||||||
wxMouseEvent event(wxEVT_LEAVE_WINDOW);
|
wxMouseEvent event(wxEVT_LEAVE_WINDOW);
|
||||||
InitMouseEvent(event, pt.x, pt.y, state);
|
InitMouseEvent(event, pt.x, pt.y, state);
|
||||||
|
|
||||||
@@ -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