Added imaggif.h, imaggif.cpp (wxImage GIF-reading support); candidate

FindFocus implementation for wxMotif


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-04-07 14:51:34 +00:00
parent 9869734d04
commit b59bf2db65
4 changed files with 524 additions and 3 deletions

View File

@@ -1584,8 +1584,30 @@ bool wxWindow::Validate()
// Get the window with the focus
wxWindow *wxWindow::FindFocus()
{
// TODO
return NULL;
// TODO Problems:
// (1) Can there be multiple focussed widgets in an application?
// In which case we need to find the top-level window that's
// currently active.
// (2) The widget with the focus may not be in the widget table
// depending on which widgets I put in the table
wxNode *node = wxTopLevelWindows.First();
while (node)
{
wxWindow *win = (wxWindow *)node->Data();
Widget w = XmGetFocusWidget ((Widget) win->GetTopWidget()) ;
if (w != (Widget) NULL)
{
wxWindow* focusWin = wxGetWindowFromTable(w);
if (focusWin)
return focusWin;
}
node = node->Next();
}
return (wxWindow*) NULL;
}
void wxWindow::AddChild(wxWindow *child)