bool Create(wxWindowBase *parent, wxSizerBehaviour behav = wxSizerNone);
- virtual void GetSize(int *w, int *h) const;
-
- virtual void GetClientSize(int *w, int *h) const { GetSize(w, h); }
-
- virtual void GetPosition(int *x, int *y) const;
+ virtual void DoGetSize(int *w, int *h) const;
+ virtual void DoGetClientSize(int *w, int *h) const { GetSize(w, h); }
+ virtual void DoGetPosition(int *x, int *y) const;
void SizerSetSize(int x, int y, int w, int h) { SetSize(x, y, w, h); }
void SizerMove(int x, int y) { Move(x, y); }
}
}
-void wxSizer::GetSize(int *w, int *h) const
+void wxSizer::DoGetSize(int *w, int *h) const
{
*w = sizerWidth;
*h = sizerHeight;
}
-void wxSizer::GetPosition(int *x, int *y) const
+void wxSizer::DoGetPosition(int *x, int *y) const
{
*x = sizerX;
*y = sizerY;
void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event))
{
+ printf( "yes.\n" );
EndModal( wxID_YES );
}
void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event))
{
+ printf( "no.\n" );
EndModal( wxID_NO );
}
void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
+ printf( "cancel message.\n" );
/* Allow cancellation via ESC/Close button except if
only YES and NO are specified. */
if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button )
{
- if (g_isIdle) wxapp_install_idle_handler();
+ if (g_isIdle)
+ wxapp_install_idle_handler();
if (!button->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
-
+
+ printf( "clicked: %s.\n", button->GetLabel().c_str() );
+
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
event.SetEventObject(button);
button->GetEventHandler()->ProcessEvent(event);
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
- if ( Validate() && TransferDataFromWindow())
+ printf( "OnOK 1.\n" );
+ if (Validate() && TransferDataFromWindow())
{
+ printf( "OnOK 2.\n" );
if (IsModal())
{
+ printf( "OnOK: modal.\n" );
EndModal(wxID_OK);
}
else
{
+ printf( "OnOK: non-modal.\n" );
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button )
{
- if (g_isIdle) wxapp_install_idle_handler();
+ if (g_isIdle)
+ wxapp_install_idle_handler();
if (!button->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
-
+
+ printf( "clicked: %s.\n", button->GetLabel().c_str() );
+
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
event.SetEventObject(button);
button->GetEventHandler()->ProcessEvent(event);
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
- if ( Validate() && TransferDataFromWindow())
+ printf( "OnOK 1.\n" );
+ if (Validate() && TransferDataFromWindow())
{
+ printf( "OnOK 2.\n" );
if (IsModal())
{
+ printf( "OnOK: modal.\n" );
EndModal(wxID_OK);
}
else
{
+ printf( "OnOK: non-modal.\n" );
SetReturnCode(wxID_OK);
this->Show(FALSE);
}