]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dialog.cpp
All functionality I know hot implement already implemented.
[wxWidgets.git] / src / gtk1 / dialog.cpp
index dda9d0a2c2f9ac021c520d64880158dd5dd63367..bdeafd1bd32b6cd9b607e0453a709b0383e0a01d 100644 (file)
@@ -2,9 +2,8 @@
 // Name:        dialog.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Id:          $Id$
+// Copyright:   (c) 1998 Robert Roebling
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -22,7 +21,8 @@
 extern wxList wxPendingDelete;
 
 //-----------------------------------------------------------------------------
-// delete
+// "delete_event"
+//-----------------------------------------------------------------------------
 
 bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
 { 
@@ -42,14 +42,14 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED
 // 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)
 {
@@ -207,7 +207,7 @@ void wxDialog::Centre( int direction )
 
 bool wxDialog::Show( bool show )
 {
-  if (!show && IsModal() && m_modalShowing)
+  if (!show && IsModal())
   {
     EndModal( wxID_CANCEL );
   }
@@ -219,19 +219,25 @@ bool wxDialog::Show( bool show )
   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();
@@ -252,7 +258,7 @@ void wxDialog::EndModal( int retCode )
 {
   SetReturnCode( retCode );
   
-  if (!m_modalShowing)
+  if (!IsModal())
   {
      wxFAIL_MSG( "wxDialog:EndModal called twice" );
      return;
@@ -270,12 +276,6 @@ void wxDialog::InitDialog(void)
   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;
@@ -287,5 +287,3 @@ void wxDialog::SetIcon( const wxIcon &icon )
   
   gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
 }
-
-