Merged the wxPy_newswig branch into the HEAD branch (main trunk)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
121
wxPython/src/_radio.i
Normal file
121
wxPython/src/_radio.i
Normal file
@@ -0,0 +1,121 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: _radio.i
|
||||
// Purpose: SWIG interface defs for wxRadioButton and wxRadioBox
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 10-June-1998
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Not a %module
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
DECLARE_DEF_STRING(RadioBoxNameStr);
|
||||
DECLARE_DEF_STRING(RadioButtonNameStr);
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%newgroup
|
||||
|
||||
class wxRadioBox : public wxControl
|
||||
{
|
||||
public:
|
||||
%addtofunc wxRadioBox "self._setOORInfo(self)"
|
||||
%addtofunc wxRadioBox() ""
|
||||
|
||||
wxRadioBox(wxWindow* parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& point = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int choices = 0, wxString* choices_array = NULL,
|
||||
int majorDimension = 0,
|
||||
long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxPyRadioBoxNameStr);
|
||||
%name(PreRadioBox)wxRadioBox();
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& point = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int choices = 0, wxString* choices_array = NULL,
|
||||
int majorDimension = 0,
|
||||
long style = wxRA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxPyRadioBoxNameStr);
|
||||
|
||||
virtual void SetSelection(int n);
|
||||
virtual int GetSelection() const;
|
||||
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual bool SetStringSelection(const wxString& s);
|
||||
|
||||
// string access
|
||||
virtual int GetCount() const;
|
||||
virtual int FindString(const wxString& s) const;
|
||||
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& label);
|
||||
%pythoncode { GetItemLabel = GetString };
|
||||
%pythoncode { SetItemLabel = SetString };
|
||||
|
||||
// change the individual radio button state
|
||||
%name(EnableItem) virtual void Enable(int n, bool enable = TRUE);
|
||||
%name(ShowItem) virtual void Show(int n, bool show = TRUE);
|
||||
|
||||
#ifndef __WXGTK__
|
||||
// layout parameters
|
||||
virtual int GetColumnCount() const;
|
||||
virtual int GetRowCount() const;
|
||||
|
||||
// return the item above/below/to the left/right of the given one
|
||||
int GetNextItem(int item, wxDirection dir, long style) const;
|
||||
#else
|
||||
%extend {
|
||||
int GetColumnCount() const { return -1; }
|
||||
int GetRowCount() const { return -1; }
|
||||
int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%newgroup
|
||||
|
||||
class wxRadioButton : public wxControl
|
||||
{
|
||||
public:
|
||||
%addtofunc wxRadioButton "self._setOORInfo(self)"
|
||||
%addtofunc wxRadioButton() ""
|
||||
|
||||
wxRadioButton(wxWindow* parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxPyRadioButtonNameStr);
|
||||
%name(PreRadioButton)wxRadioButton();
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxPyRadioButtonNameStr);
|
||||
|
||||
bool GetValue();
|
||||
void SetValue(bool value);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
Reference in New Issue
Block a user