bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
+ wxSize LayoutItems();
bool m_alreadySent;
+ int m_majorDim;
wxList m_boxes;
DECLARE_EVENT_TABLE()
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
+ wxSize LayoutItems();
bool m_alreadySent;
+ int m_majorDim;
wxList m_boxes;
DECLARE_EVENT_TABLE()
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint &pos, const wxSize &size,
- int n, const wxString choices[],
- int WXUNUSED(majorDim),
+ int n, const wxString choices[], int majorDim,
long style, const wxValidator& validator,
const wxString &name )
{
m_widget = gtk_frame_new( title );
- int x = m_x+5;
- int y = m_y+15;
- int maxLen = 0;
- int height = 20;
- int width = 0;
+ m_majorDim = majorDim;
GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
- if (m_windowStyle & wxRA_HORIZONTAL)
+ GSList *radio_button_group = (GSList *) NULL;
+ for (int i = 0; i < n; i++)
{
- GSList *radio_button_group = (GSList *) NULL;
- for (int i = 0; i < n; i++)
- {
- if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
+ if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
- m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
+ m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
- m_boxes.Append( (wxObject*) m_radio );
+ m_boxes.Append( (wxObject*) m_radio );
- ConnectWidget( GTK_WIDGET(m_radio) );
+ ConnectWidget( GTK_WIDGET(m_radio) );
- if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
+ if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
- gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
- GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
+ gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
+ GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
- gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y );
-
- int tmp = 25+gdk_string_measure( GTK_WIDGET(m_radio)->style->font, choices[i] );
- if (tmp > maxLen) maxLen = tmp;
+ gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), m_x+10, m_y+10+(i*24) );
- width = m_width-10;
- if (size.x == -1) width = tmp;
- gtk_widget_set_usize( GTK_WIDGET(m_radio), width, 20 );
-
- y += 20;
- height += 20;
- }
- width = maxLen + 10;
}
- else
- {
- int max = 0;
- for (int i = 0; i < n; i++)
- {
- GdkFont *font = m_widget->style->font;
- int len = 27+gdk_string_measure( font, choices[i] );
- if (len > max) max = len;
- }
-
- GSList *radio_button_group = (GSList *) NULL;
- for (int i = 0; i < n; i++)
- {
- if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
-
- m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
-
- m_boxes.Append( (wxObject*) m_radio );
-
- ConnectWidget( GTK_WIDGET(m_radio) );
-
- if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
-
- gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
- GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
-
- gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y );
-
- gtk_widget_set_usize( GTK_WIDGET(m_radio), max, 20 );
-
- x += max;
- }
- width = max*n + 10;
- height = 40;
- }
+ wxSize ls = LayoutItems();
wxSize newSize = size;
- if (newSize.x == -1) newSize.x = width;
- if (newSize.y == -1) newSize.y = height;
+ if (newSize.x == -1) newSize.x = ls.x;
+ if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
m_parent->AddChild( this );
void wxRadioBox::OnSize( wxSizeEvent &event )
{
- wxControl::OnSize( event );
-
- int x = m_x+5;
- int y = m_y+15;
+ wxControl::OnSize( event );
- if (m_windowStyle & wxRA_HORIZONTAL)
- {
- wxNode *node = m_boxes.First();
- while (node)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
+ LayoutItems();
+}
+
+wxSize wxRadioBox::LayoutItems()
+{
+ int x = m_x+7;
+ int y = m_y+15;
- gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
- y += 20;
+ int num_per_major = (m_boxes.GetCount() - 1) / m_majorDim +1;
- int w = m_width-10;
- if (w < 15) w = 15;
- gtk_widget_set_usize( button, w, 20 );
-
- node = node->Next();
+ wxSize res( 0, 0 );
+
+ if (m_windowStyle & wxRA_HORIZONTAL)
+ {
+
+ for (int j = 0; j < m_majorDim; j++)
+ {
+ y = m_y+15;
+
+ int max_len = 0;
+ wxNode *node = m_boxes.Nth( j*num_per_major );
+ for (int i = 0; i< num_per_major; i++)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+ GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
+ GdkFont *font = m_widget->style->font;
+ int len = 27+gdk_string_measure( font, label->label );
+ if (len > max_len) max_len = len;
+
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ y += 22;
+
+ node = node->Next();
+ if (!node) break;
+ }
+
+ // we don't know the max_len before
+
+ node = m_boxes.Nth( j*num_per_major );
+ for (int i = 0; i< num_per_major; i++)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+
+ gtk_widget_set_usize( button, max_len, 22 );
+
+ node = node->Next();
+ if (!node) break;
+ }
+
+ if (y > res.y) res.y = y;
+
+ x += max_len + 2;
+ }
+
+ res.y -= 3;
+ res.x = x-2;
}
- }
- else
- {
- int max = 0;
-
- wxNode *node = m_boxes.First();
- while (node)
+ else
{
- GtkButton *button = GTK_BUTTON( node->Data() );
- GtkLabel *label = GTK_LABEL( button->child );
+ int max = 0;
+
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkButton *button = GTK_BUTTON( node->Data() );
+ GtkLabel *label = GTK_LABEL( button->child );
- GdkFont *font = m_widget->style->font;
- int len = 27+gdk_string_measure( font, label->label );
- if (len > max) max = len;
+ GdkFont *font = m_widget->style->font;
+ int len = 27+gdk_string_measure( font, label->label );
+ if (len > max) max = len;
- node = node->Next();
- }
+ node = node->Next();
+ }
- node = m_boxes.First();
- while (node)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
+ node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
- gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
- x += max;
- gtk_widget_set_usize( button, max, 20 );
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ x += max;
+ gtk_widget_set_usize( button, max, 20 );
- node = node->Next();
+ node = node->Next();
+ }
+ res.x = x-2;
+ res.y = 42;
}
- }
+
+ return res;
}
bool wxRadioBox::Show( bool show )
if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth;
if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight;
- if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth;
- if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight;
+ if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
+ if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
wxPoint pt( m_parent->GetClientAreaOrigin() );
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint &pos, const wxSize &size,
- int n, const wxString choices[],
- int WXUNUSED(majorDim),
+ int n, const wxString choices[], int majorDim,
long style, const wxValidator& validator,
const wxString &name )
{
m_widget = gtk_frame_new( title );
- int x = m_x+5;
- int y = m_y+15;
- int maxLen = 0;
- int height = 20;
- int width = 0;
+ m_majorDim = majorDim;
GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
- if (m_windowStyle & wxRA_HORIZONTAL)
+ GSList *radio_button_group = (GSList *) NULL;
+ for (int i = 0; i < n; i++)
{
- GSList *radio_button_group = (GSList *) NULL;
- for (int i = 0; i < n; i++)
- {
- if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
+ if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
- m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
+ m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
- m_boxes.Append( (wxObject*) m_radio );
+ m_boxes.Append( (wxObject*) m_radio );
- ConnectWidget( GTK_WIDGET(m_radio) );
+ ConnectWidget( GTK_WIDGET(m_radio) );
- if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
+ if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
- gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
- GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
+ gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
+ GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
- gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y );
-
- int tmp = 25+gdk_string_measure( GTK_WIDGET(m_radio)->style->font, choices[i] );
- if (tmp > maxLen) maxLen = tmp;
+ gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), m_x+10, m_y+10+(i*24) );
- width = m_width-10;
- if (size.x == -1) width = tmp;
- gtk_widget_set_usize( GTK_WIDGET(m_radio), width, 20 );
-
- y += 20;
- height += 20;
- }
- width = maxLen + 10;
}
- else
- {
- int max = 0;
- for (int i = 0; i < n; i++)
- {
- GdkFont *font = m_widget->style->font;
- int len = 27+gdk_string_measure( font, choices[i] );
- if (len > max) max = len;
- }
-
- GSList *radio_button_group = (GSList *) NULL;
- for (int i = 0; i < n; i++)
- {
- if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );
-
- m_radio = GTK_RADIO_BUTTON( gtk_radio_button_new_with_label( radio_button_group, choices[i] ) );
-
- m_boxes.Append( (wxObject*) m_radio );
-
- ConnectWidget( GTK_WIDGET(m_radio) );
-
- if (!i) gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_radio), TRUE );
-
- gtk_signal_connect( GTK_OBJECT(m_radio), "clicked",
- GTK_SIGNAL_FUNC(gtk_radiobutton_clicked_callback), (gpointer*)this );
-
- gtk_myfixed_put( GTK_MYFIXED(m_parent->m_wxwindow), GTK_WIDGET(m_radio), x, y );
-
- gtk_widget_set_usize( GTK_WIDGET(m_radio), max, 20 );
-
- x += max;
- }
- width = max*n + 10;
- height = 40;
- }
+ wxSize ls = LayoutItems();
wxSize newSize = size;
- if (newSize.x == -1) newSize.x = width;
- if (newSize.y == -1) newSize.y = height;
+ if (newSize.x == -1) newSize.x = ls.x;
+ if (newSize.y == -1) newSize.y = ls.y;
SetSize( newSize.x, newSize.y );
m_parent->AddChild( this );
void wxRadioBox::OnSize( wxSizeEvent &event )
{
- wxControl::OnSize( event );
-
- int x = m_x+5;
- int y = m_y+15;
+ wxControl::OnSize( event );
- if (m_windowStyle & wxRA_HORIZONTAL)
- {
- wxNode *node = m_boxes.First();
- while (node)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
+ LayoutItems();
+}
+
+wxSize wxRadioBox::LayoutItems()
+{
+ int x = m_x+7;
+ int y = m_y+15;
- gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
- y += 20;
+ int num_per_major = (m_boxes.GetCount() - 1) / m_majorDim +1;
- int w = m_width-10;
- if (w < 15) w = 15;
- gtk_widget_set_usize( button, w, 20 );
-
- node = node->Next();
+ wxSize res( 0, 0 );
+
+ if (m_windowStyle & wxRA_HORIZONTAL)
+ {
+
+ for (int j = 0; j < m_majorDim; j++)
+ {
+ y = m_y+15;
+
+ int max_len = 0;
+ wxNode *node = m_boxes.Nth( j*num_per_major );
+ for (int i = 0; i< num_per_major; i++)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+ GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
+ GdkFont *font = m_widget->style->font;
+ int len = 27+gdk_string_measure( font, label->label );
+ if (len > max_len) max_len = len;
+
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ y += 22;
+
+ node = node->Next();
+ if (!node) break;
+ }
+
+ // we don't know the max_len before
+
+ node = m_boxes.Nth( j*num_per_major );
+ for (int i = 0; i< num_per_major; i++)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
+
+ gtk_widget_set_usize( button, max_len, 22 );
+
+ node = node->Next();
+ if (!node) break;
+ }
+
+ if (y > res.y) res.y = y;
+
+ x += max_len + 2;
+ }
+
+ res.y -= 3;
+ res.x = x-2;
}
- }
- else
- {
- int max = 0;
-
- wxNode *node = m_boxes.First();
- while (node)
+ else
{
- GtkButton *button = GTK_BUTTON( node->Data() );
- GtkLabel *label = GTK_LABEL( button->child );
+ int max = 0;
+
+ wxNode *node = m_boxes.First();
+ while (node)
+ {
+ GtkButton *button = GTK_BUTTON( node->Data() );
+ GtkLabel *label = GTK_LABEL( button->child );
- GdkFont *font = m_widget->style->font;
- int len = 27+gdk_string_measure( font, label->label );
- if (len > max) max = len;
+ GdkFont *font = m_widget->style->font;
+ int len = 27+gdk_string_measure( font, label->label );
+ if (len > max) max = len;
- node = node->Next();
- }
+ node = node->Next();
+ }
- node = m_boxes.First();
- while (node)
- {
- GtkWidget *button = GTK_WIDGET( node->Data() );
+ node = m_boxes.First();
+ while (node)
+ {
+ GtkWidget *button = GTK_WIDGET( node->Data() );
- gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
- x += max;
- gtk_widget_set_usize( button, max, 20 );
+ gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), button, x, y );
+ x += max;
+ gtk_widget_set_usize( button, max, 20 );
- node = node->Next();
+ node = node->Next();
+ }
+ res.x = x-2;
+ res.y = 42;
}
- }
+
+ return res;
}
bool wxRadioBox::Show( bool show )
if ((m_minWidth != -1) && (m_width < m_minWidth)) m_width = m_minWidth;
if ((m_minHeight != -1) && (m_height < m_minHeight)) m_height = m_minHeight;
- if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_minWidth;
- if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_minHeight;
+ if ((m_maxWidth != -1) && (m_width > m_maxWidth)) m_width = m_maxWidth;
+ if ((m_maxHeight != -1) && (m_height > m_maxHeight)) m_height = m_maxHeight;
wxPoint pt( m_parent->GetClientAreaOrigin() );
gtk_myfixed_move( GTK_MYFIXED(m_parent->m_wxwindow), m_widget, m_x+pt.x, m_y+pt.y );
## Pick one of these, or set your own. This is where the
## wxPython module should be installed. It should be a
## subdirectory named wxPython.
-TARGETDIR=..
+#TARGETDIR=..
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
+TARGETDIR=$(BINLIBDEST)/wxPython
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
return _resultobj;
}
+#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0))
+static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ wxString * _arg1;
+ char * _argc0 = 0;
+ PyObject * _obj1 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"sO:wxFont_SetFaceName",&_argc0,&_obj1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1));
+}
+ wxFont_SetFaceName(_arg0,*_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0))
+static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ int _arg1;
+ char * _argc0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxFont_SetFamily",&_argc0,&_arg1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ wxFont_SetFamily(_arg0,_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0))
+static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ int _arg1;
+ char * _argc0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxFont_SetPointSize",&_argc0,&_arg1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ wxFont_SetPointSize(_arg0,_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0))
+static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ int _arg1;
+ char * _argc0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxFont_SetStyle",&_argc0,&_arg1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ wxFont_SetStyle(_arg0,_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFont_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0))
+static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ bool _arg1;
+ char * _argc0 = 0;
+ int tempbool1;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxFont_SetUnderlined",&_argc0,&tempbool1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetUnderlined. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ _arg1 = (bool ) tempbool1;
+ wxFont_SetUnderlined(_arg0,_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0))
+static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxFont * _arg0;
+ int _arg1;
+ char * _argc0 = 0;
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxFont_SetWeight",&_argc0,&_arg1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p.");
+ return NULL;
+ }
+ }
+ wxFont_SetWeight(_arg0,_arg1);
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args) {
PyObject * _resultobj;
{ "wxColour_Red", _wrap_wxColour_Red, 1 },
{ "delete_wxColour", _wrap_delete_wxColour, 1 },
{ "new_wxColour", _wrap_new_wxColour, 1 },
+ { "wxFont_SetWeight", _wrap_wxFont_SetWeight, 1 },
+ { "wxFont_SetUnderlined", _wrap_wxFont_SetUnderlined, 1 },
+ { "wxFont_SetStyle", _wrap_wxFont_SetStyle, 1 },
+ { "wxFont_SetPointSize", _wrap_wxFont_SetPointSize, 1 },
+ { "wxFont_SetFamily", _wrap_wxFont_SetFamily, 1 },
+ { "wxFont_SetFaceName", _wrap_wxFont_SetFaceName, 1 },
{ "wxFont_GetWeight", _wrap_wxFont_GetWeight, 1 },
{ "wxFont_GetUnderlined", _wrap_wxFont_GetUnderlined, 1 },
{ "wxFont_GetStyle", _wrap_wxFont_GetStyle, 1 },
def GetWeight(self):
val = gdic.wxFont_GetWeight(self.this)
return val
+ def SetFaceName(self,arg0):
+ val = gdic.wxFont_SetFaceName(self.this,arg0)
+ return val
+ def SetFamily(self,arg0):
+ val = gdic.wxFont_SetFamily(self.this,arg0)
+ return val
+ def SetPointSize(self,arg0):
+ val = gdic.wxFont_SetPointSize(self.this,arg0)
+ return val
+ def SetStyle(self,arg0):
+ val = gdic.wxFont_SetStyle(self.this,arg0)
+ return val
+ def SetUnderlined(self,arg0):
+ val = gdic.wxFont_SetUnderlined(self.this,arg0)
+ return val
+ def SetWeight(self,arg0):
+ val = gdic.wxFont_SetWeight(self.this,arg0)
+ return val
def __repr__(self):
return "<C wxFont instance>"
class wxFont(wxFontPtr):
return _resultobj;
}
+#define wxMenuBar_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindItemForId(_swigarg0))
+static PyObject *_wrap_wxMenuBar_FindItemForId(PyObject *self, PyObject *args) {
+ PyObject * _resultobj;
+ wxMenuItem * _result;
+ wxMenuBar * _arg0;
+ int _arg1;
+ char * _argc0 = 0;
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTuple(args,"si:wxMenuBar_FindItemForId",&_argc0,&_arg1))
+ return NULL;
+ if (_argc0) {
+ if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindItemForId. Expected _wxMenuBar_p.");
+ return NULL;
+ }
+ }
+ _result = (wxMenuItem *)wxMenuBar_FindItemForId(_arg0,_arg1);
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
#define wxMenuBar_GetMenuCount(_swigobj) (_swigobj->GetMenuCount())
static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args) {
PyObject * _resultobj;
{ "wxMenuItem_IsSeparator", _wrap_wxMenuItem_IsSeparator, 1 },
{ "wxMenuBar_GetMenu", _wrap_wxMenuBar_GetMenu, 1 },
{ "wxMenuBar_GetMenuCount", _wrap_wxMenuBar_GetMenuCount, 1 },
+ { "wxMenuBar_FindItemForId", _wrap_wxMenuBar_FindItemForId, 1 },
{ "wxMenuBar_FindMenuItem", _wrap_wxMenuBar_FindMenuItem, 1 },
{ "wxMenuBar_Enabled", _wrap_wxMenuBar_Enabled, 1 },
{ "wxMenuBar_Enable", _wrap_wxMenuBar_Enable, 1 },
def FindMenuItem(self,arg0,arg1):
val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1)
return val
+ def FindItemForId(self,arg0):
+ val = windowsc.wxMenuBar_FindItemForId(self.this,arg0)
+ val = wxMenuItemPtr(val)
+ return val
def GetMenuCount(self):
val = windowsc.wxMenuBar_GetMenuCount(self.this)
return val
SWIG_RegisterMapping("_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent);
SWIG_RegisterMapping("_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent);
SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0);
+ SWIG_RegisterMapping("_wxCheckListBox","_class_wxCheckListBox",0);
SWIG_RegisterMapping("_wxGridEvent","_class_wxGridEvent",0);
SWIG_RegisterMapping("_wxRect","_class_wxRect",0);
SWIG_RegisterMapping("_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0);
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
+ SWIG_RegisterMapping("_wxWindowDC","_class_wxWindowDC",0);
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
SWIG_RegisterMapping("_signed_short","_short",0);
SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0);
SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0);
+ SWIG_RegisterMapping("_class_wxWindowDC","_wxWindowDC",0);
SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0);
SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0);
SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0);
SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0);
SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0);
SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0);
+ SWIG_RegisterMapping("_class_wxCheckListBox","_wxCheckListBox",0);
SWIG_RegisterMapping("_class_wxGridEvent","_wxGridEvent",0);
SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);
SWIG_RegisterMapping("_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);