IMPLEMENT_DYNAMIC_CLASS(wxChoicebook, wxBookCtrlBase)
-const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING = wxNewEventType();
-const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = wxNewEventType();
+wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent )
+wxDEFINE_EVENT( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent )
BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
EVT_CHOICE(wxID_ANY, wxChoicebook::OnChoiceSelected)
wxSize size = sizePage;
if ( IsVertical() )
{
+ if ( sizeChoice.x > sizePage.x )
+ size.x = sizeChoice.x;
size.y += sizeChoice.y + GetInternalBorder();
}
else // left/right aligned
{
size.x += sizeChoice.x + GetInternalBorder();
+ if ( sizeChoice.y > sizePage.y )
+ size.y = sizeChoice.y;
}
return size;
}
// ----------------------------------------------------------------------------
-// image list stuff
+// miscellaneous other stuff
// ----------------------------------------------------------------------------
+void wxChoicebook::DoSetWindowVariant(wxWindowVariant variant)
+{
+ wxCHECK_RET( m_bookctrl, "can't be called before control creation" );
+
+ m_bookctrl->SetWindowVariant(variant);
+}
+
void wxChoicebook::SetImageList(wxImageList *imageList)
{
// TODO: can be implemented in form of static bitmap near choice control