1. kbd interface for wxScrolledWindow
2. wxWindow::Set/GetExtraStyle() 3. wxWS_EX_VALIDATE_RECURSIVELY added and implemented 4. docs updated to reflect (2) an (3) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -126,7 +126,9 @@ void wxWindowBase::InitBase()
|
||||
#else
|
||||
m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
#endif
|
||||
|
||||
// no style bits
|
||||
m_exStyle =
|
||||
m_windowStyle = 0;
|
||||
|
||||
// an optimization for the event processing: checking this flag is much
|
||||
@@ -704,6 +706,8 @@ void wxWindowBase::MakeModal(bool modal)
|
||||
bool wxWindowBase::Validate()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
bool recurse = (GetExtraStyle() & wxWS_EX_VALIDATE_RECURSIVELY) != 0;
|
||||
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
@@ -713,6 +717,11 @@ bool wxWindowBase::Validate()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( recurse && !child->Validate() )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
@@ -722,6 +731,8 @@ bool wxWindowBase::Validate()
|
||||
bool wxWindowBase::TransferDataToWindow()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
bool recurse = (GetExtraStyle() & wxWS_EX_VALIDATE_RECURSIVELY) != 0;
|
||||
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
@@ -729,15 +740,20 @@ bool wxWindowBase::TransferDataToWindow()
|
||||
wxValidator *validator = child->GetValidator();
|
||||
if ( validator && !validator->TransferToWindow() )
|
||||
{
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if ( log )
|
||||
{
|
||||
wxLogWarning(_("Could not transfer data to window"));
|
||||
log->Flush();
|
||||
}
|
||||
wxLogWarning(_("Could not transfer data to window"));
|
||||
wxLog::FlushActive();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( recurse )
|
||||
{
|
||||
if ( !child->TransferToWindow() )
|
||||
{
|
||||
// warning already given
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
@@ -747,15 +763,29 @@ bool wxWindowBase::TransferDataToWindow()
|
||||
bool wxWindowBase::TransferDataFromWindow()
|
||||
{
|
||||
#if wxUSE_VALIDATORS
|
||||
bool recurse = (GetExtraStyle() & wxWS_EX_VALIDATE_RECURSIVELY) != 0;
|
||||
|
||||
wxWindowList::Node *node;
|
||||
for ( node = m_children.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
wxWindow *child = node->GetData();
|
||||
if ( child->GetValidator() &&
|
||||
!child->GetValidator()->TransferFromWindow() )
|
||||
wxValidator *validator = child->GetValidator();
|
||||
if ( validator && !validator->TransferFromWindow() )
|
||||
{
|
||||
// nop warning here because the application is supposed to give
|
||||
// one itself - we don't know here what might have gone wrongly
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( recurse )
|
||||
{
|
||||
if ( !child->TransferFromWindow() )
|
||||
{
|
||||
// warning already given
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
||||
|
Reference in New Issue
Block a user