merged 2.2 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2000-07-15 19:51:35 +00:00
parent 8a693e6e04
commit f6bcfd974e
1835 changed files with 237729 additions and 67990 deletions

View File

@@ -46,8 +46,10 @@
#ifndef __WIN16__
#include "wx/spinbutt.h"
#if wxUSE_CHECKLISTBOX
#include "wx/checklst.h"
#endif
#endif
#include "wx/valgen.h"
@@ -212,30 +214,62 @@ bool wxGenericValidator::TransferToWindow(void)
if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
{
wxChoice* pControl = (wxChoice*) m_validatorWindow;
if (m_pInt)
{
pControl->SetSelection(*m_pInt) ;
return TRUE;
}
if (m_pInt)
{
pControl->SetSelection(*m_pInt) ;
return TRUE;
}
else if (m_pString)
{
if (pControl->FindString(* m_pString) > -1)
{
pControl->SetStringSelection(* m_pString);
}
return TRUE;
}
} else
#endif
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
{
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
if (m_pInt)
{
pControl->SetSelection(*m_pInt) ;
return TRUE;
}
else if (m_pString)
{
if (pControl->FindString(* m_pString) > -1)
{
pControl->SetStringSelection(* m_pString);
}
return TRUE;
}
} else
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
if (m_pString)
{
pControl->SetLabel(*m_pString) ;
return TRUE;
}
if (m_pString)
{
pControl->SetLabel(*m_pString) ;
return TRUE;
}
} else
if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
{
wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
if (m_pString)
{
pControl->SetValue(*m_pString) ;
return TRUE;
}
if (m_pString)
{
pControl->SetValue(*m_pString) ;
return TRUE;
}
else if (m_pInt)
{
wxString str;
str.Printf("%d", *m_pInt);
pControl->SetValue(str);
return TRUE;
}
} else
#if wxUSE_CHECKLISTBOX
#ifndef __WIN16__
@@ -393,6 +427,11 @@ bool wxGenericValidator::TransferFromWindow(void)
*m_pString = pControl->GetValue() ;
return TRUE;
}
else if (m_pString)
{
*m_pString = pControl->GetStringSelection();
return TRUE;
}
} else
#endif
#if wxUSE_CHOICE
@@ -404,8 +443,27 @@ bool wxGenericValidator::TransferFromWindow(void)
*m_pInt = pControl->GetSelection() ;
return TRUE;
}
else if (m_pString)
{
*m_pString = pControl->GetStringSelection();
return TRUE;
}
} else
#endif
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
{
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
if (m_pInt)
{
*m_pInt = pControl->GetSelection() ;
return TRUE;
}
else if (m_pString)
{
*m_pString = pControl->GetStringSelection();
return TRUE;
}
} else
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
@@ -423,6 +481,11 @@ bool wxGenericValidator::TransferFromWindow(void)
*m_pString = pControl->GetValue() ;
return TRUE;
}
else if (m_pInt)
{
*m_pInt = atoi(pControl->GetValue());
return TRUE;
}
} else
#if wxUSE_CHECKLISTBOX
#ifndef __WIN16__