wxSingleChoiceDialog

new topic     » topic index » view thread      » older message » newer message

Matt,

I wrapped wxSingleChoiceDialog and everything looks correct, except it's not making its way into wxeud.e. Maybe it's because I'm doing things on my Linux box at home instead of my Windows box at work (where I normally update this stuff). Or maybe it's because it's midnight and I'm running on another caffeine-induced programming binge (and I'm therefore overlooking something obvious). Can you take a look? I've committed the revisions.

object WXEUAPI  new_wxSingleChoiceDialog(object params) 
{ 
/* 
wxSingleChoiceDialog( 
--1  1 wxWindow* parent, 
--2  2 const wxString& message, 
--3  3 const wxString& caption, 
--   4 int n, 
--4  5 const wxString* choices, 
--   6 void** clientData = NULL, 
--5  7 long style = wxCHOICEDLG_STYLE, 
--67 8 const wxPoint& pos = wxDefaultPosition) 
*/ 
	s1_ptr p = SEQ_PTR( params ); 
	wxPoint pos = wxDefaultPosition; 
	long style = wxCHOICEDLG_STYLE; 
	int n = 0; 
	wxString * choices = NULL; 
	object c; 
 
	switch( p->length ){ 
		case 7: 
			pos = wxPoint( get_int( params, 6 ), get_int( params, 7) ); 
 
		case 6: 
		case 5: 
			style = get_int( params, 5 ); 
 
		case 4: 
			c = p->base[4]; 
			n = ((s1_ptr)SEQ_PTR(c))->length; 
			choices = new wxString[n]; 
 
			for( int i = 0; i < n; i++ ){ 
				choices[i] = get_string( c, i + 1 ); 
			} 
 
		default: 
			break; 
 
	} 
	wxDeRefDS(params); 
 
	wxSingleChoiceDialog * dlg = new wxSingleChoiceDialog(  
		(wxWindow *)get_int(params, 1), get_string( params, 2 ), get_string( params, 3 ),  
		n, choices, NULL, style, pos ); 
 
	return BOX_INT( dlg ); 
} 

-Greg

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu