]> git.saurik.com Git - wxWidgets.git/blame - include/wx/qt/choice.h
Rewrote wxNotebook, incl. PAGE_CHANGING event
[wxWidgets.git] / include / wx / qt / choice.h
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
01b2eeec
KB
3// Purpose: wxChoice class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
01b2eeec
KB
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
7c78e7c7
RR
14
15#ifdef __GNUG__
01b2eeec 16#pragma interface "choice.h"
7c78e7c7
RR
17#endif
18
7c78e7c7
RR
19#include "wx/control.h"
20
01b2eeec 21WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
7c78e7c7 22
01b2eeec
KB
23// Choice item
24class WXDLLEXPORT wxChoice: public wxControl
25{
26 DECLARE_DYNAMIC_CLASS(wxChoice)
7c78e7c7 27
01b2eeec
KB
28 public:
29 inline wxChoice() { m_noStrings = 0; }
7c78e7c7 30
01b2eeec
KB
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 }
7c78e7c7 41
01b2eeec
KB
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);
7c78e7c7 49
01b2eeec
KB
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);
55 virtual int FindString(const wxString& s) const;
56 virtual wxString GetString(int n) const ;
57 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
58 virtual wxString GetStringSelection() const ;
59 virtual bool SetStringSelection(const wxString& sel);
60
61 virtual inline int Number() const { return m_noStrings; }
62 virtual void Command(wxCommandEvent& event);
7c78e7c7 63
01b2eeec
KB
64 virtual inline void SetColumns(int WXUNUSED(n) = 1 ) { /* No effect */ } ;
65 virtual inline int GetColumns() const { return 1 ; };
7c78e7c7 66
01b2eeec
KB
67protected:
68 int m_noStrings;
7c78e7c7
RR
69};
70
01b2eeec
KB
71#endif
72 // _WX_CHOICE_H_