typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
#define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
+ DECLARE_EVENT_TABLE_ENTRY( \
+ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
winid, \
- -1, \
+ wxID_ANY, \
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
- NULL \
+ NULL \
),
#define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
+ DECLARE_EVENT_TABLE_ENTRY( \
+ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
winid, \
- -1, \
+ wxID_ANY, \
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
NULL \
),
, m_baseInfo1(baseInfo1)
, m_baseInfo2(baseInfo2)
, m_next(sm_first)
- {
+ {
sm_first = this;
Register();
}
wxDEPRECATED( static void CleanUpClasses() );
#endif
static void CleanUp();
-
+
public:
const wxChar *m_className;
int m_objectSize;
static wxClassInfo *GetBaseByName(const wxChar *name);
DECLARE_NO_COPY_CLASS(wxClassInfo)
-
-protected:
+
+protected:
// registers the class
void Register();
void Unregister();
// get the runtime identity of this object
wxClassInfo *GetClassInfo() const
{
- return wx_const_cast(wxClassInfo *, m_classInfo);
+ return wx_const_cast(wxClassInfo *, m_classInfo);
}
wxObject* GetSuperClassInstance() const
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 ; }
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
{
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; }
// 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
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);
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PAPERH__
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)
};
//
// 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);
wxPrintDialogData& GetPrintDialogData() const
{ return (wxPrintDialogData&) m_printDialogData; }
bool GetAbort() const { return sm_abortIt; }
-
+
static wxPrinterError GetLastError() { return sm_lastError; }
///////////////////////////////////////////////////////////////////////////
// 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:
wxPrintDialogData m_printDialogData;
wxPrintout* m_currentPrintout;
-
+
static wxPrinterError sm_lastError;
-
+
public:
static wxWindow* sm_abortWindow;
static bool sm_abortIt;
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)
{
}
// 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();
// 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
// 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;
// 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:
#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
/////////////////////////////////////////////////////////////////////////////
// This class closely follows the implementation of the boost
-// library scoped_ptr and is an adaption for c++ macro's in
+// library scoped_ptr and is an adaption for c++ macro's in
// the wxWidgets project. The original authors of the boost
// scoped_ptr are given below with their respective copyrights.
//// Helpers
// Converts input bitmap(s) into 8bit representation with custom palette
-
+
// in_rows and out_rows are arrays [0..h-1] of pointer to rows
// (in_rows contains w * 3 bytes per row, out_rows w bytes per row)
// fills out_rows with indexes into palette (which is also stored into palette variable)
wxClassInfo wxObject::ms_classInfo(ms_classParents , wxT("") , wxT("wxObject"),
(int) sizeof(wxObject), \
(wxObjectConstructorFn) 0 ,
- (wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 ,
- 0 , wxVariantOfPtrToObjectConverterwxObject , wxVariantToObjectConverterwxObject , wxObjectToVariantConverterwxObject);
+ (wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 ,
+ 0 , wxVariantOfPtrToObjectConverterwxObject , wxVariantToObjectConverterwxObject , wxObjectToVariantConverterwxObject);
template<> void wxStringReadValue(const wxString & , wxObject * & ){assert(0) ;}
template<> void wxStringWriteValue(wxString & , wxObject* const & ){assert(0) ;}
template<> void wxStringReadValue(const wxString & , wxObject & ){assert(0) ;}
template<> void wxStringWriteValue(wxString & , wxObject const & ){assert(0) ;}
- wxClassTypeInfo s_typeInfo(wxT_OBJECT_PTR , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject*).name() ) ;
- wxClassTypeInfo s_typeInfowxObject(wxT_OBJECT , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject).name() ) ;
+ wxClassTypeInfo s_typeInfo(wxT_OBJECT_PTR , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject*).name() ) ;
+ wxClassTypeInfo s_typeInfowxObject(wxT_OBJECT , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject).name() ) ;
#else
wxClassInfo wxObject::ms_classInfo( wxT("wxObject"), 0, 0,
(int) sizeof(wxObject),
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?
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 )
- #undef new
+ #undef new
#endif
#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
#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
info = info->m_next;
}
}
- Unregister();
+ Unregister();
}
wxClassInfo *wxClassInfo::FindClass(const wxChar *className)
// try to do some checks here
wxASSERT_MSG( sm_classTable->Get(m_className) == NULL,
_T("class already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") );
-
+
sm_classTable->Put(m_className, (wxObject *)this);
}
/////////////////////////////////////////////////////////////////////////////
// Name: paper.cpp
// Purpose: Paper size classes
-// Author: Julian Smart
+// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
wxThePrintPaperDatabase = new wxPrintPaperDatabase;
wxThePrintPaperDatabase->CreateDatabase();
- return TRUE;
+ return true;
}
void wxPrintPaperModule::OnExit()
bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags))
{
- return TRUE;
+ return true;
}
void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
PopHandlers();
#ifndef __WXX11__
delete m_handlerFocus;
-#endif
+#endif
delete m_handlerPopup;
}
bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event))
{
// no special processing here
- return FALSE;
+ return false;
}
#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
{
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()
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;
}
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);
m_PPIScreenY = 0;
m_PPIPrinterX = 0;
m_PPIPrinterY = 0;
- m_isPreview = FALSE;
+ m_isPreview = false;
}
wxPrintout::~wxPrintout()
// 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__
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)
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;
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)
};
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());
}
return;
}
}
-
+
m_zoomControl->SetSelection(count-1);
}
}
if (m_zoomControl->GetStringSelection().BeforeFirst(wxT('%')).ToLong(&val))
return int(val);
}
-
+
return 0;
}
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;
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);
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;
m_leftMargin = 40;
m_pageWidth = 0;
m_pageHeight = 0;
- m_printingPrepared = FALSE;
+ m_printingPrepared = false;
m_minPage = 1;
m_maxPage = 1;
}
bool wxPrintPreviewBase::SetCurrentPage(int pageNum)
{
if (m_currentPage == pageNum)
- return TRUE;
+ return true;
m_currentPage = pageNum;
if (m_previewBitmap)
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)
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);
temp_dc.SelectObject(wxNullBitmap);
- return TRUE;
+ return true;
}
// Adjusts the scrollbars for the current scale
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)
{
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);
m_previewBitmap = NULL;
}
wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK);
- return FALSE;
+ return false;
}
}
m_previewPrintout->OnPreparePrinting();
int selFrom, selTo;
m_previewPrintout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo);
- m_printingPrepared = TRUE;
+ m_printingPrepared = true;
}
m_previewPrintout->OnBeginPrinting();
delete m_previewBitmap;
m_previewBitmap = NULL;
- return FALSE;
+ return false;
}
m_previewPrintout->OnPrintPage(pageNum);
#if wxUSE_STATUSBAR
wxString status;
if (m_maxPage != 0)
- status = wxString::Format(_("Page %d of %d"), pageNum, m_maxPage);
+ status = wxString::Format(_("Page %d of %d"), pageNum, m_maxPage);
else
- status = wxString::Format(_("Page %d"), pageNum);
+ status = wxString::Format(_("Page %d"), pageNum);
if (m_previewFrame)
m_previewFrame->SetStatusText(status);
#endif
- return TRUE;
+ return true;
}
dc.DrawRectangle((int)(x-2), (int)(y-1), (int)(actualWidth+3), (int)(actualHeight+2));
- return TRUE;
+ return true;
}
void wxPrintPreviewBase::SetZoom(int percent)
{
case wxKILL_OK:
case wxKILL_ACCESS_DENIED:
- return TRUE;
+ return true;
default:
case wxKILL_ERROR:
// fall through
case wxKILL_NO_PROCESS:
- return FALSE;
+ return false;
}
}
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;
}
// ----------------------------------------------------------------------------
// 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')
+ if (*ret == '\n')
{
- found = TRUE;
+ found = true;
break;
}
if (!found)
return wxPROTO_PROTERR;
-
+
*ret = 0;
result = wxString::FromAscii( tmp_str );
size = ret-tmp_str+1;
sock->Unread(&tmp_buf[size], avail-size);
-
+
return wxPROTO_NOERR;
#undef PROTO_BSIZE
}
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;
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;
}
/* 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;
/* 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;
}
}
memset((void *) histogram[i], 0,
HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell));
}
- cquantize->needs_zeroed = FALSE;
+ cquantize->needs_zeroed = false;
}
}
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
/* Reset the inverse color map */
- cquantize->needs_zeroed = TRUE;
+ cquantize->needs_zeroed = true;
}
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
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);
}
#endif // wxUSE_PALETTE
- return TRUE;
+ return true;
}
// This version sets a palette in the destination image so you don't
{
wxPalette* palette = NULL;
if ( !Quantize(src, dest, & palette, desiredNoColours, eightBitData, flags) )
- return FALSE;
+ return false;
#if wxUSE_PALETTE
if (palette)
}
#endif // wxUSE_PALETTE
- return TRUE;
+ return true;
}
#endif