#include "wx/slider.h"
#endif
-#ifndef __WIN16__
+#if wxUSE_SPINCTRL && !defined(__WIN16__)
+ #include "wx/spinctrl.h"
+#endif
+#if wxUSE_SPINBTN && !defined(__WIN16__)
#include "wx/spinbutt.h"
-#if wxUSE_CHECKLISTBOX
- #include "wx/checklst.h"
#endif
+#if wxUSE_CHECKLISTBOX && !defined(__WIN16__)
+ #include "wx/checklst.h"
#endif
#include "wx/valgen.h"
}
} else
#endif
-#if wxUSE_SPINBTN
-#ifndef __WIN16__
+#if wxUSE_SPINCTRL && !defined(__WIN16__)
+ if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
+ {
+ wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
+ if (m_pInt)
+ {
+ pControl->SetValue(*m_pInt);
+ return TRUE;
+ }
+ } else
+#endif
+#if wxUSE_SPINBTN && !defined(__WIN16__)
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
}
} else
#endif
-#endif
#if wxUSE_SLIDER
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
{
#endif
// string controls
-#if 1
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
{
wxButton* pControl = (wxButton*) m_validatorWindow;
return TRUE;
}
} else
-#endif
#if wxUSE_COMBOBOX
if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
{
wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
- if (m_pString)
- {
- pControl->SetValue(*m_pString) ;
- return TRUE;
- }
- } else
-#endif
-#if wxUSE_CHOICE
- if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
- {
- wxChoice* pControl = (wxChoice*) m_validatorWindow;
if (m_pInt)
{
pControl->SetSelection(*m_pInt) ;
}
} else
#endif
- if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
+#if wxUSE_CHOICE
+ if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
{
- wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+ wxChoice* pControl = (wxChoice*) m_validatorWindow;
if (m_pInt)
{
pControl->SetSelection(*m_pInt) ;
return TRUE;
}
} else
+#endif
if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
{
wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
}
} else
#endif
-#if wxUSE_SPINBTN
-#ifndef __WIN16__
+#if wxUSE_SPINCTRL && !defined(__WIN16__)
+ if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
+ {
+ wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
+ if (m_pInt)
+ {
+ *m_pInt=pControl->GetValue();
+ return TRUE;
+ }
+ } else
+#endif
+#if wxUSE_SPINBTN && !defined(__WIN16__)
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
}
} else
#endif
-#endif
#if wxUSE_SLIDER
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
{
}
} 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;
/*
Called by constructors to initialize ALL data members
+ Last change: JAC 21 Jul 100 5:00 pm
*/
void wxGenericValidator::Initialize()
{