Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -119,7 +119,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
DECLARE_EVENT_TABLE_ENTRY( \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
|
||||
winid, \
|
||||
-1, \
|
||||
wxID_ANY, \
|
||||
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
|
||||
NULL \
|
||||
),
|
||||
@@ -128,7 +128,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
DECLARE_EVENT_TABLE_ENTRY( \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
|
||||
winid, \
|
||||
-1, \
|
||||
wxID_ANY, \
|
||||
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
|
||||
NULL \
|
||||
),
|
||||
|
@@ -36,23 +36,23 @@ class WXDLLEXPORT wxOwnerDrawn
|
||||
public:
|
||||
// ctor & dtor
|
||||
wxOwnerDrawn(const wxString& str = wxEmptyString,
|
||||
bool bCheckable = FALSE,
|
||||
bool bMenuItem = FALSE); // FIXME kludge for colors
|
||||
bool bCheckable = false,
|
||||
bool bMenuItem = false); // FIXME kludge for colors
|
||||
virtual ~wxOwnerDrawn() { }
|
||||
|
||||
// fix appearance
|
||||
void SetFont(const wxFont& font)
|
||||
{ m_font = font; m_bOwnerDrawn = TRUE; }
|
||||
{ m_font = font; m_bOwnerDrawn = true; }
|
||||
|
||||
wxFont& GetFont() const { return (wxFont &)m_font; }
|
||||
|
||||
void SetTextColour(const wxColour& colText)
|
||||
{ m_colText = colText; m_bOwnerDrawn = TRUE; }
|
||||
{ m_colText = colText; m_bOwnerDrawn = true; }
|
||||
|
||||
wxColour& GetTextColour() const { return (wxColour&) m_colText; }
|
||||
|
||||
void SetBackgroundColour(const wxColour& colBack)
|
||||
{ m_colBack = colBack; m_bOwnerDrawn = TRUE; }
|
||||
{ m_colBack = colBack; m_bOwnerDrawn = true; }
|
||||
|
||||
wxColour& GetBackgroundColour() const
|
||||
{ return (wxColour&) m_colBack ; }
|
||||
@@ -61,17 +61,17 @@ public:
|
||||
const wxBitmap& bmpUnchecked = wxNullBitmap)
|
||||
{ m_bmpChecked = bmpChecked;
|
||||
m_bmpUnchecked = bmpUnchecked;
|
||||
m_bOwnerDrawn = TRUE; }
|
||||
m_bOwnerDrawn = true; }
|
||||
|
||||
void SetBitmap(const wxBitmap& bmpChecked)
|
||||
{ m_bmpChecked = bmpChecked;
|
||||
m_bOwnerDrawn = TRUE; }
|
||||
m_bOwnerDrawn = true; }
|
||||
|
||||
void SetDisabledBitmap( const wxBitmap& bmpDisabled )
|
||||
{ m_bmpDisabled = bmpDisabled;
|
||||
m_bOwnerDrawn = TRUE; }
|
||||
m_bOwnerDrawn = true; }
|
||||
|
||||
const wxBitmap& GetBitmap(bool bChecked = TRUE) const
|
||||
const wxBitmap& GetBitmap(bool bChecked = true) const
|
||||
{ return (bChecked ? m_bmpChecked : m_bmpUnchecked); }
|
||||
|
||||
const wxBitmap& GetDisabledBitmap() const
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
{
|
||||
ms_nLastMarginWidth = m_nMarginWidth = (size_t) nWidth;
|
||||
if ( ((size_t) nWidth) != ms_nDefaultMarginWidth )
|
||||
m_bOwnerDrawn = TRUE;
|
||||
m_bOwnerDrawn = true;
|
||||
}
|
||||
|
||||
int GetMarginWidth() const { return (int) m_nMarginWidth; }
|
||||
@@ -103,16 +103,16 @@ public:
|
||||
// menu item if not empty
|
||||
void SetAccelString(const wxString& strAccel) { m_strAccel = strAccel; }
|
||||
|
||||
// this function might seem strange, but if it returns FALSE it means that
|
||||
// this function might seem strange, but if it returns false it means that
|
||||
// no non-standard attribute are set, so there is no need for this control
|
||||
// to be owner-drawn. Moreover, you can force owner-drawn to FALSE if you
|
||||
// to be owner-drawn. Moreover, you can force owner-drawn to false if you
|
||||
// want to change, say, the color for the item but only if it is owner-drawn
|
||||
// (see wxMenuItem::wxMenuItem for example)
|
||||
bool IsOwnerDrawn() const { return m_bOwnerDrawn; }
|
||||
|
||||
// switch on/off owner-drawing the item
|
||||
void SetOwnerDrawn(bool ownerDrawn = TRUE) { m_bOwnerDrawn = ownerDrawn; }
|
||||
void ResetOwnerDrawn() { m_bOwnerDrawn = FALSE; }
|
||||
void SetOwnerDrawn(bool ownerDrawn = true) { m_bOwnerDrawn = ownerDrawn; }
|
||||
void ResetOwnerDrawn() { m_bOwnerDrawn = false; }
|
||||
|
||||
public:
|
||||
// constants used in OnDrawItem
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
wxODDefault = 0x0020 // item is the default item
|
||||
};
|
||||
|
||||
// virtual functions to implement drawing (return TRUE if processed)
|
||||
// virtual functions to implement drawing (return true if processed)
|
||||
virtual bool OnMeasureItem(size_t *pwidth, size_t *pheight);
|
||||
virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat);
|
||||
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
virtual void Position(const wxPoint& ptOrigin,
|
||||
const wxSize& size);
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
virtual bool IsTopLevel() const { return true; }
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxPopupWindowBase)
|
||||
};
|
||||
@@ -97,9 +97,9 @@ public:
|
||||
//
|
||||
// VZ: where is this used??
|
||||
virtual bool CanDismiss()
|
||||
{ return TRUE; }
|
||||
{ return true; }
|
||||
|
||||
// called when a mouse is pressed while the popup is shown: return TRUE
|
||||
// called when a mouse is pressed while the popup is shown: return true
|
||||
// from here to prevent its normal processing by the popup (which consists
|
||||
// in dismissing it if the mouse is cilcked outside it)
|
||||
virtual bool ProcessLeftDown(wxMouseEvent& event);
|
||||
|
@@ -70,7 +70,7 @@ public:
|
||||
// OVERRIDES
|
||||
|
||||
virtual bool Setup(wxWindow *parent) = 0;
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE) = 0;
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true) = 0;
|
||||
virtual wxDC* PrintDialog(wxWindow *parent) = 0;
|
||||
|
||||
protected:
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxT("dialog"))
|
||||
: wxDialog(parent, -1, title, pos, size, style, name)
|
||||
: wxDialog(parent, wxID_ANY, title, pos, size, style, name)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -59,10 +59,10 @@ public:
|
||||
|
||||
|
||||
// ctors
|
||||
wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int id = -1)
|
||||
wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int id = wxID_ANY)
|
||||
{ Init(parent, id, wxPROCESS_DEFAULT); }
|
||||
|
||||
wxProcess(int flags) { Init(NULL, -1, flags); }
|
||||
wxProcess(int flags) { Init(NULL, wxID_ANY, flags); }
|
||||
|
||||
virtual ~wxProcess();
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
// call this before passing the object to wxExecute() to redirect the
|
||||
// launched process stdin/stdout, then use GetInputStream() and
|
||||
// GetOutputStream() to get access to them
|
||||
void Redirect() { m_redirect = TRUE; }
|
||||
void Redirect() { m_redirect = true; }
|
||||
bool IsRedirected() const { return m_redirect; }
|
||||
|
||||
// detach from the parent - should be called by the parent if it's deleted
|
||||
@@ -88,10 +88,10 @@ public:
|
||||
// close the output stream indicating that nothing more will be written
|
||||
void CloseOutput() { delete m_outputStream; m_outputStream = NULL; }
|
||||
|
||||
// return TRUE if the child process stdout is not closed
|
||||
// return true if the child process stdout is not closed
|
||||
bool IsInputOpened() const;
|
||||
|
||||
// return TRUE if any input is available on the child process stdout/err
|
||||
// return true if any input is available on the child process stdout/err
|
||||
bool IsInputAvailable() const;
|
||||
bool IsErrorAvailable() const;
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
// for backwards compatibility only, don't use
|
||||
#if WXWIN_COMPATIBILITY_2_2
|
||||
wxProcess(wxEvtHandler *parent, bool redirect)
|
||||
{ Init(parent, -1, redirect ? wxPROCESS_REDIRECT : wxPROCESS_DEFAULT); }
|
||||
{ Init(parent, wxID_ANY, redirect ? wxPROCESS_REDIRECT : wxPROCESS_DEFAULT); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_2
|
||||
|
||||
protected:
|
||||
@@ -170,7 +170,7 @@ typedef void (wxEvtHandler::*wxProcessEventFunction)(wxProcessEvent&);
|
||||
|
||||
#define EVT_END_PROCESS(id, func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( \
|
||||
wxEVT_END_PROCESS, id, -1, \
|
||||
wxEVT_END_PROCESS, id, wxID_ANY, \
|
||||
(wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxProcessEventFunction, & func ), NULL),
|
||||
|
||||
#endif
|
||||
|
@@ -82,9 +82,9 @@ wxClassInfo* wxClassInfo::sm_first = NULL;
|
||||
wxHashTable* wxClassInfo::sm_classTable = NULL;
|
||||
|
||||
// These are here so we can avoid 'always true/false' warnings
|
||||
// by referring to these instead of TRUE/FALSE
|
||||
const bool wxTrue = TRUE;
|
||||
const bool wxFalse = FALSE;
|
||||
// by referring to these instead of true/false
|
||||
const bool wxTrue = true;
|
||||
const bool wxFalse = false;
|
||||
|
||||
// Is this object a kind of (a subclass of) 'info'?
|
||||
// E.g. is wxWindow a kind of wxObject?
|
||||
@@ -93,7 +93,7 @@ const bool wxFalse = FALSE;
|
||||
bool wxObject::IsKindOf(wxClassInfo *info) const
|
||||
{
|
||||
wxClassInfo *thisInfo = GetClassInfo();
|
||||
return (thisInfo) ? thisInfo->IsKindOf(info) : FALSE ;
|
||||
return (thisInfo) ? thisInfo->IsKindOf(info) : false ;
|
||||
}
|
||||
|
||||
#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING && defined( new )
|
||||
@@ -104,7 +104,7 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
|
||||
#ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT
|
||||
void *wxObject::operator new ( size_t size, const wxChar *fileName, int lineNum )
|
||||
{
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, TRUE);
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -132,21 +132,21 @@ void wxObject::operator delete ( void *buf, const wxChar *WXUNUSED(fileName), in
|
||||
#ifdef _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT
|
||||
void *wxObject::operator new[] ( size_t size, const wxChar* fileName, int lineNum )
|
||||
{
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, TRUE, TRUE);
|
||||
return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_ARRAY_DELETE_VOID
|
||||
void wxObject::operator delete[] ( void *buf )
|
||||
{
|
||||
wxDebugFree(buf, TRUE);
|
||||
wxDebugFree(buf, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT
|
||||
void wxObject::operator delete[] (void * buf, const wxChar* WXUNUSED(fileName), int WXUNUSED(lineNum) )
|
||||
{
|
||||
wxDebugFree(buf, TRUE);
|
||||
wxDebugFree(buf, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -330,7 +330,7 @@ bool wxPrintPaperModule::OnInit()
|
||||
wxThePrintPaperDatabase = new wxPrintPaperDatabase;
|
||||
wxThePrintPaperDatabase->CreateDatabase();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxPrintPaperModule::OnExit()
|
||||
|
@@ -136,7 +136,7 @@ wxPopupWindowBase::~wxPopupWindowBase()
|
||||
|
||||
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
|
||||
@@ -298,7 +298,7 @@ void wxPopupTransientWindow::OnDismiss()
|
||||
bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event))
|
||||
{
|
||||
// no special processing here
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
|
||||
|
@@ -82,14 +82,14 @@ wxPrinterBase::wxPrinterBase(wxPrintDialogData *data)
|
||||
{
|
||||
m_currentPrintout = (wxPrintout *) NULL;
|
||||
sm_abortWindow = (wxWindow *) NULL;
|
||||
sm_abortIt = FALSE;
|
||||
sm_abortIt = false;
|
||||
if (data)
|
||||
m_printDialogData = (*data);
|
||||
sm_lastError = wxPRINTER_NO_ERROR;
|
||||
}
|
||||
|
||||
wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL;
|
||||
bool wxPrinterBase::sm_abortIt = FALSE;
|
||||
bool wxPrinterBase::sm_abortIt = false;
|
||||
wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR;
|
||||
|
||||
wxPrinterBase::~wxPrinterBase()
|
||||
@@ -98,9 +98,9 @@ wxPrinterBase::~wxPrinterBase()
|
||||
|
||||
void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPrinterBase::sm_abortIt = TRUE;
|
||||
wxPrinterBase::sm_abortWindow->Show(FALSE);
|
||||
wxPrinterBase::sm_abortWindow->Close(TRUE);
|
||||
wxPrinterBase::sm_abortIt = true;
|
||||
wxPrinterBase::sm_abortWindow->Show(false);
|
||||
wxPrinterBase::sm_abortWindow->Close(true);
|
||||
wxPrinterBase::sm_abortWindow = (wxWindow *) NULL;
|
||||
}
|
||||
|
||||
@@ -109,10 +109,10 @@ wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout * printo
|
||||
wxPrintAbortDialog *dialog = new wxPrintAbortDialog(parent, _("Printing ") , wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
|
||||
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
button_sizer->Add( new wxStaticText(dialog, -1, _("Please wait while printing\n") + printout->GetTitle() ), 0, wxALL, 10 );
|
||||
button_sizer->Add( new wxStaticText(dialog, wxID_ANY, _("Please wait while printing\n") + printout->GetTitle() ), 0, wxALL, 10 );
|
||||
button_sizer->Add( new wxButton( dialog, wxID_CANCEL, wxT("Cancel") ), 0, wxALL | wxALIGN_CENTER, 10 );
|
||||
|
||||
dialog->SetAutoLayout( TRUE );
|
||||
dialog->SetAutoLayout( true );
|
||||
dialog->SetSizer( button_sizer );
|
||||
|
||||
button_sizer->Fit(dialog);
|
||||
@@ -142,7 +142,7 @@ wxPrintout::wxPrintout(const wxString& title)
|
||||
m_PPIScreenY = 0;
|
||||
m_PPIPrinterX = 0;
|
||||
m_PPIPrinterY = 0;
|
||||
m_isPreview = FALSE;
|
||||
m_isPreview = false;
|
||||
}
|
||||
|
||||
wxPrintout::~wxPrintout()
|
||||
@@ -190,7 +190,7 @@ void wxPrintout::GetPageInfo(int *minPage, int *maxPage, int *fromPage, int *toP
|
||||
// this style it simply doesn't work correctly at all...
|
||||
wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
|
||||
wxScrolledWindow(parent, -1, pos, size, style | wxFULL_REPAINT_ON_RESIZE, name)
|
||||
wxScrolledWindow(parent, wxID_ANY, pos, size, style | wxFULL_REPAINT_ON_RESIZE, name)
|
||||
{
|
||||
m_printPreview = preview;
|
||||
#ifdef __WXMAC__
|
||||
@@ -249,7 +249,7 @@ void wxPreviewCanvas::OnChar(wxKeyEvent &event)
|
||||
wxPreviewControlBar* controlBar = ((wxPreviewFrame*) GetParent())->GetControlBar();
|
||||
if (event.GetKeyCode() == WXK_ESCAPE)
|
||||
{
|
||||
((wxPreviewFrame*) GetParent())->Close(TRUE);
|
||||
((wxPreviewFrame*) GetParent())->Close(true);
|
||||
return;
|
||||
}
|
||||
else if (event.GetKeyCode() == WXK_TAB)
|
||||
@@ -303,7 +303,7 @@ END_EVENT_TABLE()
|
||||
wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long buttons,
|
||||
wxWindow *parent, const wxPoint& pos, const wxSize& size,
|
||||
long style, const wxString& name):
|
||||
wxPanel(parent, -1, pos, size, style, name)
|
||||
wxPanel(parent, wxID_ANY, pos, size, style, name)
|
||||
{
|
||||
m_printPreview = preview;
|
||||
m_closeButton = (wxButton *) NULL;
|
||||
@@ -332,13 +332,13 @@ void wxPreviewControlBar::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
void wxPreviewControlBar::OnWindowClose(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPreviewFrame *frame = (wxPreviewFrame *)GetParent();
|
||||
frame->Close(TRUE);
|
||||
frame->Close(true);
|
||||
}
|
||||
|
||||
void wxPreviewControlBar::OnPrint(void)
|
||||
{
|
||||
wxPrintPreviewBase *preview = GetPrintPreview();
|
||||
preview->Print(TRUE);
|
||||
preview->Print(true);
|
||||
}
|
||||
|
||||
void wxPreviewControlBar::OnNext(void)
|
||||
@@ -487,7 +487,7 @@ void wxPreviewControlBar::CreateButtons()
|
||||
};
|
||||
int n = WXSIZEOF(choices);
|
||||
|
||||
m_zoomControl = new wxChoice( this, wxID_PREVIEW_ZOOM, wxDefaultPosition, wxSize(70,-1), n, choices, 0 );
|
||||
m_zoomControl = new wxChoice( this, wxID_PREVIEW_ZOOM, wxDefaultPosition, wxSize(70,wxDefaultCoord), n, choices, 0 );
|
||||
item0->Add( m_zoomControl, 0, wxALIGN_CENTRE|wxALL, 5 );
|
||||
SetZoomControl(m_printPreview->GetZoom());
|
||||
}
|
||||
@@ -539,7 +539,7 @@ END_EVENT_TABLE()
|
||||
|
||||
wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, long style, const wxString& name):
|
||||
wxFrame(parent, -1, title, pos, size, style, name)
|
||||
wxFrame(parent, wxID_ANY, title, pos, size, style, name)
|
||||
{
|
||||
m_printPreview = preview;
|
||||
m_controlBar = NULL;
|
||||
@@ -593,7 +593,7 @@ void wxPreviewFrame::Initialize()
|
||||
item0->Add( m_controlBar, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
item0->Add( m_previewCanvas, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
SetAutoLayout( TRUE );
|
||||
SetAutoLayout( true );
|
||||
SetSizer( item0 );
|
||||
|
||||
m_windowDisabler = new wxWindowDisabler(this);
|
||||
@@ -647,10 +647,10 @@ wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout,
|
||||
void wxPrintPreviewBase::Init(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting)
|
||||
{
|
||||
m_isOk = TRUE;
|
||||
m_isOk = true;
|
||||
m_previewPrintout = printout;
|
||||
if (m_previewPrintout)
|
||||
m_previewPrintout->SetIsPreview(TRUE);
|
||||
m_previewPrintout->SetIsPreview(true);
|
||||
|
||||
m_printPrintout = printoutForPrinting;
|
||||
|
||||
@@ -663,7 +663,7 @@ void wxPrintPreviewBase::Init(wxPrintout *printout,
|
||||
m_leftMargin = 40;
|
||||
m_pageWidth = 0;
|
||||
m_pageHeight = 0;
|
||||
m_printingPrepared = FALSE;
|
||||
m_printingPrepared = false;
|
||||
m_minPage = 1;
|
||||
m_maxPage = 1;
|
||||
}
|
||||
@@ -681,7 +681,7 @@ wxPrintPreviewBase::~wxPrintPreviewBase()
|
||||
bool wxPrintPreviewBase::SetCurrentPage(int pageNum)
|
||||
{
|
||||
if (m_currentPage == pageNum)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
m_currentPage = pageNum;
|
||||
if (m_previewBitmap)
|
||||
@@ -695,11 +695,11 @@ bool wxPrintPreviewBase::SetCurrentPage(int pageNum)
|
||||
AdjustScrollbars(m_previewCanvas);
|
||||
|
||||
if (!RenderPage(pageNum))
|
||||
return FALSE;
|
||||
return false;
|
||||
m_previewCanvas->Refresh();
|
||||
m_previewCanvas->SetFocus();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxPrintPreviewBase::PaintPage(wxPreviewCanvas *canvas, wxDC& dc)
|
||||
@@ -708,13 +708,13 @@ bool wxPrintPreviewBase::PaintPage(wxPreviewCanvas *canvas, wxDC& dc)
|
||||
|
||||
if (!m_previewBitmap)
|
||||
if (!RenderPage(m_currentPage))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!m_previewBitmap)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!canvas)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
int canvasWidth, canvasHeight;
|
||||
canvas->GetSize(&canvasWidth, &canvasHeight);
|
||||
@@ -735,7 +735,7 @@ bool wxPrintPreviewBase::PaintPage(wxPreviewCanvas *canvas, wxDC& dc)
|
||||
|
||||
temp_dc.SelectObject(wxNullBitmap);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Adjusts the scrollbars for the current scale
|
||||
@@ -758,7 +758,7 @@ void wxPrintPreviewBase::AdjustScrollbars(wxPreviewCanvas *canvas)
|
||||
int scrollUnitsY = totalHeight/10;
|
||||
wxSize virtualSize = canvas->GetVirtualSize();
|
||||
if (virtualSize.GetWidth() != totalWidth || virtualSize.GetHeight() != totalHeight)
|
||||
canvas->SetScrollbars(10, 10, scrollUnitsX, scrollUnitsY, 0, 0, TRUE);
|
||||
canvas->SetScrollbars(10, 10, scrollUnitsX, scrollUnitsY, 0, 0, true);
|
||||
}
|
||||
|
||||
bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
@@ -771,7 +771,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
{
|
||||
wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
m_previewCanvas->GetSize(&canvasWidth, &canvasHeight);
|
||||
|
||||
@@ -789,7 +789,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
m_previewBitmap = NULL;
|
||||
}
|
||||
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,7 +807,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
m_previewPrintout->OnPreparePrinting();
|
||||
int selFrom, selTo;
|
||||
m_previewPrintout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo);
|
||||
m_printingPrepared = TRUE;
|
||||
m_printingPrepared = true;
|
||||
}
|
||||
|
||||
m_previewPrintout->OnBeginPrinting();
|
||||
@@ -820,7 +820,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
|
||||
delete m_previewBitmap;
|
||||
m_previewBitmap = NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_previewPrintout->OnPrintPage(pageNum);
|
||||
@@ -842,7 +842,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
||||
m_previewFrame->SetStatusText(status);
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc)
|
||||
|
||||
dc.DrawRectangle((int)(x-2), (int)(y-1), (int)(actualWidth+3), (int)(actualHeight+2));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxPrintPreviewBase::SetZoom(int percent)
|
||||
|
@@ -157,7 +157,7 @@ bool wxProcess::Exists(int pid)
|
||||
{
|
||||
case wxKILL_OK:
|
||||
case wxKILL_ACCESS_DENIED:
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
case wxKILL_ERROR:
|
||||
@@ -166,7 +166,7 @@ bool wxProcess::Exists(int pid)
|
||||
// fall through
|
||||
|
||||
case wxKILL_NO_PROCESS:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -74,16 +74,16 @@ bool wxProtocol::Reconnect()
|
||||
if (!GetPeer(addr))
|
||||
{
|
||||
Close();
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Close())
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!Connect(addr))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -184,11 +184,11 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result)
|
||||
|
||||
// Not implemented on all systems
|
||||
// ret = (char *)memccpy(tmp_str, tmp_buf, '\n', avail);
|
||||
found = FALSE;
|
||||
found = false;
|
||||
for (ret=tmp_str;ret < (tmp_str+avail); ret++)
|
||||
if (*ret == '\n')
|
||||
{
|
||||
found = TRUE;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -1116,13 +1116,13 @@ pass2_fs_dither (j_decompress_ptr cinfo,
|
||||
dir = -1;
|
||||
dir3 = -3;
|
||||
errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */
|
||||
cquantize->on_odd_row = FALSE; /* flip for next time */
|
||||
cquantize->on_odd_row = false; /* flip for next time */
|
||||
} else {
|
||||
/* work left to right in this row */
|
||||
dir = 1;
|
||||
dir3 = 3;
|
||||
errorptr = cquantize->fserrors; /* => entry before first real column */
|
||||
cquantize->on_odd_row = TRUE; /* flip for next time */
|
||||
cquantize->on_odd_row = true; /* flip for next time */
|
||||
}
|
||||
/* Preset error values: no error propagated to first pixel from left */
|
||||
cur0 = cur1 = cur2 = 0;
|
||||
@@ -1282,7 +1282,7 @@ finish_pass1 (j_decompress_ptr cinfo)
|
||||
cinfo->colormap = cquantize->sv_colormap;
|
||||
select_colors(cinfo, cquantize->desired);
|
||||
/* Force next pass to zero the color index table */
|
||||
cquantize->needs_zeroed = TRUE;
|
||||
cquantize->needs_zeroed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1307,7 +1307,7 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
/* Set up method pointers */
|
||||
cquantize->pub.color_quantize = prescan_quantize;
|
||||
cquantize->pub.finish_pass = finish_pass1;
|
||||
cquantize->needs_zeroed = TRUE; /* Always zero histogram */
|
||||
cquantize->needs_zeroed = true; /* Always zero histogram */
|
||||
} else {
|
||||
/* Set up method pointers */
|
||||
cquantize->pub.color_quantize = pass2_fs_dither;
|
||||
@@ -1324,7 +1324,7 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
/* Make the error-limit table if we didn't already. */
|
||||
if (cquantize->error_limiter == NULL)
|
||||
init_error_limit(cinfo);
|
||||
cquantize->on_odd_row = FALSE;
|
||||
cquantize->on_odd_row = false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1334,7 +1334,7 @@ start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan)
|
||||
memset((void *) histogram[i], 0,
|
||||
HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell));
|
||||
}
|
||||
cquantize->needs_zeroed = FALSE;
|
||||
cquantize->needs_zeroed = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1349,7 +1349,7 @@ new_color_map_2_quant (j_decompress_ptr cinfo)
|
||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||
|
||||
/* Reset the inverse color map */
|
||||
cquantize->needs_zeroed = TRUE;
|
||||
cquantize->needs_zeroed = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1376,7 +1376,7 @@ jinit_2pass_quantizer (j_decompress_ptr cinfo)
|
||||
for (i = 0; i < HIST_C0_ELEMS; i++) {
|
||||
cquantize->histogram[i] = (hist2d) malloc(HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell));
|
||||
}
|
||||
cquantize->needs_zeroed = TRUE; /* histogram is garbage now */
|
||||
cquantize->needs_zeroed = true; /* histogram is garbage now */
|
||||
|
||||
/* Allocate storage for the completed colormap, if required.
|
||||
* We do this now since it is storage and may affect
|
||||
@@ -1465,11 +1465,11 @@ void wxQuantize::DoQuantize(unsigned w, unsigned h, unsigned char **in_rows, uns
|
||||
cquantize = (my_cquantize_ptr) dec.cquantize;
|
||||
|
||||
|
||||
cquantize->pub.start_pass(&dec, TRUE);
|
||||
cquantize->pub.start_pass(&dec, true);
|
||||
cquantize->pub.color_quantize(&dec, in_rows, out_rows, h);
|
||||
cquantize->pub.finish_pass(&dec);
|
||||
|
||||
cquantize->pub.start_pass(&dec, FALSE);
|
||||
cquantize->pub.start_pass(&dec, false);
|
||||
cquantize->pub.color_quantize(&dec, in_rows, out_rows, h);
|
||||
cquantize->pub.finish_pass(&dec);
|
||||
|
||||
@@ -1625,7 +1625,7 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest,
|
||||
}
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// This version sets a palette in the destination image so you don't
|
||||
@@ -1639,7 +1639,7 @@ bool wxQuantize::Quantize(const wxImage& src,
|
||||
{
|
||||
wxPalette* palette = NULL;
|
||||
if ( !Quantize(src, dest, & palette, desiredNoColours, eightBitData, flags) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
if (palette)
|
||||
@@ -1649,7 +1649,7 @@ bool wxQuantize::Quantize(const wxImage& src,
|
||||
}
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user