extern wxList wxPendingDelete;
//-----------------------------------------------------------------------------
-// delete
+// "delete_event"
+//-----------------------------------------------------------------------------
bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
{
// wxDialog
//-----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(wxDialog,wxWindow)
+BEGIN_EVENT_TABLE(wxDialog,wxPanel)
EVT_BUTTON (wxID_OK, wxDialog::OnOK)
EVT_BUTTON (wxID_CANCEL, wxDialog::OnCancel)
EVT_BUTTON (wxID_APPLY, wxDialog::OnApply)
EVT_CLOSE (wxDialog::OnCloseWindow)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxWindow)
+IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxPanel)
wxDialog::wxDialog(void)
{
bool wxDialog::Show( bool show )
{
- if (!show && IsModal() && m_modalShowing)
+ if (!show && IsModal())
{
EndModal( wxID_CANCEL );
}
return TRUE;
}
-void wxDialog::SetModal(bool flag)
+bool wxDialog::IsModal(void) const
+{
+ return m_modalShowing;
+}
+
+void wxDialog::SetModal( bool WXUNUSED(flag) )
{
+/*
if (flag)
m_windowStyle |= wxDIALOG_MODAL;
else
if (m_windowStyle & wxDIALOG_MODAL) m_windowStyle -= wxDIALOG_MODAL;
+*/
+ wxFAIL_MSG( "wxDialog:SetModal obsolete now" );
}
int wxDialog::ShowModal(void)
{
- SetModal(TRUE);
-
- if (m_modalShowing)
+ if (IsModal())
{
wxFAIL_MSG( "wxDialog:ShowModal called twice" );
return GetReturnCode();
{
SetReturnCode( retCode );
- if (!m_modalShowing)
+ if (!IsModal())
{
wxFAIL_MSG( "wxDialog:EndModal called twice" );
return;
wxWindow::InitDialog();
}
-void wxDialog::SetSizeHints(int minW, int minH, int maxW, int maxH, int WXUNUSED(incW) )
-{
- gdk_window_set_hints( m_widget->window, -1, -1,
- minW, minH, maxW, maxH, GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE );
-}
-
void wxDialog::SetIcon( const wxIcon &icon )
{
m_icon = icon;