- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (!cb->m_hasVMT || g_blockEventsOnDrag)
- return;
-
- if (cb->m_blockEvent) return;
-
- // Generate a wx event.
- wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
- event.SetInt(cb->GetValue());
- event.SetEventObject(cb);
- cb->GetEventHandler()->ProcessEvent(event);
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ if (!cb->m_hasVMT || g_blockEventsOnDrag)
+ return;
+
+ if (cb->m_blockEvent) return;
+
+ // Generate a wx event.
+ wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId());
+ event.SetInt(cb->GetValue());
+ event.SetEventObject(cb);
+ cb->GetEventHandler()->ProcessEvent(event);
+}
if (!PreCreation(parent, pos, size) ||
!CreateBase(parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG(wxT("wxToggleBitmapButton creation failed"));
if (!PreCreation(parent, pos, size) ||
!CreateBase(parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG(wxT("wxToggleBitmapButton creation failed"));
}
// void SetValue(bool state)
// Set the value of the toggle button.
void wxToggleBitmapButton::SetValue(bool state)
{
}
// void SetValue(bool state)
// Set the value of the toggle button.
void wxToggleBitmapButton::SetValue(bool state)
{
- if (!PreCreation(parent, pos, size) ||
- !CreateBase(parent, id, pos, size, style, validator, name )) {
- wxFAIL_MSG(wxT("wxToggleButton creation failed"));
- return FALSE;
- }
+ if (!PreCreation(parent, pos, size) ||
+ !CreateBase(parent, id, pos, size, style, validator, name )) {
+ wxFAIL_MSG(wxT("wxToggleButton creation failed"));
+ return false;
+ }
- gtk_signal_connect(GTK_OBJECT(m_widget), "clicked",
- GTK_SIGNAL_FUNC(gtk_togglebutton_clicked_callback),
- (gpointer *)this);
+ gtk_signal_connect(GTK_OBJECT(m_widget), "clicked",
+ GTK_SIGNAL_FUNC(gtk_togglebutton_clicked_callback),
+ (gpointer *)this);
}
// void SetValue(bool state)
// Set the value of the toggle button.
void wxToggleButton::SetValue(bool state)
{
}
// void SetValue(bool state)
// Set the value of the toggle button.
void wxToggleButton::SetValue(bool state)
{