1. corrected bug in MDI sample (which resulted in missing horz scrollbar)
2. define LVS_EX_FULLROWSELECT ourselves if compiler headers don't 3. wxSafeYield() will only reenable windows which had been enabled, not all windows in the application 4. selection in wxTreeCtrl is not broken after dnd operation 5. wxRegKey::Rename() added, regtest sample shows copying/moving/renaming keys and values now 6. wxListEvent accessors made const 7. wxListCtrl sets client data field in generated events under MSW too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -954,21 +954,58 @@ int isascii( int c )
|
||||
|
||||
void wxEnableTopLevelWindows(bool enable)
|
||||
{
|
||||
wxWindowList::Node *node;
|
||||
for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
|
||||
node->GetData()->Enable(enable);
|
||||
wxWindowList::Node *node;
|
||||
for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
|
||||
node->GetData()->Enable(enable);
|
||||
}
|
||||
|
||||
// Yield to other apps/messages and disable user input
|
||||
static void wxFindDisabledWindows(wxWindowList& winDisabled, wxWindow *win)
|
||||
{
|
||||
wxWindowList::Node *node;
|
||||
for ( node = win->GetChildren().GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
wxWindow *child = node->GetData();
|
||||
if ( child->IsEnabled() )
|
||||
{
|
||||
winDisabled.Append(child);
|
||||
}
|
||||
|
||||
wxFindDisabledWindows(winDisabled, child);
|
||||
}
|
||||
}
|
||||
|
||||
// Yield to other apps/messages and disable user input to all windows except
|
||||
// the given one
|
||||
bool wxSafeYield(wxWindow *win)
|
||||
{
|
||||
wxEnableTopLevelWindows(FALSE);
|
||||
// always enable ourselves
|
||||
if ( win )
|
||||
win->Enable(TRUE);
|
||||
bool rc = wxYield();
|
||||
wxEnableTopLevelWindows(TRUE);
|
||||
return rc;
|
||||
// remember all windows we're going to (temporarily) disable
|
||||
wxWindowList winDisabled;
|
||||
|
||||
wxWindowList::Node *node;
|
||||
for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
wxWindow *winTop = node->GetData();
|
||||
wxFindDisabledWindows(winDisabled, winTop);
|
||||
|
||||
winTop->Disable();
|
||||
}
|
||||
|
||||
if ( win )
|
||||
{
|
||||
// always enable ourselves
|
||||
win->Enable();
|
||||
}
|
||||
|
||||
bool rc = wxYield();
|
||||
|
||||
// don't call wxEnableTopLevelWindows(TRUE) because this will reenable even
|
||||
// the window which had been disabled before, do it manually instead
|
||||
for ( node = winDisabled.GetFirst(); node; node = node->GetNext() )
|
||||
{
|
||||
node->GetData()->Enable();
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
// Don't synthesize KeyUp events holding down a key and producing KeyDown
|
||||
@@ -977,7 +1014,7 @@ bool wxSafeYield(wxWindow *win)
|
||||
#ifndef __WXGTK__
|
||||
bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
|
||||
{
|
||||
return TRUE; // detectable auto-repeat is the only mode MSW supports
|
||||
return TRUE; // detectable auto-repeat is the only mode MSW supports
|
||||
}
|
||||
#endif // !wxGTK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user