Code cleaning: whitespaces, -1/wxID_ANY/wxDefaultCoord, TRUE/true, FALSE/false, ::.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-08-25 12:17:55 +00:00
parent 0de41e82dc
commit cbe874bd32
10 changed files with 155 additions and 155 deletions

View File

@@ -39,7 +39,7 @@ public:
wxFindReplaceDialogImpl *GetImpl() const { return m_impl; } wxFindReplaceDialogImpl *GetImpl() const { return m_impl; }
// override some base class virtuals // override some base class virtuals
virtual bool Show(bool show = TRUE); virtual bool Show(bool show = true);
virtual void SetTitle( const wxString& title); virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const; virtual wxString GetTitle() const;

View File

@@ -29,7 +29,7 @@ public:
// Enumerate the fonts. // Enumerate the fonts.
bool Enumerate(); bool Enumerate();
// Stop enumeration if FALSE is returned. // Stop enumeration if false is returned.
// By default, the enumerator stores the facenames in a list for // By default, the enumerator stores the facenames in a list for
// retrieval via GetFacenames(). // retrieval via GetFacenames().
virtual bool OnFont(const wxFont& font); virtual bool OnFont(const wxFont& font);

View File

@@ -57,7 +57,7 @@ public:
// Toolbar // Toolbar
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
virtual wxToolBar* CreateToolBar(long style = -1, virtual wxToolBar* CreateToolBar(long style = -1,
wxWindowID id = -1, wxWindowID id = wxID_ANY,
const wxString& name = wxToolBarNameStr); const wxString& name = wxToolBarNameStr);
virtual void PositionToolBar(); virtual void PositionToolBar();
@@ -103,7 +103,7 @@ public:
virtual void SendSizeEvent(); virtual void SendSizeEvent();
virtual wxPoint GetClientAreaOrigin() const; virtual wxPoint GetClientAreaOrigin() const;
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -133,7 +133,7 @@ protected:
// handle WM_INITMENUPOPUP message // handle WM_INITMENUPOPUP message
bool HandleInitMenuPopup(WXHMENU hMenu); bool HandleInitMenuPopup(WXHMENU hMenu);
virtual bool IsMDIChild() const { return FALSE; } virtual bool IsMDIChild() const { return false; }
// get default (wxWidgets) icon for the frame // get default (wxWidgets) icon for the frame
virtual WXHICON GetDefaultIcon() const; virtual WXHICON GetDefaultIcon() const;

View File

@@ -103,7 +103,7 @@ void wxEnhMetaFile::Free()
bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound) bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound)
{ {
wxCHECK_MSG( Ok(), FALSE, _T("can't play invalid enhanced metafile") ); wxCHECK_MSG( Ok(), false, _T("can't play invalid enhanced metafile") );
wxCHECK_MSG( dc, FALSE, _T("invalid wxDC in wxEnhMetaFile::Play") ); wxCHECK_MSG( dc, FALSE, _T("invalid wxDC in wxEnhMetaFile::Play") );
RECT rect; RECT rect;
@@ -128,10 +128,10 @@ bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound)
{ {
wxLogLastError(_T("PlayEnhMetaFile")); wxLogLastError(_T("PlayEnhMetaFile"));
return FALSE; return false;
} }
return TRUE; return true;
} }
wxSize wxEnhMetaFile::GetSize() const wxSize wxEnhMetaFile::GetSize() const
@@ -170,7 +170,7 @@ bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height))
return wxTheClipboard->AddData(new wxEnhMetaFileDataObject(*this)); return wxTheClipboard->AddData(new wxEnhMetaFileDataObject(*this));
#else // !wxUSE_DRAG_AND_DROP #else // !wxUSE_DRAG_AND_DROP
wxFAIL_MSG(_T("not implemented")); wxFAIL_MSG(_T("not implemented"));
return FALSE; return false;
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP #endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
} }
@@ -184,7 +184,7 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
{ {
ScreenHDC hdcRef; ScreenHDC hdcRef;
RECT rect; RECT rect;
RECT *pRect; RECT *pRect;
if ( width && height ) if ( width && height )
{ {
rect.top = rect.top =
@@ -194,7 +194,7 @@ wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
// CreateEnhMetaFile() wants them in HIMETRIC // CreateEnhMetaFile() wants them in HIMETRIC
PixelToHIMETRIC(&rect.right, &rect.bottom); PixelToHIMETRIC(&rect.right, &rect.bottom);
pRect = ▭ pRect = ▭
} }
else else
@@ -276,7 +276,7 @@ size_t wxEnhMetaFileDataObject::GetDataSize(const wxDataFormat& format) const
bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) const bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
{ {
wxCHECK_MSG( m_metafile.Ok(), FALSE, _T("copying invalid enh metafile") ); wxCHECK_MSG( m_metafile.Ok(), false, _T("copying invalid enh metafile") );
HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE(); HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE();
@@ -287,7 +287,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
{ {
wxLogLastError(_T("CopyEnhMetaFile")); wxLogLastError(_T("CopyEnhMetaFile"));
return FALSE; return false;
} }
*(HENHMETAFILE *)buf = hEMFCopy; *(HENHMETAFILE *)buf = hEMFCopy;
@@ -313,7 +313,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
free(bits); free(bits);
return FALSE; return false;
} }
// and finally convert them to the WMF // and finally convert them to the WMF
@@ -323,7 +323,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
{ {
wxLogLastError(_T("SetMetaFileBitsEx")); wxLogLastError(_T("SetMetaFileBitsEx"));
return FALSE; return false;
} }
METAFILEPICT *mfpict = (METAFILEPICT *)buf; METAFILEPICT *mfpict = (METAFILEPICT *)buf;
@@ -337,7 +337,7 @@ bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf)
PixelToHIMETRIC(&mfpict->xExt, &mfpict->yExt); PixelToHIMETRIC(&mfpict->xExt, &mfpict->yExt);
} }
return TRUE; return true;
} }
bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format, bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format,
@@ -371,7 +371,7 @@ bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format,
free(bits); free(bits);
return FALSE; return false;
} }
ScreenHDC hdcRef; ScreenHDC hdcRef;
@@ -383,13 +383,13 @@ bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format,
{ {
wxLogLastError(_T("SetWinMetaFileBits")); wxLogLastError(_T("SetWinMetaFileBits"));
return FALSE; return false;
} }
} }
m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF); m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF);
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -404,7 +404,7 @@ size_t wxEnhMetaFileSimpleDataObject::GetDataSize() const
bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const
{ {
wxCHECK_MSG( m_metafile.Ok(), FALSE, _T("copying invalid enh metafile") ); wxCHECK_MSG( m_metafile.Ok(), false, _T("copying invalid enh metafile") );
HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE(); HENHMETAFILE hEMF = (HENHMETAFILE)m_metafile.GetHENHMETAFILE();
@@ -413,11 +413,11 @@ bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const
{ {
wxLogLastError(_T("CopyEnhMetaFile")); wxLogLastError(_T("CopyEnhMetaFile"));
return FALSE; return false;
} }
*(HENHMETAFILE *)buf = hEMFCopy; *(HENHMETAFILE *)buf = hEMFCopy;
return TRUE; return true;
} }
bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len), bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len),
@@ -428,7 +428,7 @@ bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len),
wxCHECK_MSG( hEMF, FALSE, _T("pasting invalid enh metafile") ); wxCHECK_MSG( hEMF, FALSE, _T("pasting invalid enh metafile") );
m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF); m_metafile.SetHENHMETAFILE((WXHANDLE)hEMF);
return TRUE; return true;
} }

View File

@@ -82,7 +82,7 @@ public:
FINDREPLACE *GetPtrFindReplace() { return &m_findReplace; } FINDREPLACE *GetPtrFindReplace() { return &m_findReplace; }
// set/query the "closed by user" flag // set/query the "closed by user" flag
void SetClosedByUser() { m_wasClosedByUser = TRUE; } void SetClosedByUser() { m_wasClosedByUser = true; }
bool WasClosedByUser() const { return m_wasClosedByUser; } bool WasClosedByUser() const { return m_wasClosedByUser; }
private: private:
@@ -97,7 +97,7 @@ private:
// the find replace data used by the dialog // the find replace data used by the dialog
FINDREPLACE m_findReplace; FINDREPLACE m_findReplace;
// TRUE if the user closed us, FALSE otherwise // true if the user closed us, false otherwise
bool m_wasClosedByUser; bool m_wasClosedByUser;
// registered Message for Dialog // registered Message for Dialog
@@ -133,7 +133,7 @@ wxFindReplaceDialogImpl::wxFindReplaceDialogImpl(wxFindReplaceDialog *dialog,
m_hwndOwner = NULL; m_hwndOwner = NULL;
m_oldParentWndProc = NULL; m_oldParentWndProc = NULL;
m_wasClosedByUser = FALSE; m_wasClosedByUser = false;
wxZeroMemory(m_findReplace); wxZeroMemory(m_findReplace);
@@ -260,7 +260,7 @@ LRESULT APIENTRY wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
// map flags from Windows // map flags from Windows
wxEventType evtType; wxEventType evtType;
bool replace = FALSE; bool replace = false;
if ( pFR->Flags & FR_DIALOGTERM ) if ( pFR->Flags & FR_DIALOGTERM )
{ {
// we have to notify the dialog that it's being closed by user and // we have to notify the dialog that it's being closed by user and
@@ -278,13 +278,13 @@ LRESULT APIENTRY wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
{ {
evtType = wxEVT_COMMAND_FIND_REPLACE; evtType = wxEVT_COMMAND_FIND_REPLACE;
replace = TRUE; replace = true;
} }
else if ( pFR->Flags & FR_REPLACEALL ) else if ( pFR->Flags & FR_REPLACEALL )
{ {
evtType = wxEVT_COMMAND_FIND_REPLACE_ALL; evtType = wxEVT_COMMAND_FIND_REPLACE_ALL;
replace = TRUE; replace = true;
} }
else else
{ {
@@ -372,7 +372,7 @@ void wxFindReplaceDialog::Init()
m_FindReplaceData = NULL; m_FindReplaceData = NULL;
// as we're created in the hidden state, bring the internal flag in sync // as we're created in the hidden state, bring the internal flag in sync
m_isShown = FALSE; m_isShown = false;
} }
wxFindReplaceDialog::wxFindReplaceDialog(wxWindow *parent, wxFindReplaceDialog::wxFindReplaceDialog(wxWindow *parent,
@@ -404,7 +404,7 @@ wxFindReplaceDialog::~wxFindReplaceDialog()
delete m_impl; delete m_impl;
// prevent the base class dtor from trying to hide us! // prevent the base class dtor from trying to hide us!
m_isShown = FALSE; m_isShown = false;
// and from destroying our window [again] // and from destroying our window [again]
m_hWnd = (WXHWND)NULL; m_hWnd = (WXHWND)NULL;
@@ -434,7 +434,7 @@ bool wxFindReplaceDialog::Show(bool show)
if ( !wxWindowBase::Show(show) ) if ( !wxWindowBase::Show(show) )
{ {
// visibility status didn't change // visibility status didn't change
return FALSE; return false;
} }
// do we already have the dialog window? // do we already have the dialog window?
@@ -443,16 +443,16 @@ bool wxFindReplaceDialog::Show(bool show)
// yes, just use it // yes, just use it
(void)::ShowWindow(GetHwnd(), show ? SW_SHOW : SW_HIDE); (void)::ShowWindow(GetHwnd(), show ? SW_SHOW : SW_HIDE);
return TRUE; return true;
} }
if ( !show ) if ( !show )
{ {
// well, it doesn't exist which is as good as being hidden // well, it doesn't exist which is as good as being hidden
return TRUE; return true;
} }
wxCHECK_MSG( m_FindReplaceData, FALSE, _T("call Create() first!") ); wxCHECK_MSG( m_FindReplaceData, false, _T("call Create() first!") );
wxASSERT_MSG( !m_impl, _T("why don't we have the window then?") ); wxASSERT_MSG( !m_impl, _T("why don't we have the window then?") );
@@ -482,7 +482,7 @@ bool wxFindReplaceDialog::Show(bool show)
delete m_impl; delete m_impl;
m_impl = NULL; m_impl = NULL;
return FALSE; return false;
} }
// subclass parent window in order to get FINDMSGSTRING message // subclass parent window in order to get FINDMSGSTRING message
@@ -495,7 +495,7 @@ bool wxFindReplaceDialog::Show(bool show)
m_hWnd = (WXHWND)hwnd; m_hWnd = (WXHWND)hwnd;
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -299,8 +299,8 @@ int wxFileDialog::ShowModal()
// forward slashes) and also squeeze multiple consecutive slashes into one // forward slashes) and also squeeze multiple consecutive slashes into one
// as it doesn't like two backslashes in a row neither // as it doesn't like two backslashes in a row neither
wxString dir; wxString dir;
size_t i, len = m_dir.length(); size_t i, len = m_dir.length();
dir.reserve(len); dir.reserve(len);
for ( i = 0; i < len; i++ ) for ( i = 0; i < len; i++ )
{ {

View File

@@ -48,46 +48,46 @@
#if wxUSE_EXTENDED_RTTI #if wxUSE_EXTENDED_RTTI
wxBEGIN_ENUM( wxFontFamily ) wxBEGIN_ENUM( wxFontFamily )
wxENUM_MEMBER( wxDEFAULT ) wxENUM_MEMBER( wxDEFAULT )
wxENUM_MEMBER( wxDECORATIVE ) wxENUM_MEMBER( wxDECORATIVE )
wxENUM_MEMBER( wxROMAN ) wxENUM_MEMBER( wxROMAN )
wxENUM_MEMBER( wxSCRIPT ) wxENUM_MEMBER( wxSCRIPT )
wxENUM_MEMBER( wxSWISS ) wxENUM_MEMBER( wxSWISS )
wxENUM_MEMBER( wxMODERN ) wxENUM_MEMBER( wxMODERN )
wxENUM_MEMBER( wxTELETYPE ) wxENUM_MEMBER( wxTELETYPE )
wxEND_ENUM( wxFontFamily ) wxEND_ENUM( wxFontFamily )
wxBEGIN_ENUM( wxFontStyle ) wxBEGIN_ENUM( wxFontStyle )
wxENUM_MEMBER( wxNORMAL ) wxENUM_MEMBER( wxNORMAL )
wxENUM_MEMBER( wxITALIC ) wxENUM_MEMBER( wxITALIC )
wxENUM_MEMBER( wxSLANT ) wxENUM_MEMBER( wxSLANT )
wxEND_ENUM( wxFontStyle ) wxEND_ENUM( wxFontStyle )
wxBEGIN_ENUM( wxFontWeight ) wxBEGIN_ENUM( wxFontWeight )
wxENUM_MEMBER( wxNORMAL ) wxENUM_MEMBER( wxNORMAL )
wxENUM_MEMBER( wxLIGHT ) wxENUM_MEMBER( wxLIGHT )
wxENUM_MEMBER( wxBOLD ) wxENUM_MEMBER( wxBOLD )
wxEND_ENUM( wxFontWeight ) wxEND_ENUM( wxFontWeight )
IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject,"wx/font.h") IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject,"wx/font.h")
wxBEGIN_PROPERTIES_TABLE(wxFont) wxBEGIN_PROPERTIES_TABLE(wxFont)
wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontFamily wxPROPERTY( Family, int , SetFamily, GetFamily, (int)wxDEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontFamily
wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle
wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight
wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxEND_PROPERTIES_TABLE() wxEND_PROPERTIES_TABLE()
wxCONSTRUCTOR_6( wxFont , int , Size , int , Family , int , Style , int , Weight , bool , Underlined , wxString , Face ) wxCONSTRUCTOR_6( wxFont , int , Size , int , Family , int , Style , int , Weight , bool , Underlined , wxString , Face )
wxBEGIN_HANDLERS_TABLE(wxFont) wxBEGIN_HANDLERS_TABLE(wxFont)
wxEND_HANDLERS_TABLE() wxEND_HANDLERS_TABLE()
#else #else
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
#endif #endif
@@ -109,7 +109,7 @@ public:
wxFontRefData() wxFontRefData()
{ {
Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
FALSE, wxEmptyString, wxFONTENCODING_DEFAULT); false, wxEmptyString, wxFONTENCODING_DEFAULT);
} }
wxFontRefData(int size, wxFontRefData(int size,
@@ -313,7 +313,7 @@ void wxFontRefData::Init(int pointSize,
m_hFont = 0; m_hFont = 0;
m_nativeFontInfoOk = FALSE; m_nativeFontInfoOk = false;
} }
void wxFontRefData::Init(const wxNativeFontInfo& info, WXHFONT hFont) void wxFontRefData::Init(const wxNativeFontInfo& info, WXHFONT hFont)
@@ -324,7 +324,7 @@ void wxFontRefData::Init(const wxNativeFontInfo& info, WXHFONT hFont)
// to LOGFONT back to HFONT) // to LOGFONT back to HFONT)
m_hFont = hFont; m_hFont = hFont;
m_nativeFontInfoOk = TRUE; m_nativeFontInfoOk = true;
m_nativeFontInfo = info; m_nativeFontInfo = info;
// This is the best we can do since we don't have the // This is the best we can do since we don't have the
// correct information at this point. // correct information at this point.
@@ -341,7 +341,7 @@ bool wxFontRefData::Alloc(wxFont *font)
if ( !m_nativeFontInfoOk ) if ( !m_nativeFontInfoOk )
{ {
wxFillLogFont(&m_nativeFontInfo.lf, font); wxFillLogFont(&m_nativeFontInfo.lf, font);
m_nativeFontInfoOk = TRUE; m_nativeFontInfoOk = true;
} }
HFONT hfont = ::CreateFontIndirect(&m_nativeFontInfo.lf); HFONT hfont = ::CreateFontIndirect(&m_nativeFontInfo.lf);
@@ -349,12 +349,12 @@ bool wxFontRefData::Alloc(wxFont *font)
{ {
wxLogLastError(wxT("CreateFont")); wxLogLastError(wxT("CreateFont"));
return FALSE; return false;
} }
m_hFont = (WXHFONT)hfont; m_hFont = (WXHFONT)hfont;
return TRUE; return true;
} }
void wxFontRefData::Free() void wxFontRefData::Free()
@@ -602,79 +602,79 @@ bool wxNativeFontInfo::FromString(const wxString& s)
// first the version // first the version
wxString token = tokenizer.GetNextToken(); wxString token = tokenizer.GetNextToken();
if ( token != _T('0') ) if ( token != _T('0') )
return FALSE; return false;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfHeight = l; lf.lfHeight = l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfWidth = l; lf.lfWidth = l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfEscapement = l; lf.lfEscapement = l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfOrientation = l; lf.lfOrientation = l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfWeight = l; lf.lfWeight = l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) ) if ( !token.ToLong(&l) )
return FALSE; return false;
lf.lfItalic = (BYTE)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 = (BYTE)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 = (BYTE)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 = (BYTE)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 = (BYTE)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 = (BYTE)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 = (BYTE)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 = (BYTE)l; lf.lfPitchAndFamily = (BYTE)l;
token = tokenizer.GetNextToken(); token = tokenizer.GetNextToken();
if(!token) if(!token)
return FALSE; return false;
wxStrcpy(lf.lfFaceName, token.c_str()); wxStrcpy(lf.lfFaceName, token.c_str());
return TRUE; return true;
} }
wxString wxNativeFontInfo::ToString() const wxString wxNativeFontInfo::ToString() const
@@ -717,7 +717,7 @@ bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
RealizeResource(); RealizeResource();
return TRUE; return true;
} }
wxFont::wxFont(const wxString& fontdesc) wxFont::wxFont(const wxString& fontdesc)
@@ -752,7 +752,7 @@ bool wxFont::Create(int pointSize,
RealizeResource(); RealizeResource();
return TRUE; return true;
} }
wxFont::~wxFont() wxFont::~wxFont()
@@ -767,9 +767,9 @@ bool wxFont::RealizeResource()
{ {
if ( GetResourceHandle() ) if ( GetResourceHandle() )
{ {
// VZ: the old code returned FALSE in this case, but it doesn't seem // VZ: the old code returned false in this case, but it doesn't seem
// to make sense because the font _was_ created // to make sense because the font _was_ created
return TRUE; return true;
} }
return M_FONTDATA->Alloc(this); return M_FONTDATA->Alloc(this);
@@ -781,10 +781,10 @@ bool wxFont::FreeResource(bool WXUNUSED(force))
{ {
M_FONTDATA->Free(); M_FONTDATA->Free();
return TRUE; return true;
} }
return FALSE; return false;
} }
WXHANDLE wxFont::GetResourceHandle() const WXHANDLE wxFont::GetResourceHandle() const
@@ -929,7 +929,7 @@ int wxFont::GetWeight() const
bool wxFont::GetUnderlined() const bool wxFont::GetUnderlined() const
{ {
wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") ); wxCHECK_MSG( Ok(), false, wxT("invalid font") );
return M_FONTDATA->GetUnderlined(); return M_FONTDATA->GetUnderlined();
} }

View File

@@ -80,10 +80,10 @@ private:
// if not empty, enum only the fonts in this family // if not empty, enum only the fonts in this family
wxString m_family; wxString m_family;
// if TRUE, enum only fixed fonts // if true, enum only fixed fonts
bool m_fixedOnly; bool m_fixedOnly;
// if TRUE, we enumerate the encodings, not fonts // if true, we enumerate the encodings, not fonts
bool m_enumEncodings; bool m_enumEncodings;
// the list of charsets we already found while enumerating charsets // the list of charsets we already found while enumerating charsets
@@ -116,13 +116,13 @@ wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum)
{ {
m_fontEnum = fontEnum; m_fontEnum = fontEnum;
m_charset = DEFAULT_CHARSET; m_charset = DEFAULT_CHARSET;
m_fixedOnly = FALSE; m_fixedOnly = false;
m_enumEncodings = FALSE; m_enumEncodings = false;
} }
void wxFontEnumeratorHelper::SetFamily(const wxString& family) void wxFontEnumeratorHelper::SetFamily(const wxString& family)
{ {
m_enumEncodings = TRUE; m_enumEncodings = true;
m_family = family; m_family = family;
} }
@@ -138,7 +138,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
#endif // wxUSE_FONTMAP #endif // wxUSE_FONTMAP
{ {
// no such encodings at all // no such encodings at all
return FALSE; return false;
} }
} }
@@ -146,7 +146,7 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
m_facename = info.facename; m_facename = info.facename;
} }
return TRUE; return true;
} }
#if defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 ) && !wxUSE_NORLANDER_HEADERS #if defined(__GNUWIN32__) && !defined(__CYGWIN10__) && !wxCHECK_W32API_VERSION( 1, 1 ) && !wxUSE_NORLANDER_HEADERS
@@ -194,7 +194,7 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
else else
{ {
// continue enumeration // continue enumeration
return TRUE; return true;
} }
} }
@@ -205,7 +205,7 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH ) if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH )
{ {
// not a fixed pitch font // not a fixed pitch font
return TRUE; return true;
} }
} }
@@ -214,7 +214,7 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
// check that we have the right encoding // check that we have the right encoding
if ( lf->lfCharSet != m_charset ) if ( lf->lfCharSet != m_charset )
{ {
return TRUE; return true;
} }
} }
else // enumerating fonts in all charsets else // enumerating fonts in all charsets
@@ -225,7 +225,7 @@ bool wxFontEnumeratorHelper::OnFont(const LPLOGFONT lf,
if ( m_facenames.Index(lf->lfFaceName) != wxNOT_FOUND ) if ( m_facenames.Index(lf->lfFaceName) != wxNOT_FOUND )
{ {
// continue enumeration // continue enumeration
return TRUE; return true;
} }
wxConstCast(this, wxFontEnumeratorHelper)-> wxConstCast(this, wxFontEnumeratorHelper)->
@@ -251,7 +251,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
} }
// else: no such fonts, unknown encoding // else: no such fonts, unknown encoding
return TRUE; return true;
} }
bool wxFontEnumerator::EnumerateEncodings(const wxString& family) bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
@@ -260,7 +260,7 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
fe.SetFamily(family); fe.SetFamily(family);
fe.DoEnumerate(); fe.DoEnumerate();
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -102,11 +102,11 @@ bool wxNativeEncodingInfo::FromString(const wxString& s)
if ( wxSscanf(tmp, _T("%u"), &charset) != 1 ) if ( wxSscanf(tmp, _T("%u"), &charset) != 1 )
{ {
// should be a number! // should be a number!
return FALSE; return false;
} }
} }
return TRUE; return true;
} }
wxString wxNativeEncodingInfo::ToString() const wxString wxNativeEncodingInfo::ToString() const
@@ -141,7 +141,7 @@ wxString wxNativeEncodingInfo::ToString() const
bool wxGetNativeFontEncoding(wxFontEncoding encoding, bool wxGetNativeFontEncoding(wxFontEncoding encoding,
wxNativeEncodingInfo *info) wxNativeEncodingInfo *info)
{ {
wxCHECK_MSG( info, FALSE, _T("bad pointer in wxGetNativeFontEncoding") ); wxCHECK_MSG( info, NULL, _T("bad pointer in wxGetNativeFontEncoding") );
if ( encoding == wxFONTENCODING_DEFAULT ) if ( encoding == wxFONTENCODING_DEFAULT )
{ {
@@ -151,11 +151,11 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding,
extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding); extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding);
info->charset = wxEncodingToCharset(encoding); info->charset = wxEncodingToCharset(encoding);
if ( info->charset == -1 ) if ( info->charset == -1 )
return FALSE; return false;
info->encoding = encoding; info->encoding = encoding;
return TRUE; return true;
} }
bool wxTestFontEncoding(const wxNativeEncodingInfo& info) bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
@@ -171,12 +171,12 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
if ( !hfont ) if ( !hfont )
{ {
// no such font // no such font
return FALSE; return false;
} }
::DeleteObject((HGDIOBJ)hfont); ::DeleteObject((HGDIOBJ)hfont);
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -91,7 +91,7 @@ wxBEGIN_FLAGS( wxFrameStyle )
wxFLAGS_MEMBER(wxBORDER_RAISED) wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC) wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE) wxFLAGS_MEMBER(wxBORDER_NONE)
// old style border flags // old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER) wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER) wxFLAGS_MEMBER(wxSUNKEN_BORDER)
@@ -141,7 +141,7 @@ wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxFrame) wxBEGIN_HANDLERS_TABLE(wxFrame)
wxEND_HANDLERS_TABLE() wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle) wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle)
#else #else
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow) IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
@@ -157,9 +157,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
#if wxUSE_NATIVE_STATUSBAR #if wxUSE_NATIVE_STATUSBAR
bool wxFrame::m_useNativeStatusBar = TRUE; bool wxFrame::m_useNativeStatusBar = true;
#else #else
bool wxFrame::m_useNativeStatusBar = FALSE; bool wxFrame::m_useNativeStatusBar = false;
#endif #endif
#endif // wxUSE_NATIVE_STATUSBAR #endif // wxUSE_NATIVE_STATUSBAR
@@ -178,7 +178,7 @@ void wxFrame::Init()
m_fsStatusBarHeight = 0; m_fsStatusBarHeight = 0;
m_fsToolBarHeight = 0; m_fsToolBarHeight = 0;
m_wasMinimized = FALSE; m_wasMinimized = false;
} }
bool wxFrame::Create(wxWindow *parent, bool wxFrame::Create(wxWindow *parent,
@@ -203,7 +203,7 @@ bool wxFrame::Create(wxWindow *parent,
wxFrame::~wxFrame() wxFrame::~wxFrame()
{ {
m_isBeingDeleted = TRUE; m_isBeingDeleted = true;
DeleteAllBars(); DeleteAllBars();
} }
@@ -349,7 +349,7 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar)
#elif defined(WINCE_WITHOUT_COMMANDBAR) #elif defined(WINCE_WITHOUT_COMMANDBAR)
if (!GetToolBar()) if (!GetToolBar())
{ {
wxToolBar* toolBar = new wxToolBar(this, -1, wxToolBar* toolBar = new wxToolBar(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxBORDER_NONE | wxTB_HORIZONTAL, wxBORDER_NONE | wxTB_HORIZONTAL,
wxToolBarNameStr, menubar); wxToolBarNameStr, menubar);
@@ -368,7 +368,7 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar)
// adjust for menu / titlebar height // adjust for menu / titlebar height
rc.bottom -= (2*menuHeight-1); rc.bottom -= (2*menuHeight-1);
MoveWindow((HWND) GetHWND(), rc.left, rc.top, rc.right, rc.bottom, FALSE); ::MoveWindow((HWND) GetHWND(), rc.left, rc.top, rc.right, rc.bottom, FALSE);
} }
#endif #endif
@@ -436,11 +436,11 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
wxWindow::OnSysColourChanged(event); wxWindow::OnSysColourChanged(event);
} }
// Pass TRUE to show full screen, FALSE to restore. // Pass true to show full screen, false to restore.
bool wxFrame::ShowFullScreen(bool show, long style) bool wxFrame::ShowFullScreen(bool show, long style)
{ {
if ( IsFullScreen() == show ) if ( IsFullScreen() == show )
return FALSE; return false;
if (show) if (show)
{ {
@@ -457,8 +457,8 @@ bool wxFrame::ShowFullScreen(bool show, long style)
if ((style & wxFULLSCREEN_NOTOOLBAR) && theToolBar) if ((style & wxFULLSCREEN_NOTOOLBAR) && theToolBar)
{ {
theToolBar->SetSize(-1,0); theToolBar->SetSize(wxDefaultCoord,0);
theToolBar->Show(FALSE); theToolBar->Show(false);
} }
#endif // __WXWINCE__ #endif // __WXWINCE__
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
@@ -482,7 +482,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
//m_fsStatusBarFields = theStatusBar->GetFieldsCount(); //m_fsStatusBarFields = theStatusBar->GetFieldsCount();
//SetStatusBar((wxStatusBar*) NULL); //SetStatusBar((wxStatusBar*) NULL);
//delete theStatusBar; //delete theStatusBar;
theStatusBar->Show(FALSE); theStatusBar->Show(false);
} }
else else
m_fsStatusBarFields = 0; m_fsStatusBarFields = 0;
@@ -491,7 +491,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
else else
{ {
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
#if defined(WINCE_WITHOUT_COMMANDBAR) #if defined(WINCE_WITHOUT_COMMANDBAR)
// TODO: show commandbar // TODO: show commandbar
#else #else
wxToolBar *theToolBar = GetToolBar(); wxToolBar *theToolBar = GetToolBar();
@@ -499,8 +499,8 @@ bool wxFrame::ShowFullScreen(bool show, long style)
// restore the toolbar, menubar, and statusbar // restore the toolbar, menubar, and statusbar
if (theToolBar && (m_fsStyle & wxFULLSCREEN_NOTOOLBAR)) if (theToolBar && (m_fsStyle & wxFULLSCREEN_NOTOOLBAR))
{ {
theToolBar->SetSize(-1, m_fsToolBarHeight); theToolBar->SetSize(wxDefaultCoord, m_fsToolBarHeight);
theToolBar->Show(TRUE); theToolBar->Show(true);
} }
#endif // __WXWINCE__ #endif // __WXWINCE__
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
@@ -511,7 +511,7 @@ bool wxFrame::ShowFullScreen(bool show, long style)
//CreateStatusBar(m_fsStatusBarFields); //CreateStatusBar(m_fsStatusBarFields);
if (GetStatusBar()) if (GetStatusBar())
{ {
GetStatusBar()->Show(TRUE); GetStatusBar()->Show(true);
PositionStatusBar(); PositionStatusBar();
} }
} }
@@ -590,13 +590,13 @@ void wxFrame::PositionToolBar()
int tw, th; int tw, th;
toolbar->GetPosition(&tx, &ty); toolbar->GetPosition(&tx, &ty);
toolbar->GetSize(&tw, &th); toolbar->GetSize(&tw, &th);
// Adjust // Adjust
if (ty < 0 && (-ty == th)) if (ty < 0 && (-ty == th))
ty = 0; ty = 0;
if (tx < 0 && (-tx == tw)) if (tx < 0 && (-tx == tw))
tx = 0; tx = 0;
int desiredW = tw; int desiredW = tw;
int desiredH = th; int desiredH = th;
@@ -609,23 +609,23 @@ void wxFrame::PositionToolBar()
desiredW = width; desiredW = width;
// if ( toolbar->GetWindowStyleFlag() & wxTB_FLAT ) // if ( toolbar->GetWindowStyleFlag() & wxTB_FLAT )
// desiredW -= 3; // desiredW -= 3;
} }
// use the 'real' MSW position here, don't offset relativly to the // use the 'real' MSW position here, don't offset relativly to the
// client area origin // client area origin
// Optimise such that we don't have to always resize the toolbar // Optimise such that we don't have to always resize the toolbar
// when the frame changes, otherwise we'll get a lot of flicker. // when the frame changes, otherwise we'll get a lot of flicker.
bool heightChanging wxDUMMY_INITIALIZE(true); bool heightChanging wxDUMMY_INITIALIZE(true);
bool widthChanging wxDUMMY_INITIALIZE(true); bool widthChanging wxDUMMY_INITIALIZE(true);
if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL ) if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )
{ {
// It's OK if the current height is greater than what can be shown. // It's OK if the current height is greater than what can be shown.
heightChanging = (desiredH > th) ; heightChanging = (desiredH > th) ;
widthChanging = (desiredW != tw) ; widthChanging = (desiredW != tw) ;
// The next time around, we may not have to set the size // The next time around, we may not have to set the size
if (heightChanging) if (heightChanging)
desiredH = desiredH + 200; desiredH = desiredH + 200;
} }
@@ -635,14 +635,14 @@ void wxFrame::PositionToolBar()
widthChanging = (desiredW > tw) ; widthChanging = (desiredW > tw) ;
heightChanging = (desiredH != th) ; heightChanging = (desiredH != th) ;
// The next time around, we may not have to set the size // The next time around, we may not have to set the size
if (widthChanging) if (widthChanging)
desiredW = desiredW + 200; desiredW = desiredW + 200;
} }
if (tx != 0 || ty != 0 || widthChanging || heightChanging) if (tx != 0 || ty != 0 || widthChanging || heightChanging)
toolbar->SetSize(x, y, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS); toolbar->SetSize(x, y, desiredW, desiredH, wxSIZE_NO_ADJUSTMENTS);
#endif // __WXWINCE__ #endif // __WXWINCE__
} }
} }
@@ -717,18 +717,18 @@ WXHICON wxFrame::GetDefaultIcon() const
bool wxFrame::MSWTranslateMessage(WXMSG* pMsg) bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
{ {
if ( wxWindow::MSWTranslateMessage(pMsg) ) if ( wxWindow::MSWTranslateMessage(pMsg) )
return TRUE; return true;
#if wxUSE_MENUS && wxUSE_ACCEL && !defined(__WXUNIVERSAL__) #if wxUSE_MENUS && wxUSE_ACCEL && !defined(__WXUNIVERSAL__)
// try the menu bar accels // try the menu bar accels
wxMenuBar *menuBar = GetMenuBar(); wxMenuBar *menuBar = GetMenuBar();
if ( !menuBar ) if ( !menuBar )
return FALSE; return false;
const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable(); const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
return acceleratorTable.Translate(this, pMsg); return acceleratorTable.Translate(this, pMsg);
#else #else
return FALSE; return false;
#endif // wxUSE_MENUS && wxUSE_ACCEL #endif // wxUSE_MENUS && wxUSE_ACCEL
} }
@@ -739,7 +739,7 @@ bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
bool wxFrame::HandlePaint() bool wxFrame::HandlePaint()
{ {
RECT rect; RECT rect;
if ( GetUpdateRect(GetHwnd(), &rect, FALSE) ) if ( ::GetUpdateRect(GetHwnd(), &rect, FALSE) )
{ {
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
if ( m_iconized ) if ( m_iconized )
@@ -773,7 +773,7 @@ bool wxFrame::HandlePaint()
::EndPaint(GetHwnd(), &ps); ::EndPaint(GetHwnd(), &ps);
return TRUE; return true;
} }
else else
#endif #endif
@@ -784,13 +784,13 @@ bool wxFrame::HandlePaint()
else else
{ {
// nothing to paint - processed // nothing to paint - processed
return TRUE; return true;
} }
} }
bool wxFrame::HandleSize(int x, int y, WXUINT id) bool wxFrame::HandleSize(int x, int y, WXUINT id)
{ {
bool processed = FALSE; bool processed = false;
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
switch ( id ) switch ( id )
@@ -803,9 +803,9 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
break; break;
// restore all child frames too // restore all child frames too
IconizeChildFrames(FALSE); IconizeChildFrames(false);
(void)SendIconizeEvent(FALSE); (void)SendIconizeEvent(false);
// fall through // fall through
@@ -815,11 +815,11 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id)
case SIZEICONIC: case SIZEICONIC:
// iconize all child frames too // iconize all child frames too
IconizeChildFrames(TRUE); IconizeChildFrames(true);
(void)SendIconizeEvent(); (void)SendIconizeEvent();
m_iconized = TRUE; m_iconized = true;
break; break;
} }
#endif #endif
@@ -890,11 +890,11 @@ bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
if ( ProcessCommand(id) ) if ( ProcessCommand(id) )
{ {
return TRUE; return true;
} }
} }
return FALSE; return false;
} }
bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu) bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
@@ -917,9 +917,9 @@ bool wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
// items opening popup menus (they don't have them anyhow) but do clear // items opening popup menus (they don't have them anyhow) but do clear
// the status line - otherwise, we would be left with the help message // the status line - otherwise, we would be left with the help message
// for the previous item which doesn't apply any more // for the previous item which doesn't apply any more
DoGiveHelp(wxEmptyString, FALSE); DoGiveHelp(wxEmptyString, false);
return FALSE; return false;
} }
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item); wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
@@ -945,7 +945,7 @@ bool wxFrame::HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup)
WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{ {
WXLRESULT rc = 0; WXLRESULT rc = 0;
bool processed = FALSE; bool processed = false;
switch ( message ) switch ( message )
{ {
@@ -1027,7 +1027,7 @@ bool wxFrame::HandleInitMenuPopup(WXHMENU hMenu)
} }
} }
} }
wxMenuEvent event(wxEVT_MENU_OPEN, 0, menu); wxMenuEvent event(wxEVT_MENU_OPEN, 0, menu);
event.SetEventObject(this); event.SetEventObject(this);