Source cleaning: TRUE/true, FALSE/false, whitespaces, tabs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
11908acc89
commit
c9d59ee7e0
@ -26,16 +26,16 @@
|
||||
#if __VISUALC__ > 1100
|
||||
#pragma warning(push, 1)
|
||||
#else // VC 5
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(disable:4018)
|
||||
// 'expression' : signed/unsigned mismatch
|
||||
#pragma warning(disable:4018)
|
||||
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(disable:4244)
|
||||
// 'conversion' : conversion from 'type1' to 'type2',
|
||||
// possible loss of data
|
||||
#pragma warning(disable:4244)
|
||||
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(disable:4663)
|
||||
// C++ language change: to explicitly specialize class template
|
||||
// 'identifier' use the following syntax
|
||||
#pragma warning(disable:4663)
|
||||
#endif
|
||||
|
||||
// these warning have to be disabled and not just temporarily disabled
|
||||
|
@ -94,7 +94,7 @@
|
||||
#else
|
||||
#define __WX_BO_STL ",wx containers"
|
||||
#endif
|
||||
|
||||
|
||||
// This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
|
||||
#define WX_BUILD_OPTIONS_SIGNATURE \
|
||||
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
|
||||
|
@ -52,10 +52,10 @@ bool wxBitmapBase::RemoveHandler(const wxString& name)
|
||||
if ( handler )
|
||||
{
|
||||
sm_handlers.DeleteObject(handler);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxBitmapHandler *wxBitmapBase::FindHandler(const wxString& name)
|
||||
@ -116,7 +116,7 @@ class wxBitmapBaseModule: public wxModule
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapBaseModule)
|
||||
public:
|
||||
wxBitmapBaseModule() {}
|
||||
bool OnInit() { wxBitmap::InitStandardHandlers(); return TRUE; };
|
||||
bool OnInit() { wxBitmap::InitStandardHandlers(); return true; };
|
||||
void OnExit() { wxBitmap::CleanUpHandlers(); };
|
||||
};
|
||||
|
||||
|
@ -152,7 +152,7 @@ wxBookCtrl::InsertPage(size_t nPage,
|
||||
|
||||
m_pages.Insert(page, nPage);
|
||||
InvalidateBestSize();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -50,12 +50,12 @@ wxChoiceBase::~wxChoiceBase()
|
||||
bool wxChoiceBase::SetStringSelection(const wxString& s)
|
||||
{
|
||||
int sel = FindString(s);
|
||||
wxCHECK_MSG( sel != -1, FALSE,
|
||||
wxCHECK_MSG( sel != -1, false,
|
||||
wxT("invalid string in wxChoice::SetStringSelection") );
|
||||
|
||||
Select(sel);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -86,7 +86,7 @@ struct wxCmdLineOption
|
||||
GetLongOptionName(lng).Len() == lng.Len(),
|
||||
wxT("Long option contains invalid characters")
|
||||
);
|
||||
|
||||
|
||||
|
||||
kind = k;
|
||||
|
||||
|
@ -91,23 +91,23 @@ bool wxCommandProcessor::UndoCommand(wxCommand& cmd)
|
||||
|
||||
// Pass a command to the processor. The processor calls Do();
|
||||
// if successful, is appended to the command history unless
|
||||
// storeIt is FALSE.
|
||||
// storeIt is false.
|
||||
bool wxCommandProcessor::Submit(wxCommand *command, bool storeIt)
|
||||
{
|
||||
wxCHECK_MSG( command, FALSE, _T("no command in wxCommandProcessor::Submit") );
|
||||
wxCHECK_MSG( command, false, _T("no command in wxCommandProcessor::Submit") );
|
||||
|
||||
if ( !DoCommand(*command) )
|
||||
{
|
||||
// the user code expects the command to be deleted anyhow
|
||||
delete command;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( storeIt )
|
||||
Store(command);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxCommandProcessor::Store(wxCommand *command)
|
||||
@ -152,11 +152,11 @@ bool wxCommandProcessor::Undo()
|
||||
{
|
||||
m_currentCommand = m_currentCommand->GetPrevious();
|
||||
SetMenuStrings();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxCommandProcessor::Redo()
|
||||
@ -193,10 +193,10 @@ bool wxCommandProcessor::Redo()
|
||||
{
|
||||
m_currentCommand = redoNode;
|
||||
SetMenuStrings();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxCommandProcessor::CanUndo() const
|
||||
@ -209,15 +209,15 @@ bool wxCommandProcessor::CanUndo() const
|
||||
bool wxCommandProcessor::CanRedo() const
|
||||
{
|
||||
if (m_currentCommand && !m_currentCommand->GetNext())
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (m_currentCommand && m_currentCommand->GetNext())
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (!m_currentCommand && (m_commands.GetCount() > 0))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxCommandProcessor::Initialize()
|
||||
@ -233,7 +233,7 @@ void wxCommandProcessor::SetMenuStrings()
|
||||
{
|
||||
wxString undoLabel = GetUndoMenuLabel();
|
||||
wxString redoLabel = GetRedoMenuLabel();
|
||||
|
||||
|
||||
m_commandEditMenu->SetLabel(wxID_UNDO, undoLabel);
|
||||
m_commandEditMenu->Enable(wxID_UNDO, CanUndo());
|
||||
|
||||
@ -262,7 +262,7 @@ wxString wxCommandProcessor::GetUndoMenuLabel() const
|
||||
{
|
||||
buf = _("&Undo") + m_undoAccelerator;
|
||||
}
|
||||
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@ -137,9 +137,9 @@ wxFontData::wxFontData()
|
||||
// Intialize colour to black.
|
||||
m_fontColour = wxNullColour;
|
||||
|
||||
m_showHelp = FALSE;
|
||||
m_allowSymbols = TRUE;
|
||||
m_enableEffects = TRUE;
|
||||
m_showHelp = false;
|
||||
m_allowSymbols = true;
|
||||
m_enableEffects = true;
|
||||
m_minSize = 0;
|
||||
m_maxSize = 0;
|
||||
|
||||
@ -173,11 +173,11 @@ wxPrintData::wxPrintData()
|
||||
#endif
|
||||
m_printOrientation = wxPORTRAIT;
|
||||
m_printNoCopies = 1;
|
||||
m_printCollate = FALSE;
|
||||
m_printCollate = false;
|
||||
|
||||
// New, 24/3/99
|
||||
m_printerName = wxT("");
|
||||
m_colour = TRUE;
|
||||
m_colour = true;
|
||||
m_duplexMode = wxDUPLEX_SIMPLEX;
|
||||
m_printQuality = wxPRINT_QUALITY_HIGH;
|
||||
m_paperId = wxPAPER_A4;
|
||||
@ -513,9 +513,9 @@ void wxPrintData::ConvertFromNative()
|
||||
if (devMode->dmFields & DM_COLLATE)
|
||||
{
|
||||
if (devMode->dmCollate == DMCOLLATE_TRUE)
|
||||
m_printCollate = TRUE;
|
||||
m_printCollate = true;
|
||||
else
|
||||
m_printCollate = FALSE;
|
||||
m_printCollate = false;
|
||||
}
|
||||
|
||||
//// Number of copies
|
||||
@ -537,12 +537,12 @@ void wxPrintData::ConvertFromNative()
|
||||
if (devMode->dmFields & DM_COLOR)
|
||||
{
|
||||
if (devMode->dmColor == DMCOLOR_COLOR)
|
||||
m_colour = TRUE;
|
||||
m_colour = true;
|
||||
else
|
||||
m_colour = FALSE;
|
||||
m_colour = false;
|
||||
}
|
||||
else
|
||||
m_colour = TRUE;
|
||||
m_colour = true;
|
||||
|
||||
//// Paper size
|
||||
|
||||
@ -732,7 +732,7 @@ bool wxPrintData::Ok() const
|
||||
((wxPrintData*)this)->ConvertToNative();
|
||||
return (m_devMode != NULL) ;
|
||||
#else
|
||||
return TRUE;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -750,15 +750,15 @@ wxPrintDialogData::wxPrintDialogData()
|
||||
m_printMinPage = 0;
|
||||
m_printMaxPage = 0;
|
||||
m_printNoCopies = 1;
|
||||
m_printAllPages = FALSE;
|
||||
m_printCollate = FALSE;
|
||||
m_printToFile = FALSE;
|
||||
m_printSelection = FALSE;
|
||||
m_printEnableSelection = FALSE;
|
||||
m_printEnablePageNumbers = TRUE;
|
||||
m_printEnablePrintToFile = TRUE;
|
||||
m_printEnableHelp = FALSE;
|
||||
m_printSetupDialog = FALSE;
|
||||
m_printAllPages = false;
|
||||
m_printCollate = false;
|
||||
m_printToFile = false;
|
||||
m_printSelection = false;
|
||||
m_printEnableSelection = false;
|
||||
m_printEnablePageNumbers = true;
|
||||
m_printEnablePrintToFile = true;
|
||||
m_printEnableHelp = false;
|
||||
m_printSetupDialog = false;
|
||||
}
|
||||
|
||||
wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData)
|
||||
@ -780,15 +780,15 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
|
||||
m_printMinPage = 1;
|
||||
m_printMaxPage = 9999;
|
||||
m_printNoCopies = 1;
|
||||
m_printAllPages = FALSE;
|
||||
m_printCollate = FALSE;
|
||||
m_printToFile = FALSE;
|
||||
m_printSelection = FALSE;
|
||||
m_printEnableSelection = FALSE;
|
||||
m_printEnablePageNumbers = TRUE;
|
||||
m_printEnablePrintToFile = TRUE;
|
||||
m_printEnableHelp = FALSE;
|
||||
m_printSetupDialog = FALSE;
|
||||
m_printAllPages = false;
|
||||
m_printCollate = false;
|
||||
m_printToFile = false;
|
||||
m_printSelection = false;
|
||||
m_printEnableSelection = false;
|
||||
m_printEnablePageNumbers = true;
|
||||
m_printEnablePrintToFile = true;
|
||||
m_printEnableHelp = false;
|
||||
m_printSetupDialog = false;
|
||||
|
||||
m_printData = printData;
|
||||
}
|
||||
@ -1044,13 +1044,13 @@ wxPageSetupDialogData::wxPageSetupDialogData()
|
||||
m_marginBottomRight = wxPoint(0, 0);
|
||||
|
||||
// Flags
|
||||
m_defaultMinMargins = FALSE;
|
||||
m_enableMargins = TRUE;
|
||||
m_enableOrientation = TRUE;
|
||||
m_enablePaper = TRUE;
|
||||
m_enablePrinter = TRUE;
|
||||
m_enableHelp = FALSE;
|
||||
m_getDefaultInfo = FALSE;
|
||||
m_defaultMinMargins = false;
|
||||
m_enableMargins = true;
|
||||
m_enableOrientation = true;
|
||||
m_enablePaper = true;
|
||||
m_enablePrinter = true;
|
||||
m_enableHelp = false;
|
||||
m_getDefaultInfo = false;
|
||||
}
|
||||
|
||||
wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialogData)
|
||||
@ -1074,13 +1074,13 @@ wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData)
|
||||
m_marginBottomRight = wxPoint(0, 0);
|
||||
|
||||
// Flags
|
||||
m_defaultMinMargins = FALSE;
|
||||
m_enableMargins = TRUE;
|
||||
m_enableOrientation = TRUE;
|
||||
m_enablePaper = TRUE;
|
||||
m_enablePrinter = TRUE;
|
||||
m_enableHelp = FALSE;
|
||||
m_getDefaultInfo = FALSE;
|
||||
m_defaultMinMargins = false;
|
||||
m_enableMargins = true;
|
||||
m_enableOrientation = true;
|
||||
m_enablePaper = true;
|
||||
m_enablePrinter = true;
|
||||
m_enableHelp = false;
|
||||
m_getDefaultInfo = false;
|
||||
|
||||
m_printData = printData;
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxConfigBase *wxConfigBase::ms_pConfig = NULL;
|
||||
bool wxConfigBase::ms_bAutoCreate = TRUE;
|
||||
bool wxConfigBase::ms_bAutoCreate = true;
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
@ -69,8 +69,8 @@ wxConfigBase::wxConfigBase(const wxString& appName,
|
||||
long style)
|
||||
: m_appName(appName), m_vendorName(vendorName), m_style(style)
|
||||
{
|
||||
m_bExpandEnvVars = TRUE;
|
||||
m_bRecordDefaults = FALSE;
|
||||
m_bExpandEnvVars = true;
|
||||
m_bRecordDefaults = false;
|
||||
}
|
||||
|
||||
wxConfigBase::~wxConfigBase()
|
||||
@ -106,21 +106,21 @@ wxConfigBase *wxConfigBase::Create()
|
||||
#define IMPLEMENT_READ_FOR_TYPE(name, type, deftype, extra) \
|
||||
bool wxConfigBase::Read(const wxString& key, type *val) const \
|
||||
{ \
|
||||
wxCHECK_MSG( val, FALSE, _T("wxConfig::Read(): NULL parameter") ); \
|
||||
wxCHECK_MSG( val, false, _T("wxConfig::Read(): NULL parameter") ); \
|
||||
\
|
||||
if ( !DoRead##name(key, val) ) \
|
||||
return FALSE; \
|
||||
return false; \
|
||||
\
|
||||
*val = extra(*val); \
|
||||
\
|
||||
return TRUE; \
|
||||
return true; \
|
||||
} \
|
||||
\
|
||||
bool wxConfigBase::Read(const wxString& key, \
|
||||
type *val, \
|
||||
deftype defVal) const \
|
||||
{ \
|
||||
wxCHECK_MSG( val, FALSE, _T("wxConfig::Read(): NULL parameter") ); \
|
||||
wxCHECK_MSG( val, false, _T("wxConfig::Read(): NULL parameter") ); \
|
||||
\
|
||||
bool read = DoRead##name(key, val); \
|
||||
if ( !read ) \
|
||||
@ -151,32 +151,32 @@ IMPLEMENT_READ_FOR_TYPE(Bool, bool, bool, bool)
|
||||
// but can be overridden in the derived ones
|
||||
bool wxConfigBase::DoReadInt(const wxString& key, int *pi) const
|
||||
{
|
||||
wxCHECK_MSG( pi, FALSE, _T("wxConfig::Read(): NULL parameter") );
|
||||
wxCHECK_MSG( pi, false, _T("wxConfig::Read(): NULL parameter") );
|
||||
|
||||
long l;
|
||||
if ( !DoReadLong(key, &l) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxASSERT_MSG( l < INT_MAX, _T("overflow in wxConfig::DoReadInt") );
|
||||
|
||||
*pi = (int)l;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxConfigBase::DoReadBool(const wxString& key, bool* val) const
|
||||
{
|
||||
wxCHECK_MSG( val, FALSE, _T("wxConfig::Read(): NULL parameter") );
|
||||
wxCHECK_MSG( val, false, _T("wxConfig::Read(): NULL parameter") );
|
||||
|
||||
long l;
|
||||
if ( !DoReadLong(key, &l) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxASSERT_MSG( l == 0 || l == 1, _T("bad bool value in wxConfig::DoReadInt") );
|
||||
|
||||
*val = l != 0;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxConfigBase::DoReadDouble(const wxString& key, double* val) const
|
||||
@ -187,7 +187,7 @@ bool wxConfigBase::DoReadDouble(const wxString& key, double* val) const
|
||||
return str.ToDouble(val);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// string reading helper
|
||||
@ -241,17 +241,17 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer,
|
||||
|
||||
if ( !strPath.IsEmpty() ) {
|
||||
// do change the path
|
||||
m_bChanged = TRUE;
|
||||
m_bChanged = true;
|
||||
m_strName = strEntry.AfterLast(wxCONFIG_PATH_SEPARATOR);
|
||||
m_strOldPath = m_pContainer->GetPath();
|
||||
if ( m_strOldPath.Len() == 0 ||
|
||||
if ( m_strOldPath.Len() == 0 ||
|
||||
m_strOldPath.Last() != wxCONFIG_PATH_SEPARATOR )
|
||||
m_strOldPath += wxCONFIG_PATH_SEPARATOR;
|
||||
m_pContainer->SetPath(strPath);
|
||||
}
|
||||
else {
|
||||
// it's a name only, without path - nothing to do
|
||||
m_bChanged = FALSE;
|
||||
m_bChanged = false;
|
||||
m_strName = strEntry;
|
||||
}
|
||||
}
|
||||
|
@ -64,21 +64,21 @@ bool wxControlContainer::AcceptsFocus() const
|
||||
// at least one child will accept focus
|
||||
wxWindowList::compatibility_iterator node = m_winParent->GetChildren().GetFirst();
|
||||
if ( !node )
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// wxMac has eventually the two scrollbars as children, they don't count
|
||||
// as real children in the algorithm mentioned above
|
||||
bool hasRealChildren = false ;
|
||||
#endif
|
||||
|
||||
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = node->GetData();
|
||||
|
||||
if ( child->AcceptsFocus() )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __WXMAC__
|
||||
@ -88,14 +88,14 @@ bool wxControlContainer::AcceptsFocus() const
|
||||
#endif
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
|
||||
#ifdef __WXMAC__
|
||||
if ( !hasRealChildren )
|
||||
return TRUE ;
|
||||
return true ;
|
||||
#endif
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxControlContainer::SetLastFocus(wxWindow *win)
|
||||
@ -308,7 +308,7 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
}
|
||||
//else: the child manages its focus itself
|
||||
|
||||
event.Skip( FALSE );
|
||||
event.Skip( false );
|
||||
|
||||
return;
|
||||
}
|
||||
@ -344,7 +344,7 @@ bool wxControlContainer::DoSetFocus()
|
||||
|
||||
if (m_inSetFocus)
|
||||
return true;
|
||||
|
||||
|
||||
// when the panel gets the focus we move the focus to either the last
|
||||
// window that had the focus or the first one that can get it unless the
|
||||
// focus had been already set to some other child
|
||||
@ -367,7 +367,7 @@ bool wxControlContainer::DoSetFocus()
|
||||
|
||||
win = win->GetParent();
|
||||
}
|
||||
|
||||
|
||||
// protect against infinite recursion:
|
||||
m_inSetFocus = true;
|
||||
|
||||
@ -401,8 +401,8 @@ bool wxControlContainer::SetFocusToChild()
|
||||
|
||||
bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
||||
{
|
||||
wxCHECK_MSG( win, FALSE, _T("wxSetFocusToChild(): invalid window") );
|
||||
wxCHECK_MSG( childLastFocused, FALSE,
|
||||
wxCHECK_MSG( win, false, _T("wxSetFocusToChild(): invalid window") );
|
||||
wxCHECK_MSG( childLastFocused, false,
|
||||
_T("wxSetFocusToChild(): NULL child poonter") );
|
||||
|
||||
if ( *childLastFocused )
|
||||
@ -417,7 +417,7 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
||||
// not SetFocusFromKbd(): we're restoring focus back to the old
|
||||
// window and not setting it as the result of a kbd action
|
||||
(*childLastFocused)->SetFocus();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -440,12 +440,12 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
|
||||
|
||||
*childLastFocused = child;
|
||||
child->SetFocusFromKbd();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxContextHelp, wxObject)
|
||||
|
||||
wxContextHelp::wxContextHelp(wxWindow* win, bool beginHelp)
|
||||
{
|
||||
m_inHelp = FALSE;
|
||||
m_inHelp = false;
|
||||
|
||||
if (beginHelp)
|
||||
BeginContextHelp(win);
|
||||
@ -97,7 +97,7 @@ static void wxPushOrPopEventHandlers(wxContextHelp* help, wxWindow* win, bool pu
|
||||
if (push)
|
||||
win->PushEventHandler(new wxContextHelpEvtHandler(help));
|
||||
else
|
||||
win->PopEventHandler(TRUE);
|
||||
win->PopEventHandler(true);
|
||||
|
||||
wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
|
||||
while (node)
|
||||
@ -116,7 +116,7 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
|
||||
if (!win)
|
||||
win = wxTheApp->GetTopWindow();
|
||||
if (!win)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxCursor cursor(wxCURSOR_QUESTION_ARROW);
|
||||
wxCursor oldCursor = win->GetCursor();
|
||||
@ -126,10 +126,10 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
|
||||
// wxSetCursor(cursor);
|
||||
#endif
|
||||
|
||||
m_status = FALSE;
|
||||
m_status = false;
|
||||
|
||||
#ifdef __WXMOTIF__
|
||||
wxPushOrPopEventHandlers(this, win, TRUE);
|
||||
wxPushOrPopEventHandlers(this, win, true);
|
||||
#else
|
||||
win->PushEventHandler(new wxContextHelpEvtHandler(this));
|
||||
#endif
|
||||
@ -141,9 +141,9 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
|
||||
win->ReleaseMouse();
|
||||
|
||||
#ifdef __WXMOTIF__
|
||||
wxPushOrPopEventHandlers(this, win, FALSE);
|
||||
wxPushOrPopEventHandlers(this, win, false);
|
||||
#else
|
||||
win->PopEventHandler(TRUE);
|
||||
win->PopEventHandler(true);
|
||||
#endif
|
||||
|
||||
win->SetCursor(oldCursor);
|
||||
@ -165,19 +165,19 @@ bool wxContextHelp::BeginContextHelp(wxWindow* win)
|
||||
DispatchEvent(winAtPtr, pt);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxContextHelp::EndContextHelp()
|
||||
{
|
||||
m_inHelp = FALSE;
|
||||
m_inHelp = false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxContextHelp::EventLoop()
|
||||
{
|
||||
m_inHelp = TRUE;
|
||||
m_inHelp = true;
|
||||
|
||||
while ( m_inHelp )
|
||||
{
|
||||
@ -191,16 +191,16 @@ bool wxContextHelp::EventLoop()
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
if (event.GetEventType() == wxEVT_LEFT_DOWN)
|
||||
{
|
||||
m_contextHelp->SetStatus(TRUE);
|
||||
m_contextHelp->SetStatus(true);
|
||||
m_contextHelp->EndContextHelp();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((event.GetEventType() == wxEVT_CHAR) ||
|
||||
@ -208,27 +208,27 @@ bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event)
|
||||
(event.GetEventType() == wxEVT_ACTIVATE) ||
|
||||
(event.GetEventType() == wxEVT_MOUSE_CAPTURE_CHANGED))
|
||||
{
|
||||
// May have already been set to TRUE by a left-click
|
||||
//m_contextHelp->SetStatus(FALSE);
|
||||
// May have already been set to true by a left-click
|
||||
//m_contextHelp->SetStatus(false);
|
||||
m_contextHelp->EndContextHelp();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((event.GetEventType() == wxEVT_PAINT) ||
|
||||
(event.GetEventType() == wxEVT_ERASE_BACKGROUND))
|
||||
{
|
||||
event.Skip();
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Dispatch the help event to the relevant window
|
||||
bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
|
||||
{
|
||||
wxWindow* subjectOfHelp = win;
|
||||
bool eventProcessed = FALSE;
|
||||
bool eventProcessed = false;
|
||||
while (subjectOfHelp && !eventProcessed)
|
||||
{
|
||||
wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), pt) ;
|
||||
@ -381,11 +381,11 @@ bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window)
|
||||
{
|
||||
s_tipWindow = new wxTipWindow((wxWindow *)window, text, 100, & s_tipWindow);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif // wxUSE_TIPWINDOW
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -410,7 +410,7 @@ bool wxHelpControllerHelpProvider::ShowHelp(wxWindowBase *window)
|
||||
// If the help controller is capable of popping up the text...
|
||||
else if (m_helpController->DisplayTextPopup(text, wxGetMousePosition()))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
// ...else use the default method.
|
||||
@ -421,7 +421,7 @@ bool wxHelpControllerHelpProvider::ShowHelp(wxWindowBase *window)
|
||||
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Convenience function for turning context id into wxString
|
||||
@ -452,7 +452,7 @@ bool wxHelpProviderModule::OnInit()
|
||||
// since it could pull in extra code
|
||||
// wxHelpProvider::Set(new wxSimpleHelpProvider);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxHelpProviderModule::OnExit()
|
||||
|
@ -79,14 +79,14 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
|
||||
// even if it's possible to create controls without parents in some port,
|
||||
// it should surely be discouraged because it doesn't work at all under
|
||||
// Windows
|
||||
wxCHECK_MSG( parent, FALSE, wxT("all controls must have parents") );
|
||||
wxCHECK_MSG( parent, false, wxT("all controls must have parents") );
|
||||
|
||||
if ( !CreateBase(parent, id, pos, size, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxControlBase::Command(wxCommandEvent& event)
|
||||
@ -120,7 +120,7 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
|
||||
void wxControlBase::SetLabel( const wxString &label )
|
||||
{
|
||||
InvalidateBestSize();
|
||||
wxWindow::SetLabel(label);
|
||||
wxWindow::SetLabel(label);
|
||||
}
|
||||
|
||||
bool wxControlBase::SetFont(const wxFont& font)
|
||||
|
Loading…
Reference in New Issue
Block a user