#include "wx/log.h"
#endif
-#include "wx/palmos/private.h"
-
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#endif // wxUSE_TOOLTIPS
+#include "wx/radiobut.h"
+
// TODO: wxCONSTRUCTOR
#if 0 // wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxRadioBoxStyle )
item
*/
-#define RADIOBTN_PARENT_IS_RADIOBOX 0
-
-// ---------------------------------------------------------------------------
-// private functions
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-// global vars
-// ---------------------------------------------------------------------------
-
-// the pointer to standard radio button wnd proc
-static WXFARPROC s_wndprocRadioBtn = (WXFARPROC)NULL;
-
// ===========================================================================
// implementation
// ===========================================================================
const wxValidator& val,
const wxString& name)
{
- return false;
+ // initialize members
+ m_majorDim = majorDim == 0 ? n : majorDim;
+
+ if(!wxControl::Create(parent, id, pos, size, style, val, name))
+ return false;
+
+ for(int i=0; i<n; i++)
+ {
+ wxRadioButton* rb = new wxRadioButton();
+ rb->SetGroup( id );
+ rb->Create(
+ this,
+ wxID_ANY,
+ choices[n],
+ pos,
+ size,
+ ( n == 0 ? wxRB_GROUP : 0 ) |
+ ( style & wxRA_USE_CHECKBOX ) ? wxRB_USE_CHECKBOX : 0
+ );
+ }
+
+ SetSize(size);
}
bool wxRadioBox::Create(wxWindow *parent,
const wxValidator& val,
const wxString& name)
{
- return false;
+ wxCArrayString chs(choices);
+
+ return Create( parent, id, title, pos, size, chs.GetCount(),
+ chs.GetStrings(), majorDim, style, val, name );
}
wxRadioBox::~wxRadioBox()
{
}
-void wxRadioBox::GetSize(int *width, int *height) const
-{
-}
-
-void wxRadioBox::GetPosition(int *x, int *y) const
-{
-}
-
void wxRadioBox::SetFocus()
{
}
{
}
-bool wxRadioBox::ContainsHWND(WXHWND hWnd) const
-{
- return false;
-}
-
void wxRadioBox::Command(wxCommandEvent & event)
{
}
-void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn)
-{
-}
-
void wxRadioBox::SendNotificationEvent()
{
}
return false;
}
-// ----------------------------------------------------------------------------
-// our window proc
-// ----------------------------------------------------------------------------
-
-WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
- WXUINT WXUNUSED(message),
- WXWPARAM WXUNUSED(wParam),
- WXLPARAM WXUNUSED(lParam)
- )
-{
- return (WXHBRUSH)0;
-}
-
#endif // wxUSE_RADIOBOX