/////////////////////////////////////////////////////////////////////////////
// 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,
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_