Source cleaning: -1/wxID_ANY/wxDefaultCoord, ::, !!/!IsEmpty(), TRUE/true. FALSE/false, tabs, whitespaces.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/msw/uxtheme.h
|
||||
// Purpose: wxUxThemeEngine class: support for XP themes
|
||||
// Author:
|
||||
// Author:
|
||||
// Modified by:
|
||||
// Created: 2003
|
||||
// RCS-ID: $Id$
|
||||
@@ -58,17 +58,17 @@ typedef struct _WXUOSVERSIONINFOEXA {
|
||||
|
||||
typedef void* WXHTHEME;
|
||||
typedef long WXUHRESULT;
|
||||
typedef WXHTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(WXHWND, const wchar_t *);
|
||||
typedef WXHTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(WXHWND, const wchar_t *);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(WXHTHEME);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(WXHTHEME, WXHDC,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(WXHTHEME, WXHDC,
|
||||
int, int, const RECT *, const RECT *);
|
||||
#define WXU_DTT_GRAYED 0x1
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(WXHTHEME, WXHDC, int,
|
||||
int, const wchar_t *, int, DWORD,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(WXHTHEME, WXHDC, int,
|
||||
int, const wchar_t *, int, DWORD,
|
||||
DWORD, const RECT *);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(WXHTHEME, WXHDC,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(WXHTHEME, WXHDC,
|
||||
int, int, const RECT *, RECT *);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(WXHTHEME, WXHDC, int, int,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(WXHTHEME, WXHDC, int, int,
|
||||
const RECT *, RECT *);
|
||||
|
||||
enum WXUTHEMESIZE
|
||||
@@ -108,9 +108,9 @@ typedef struct tagWXUTEXTMETRIC
|
||||
unsigned char tmCharSet;
|
||||
} WXUTEXTMETRIC;
|
||||
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(WXHTHEME, WXHDC, int, int, const RECT *,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(WXHTHEME, WXHDC, int, int, const RECT *,
|
||||
enum WXUTHEMESIZE, WXUSIZE *);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(WXHTHEME, WXHDC, int, int, const wchar_t *,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(WXHTHEME, WXHDC, int, int, const wchar_t *,
|
||||
int, WXDWORD, const RECT *, RECT *);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(WXHTHEME, WXHDC,
|
||||
int, int, WXUTEXTMETRIC*);
|
||||
@@ -188,7 +188,7 @@ typedef struct _WXUINTLIST
|
||||
int iValues[WXU_MAX_INTLIST_COUNT];
|
||||
} WXUINTLIST, *PWXUINTLIST;
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(WXHTHEME, int,
|
||||
int, int, WXUINTLIST*);
|
||||
int, int, WXUINTLIST*);
|
||||
|
||||
enum WXUPROPERTYORIGIN
|
||||
{
|
||||
@@ -228,7 +228,7 @@ typedef BOOL (__stdcall *PFNWXUISTHEMEDIALOGTEXTUREENABLED)(WXHWND);
|
||||
|
||||
typedef WXDWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)();
|
||||
typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(WXDWORD);
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int,
|
||||
typedef WXUHRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int,
|
||||
wchar_t *, int, wchar_t *, int);
|
||||
|
||||
#define WXU_SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
|
||||
@@ -329,7 +329,7 @@ private:
|
||||
// uxtheme.dll
|
||||
wxDynamicLibrary m_dllUxTheme;
|
||||
|
||||
|
||||
|
||||
// the one and only theme engine, initially NULL
|
||||
static wxUxThemeEngine *ms_themeEngine;
|
||||
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
wxUxThemeEngine *engine = wxUxThemeEngine::Get();
|
||||
|
||||
m_hTheme =
|
||||
m_hTheme =
|
||||
engine ? (WXHTHEME)engine->OpenThemeData(win->GetHWND(), classes)
|
||||
: NULL;
|
||||
}
|
||||
|
@@ -75,8 +75,8 @@ public:
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
||||
virtual bool Show( bool show = TRUE );
|
||||
virtual bool Enable( bool enable = TRUE );
|
||||
virtual bool Show( bool show = true );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
virtual void SetFocus();
|
||||
virtual void SetFocusFromKbd();
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
virtual void WarpPointer(int x, int y);
|
||||
|
||||
virtual void Refresh( bool eraseBackground = TRUE,
|
||||
virtual void Refresh( bool eraseBackground = true,
|
||||
const wxRect *rect = (const wxRect *) NULL );
|
||||
virtual void Update();
|
||||
virtual void Freeze();
|
||||
@@ -109,8 +109,8 @@ public:
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = TRUE );
|
||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
||||
int range, bool refresh = true );
|
||||
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
||||
virtual int GetScrollPos( int orient ) const;
|
||||
virtual int GetScrollThumb( int orient ) const;
|
||||
virtual int GetScrollRange( int orient ) const;
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxDEPRECATED( bool GetUseCtl3D() const );
|
||||
wxDEPRECATED( bool GetTransparentBackground() const );
|
||||
wxDEPRECATED( void SetTransparent(bool t = TRUE) );
|
||||
wxDEPRECATED( void SetTransparent(bool t = true) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
@@ -179,16 +179,16 @@ public:
|
||||
WXFARPROC MSWGetOldWndProc() const { return m_oldWndProc; }
|
||||
void MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; }
|
||||
|
||||
// return TRUE if the window is of a standard (i.e. not wxWidgets') class
|
||||
// return true if the window is of a standard (i.e. not wxWidgets') class
|
||||
//
|
||||
// to understand why does it work, look at SubclassWin() code and comments
|
||||
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
||||
|
||||
wxWindow *FindItem(long id) const;
|
||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = FALSE) const;
|
||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
||||
|
||||
// MSW only: TRUE if this control is part of the main control
|
||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
|
||||
// MSW only: true if this control is part of the main control
|
||||
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; };
|
||||
|
||||
// translate wxWidgets style flags for this control into the Windows style
|
||||
// and optional extended style for the corresponding native control
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
// translate wxWidgets coords into Windows ones suitable to be passed to
|
||||
// ::CreateWindow()
|
||||
//
|
||||
// returns TRUE if non default coords are returned, FALSE otherwise
|
||||
// returns true if non default coords are returned, false otherwise
|
||||
bool MSWGetCreateWindowCoords(const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
int& x, int& y,
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
// creates the window of specified Windows class with given style, extended
|
||||
// style, title and geometry (default values
|
||||
//
|
||||
// returns TRUE if the window has been created, FALSE if creation failed
|
||||
// returns true if the window has been created, false if creation failed
|
||||
bool MSWCreate(const wxChar *wclass,
|
||||
const wxChar *title = NULL,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// internal handlers for MSW messages: all handlers return a boolean value:
|
||||
// TRUE means that the handler processed the event and FALSE that it didn't
|
||||
// true means that the handler processed the event and false that it didn't
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// there are several cases where we have virtual functions for Windows
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
bool HandleMouseMove(int x, int y, WXUINT flags);
|
||||
bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = FALSE);
|
||||
bool HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII = false);
|
||||
bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam);
|
||||
bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam);
|
||||
#if wxUSE_ACCEL
|
||||
@@ -349,14 +349,14 @@ public:
|
||||
|
||||
// message processing helpers
|
||||
|
||||
// return FALSE if the message shouldn't be translated/preprocessed but
|
||||
// return false if the message shouldn't be translated/preprocessed but
|
||||
// dispatched normally
|
||||
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
|
||||
|
||||
// return TRUE if the message was preprocessed and shouldn't be dispatched
|
||||
// return true if the message was preprocessed and shouldn't be dispatched
|
||||
virtual bool MSWProcessMessage(WXMSG* pMsg);
|
||||
|
||||
// return TRUE if the message was translated and shouldn't be dispatched
|
||||
// return true if the message was translated and shouldn't be dispatched
|
||||
virtual bool MSWTranslateMessage(WXMSG* pMsg);
|
||||
|
||||
// called when the window is about to be destroyed
|
||||
|
@@ -395,7 +395,7 @@
|
||||
|
||||
#if defined(__WXWINCE__) && defined(DrawIcon) //#ifdef DrawIcon
|
||||
#undef DrawIcon
|
||||
inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon)
|
||||
inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon)
|
||||
{
|
||||
return DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL) ;
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
wxProtocolError GetError() { return m_error; }
|
||||
|
||||
virtual bool Abort() { return TRUE; }
|
||||
virtual bool Abort() { return true; }
|
||||
|
||||
wxInputStream *GetInputStream(const wxString& WXUNUSED(path))
|
||||
{
|
||||
|
@@ -129,7 +129,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#else
|
||||
wxChar *sysname;
|
||||
const wxChar *default_host = wxT("noname");
|
||||
@@ -139,7 +139,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
|
||||
} else
|
||||
wxStrncpy(buf, sysname, maxSize - 1);
|
||||
buf[maxSize] = wxT('\0');
|
||||
return *buf ? TRUE : FALSE;
|
||||
return *buf ? true : false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
|
||||
{
|
||||
wxStrncpy(buf, host, maxSize);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,11 +241,11 @@ bool wxGetUserId(wxChar *buf, int maxSize)
|
||||
if ( res == 0 )
|
||||
{
|
||||
// not found
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#else // __WXMICROWIN__
|
||||
wxChar *user;
|
||||
const wxChar *default_id = wxT("anonymous");
|
||||
@@ -263,7 +263,7 @@ bool wxGetUserId(wxChar *buf, int maxSize)
|
||||
wxStrncpy(buf, user, maxSize - 1);
|
||||
}
|
||||
|
||||
return *buf ? TRUE : FALSE;
|
||||
return *buf ? true : false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -332,12 +332,12 @@ bool wxGetUserName(wxChar *buf, int maxSize)
|
||||
WideCharToMultiByte( CP_ACP, 0, ui2->usri2_full_name, -1,
|
||||
buf, maxSize, NULL, NULL );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
error:
|
||||
wxLogError(wxT("Couldn't look up full user name."));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
#else // !USE_NET_API
|
||||
// Could use NIS, MS-Mail or other site specific programs
|
||||
// Use wxWidgets configuration data
|
||||
@@ -353,7 +353,7 @@ error:
|
||||
}
|
||||
#endif // Win32/16
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
const wxChar* wxGetHomeDir(wxString *pstr)
|
||||
@@ -507,7 +507,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
||||
{
|
||||
wxLogLastError(_T("GetDiskFreeSpaceEx"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ULARGE_INTEGER is a union of a 64 bit value and a struct containing
|
||||
@@ -550,7 +550,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
||||
{
|
||||
wxLogLastError(_T("GetDiskFreeSpace"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLongLong lBytesPerCluster = lSectorsPerCluster;
|
||||
@@ -569,7 +569,7 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#endif
|
||||
// __WXWINCE__
|
||||
}
|
||||
@@ -581,14 +581,14 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
||||
bool wxGetEnv(const wxString& var, wxString *value)
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
return FALSE;
|
||||
return false;
|
||||
#else // Win32
|
||||
// first get the size of the buffer
|
||||
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
||||
if ( !dwRet )
|
||||
{
|
||||
// this means that there is no such variable
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( value )
|
||||
@@ -597,7 +597,7 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
||||
dwRet);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#endif // WinCE/32
|
||||
}
|
||||
|
||||
@@ -610,12 +610,12 @@ bool wxSetEnv(const wxString& var, const wxChar *value)
|
||||
{
|
||||
wxLogLastError(_T("SetEnvironmentVariable"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#else // no way to set env vars
|
||||
return FALSE;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
switch ( sig )
|
||||
{
|
||||
case wxSIGKILL:
|
||||
@@ -699,7 +699,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
||||
*krc = wxKILL_ERROR;
|
||||
}
|
||||
|
||||
ok = FALSE;
|
||||
ok = false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -736,7 +736,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
||||
{
|
||||
wxLogLastError(_T("EnumWindows"));
|
||||
|
||||
ok = FALSE;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
else // no windows for this PID
|
||||
@@ -746,7 +746,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc)
|
||||
*krc = wxKILL_ERROR;
|
||||
}
|
||||
|
||||
ok = FALSE;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -845,9 +845,9 @@ bool wxShell(const wxString& command)
|
||||
bool wxShutdown(wxShutdownFlags wFlags)
|
||||
{
|
||||
#ifdef __WXWINCE__
|
||||
return FALSE;
|
||||
return false;
|
||||
#elif defined(__WIN32__)
|
||||
bool bOK = TRUE;
|
||||
bool bOK = true;
|
||||
|
||||
if ( wxGetOsVersion(NULL, NULL) == wxWINDOWS_NT ) // if is NT or 2K
|
||||
{
|
||||
@@ -891,7 +891,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown wxShutdown() flag") );
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bOK = ::ExitWindowsEx(flags, 0) != 0;
|
||||
@@ -1148,7 +1148,7 @@ extern long wxCharsetToCodepage(const wxChar *name)
|
||||
if ( !name )
|
||||
return -1;
|
||||
|
||||
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(name, FALSE);
|
||||
wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(name, false);
|
||||
if ( enc == wxFONTENCODING_SYSTEM )
|
||||
return -1;
|
||||
|
||||
|
@@ -124,7 +124,7 @@ public:
|
||||
DWORD dwProcessId; // pid of the process
|
||||
wxProcess *handler;
|
||||
DWORD dwExitCode; // the exit code of the process
|
||||
bool state; // set to FALSE when the process finishes
|
||||
bool state; // set to false when the process finishes
|
||||
};
|
||||
|
||||
class wxExecuteModule : public wxModule
|
||||
@@ -160,10 +160,10 @@ public:
|
||||
wxPipeInputStream(HANDLE hInput);
|
||||
virtual ~wxPipeInputStream();
|
||||
|
||||
// returns TRUE if the pipe is still opened
|
||||
// returns true if the pipe is still opened
|
||||
bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; }
|
||||
|
||||
// returns TRUE if there is any data to be read from the pipe
|
||||
// returns true if there is any data to be read from the pipe
|
||||
virtual bool CanRead() const;
|
||||
|
||||
protected:
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
// default ctor doesn't do anything
|
||||
wxPipe() { m_handles[Read] = m_handles[Write] = INVALID_HANDLE_VALUE; }
|
||||
|
||||
// create the pipe, return TRUE if ok, FALSE on error
|
||||
// create the pipe, return true if ok, false on error
|
||||
bool Create()
|
||||
{
|
||||
// default secutiry attributes
|
||||
@@ -225,13 +225,13 @@ public:
|
||||
{
|
||||
wxLogSysError(_("Failed to create an anonymous pipe"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// return TRUE if we were created successfully
|
||||
// return true if we were created successfully
|
||||
bool IsOk() const { return m_handles[Read] != INVALID_HANDLE_VALUE; }
|
||||
|
||||
// return the descriptor for one of the pipe ends
|
||||
@@ -362,7 +362,7 @@ wxPipeInputStream::~wxPipeInputStream()
|
||||
bool wxPipeInputStream::CanRead() const
|
||||
{
|
||||
if ( !IsOpened() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
DWORD nAvailable;
|
||||
|
||||
@@ -497,7 +497,7 @@ static bool wxExecuteDDE(const wxString& ddeServer,
|
||||
ddeTopic);
|
||||
if ( !conn )
|
||||
{
|
||||
ok = FALSE;
|
||||
ok = false;
|
||||
}
|
||||
else // connected to DDE server
|
||||
{
|
||||
@@ -529,7 +529,7 @@ static bool wxExecuteDDE(const wxString& ddeServer,
|
||||
|
||||
long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
||||
{
|
||||
wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") );
|
||||
wxCHECK_MSG( !cmd.IsEmpty(), 0, wxT("empty command in wxExecute") );
|
||||
|
||||
#if wxUSE_THREADS
|
||||
// for many reasons, the code below breaks down if it's called from another
|
||||
@@ -862,7 +862,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
||||
case WAIT_TIMEOUT:
|
||||
wxLogDebug(_T("Timeout too small in WaitForInputIdle"));
|
||||
|
||||
ok = FALSE;
|
||||
ok = false;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
|
@@ -90,17 +90,17 @@ bool wxGetResource(const wxString& section, const wxString& entry, wxChar **valu
|
||||
int n = GetPrivateProfileString(section, entry, defunkt,
|
||||
buf, WXSIZEOF(buf), file);
|
||||
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int n = GetProfileString(section, entry, defunkt, buf, WXSIZEOF(buf));
|
||||
if (n == 0 || wxStrcmp(buf, defunkt) == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
if (*value) delete[] (*value);
|
||||
*value = wxStrcpy(new wxChar[wxStrlen(buf) + 1], buf);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
|
||||
@@ -111,9 +111,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
|
||||
{
|
||||
*value = (float)wxStrtod(s, NULL);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
|
||||
@@ -124,9 +124,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
|
||||
{
|
||||
*value = wxStrtol(s, NULL, 10);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
|
||||
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
|
||||
@@ -137,9 +137,9 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
||||
{
|
||||
*value = (int)wxStrtol(s, NULL, 10);
|
||||
delete[] s;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else return FALSE;
|
||||
else return false;
|
||||
}
|
||||
#endif // wxUSE_RESOURCES
|
||||
|
||||
@@ -184,7 +184,7 @@ void wxEndBusyCursor()
|
||||
}
|
||||
}
|
||||
|
||||
// TRUE if we're between the above two calls
|
||||
// true if we're between the above two calls
|
||||
bool wxIsBusy()
|
||||
{
|
||||
return gs_wxBusyCursorCount > 0;
|
||||
@@ -194,7 +194,7 @@ bool wxIsBusy()
|
||||
// in long calculations.
|
||||
bool wxCheckForInterrupt(wxWindow *wnd)
|
||||
{
|
||||
wxCHECK( wnd, FALSE );
|
||||
wxCHECK( wnd, false );
|
||||
|
||||
MSG msg;
|
||||
while ( ::PeekMessage(&msg, GetHwndOf(wnd), 0, 0, PM_REMOVE) )
|
||||
@@ -203,7 +203,7 @@ bool wxCheckForInterrupt(wxWindow *wnd)
|
||||
::DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// MSW only: get user-defined resource from the .res file.
|
||||
@@ -259,12 +259,12 @@ void wxGetMousePosition( int* x, int* y )
|
||||
if ( y ) *y = pt.y;
|
||||
};
|
||||
|
||||
// Return TRUE if we have a colour display
|
||||
// Return true if we have a colour display
|
||||
bool wxColourDisplay()
|
||||
{
|
||||
#ifdef __WXMICROWIN__
|
||||
// MICROWIN_TODO
|
||||
return TRUE;
|
||||
return true;
|
||||
#else
|
||||
// this function is called from wxDC ctor so it is called a *lot* of times
|
||||
// hence we optimize it a bit but doign the check only once
|
||||
|
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/msw/uxtheme.cpp
|
||||
// Purpose: implements wxUxThemeEngine class: support for XP themes
|
||||
// Author:
|
||||
// Author:
|
||||
// Modified by:
|
||||
// Created: 2003
|
||||
// RCS-ID: $Id$
|
||||
@@ -49,11 +49,11 @@
|
||||
class wxUxThemeModule : public wxModule
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit() { return true; }
|
||||
virtual void OnExit()
|
||||
{
|
||||
if ( wxUxThemeEngine::ms_themeEngine )
|
||||
{
|
||||
virtual bool OnInit() { return true; }
|
||||
virtual void OnExit()
|
||||
{
|
||||
if ( wxUxThemeEngine::ms_themeEngine )
|
||||
{
|
||||
// this is probably not necessary right now but try to be careful
|
||||
// and avoid the problems which we might have if someone ever
|
||||
// decides to show a message box using the theme engine from
|
||||
@@ -63,12 +63,12 @@ public:
|
||||
wxUxThemeEngine::ms_themeEngine = NULL;
|
||||
wxUxThemeEngine::ms_isThemeEngineAvailable = false;
|
||||
|
||||
delete themeEngine;
|
||||
}
|
||||
}
|
||||
delete themeEngine;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxUxThemeModule)
|
||||
DECLARE_DYNAMIC_CLASS(wxUxThemeModule)
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxUxThemeModule, wxModule)
|
||||
@@ -114,7 +114,7 @@ bool wxUxThemeEngine::Initialize()
|
||||
// themes
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// we're prepared to handle the errors
|
||||
wxLogNull noLog;
|
||||
|
||||
|
@@ -180,28 +180,28 @@ static unsigned GetBasicFlags(const wxChar* filename)
|
||||
// Purpose: Add a file to the list if it meets the filter requirement.
|
||||
// Notes: - See GetBasicFlags for remarks about the Mounted flag.
|
||||
//=============================================================================
|
||||
static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
||||
static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
||||
unsigned flagsSet, unsigned flagsUnset)
|
||||
{
|
||||
bool accept = TRUE;
|
||||
bool accept = true;
|
||||
unsigned flags = GetBasicFlags(filename);
|
||||
|
||||
if (flagsSet & wxFS_VOL_MOUNTED && !(flags & wxFS_VOL_MOUNTED))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsUnset & wxFS_VOL_MOUNTED && (flags & wxFS_VOL_MOUNTED))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsSet & wxFS_VOL_REMOVABLE && !(flags & wxFS_VOL_REMOVABLE))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsUnset & wxFS_VOL_REMOVABLE && (flags & wxFS_VOL_REMOVABLE))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsSet & wxFS_VOL_READONLY && !(flags & wxFS_VOL_READONLY))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsUnset & wxFS_VOL_READONLY && (flags & wxFS_VOL_READONLY))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsSet & wxFS_VOL_REMOTE && !(flags & wxFS_VOL_REMOTE))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
else if (flagsUnset & wxFS_VOL_REMOTE && (flags & wxFS_VOL_REMOTE))
|
||||
accept = FALSE;
|
||||
accept = false;
|
||||
|
||||
// Add to the list if passed the filter.
|
||||
if (accept)
|
||||
@@ -217,7 +217,7 @@ static bool FilteredAdd(wxArrayString& list, const wxChar* filename,
|
||||
// all items while determining which are connected and not. So this
|
||||
// function will find either all items or connected items.
|
||||
//=============================================================================
|
||||
static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
unsigned flagsSet, unsigned flagsUnset)
|
||||
{
|
||||
HANDLE hEnum;
|
||||
@@ -303,19 +303,19 @@ static int CompareFcn(const wxString& first, const wxString& second)
|
||||
// way manually.
|
||||
// - The resulting list is sorted alphabetically.
|
||||
//=============================================================================
|
||||
static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
unsigned flagsSet, unsigned flagsUnset)
|
||||
{
|
||||
// NN query depends on dynamically loaded library.
|
||||
if (!s_pWNetOpenEnum || !s_pWNetEnumResource || !s_pWNetCloseEnum)
|
||||
{
|
||||
wxLogError(_("Failed to load mpr.dll."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't waste time doing the work if the flags conflict.
|
||||
if (flagsSet & wxFS_VOL_MOUNTED && flagsUnset & wxFS_VOL_MOUNTED)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
//----------------------------------------------
|
||||
// Generate the list according to the flags set.
|
||||
@@ -344,7 +344,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
wxString all(list[iList]);
|
||||
wxString mount(mounted[iMounted]);
|
||||
|
||||
while (compare =
|
||||
while (compare =
|
||||
wxStricmp(list[iList].c_str(), mounted[iMounted].c_str()),
|
||||
compare > 0 && iList >= 0)
|
||||
{
|
||||
@@ -367,7 +367,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
} // BuildRemoteList
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
@@ -381,7 +381,7 @@ static bool BuildRemoteList(wxArrayString& list, NETRESOURCE* pResSrc,
|
||||
//=============================================================================
|
||||
wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset)
|
||||
{
|
||||
InterlockedExchange(&s_cancelSearch, FALSE); // reset
|
||||
::InterlockedExchange(&s_cancelSearch, FALSE); // reset
|
||||
|
||||
if (!s_mprLib.IsLoaded() && s_mprLib.Load(_T("mpr.dll")))
|
||||
{
|
||||
@@ -450,7 +450,7 @@ wxArrayString wxFSVolumeBase::GetVolumes(int flagsSet, int flagsUnset)
|
||||
//=============================================================================
|
||||
void wxFSVolumeBase::CancelSearch()
|
||||
{
|
||||
InterlockedExchange(&s_cancelSearch, TRUE);
|
||||
::InterlockedExchange(&s_cancelSearch, TRUE);
|
||||
} // CancelSearch
|
||||
|
||||
//=============================================================================
|
||||
@@ -459,7 +459,7 @@ void wxFSVolumeBase::CancelSearch()
|
||||
//=============================================================================
|
||||
wxFSVolumeBase::wxFSVolumeBase()
|
||||
{
|
||||
m_isOk = FALSE;
|
||||
m_isOk = false;
|
||||
} // wxVolume
|
||||
|
||||
//=============================================================================
|
||||
@@ -478,7 +478,7 @@ wxFSVolumeBase::wxFSVolumeBase(const wxString& name)
|
||||
bool wxFSVolumeBase::Create(const wxString& name)
|
||||
{
|
||||
// assume fail.
|
||||
m_isOk = FALSE;
|
||||
m_isOk = false;
|
||||
|
||||
// supplied.
|
||||
m_volName = name;
|
||||
@@ -494,12 +494,12 @@ bool wxFSVolumeBase::Create(const wxString& name)
|
||||
m_dispName = fi.szDisplayName;
|
||||
|
||||
// all tests passed.
|
||||
return m_isOk = TRUE;
|
||||
return m_isOk = true;
|
||||
} // Create
|
||||
|
||||
//=============================================================================
|
||||
// Function: IsOk
|
||||
// Purpose: returns TRUE if the volume is legal.
|
||||
// Purpose: returns true if the volume is legal.
|
||||
// Notes: For fixed disks, it must exist. For removable disks, it must also
|
||||
// be present. For Network Shares, it must also be logged in, etc.
|
||||
//=============================================================================
|
||||
@@ -588,7 +588,7 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const
|
||||
case wxFS_VOL_ICO_SEL_LARGE:
|
||||
flags |= SHGFI_SHELLICONSIZE | SHGFI_OPENICON;
|
||||
break;
|
||||
|
||||
|
||||
case wxFS_VOL_ICO_MAX:
|
||||
wxFAIL_MSG(_T("wxFS_VOL_ICO_MAX is not valid icon type"));
|
||||
break;
|
||||
|
@@ -1737,7 +1737,7 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
menu->SetInvokingWindow(this);
|
||||
menu->UpdateUI();
|
||||
|
||||
if ( x == -1 && y == -1 )
|
||||
if ( x == wxDefaultCoord && y == wxDefaultCoord )
|
||||
{
|
||||
wxPoint mouse = ScreenToClient(wxGetMousePosition());
|
||||
x = mouse.x; y = mouse.y;
|
||||
@@ -4014,7 +4014,7 @@ extern wxCOLORMAP *wxGetStdColourMap()
|
||||
bool wxWindowMSW::HandlePaint()
|
||||
{
|
||||
// if (GetExtraStyle() & wxWS_EX_THEMED_BACKGROUND)
|
||||
// return FALSE;
|
||||
// return false;
|
||||
|
||||
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
||||
if ( !hRegion )
|
||||
|
@@ -39,7 +39,7 @@ int main( int argc, char *argv [] )
|
||||
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
|
||||
|
||||
return WinMain (hInstance, /* hInstance */
|
||||
0, /* hPrevInstance */
|
||||
lpszCmdParam, /* lpszCmdParam */
|
||||
SW_NORMAL); /* nCmdShow */
|
||||
0, /* hPrevInstance */
|
||||
lpszCmdParam, /* lpszCmdParam */
|
||||
SW_NORMAL); /* nCmdShow */
|
||||
}
|
||||
|
Reference in New Issue
Block a user