#if wxUSE_TOGGLEBTN
+#include "wx/tglbtn.h"
+
#ifndef WX_PRECOMP
#include "wx/button.h"
#include "wx/brush.h"
#include "wx/log.h"
#endif // WX_PRECOMP
-#include "wx/tglbtn.h"
+#include <Control.h>
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)
+wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent );
// ============================================================================
// implementation
const wxValidator& validator,
const wxString& name)
{
- wxControl::PalmCreateControl(pushButtonCtl, parent, id, label, pos, size);
- return true;
+ if(!wxControl::Create(parent, id, pos, size, style, validator, name))
+ return false;
+
+ return wxControl::PalmCreateControl(pushButtonCtl, label, pos, size);
}
wxBorder wxToggleButton::GetDefaultBorder() const
return GetBoolValue();
}
+bool wxToggleButton::SendClickEvent()
+{
+ wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, GetId());
+ event.SetInt(GetValue());
+ event.SetEventObject(this);
+ return ProcessCommand(event);
+}
+
void wxToggleButton::Command(wxCommandEvent & event)
{
}
#endif // wxUSE_TOGGLEBTN
-