]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/choice.h
(blind) fixes for Motif compilation
[wxWidgets.git] / include / wx / mac / choice.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
3// Purpose: wxChoice class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
14
15#ifdef __GNUG__
16#pragma interface "choice.h"
17#endif
18
19#include "wx/control.h"
20
21WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
22
23// Choice item
24class WXDLLEXPORT wxChoice: public wxControl
25{
26 DECLARE_DYNAMIC_CLASS(wxChoice)
27
28 public:
05adb9d2 29 inline wxChoice() {}
0dbd6262
SC
30
31 inline wxChoice(wxWindow *parent, wxWindowID id,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int n = 0, const wxString choices[] = NULL,
35 long style = 0,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxChoiceNameStr)
38 {
39 Create(parent, id, pos, size, n, choices, style, validator, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 int n = 0, const wxString choices[] = NULL,
46 long style = 0,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxChoiceNameStr);
49
50 virtual void Append(const wxString& item);
51 virtual void Delete(int n);
52 virtual void Clear();
53 virtual int GetSelection() const ;
54 virtual void SetSelection(int n);
21168619 55 virtual inline void Select( int n ) { SetSelection( n ); }
0dbd6262
SC
56 virtual int FindString(const wxString& s) const;
57 virtual wxString GetString(int n) const ;
58 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
59 virtual wxString GetStringSelection() const ;
60 virtual bool SetStringSelection(const wxString& sel);
61
05adb9d2 62 virtual inline int Number() const { return m_strings.GetCount(); }
21168619 63 virtual inline int GetCount() const { return m_strings.GetCount(); }
0dbd6262
SC
64 virtual void Command(wxCommandEvent& event);
65
66 virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ;
67 virtual inline int GetColumns() const { return 1 ; };
519cb848 68 void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
0dbd6262
SC
69
70protected:
05adb9d2 71 wxArrayString m_strings;
519cb848 72 MenuHandle m_macPopUpMenuHandle ;
0dbd6262
SC
73};
74
75#endif
76 // _WX_CHOICE_H_