X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cc3cec9a7c19df7897f878e0ecf2ae30d2bb0d6..f1e269209afbcbec4e46ab5df4ba43d902a6bf2f:/src/common/valgen.cpp?ds=inline diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index d6fc453323..4cf521922f 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "valgen.h" #endif @@ -44,18 +44,20 @@ #include "wx/slider.h" #endif -#if wxUSE_SPINCTRL && !defined(__WIN16__) + #include "wx/spinctrl.h" -#endif -#if wxUSE_SPINBTN && !defined(__WIN16__) + +#if wxUSE_SPINBTN #include "wx/spinbutt.h" #endif -#if wxUSE_CHECKLISTBOX && !defined(__WIN16__) +#if wxUSE_CHECKLISTBOX #include "wx/checklst.h" #endif #include "wx/valgen.h" +IMPLEMENT_CLASS(wxGenericValidator, wxValidator) + wxGenericValidator::wxGenericValidator(bool *val) { Initialize(); @@ -201,6 +203,7 @@ bool wxGenericValidator::TransferToWindow(void) #endif // string controls +#if wxUSE_BUTTON if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) ) { wxButton* pControl = (wxButton*) m_validatorWindow; @@ -210,6 +213,7 @@ bool wxGenericValidator::TransferToWindow(void) return TRUE; } } else +#endif #if wxUSE_COMBOBOX if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) ) { @@ -261,6 +265,7 @@ bool wxGenericValidator::TransferToWindow(void) return TRUE; } } else +#if wxUSE_TEXTCTRL if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) { wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; @@ -277,6 +282,7 @@ bool wxGenericValidator::TransferToWindow(void) return TRUE; } } else +#endif // array controls #if wxUSE_CHECKLISTBOX && !defined(__WIN16__) // NOTE: wxCheckListBox is a wxListBox, so wxCheckListBox MUST come first: @@ -426,6 +432,7 @@ bool wxGenericValidator::TransferFromWindow(void) } else #endif // string controls +#if wxUSE_BUTTON if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) ) { wxButton* pControl = (wxButton*) m_validatorWindow; @@ -434,8 +441,8 @@ bool wxGenericValidator::TransferFromWindow(void) *m_pString = pControl->GetLabel() ; return TRUE; } - } - else + } else +#endif #if wxUSE_COMBOBOX if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) ) { @@ -477,6 +484,7 @@ bool wxGenericValidator::TransferFromWindow(void) return TRUE; } } else +#if wxUSE_TEXTCTRL if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) ) { wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; @@ -491,6 +499,7 @@ bool wxGenericValidator::TransferFromWindow(void) return TRUE; } } else +#endif // array controls #if wxUSE_CHECKLISTBOX #ifndef __WIN16__