Sorry folks, a lot of changes to remedy GetFont, GetBrush etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,9 +108,9 @@ END_EVENT_TABLE()
|
||||
// Find an item given the MS Windows id
|
||||
wxWindow *wxWindow::FindItem(int id) const
|
||||
{
|
||||
if (!GetChildren())
|
||||
return NULL;
|
||||
wxNode *current = GetChildren()->First();
|
||||
// if (!GetChildren())
|
||||
// return NULL;
|
||||
wxNode *current = GetChildren().First();
|
||||
while (current)
|
||||
{
|
||||
wxWindow *childWin = (wxWindow *)current->Data();
|
||||
@@ -139,9 +139,9 @@ wxWindow *wxWindow::FindItem(int id) const
|
||||
// Find an item given the MS Windows handle
|
||||
wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const
|
||||
{
|
||||
if (!GetChildren())
|
||||
return NULL;
|
||||
wxNode *current = GetChildren()->First();
|
||||
// if (!GetChildren())
|
||||
// return NULL;
|
||||
wxNode *current = GetChildren().First();
|
||||
while (current)
|
||||
{
|
||||
wxObject *obj = (wxObject *)current->Data() ;
|
||||
@@ -1594,7 +1594,7 @@ long wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
// Rely on MSWNotify to check whether the message
|
||||
// belongs to the window or not
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -1818,7 +1818,7 @@ long wxWindow::MSWOnQueryNewPalette()
|
||||
// Responds to colour changes: passes event on to children.
|
||||
void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
{
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
// Only propagate to non-top-level windows
|
||||
@@ -3493,7 +3493,7 @@ bool wxWindow::IsEnabled(void) const
|
||||
// it's an application error (pops up a dialog)
|
||||
bool wxWindow::TransferDataToWindow()
|
||||
{
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -3513,7 +3513,7 @@ bool wxWindow::TransferDataToWindow()
|
||||
// validation failed: don't quit
|
||||
bool wxWindow::TransferDataFromWindow()
|
||||
{
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -3529,7 +3529,7 @@ bool wxWindow::TransferDataFromWindow()
|
||||
|
||||
bool wxWindow::Validate()
|
||||
{
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -3556,30 +3556,28 @@ wxWindow *wxWindow::FindFocus()
|
||||
|
||||
void wxWindow::AddChild(wxWindow *child)
|
||||
{
|
||||
GetChildren()->Append(child);
|
||||
GetChildren().Append(child);
|
||||
child->m_windowParent = this;
|
||||
}
|
||||
|
||||
void wxWindow::RemoveChild(wxWindow *child)
|
||||
{
|
||||
if (GetChildren())
|
||||
GetChildren()->DeleteObject(child);
|
||||
// if (GetChildren())
|
||||
GetChildren().DeleteObject(child);
|
||||
child->m_windowParent = NULL;
|
||||
}
|
||||
|
||||
void wxWindow::DestroyChildren()
|
||||
{
|
||||
if (GetChildren()) {
|
||||
wxNode *node;
|
||||
while ((node = GetChildren()->First()) != (wxNode *)NULL) {
|
||||
while ((node = GetChildren().First()) != (wxNode *)NULL) {
|
||||
wxWindow *child;
|
||||
if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
|
||||
delete child;
|
||||
if ( GetChildren()->Member(child) )
|
||||
if ( GetChildren().Member(child) )
|
||||
delete node;
|
||||
}
|
||||
} /* while */
|
||||
}
|
||||
}
|
||||
|
||||
void wxWindow::MakeModal(bool modal)
|
||||
@@ -3794,7 +3792,7 @@ bool wxWindow::DoPhase(int phase)
|
||||
{
|
||||
noChanges = 0;
|
||||
noFailures = 0;
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -3839,7 +3837,7 @@ void wxWindow::ResetConstraints()
|
||||
constr->centreX.SetDone(FALSE);
|
||||
constr->centreY.SetDone(FALSE);
|
||||
}
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *win = (wxWindow *)node->Data();
|
||||
@@ -3898,7 +3896,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while (node)
|
||||
{
|
||||
wxWindow *win = (wxWindow *)node->Data();
|
||||
@@ -4036,9 +4034,9 @@ bool wxWindow::Close(bool force)
|
||||
wxObject* wxWindow::GetChild(int number) const
|
||||
{
|
||||
// Return a pointer to the Nth object in the Panel
|
||||
if (!GetChildren())
|
||||
return(NULL) ;
|
||||
wxNode *node = GetChildren()->First();
|
||||
// if (!GetChildren())
|
||||
// return(NULL) ;
|
||||
wxNode *node = GetChildren().First();
|
||||
int n = number;
|
||||
while (node && n--)
|
||||
node = node->Next() ;
|
||||
@@ -4100,7 +4098,7 @@ void wxWindow::Fit()
|
||||
{
|
||||
int maxX = 0;
|
||||
int maxY = 0;
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *win = (wxWindow *)node->Data();
|
||||
@@ -4133,7 +4131,7 @@ wxWindow *wxWindow::FindWindow(long id)
|
||||
if ( GetId() == id)
|
||||
return this;
|
||||
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
@@ -4150,7 +4148,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
|
||||
if ( GetName() == name)
|
||||
return this;
|
||||
|
||||
wxNode *node = GetChildren()->First();
|
||||
wxNode *node = GetChildren().First();
|
||||
while ( node )
|
||||
{
|
||||
wxWindow *child = (wxWindow *)node->Data();
|
||||
|
Reference in New Issue
Block a user