Source cleaning: -1/wxID_ANY/wxNOT_FOUND, ::, TRUE/true, FALSE/false, whitespaces, tabs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-08-31 12:38:46 +00:00
parent f50ff87bdb
commit 078cf5cb75
15 changed files with 80 additions and 80 deletions

View File

@@ -124,7 +124,7 @@ public:
bool InsertPage(size_t nPage,
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1);
void AddPageInfo( wxNotebookPageInfo* info ) { AddPage( info->GetPage() , info->GetText() , info->GetSelected() , info->GetImageId() ) ; }
@@ -158,7 +158,7 @@ public:
virtual bool MSWTranslateMessage(WXMSG *wxmsg);
#if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = TRUE);
virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase);
#endif // wxUSE_CONSTRAINTS

View File

@@ -52,7 +52,7 @@ public:
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
virtual bool FreeResource(bool force = FALSE);
virtual bool FreeResource(bool force = false);
inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); }
void SetHPALETTE(WXHPALETTE pal);

View File

@@ -132,7 +132,7 @@ public:
// Internal
bool RealizeResource();
bool FreeResource(bool force = FALSE);
bool FreeResource(bool force = false);
WXHANDLE GetResourceHandle() const;
bool IsFree() const;
void Unshare();

View File

@@ -30,7 +30,7 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual bool Show(bool show = TRUE);
virtual bool Show(bool show = true);
protected:
// popups handle the position like wxTopLevelWindow, not wxWindow

View File

@@ -32,7 +32,7 @@ public:
virtual bool Print(wxWindow *parent,
wxPrintout *printout,
bool prompt = TRUE);
bool prompt = true);
virtual wxDC* PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);

View File

@@ -61,7 +61,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
(DLGPROC) wxDlgProc);
if ( !m_hWnd )
return FALSE;
return false;
SubclassWin(GetHWND());
@@ -84,7 +84,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
return TRUE;
return true;
}
bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
@@ -98,7 +98,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
(DLGPROC)wxDlgProc);
if ( !m_hWnd )
return FALSE;
return false;
SubclassWin(GetHWND());
@@ -121,7 +121,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
CreateWindowFromHWND(this, (WXHWND) hWndNext);
}
return TRUE;
return true;
}
// ---------------------------------------------------------------------------

View File

@@ -323,7 +323,7 @@ int wxNotebook::GetRowCount() const
int wxNotebook::SetSelection(size_t nPage)
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
if ( int(nPage) != m_nSelection )
{

View File

@@ -121,7 +121,7 @@ wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
}
m_bCheckable = bCheckable;
m_bOwnerDrawn = FALSE;
m_bOwnerDrawn = false;
m_nHeight = 0;
m_nMarginWidth = ms_nLastMarginWidth;
m_nMinHeight = wxMSWSystemMenuFontModule::ms_systemMenuHeight;
@@ -192,7 +192,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
// remember height for use in OnDrawItem
m_nHeight = *pheight;
return TRUE;
return true;
}
// draw the item
@@ -203,7 +203,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
{
// we do nothing on focus change
if ( act == wxODFocusChanged )
return TRUE;
return true;
// this flag determines whether or not an edge will
@@ -386,7 +386,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
dc.Blit(rc.x + (margin - nBmpWidth) / 2,
rc.y + heightDiff / 2,
nBmpWidth, nBmpHeight,
&dcMem, 0, 0, wxCOPY, TRUE /* use mask */);
&dcMem, 0, 0, wxCOPY, true /* use mask */);
if ( st & wxODSelected && draw_bitmap_edge ) {
RECT rectBmp = { rc.GetLeft(), rc.GetTop(),
@@ -402,7 +402,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
::SetTextColor(hdc, colOldText);
::SetBkColor(hdc, colOldBack);
return TRUE;
return true;
}

View File

@@ -57,7 +57,7 @@ wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green
wxPalette::~wxPalette(void)
{
// FreeResource(TRUE);
// FreeResource(true);
}
bool wxPalette::FreeResource(bool WXUNUSED(force))
@@ -66,7 +66,7 @@ bool wxPalette::FreeResource(bool WXUNUSED(force))
{
DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
}
return TRUE;
return true;
}
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
@@ -75,7 +75,7 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
#if defined(__WXMICROWIN__)
return (FALSE);
return false;
#else
@@ -84,7 +84,7 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
(WORD)n * sizeof(PALETTEENTRY));
if (!npPal)
return(FALSE);
return false;
npPal->palVersion = 0x300;
npPal->palNumEntries = n;
@@ -99,7 +99,7 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
}
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
LocalFree((HANDLE)npPal);
return TRUE;
return true;
#endif
}
@@ -107,10 +107,10 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
{
#ifdef __WXMICROWIN__
return FALSE;
return 0;
#else
if ( !m_refData )
return FALSE;
return 0;
return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue));
#endif
@@ -119,13 +119,13 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
{
#ifdef __WXMICROWIN__
return FALSE;
return false;
#else
if ( !m_refData )
return FALSE;
return false;
if (index < 0 || index > 255)
return FALSE;
return false;
PALETTEENTRY entry;
if (::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, index, 1, &entry))
@@ -133,9 +133,9 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi
*red = entry.peRed;
*green = entry.peGreen;
*blue = entry.peBlue;
return TRUE;
return true;
} else
return FALSE;
return false;
#endif
}

View File

@@ -141,7 +141,7 @@ bool wxPen::RealizeResource()
if (M_PENDATA->m_style==wxTRANSPARENT)
{
M_PENDATA->m_hPen = (WXHPEN) ::GetStockObject(NULL_PEN);
return TRUE;
return true;
}
COLORREF ms_colour = M_PENDATA->m_colour.GetPixel();
@@ -274,9 +274,9 @@ bool wxPen::RealizeResource()
if (M_PENDATA->m_hPen==0)
wxError("Cannot create pen","Internal error") ;
#endif
return TRUE;
return true;
}
return FALSE;
return false;
}
WXHANDLE wxPen::GetResourceHandle() const
@@ -293,9 +293,9 @@ bool wxPen::FreeResource(bool WXUNUSED(force))
{
DeleteObject((HPEN) M_PENDATA->m_hPen);
M_PENDATA->m_hPen = 0;
return TRUE;
return true;
}
else return FALSE;
else return false;
}
bool wxPen::IsFree() const

View File

@@ -50,7 +50,7 @@ bool wxPopupWindow::Create(wxWindow *parent, int flags)
Hide();
return wxPopupWindowBase::Create(parent) &&
wxWindow::Create(parent, -1,
wxWindow::Create(parent, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
flags | wxPOPUP_WINDOW);
}
@@ -100,7 +100,7 @@ WXHWND wxPopupWindow::MSWGetParent() const
bool wxPopupWindow::Show(bool show)
{
if ( !wxWindowMSW::Show(show) )
return FALSE;
return false;
if ( show )
{
@@ -111,7 +111,7 @@ bool wxPopupWindow::Show(bool show)
}
}
return TRUE;
return true;
}
#endif // #if wxUSE_POPUPWIN

View File

@@ -68,7 +68,7 @@ wxPrintDialog::wxPrintDialog()
{
m_dialogParent = NULL;
m_printerDC = NULL;
m_destroyDC = TRUE;
m_destroyDC = true;
}
wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data)
@@ -89,14 +89,14 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data)
{
m_dialogParent = p;
m_printerDC = NULL;
m_destroyDC = TRUE;
m_destroyDC = true;
if ( data )
m_printDialogData = *data;
m_printDialogData.SetOwnerWindow(p);
return TRUE;
return true;
}
wxPrintDialog::~wxPrintDialog()
@@ -121,7 +121,7 @@ int wxPrintDialog::ShowModal()
p->hwndOwner = 0;
if ( ret != FALSE && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC)
if ( ret != false && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC)
{
wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC);
m_printerDC = pdc;
@@ -138,7 +138,7 @@ wxDC *wxPrintDialog::GetPrintDC()
{
if (m_printerDC)
{
m_destroyDC = FALSE;
m_destroyDC = false;
return m_printerDC;
}
else
@@ -169,7 +169,7 @@ bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data)
#if defined(__WIN95__)
m_pageSetupData.SetOwnerWindow(p);
#endif
return TRUE;
return true;
}
wxPageSetupDialog::~wxPageSetupDialog()
@@ -200,7 +200,7 @@ int wxPageSetupDialog::ShowModal()
wxGenericPageSetupDialog *genericPageSetupDialog = new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData);
int ret = genericPageSetupDialog->ShowModal();
m_pageSetupData = genericPageSetupDialog->GetPageSetupData();
genericPageSetupDialog->Close(TRUE);
genericPageSetupDialog->Close(true);
return ret;
#endif
}

View File

@@ -417,7 +417,7 @@ LONG APIENTRY _EXPORT wxAbortProc(HDC WXUNUSED(hPr), int WXUNUSED(Code))
/* Process messages intended for the abort dialog box */
while (!wxPrinterBase::sm_abortIt && PeekMessage(&msg, 0, 0, 0, TRUE))
while (!wxPrinterBase::sm_abortIt && ::PeekMessage(&msg, 0, 0, 0, TRUE))
if (!IsDialogMessage((HWND) wxPrinterBase::sm_abortWindow->GetHWND(), &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);