git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24550
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
EVT_MIDDLE_DOWN(wxWindowBase::OnMiddleClick)
#if wxUSE_HELP
EVT_MIDDLE_DOWN(wxWindowBase::OnMiddleClick)
#if wxUSE_HELP
- EVT_HELP(-1, wxWindowBase::OnHelp)
+ EVT_HELP(wxID_ANY, wxWindowBase::OnHelp)
#endif // wxUSE_HELP
END_EVENT_TABLE()
#endif // wxUSE_HELP
END_EVENT_TABLE()
{
// no window yet, no parent nor children
m_parent = (wxWindow *)NULL;
{
// no window yet, no parent nor children
m_parent = (wxWindow *)NULL;
// no constraints on the minimal window size
m_minWidth =
// no constraints on the minimal window size
m_minWidth =
m_maxHeight = -1;
// window is created enabled but it's not visible yet
m_maxHeight = -1;
// window is created enabled but it's not visible yet
- m_isShown = FALSE;
- m_isEnabled = TRUE;
+ m_isShown = false;
+ m_isEnabled = true;
// the default event handler is just this window
m_eventHandler = this;
// the default event handler is just this window
m_eventHandler = this;
// the colours/fonts are default for now
m_hasBgCol =
m_hasFgCol =
// the colours/fonts are default for now
m_hasBgCol =
m_hasFgCol =
- m_hasFont = FALSE;
-
- m_isBeingDeleted = FALSE;
+ m_hasFont = false;
+
+ m_isBeingDeleted = false;
// no style bits
m_exStyle =
// no style bits
m_exStyle =
m_windowSizer = (wxSizer *) NULL;
m_containingSizer = (wxSizer *) NULL;
m_windowSizer = (wxSizer *) NULL;
m_containingSizer = (wxSizer *) NULL;
#if wxUSE_DRAG_AND_DROP
m_dropTarget = (wxDropTarget *)NULL;
#if wxUSE_DRAG_AND_DROP
m_dropTarget = (wxDropTarget *)NULL;
#endif // wxUSE_CARET
#if wxUSE_PALETTE
#endif // wxUSE_CARET
#if wxUSE_PALETTE
- m_hasCustomPalette = FALSE;
+ m_hasCustomPalette = false;
#endif // wxUSE_PALETTE
#if wxUSE_ACCESSIBILITY
#endif // wxUSE_PALETTE
#if wxUSE_ACCESSIBILITY
m_maxVirtualHeight = -1;
// Whether we're using the current theme for this window (wxGTK only for now)
m_maxVirtualHeight = -1;
// Whether we're using the current theme for this window (wxGTK only for now)
- m_themeEnabled = FALSE;
+ m_themeEnabled = false;
}
// common part of window creation process
}
// common part of window creation process
SetExtraStyle(GetExtraStyle() | wxWS_EX_VALIDATE_RECURSIVELY);
}
SetExtraStyle(GetExtraStyle() | wxWS_EX_VALIDATE_RECURSIVELY);
}
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
}
bool wxWindowBase::Close(bool force)
}
bool wxWindowBase::Close(bool force)
event.SetEventObject(this);
event.SetCanVeto(!force);
event.SetEventObject(this);
event.SetCanVeto(!force);
- // return FALSE if window wasn't closed because the application vetoed the
+ // return false if window wasn't closed because the application vetoed the
// close event
return GetEventHandler()->ProcessEvent(event) && !event.GetVeto();
}
// close event
return GetEventHandler()->ProcessEvent(event) && !event.GetVeto();
}
wxT("child didn't remove itself using RemoveChild()") );
}
wxT("child didn't remove itself using RemoveChild()") );
}
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
}
}
// ----------------------------------------------------------------------------
}
}
// ----------------------------------------------------------------------------
bool wxWindowBase::IsTopLevel() const
{
bool wxWindowBase::IsTopLevel() const
{
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
if ( newParent == oldParent )
{
// nothing done
if ( newParent == oldParent )
{
// nothing done
}
// unlink this window from the existing parent.
}
// unlink this window from the existing parent.
wxTopLevelWindows.Append((wxWindow *)this);
}
wxTopLevelWindows.Append((wxWindow *)this);
}
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
bool wxWindowBase::RemoveEventHandler(wxEvtHandler *handler)
{
bool wxWindowBase::RemoveEventHandler(wxEvtHandler *handler)
{
- wxCHECK_MSG( handler, FALSE, _T("RemoveEventHandler(NULL) called") );
+ wxCHECK_MSG( handler, false, _T("RemoveEventHandler(NULL) called") );
wxEvtHandler *handlerPrev = NULL,
*handlerCur = GetEventHandler();
wxEvtHandler *handlerPrev = NULL,
*handlerCur = GetEventHandler();
handler->SetNextHandler(NULL);
handler->SetPreviousHandler(NULL);
handler->SetNextHandler(NULL);
handler->SetPreviousHandler(NULL);
}
handlerPrev = handlerCur;
}
handlerPrev = handlerCur;
wxFAIL_MSG( _T("where has the event handler gone?") );
wxFAIL_MSG( _T("where has the event handler gone?") );
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
bool wxWindowBase::SetBackgroundColour( const wxColour &colour )
{
if ( !colour.Ok() || (colour == m_backgroundColour) )
bool wxWindowBase::SetBackgroundColour( const wxColour &colour )
{
if ( !colour.Ok() || (colour == m_backgroundColour) )
m_backgroundColour = colour;
m_backgroundColour = colour;
}
bool wxWindowBase::SetForegroundColour( const wxColour &colour )
{
if ( !colour.Ok() || (colour == m_foregroundColour) )
}
bool wxWindowBase::SetForegroundColour( const wxColour &colour )
{
if ( !colour.Ok() || (colour == m_foregroundColour) )
m_foregroundColour = colour;
m_foregroundColour = colour;
}
bool wxWindowBase::SetCursor(const wxCursor& cursor)
}
bool wxWindowBase::SetCursor(const wxCursor& cursor)
if ( m_cursor == cursor )
{
// no change
if ( m_cursor == cursor )
{
// no change
}
bool wxWindowBase::SetFont(const wxFont& font)
}
bool wxWindowBase::SetFont(const wxFont& font)
if ( fontOk == m_font )
{
// no change
if ( fontOk == m_font )
{
// no change
}
#if wxUSE_PALETTE
void wxWindowBase::SetPalette(const wxPalette& pal)
{
}
#if wxUSE_PALETTE
void wxWindowBase::SetPalette(const wxPalette& pal)
{
- m_hasCustomPalette = TRUE;
+ m_hasCustomPalette = true;
m_palette = pal;
// VZ: can anyone explain me what do we do here?
m_palette = pal;
// VZ: can anyone explain me what do we do here?
wxValidator *validator = child->GetValidator();
if ( validator && !validator->Validate((wxWindow *)this) )
{
wxValidator *validator = child->GetValidator();
if ( validator && !validator->Validate((wxWindow *)this) )
{
}
if ( recurse && !child->Validate() )
{
}
if ( recurse && !child->Validate() )
{
}
}
#endif // wxUSE_VALIDATORS
}
}
#endif // wxUSE_VALIDATORS
}
bool wxWindowBase::TransferDataToWindow()
}
bool wxWindowBase::TransferDataToWindow()
wxLog::FlushActive();
#endif // wxUSE_LOG
wxLog::FlushActive();
#endif // wxUSE_LOG
if ( !child->TransferDataToWindow() )
{
// warning already given
if ( !child->TransferDataToWindow() )
{
// warning already given
}
}
}
#endif // wxUSE_VALIDATORS
}
}
}
#endif // wxUSE_VALIDATORS
}
bool wxWindowBase::TransferDataFromWindow()
}
bool wxWindowBase::TransferDataFromWindow()
// nop warning here because the application is supposed to give
// one itself - we don't know here what might have gone wrongly
// nop warning here because the application is supposed to give
// one itself - we don't know here what might have gone wrongly
if ( !child->TransferDataFromWindow() )
{
// warning already given
if ( !child->TransferDataFromWindow() )
{
// warning already given
}
}
}
#endif // wxUSE_VALIDATORS
}
}
}
#endif // wxUSE_VALIDATORS
}
void wxWindowBase::InitDialog()
}
void wxWindowBase::InitDialog()
// Layout grand children
DoPhase(2);
// Layout grand children
DoPhase(2);
}
// Do a phase of evaluating child constraints
}
// Do a phase of evaluating child constraints
}
void wxWindowBase::ResetConstraints()
}
void wxWindowBase::ResetConstraints()
wxLayoutConstraints *constr = GetConstraints();
if ( constr )
{
wxLayoutConstraints *constr = GetConstraints();
if ( constr )
{
- constr->left.SetDone(FALSE);
- constr->top.SetDone(FALSE);
- constr->right.SetDone(FALSE);
- constr->bottom.SetDone(FALSE);
- constr->width.SetDone(FALSE);
- constr->height.SetDone(FALSE);
- constr->centreX.SetDone(FALSE);
- constr->centreY.SetDone(FALSE);
+ constr->left.SetDone(false);
+ constr->top.SetDone(false);
+ constr->right.SetDone(false);
+ constr->bottom.SetDone(false);
+ constr->width.SetDone(false);
+ constr->height.SetDone(false);
+ constr->centreX.SetDone(false);
+ constr->centreY.SetDone(false);
}
wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
}
wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
if ( x != -1 )
{
constr->left.SetValue(x);
if ( x != -1 )
{
constr->left.SetValue(x);
- constr->left.SetDone(TRUE);
+ constr->left.SetDone(true);
}
if ( y != -1 )
{
constr->top.SetValue(y);
}
if ( y != -1 )
{
constr->top.SetValue(y);
- constr->top.SetDone(TRUE);
+ constr->top.SetDone(true);
}
if ( w != -1 )
{
constr->width.SetValue(w);
}
if ( w != -1 )
{
constr->width.SetValue(w);
- constr->width.SetDone(TRUE);
+ constr->width.SetDone(true);
}
if ( h != -1 )
{
constr->height.SetValue(h);
}
if ( h != -1 )
{
constr->height.SetValue(h);
- constr->height.SetDone(TRUE);
+ constr->height.SetDone(true);
if ( x != -1 )
{
constr->left.SetValue(x);
if ( x != -1 )
{
constr->left.SetValue(x);
- constr->left.SetDone(TRUE);
+ constr->left.SetDone(true);
}
if ( y != -1 )
{
constr->top.SetValue(y);
}
if ( y != -1 )
{
constr->top.SetValue(y);
- constr->top.SetDone(TRUE);
+ constr->top.SetDone(true);
{
if ( event.GetSetEnabled() )
Enable(event.GetEnabled());
{
if ( event.GetSetEnabled() )
Enable(event.GetEnabled());
#if wxUSE_CONTROLS
if ( event.GetSetText() )
{
#if wxUSE_CONTROLS
if ( event.GetSetText() )
{
radiobtn->SetValue(event.GetChecked());
}
#endif // wxUSE_RADIOBTN
radiobtn->SetValue(event.GetChecked());
}
#endif // wxUSE_RADIOBTN
void wxWindowBase::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) )
{
TransferDataToWindow();
void wxWindowBase::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) )
{
TransferDataToWindow();
// Update the UI at this point
UpdateWindowUI(wxUPDATE_UI_RECURSE);
}
// Update the UI at this point
UpdateWindowUI(wxUPDATE_UI_RECURSE);
}
//else: stack is empty, no previous capture
wxLogTrace(_T("mousecapture"),
//else: stack is empty, no previous capture
wxLogTrace(_T("mousecapture"),
- _T("After ReleaseMouse() mouse is captured by %p"),
- GetCapture());
+ (const wxChar *) _T("After ReleaseMouse() mouse is captured by %p"),
+ GetCapture());
title = ((wxButton*) GetWindow())->GetLabel();
else
title = GetWindow()->GetName();
title = ((wxButton*) GetWindow())->GetLabel();
else
title = GetWindow()->GetName();
if (!title.IsEmpty())
{
*name = title;
if (!title.IsEmpty())
{
*name = title;