]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/choicdgg.h
event/leave events
[wxWidgets.git] / include / wx / generic / choicdgg.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: choicdgg.h
3// Purpose: Generic choice dialogs
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c)
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __CHOICEDLGH_G__
13#define __CHOICEDLGH_G__
14
15#ifdef __GNUG__
16#pragma interface "choicdgg.h"
17#endif
18
19#include "wx/setup.h"
20#include "wx/dialog.h"
21
22#define wxCHOICE_HEIGHT 150
23#define wxCHOICE_WIDTH 200
24
25#define wxID_LISTBOX 3000
26
27class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog
28{
29DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog)
30public:
31 wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
debe6624 32 int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
c801d85f
KB
33
34 wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
35 const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
36
37 bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
debe6624 38 int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
c801d85f
KB
39 bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
40 const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
41
ef77f91e 42 void SetSelection(int sel) ;
c801d85f
KB
43 inline int GetSelection(void) const { return m_selection; }
44 inline wxString GetStringSelection(void) const { return m_stringSelection; }
45 inline char *GetSelectionClientData(void) const { return m_clientData; }
46
47 void OnOK(wxCommandEvent& event);
debe6624 48 void OnListBoxDClick(wxCommandEvent& event);
c801d85f
KB
49
50DECLARE_EVENT_TABLE()
51
52protected:
53 long m_dialogStyle;
54 int m_selection;
55 wxString m_stringSelection;
56 char* m_clientData;
57};
58
59wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption,
debe6624
JS
60 int n, const wxString *choices, wxWindow *parent = NULL,
61 int x = -1, int y = -1, bool centre = TRUE,
62 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
63
64wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption,
debe6624
JS
65 int n, char *choices[], wxWindow *parent = NULL,
66 int x = -1, int y = -1, bool centre = TRUE,
67 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
68
69// Same as above but gets position in list of strings, instead of string,
70// or -1 if no selection
71int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
debe6624
JS
72 int n, const wxString *choices, wxWindow *parent = NULL,
73 int x = -1, int y = -1, bool centre = TRUE,
74 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
75
76int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
debe6624
JS
77 int n, char *choices[], wxWindow *parent = NULL,
78 int x = -1, int y = -1, bool centre = TRUE,
79 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
80
81// Return client data instead
82char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption,
debe6624
JS
83 int n, const wxString *choices, char **client_data,
84 wxWindow *parent = NULL, int x = -1, int y = -1,
85 bool centre = TRUE,
86 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
87
88char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption,
debe6624
JS
89 int n, char *choices[], char **client_data,
90 wxWindow *parent = NULL, int x = -1, int y = -1,
91 bool centre = TRUE,
92 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
93
c801d85f
KB
94/*
95int WXDLLEXPORT wxGetMultipleChoice(const wxString& message, const wxString& caption,
debe6624
JS
96 int n, const wxString *choices,
97 int nsel, int * selection,
98 wxWindow *parent = NULL, int x = -1 , int y = -1, bool centre = TRUE,
99 int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
c801d85f
KB
100*/
101
102#endif