X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e320a79f187558effb04d92020b470372bbe456..04701dd94f691292563a1f0eb19933819b1c5fe9:/include/wx/os2/choice.h diff --git a/include/wx/os2/choice.h b/include/wx/os2/choice.h index ea9854e3b8..4778dc2636 100644 --- a/include/wx/os2/choice.h +++ b/include/wx/os2/choice.h @@ -1,32 +1,26 @@ ///////////////////////////////////////////////////////////////////////////// // Name: choice.h // Purpose: wxChoice class -// Author: AUTHOR +// Author: David Webster // Modified by: -// Created: ??/??/98 +// Created: 10/13/99 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_CHOICE_H_ #define _WX_CHOICE_H_ -#ifdef __GNUG__ -#pragma interface "choice.h" -#endif - -#include "wx/control.h" - WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; // Choice item -class WXDLLEXPORT wxChoice: public wxControl +class WXDLLEXPORT wxChoice: public wxChoiceBase { DECLARE_DYNAMIC_CLASS(wxChoice) public: - inline wxChoice() { m_noStrings = 0; } + inline wxChoice() { } inline wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -47,29 +41,42 @@ class WXDLLEXPORT wxChoice: public wxControl const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); - virtual void Append(const wxString& item); + virtual int DoAppend(const wxString& item); virtual void Delete(int n); virtual void Clear(); + + virtual int GetCount() const; virtual int GetSelection() const ; virtual void SetSelection(int n); + virtual int FindString(const wxString& s) const; virtual wxString GetString(int n) const ; - virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - virtual wxString GetStringSelection() const ; - virtual bool SetStringSelection(const wxString& sel); - - virtual inline int Number() const { return m_noStrings; } - virtual void Command(wxCommandEvent& event); - virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ; - virtual inline int GetColumns() const { return 1 ; }; + // OS2 only + virtual bool OS2Command(WXUINT param, WXWORD id); + MRESULT OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); protected: - int m_noStrings; + virtual void DoSetClientData( int n, void* clientData ); + virtual void* DoGetClientData( int n ) const; + virtual void DoSetClientObject( int n, wxClientData* clientData ); + virtual wxClientData* DoGetClientObject( int n ) const; + // OS2 implementation + virtual wxSize DoGetBestSize(); + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); private: - void SetSize(int width, int height) {wxWindow::SetSize(width, height);} + // Virtual function hiding supression + inline virtual void DoSetClientData( void *data ) + { wxWindowBase::DoSetClientData(data); } + inline virtual void DoSetClientObject( wxClientData *data ) + { wxWindowBase::DoSetClientObject(data); } + inline virtual wxClientData *DoGetClientObject() const + { return(wxWindowBase::DoGetClientObject());} + inline virtual void *DoGetClientData() const + { return(wxWindowBase::DoGetClientData());} }; -#endif - // _WX_CHOICE_H_ +#endif // _WX_CHOICE_H_