-wxSize wxBitmapToggleButton::DoGetBestSize() const
-{
- if (!m_bitmap.IsOk())
- return wxSize(20,20);
-
- wxSize best;
- best.x = m_bitmap.GetWidth() + 2 * m_marginX;
- best.y = m_bitmap.GetHeight() + 2 * m_marginY;
-
- return best;
-}
-
-void wxBitmapToggleButton::SetValue(bool val)
-{
- m_peer->SetValue( val ) ;
-}
-
-bool wxBitmapToggleButton::GetValue() const
-{
- return m_peer->GetValue() ;
-}
-
-void wxBitmapToggleButton::Command(wxCommandEvent & event)
-{
- SetValue((event.GetInt() != 0));
- ProcessCommand(event);
-}
-
-bool wxBitmapToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
-{
- wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId);
- event.SetInt(GetValue());
- event.SetEventObject(this);
- ProcessCommand(event);
- return noErr ;
-}
-