Rewrote MDI system

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-04-11 22:43:52 +00:00
parent 53b7ce7ef8
commit ab2b3dd4a2
10 changed files with 468 additions and 432 deletions

View File

@@ -145,26 +145,26 @@ bool wxDialog::Create( wxWindow *parent,
gtk_widget_realize( m_widget );
long decor = (long) GDK_DECOR_ALL;
long func = (long) GDK_FUNC_ALL;
if ((m_windowStyle & wxCAPTION) == 0)
/* comments see wxFrame */
long decor = (long) GDK_DECOR_ALL;
long func = (long) GDK_FUNC_ALL;
if ((m_windowStyle & wxCAPTION) == 0)
decor |= GDK_DECOR_TITLE;
if ((m_windowStyle & wxMINIMIZE) == 0)
if ((m_windowStyle & wxMINIMIZE) == 0)
func |= GDK_FUNC_MINIMIZE;
if ((m_windowStyle & wxMAXIMIZE) == 0)
if ((m_windowStyle & wxMAXIMIZE) == 0)
func |= GDK_FUNC_MAXIMIZE;
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
if ((m_windowStyle & wxSYSTEM_MENU) == 0)
decor |= GDK_DECOR_MENU;
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
if ((m_windowStyle & wxMINIMIZE_BOX) == 0)
decor |= GDK_DECOR_MINIMIZE;
if ((m_windowStyle & wxMAXIMIZE_BOX) == 0)
if ((m_windowStyle & wxMAXIMIZE_BOX) == 0)
decor |= GDK_DECOR_MAXIMIZE;
if ((m_windowStyle & wxRESIZE_BORDER) == 0)
if ((m_windowStyle & wxRESIZE_BORDER) == 0)
func |= GDK_FUNC_RESIZE;
gdk_window_set_decorations(m_widget->window, (GdkWMDecoration)decor);
gdk_window_set_functions(m_widget->window, (GdkWMFunction)func);
gdk_window_set_decorations(m_widget->window, (GdkWMDecoration)decor);
gdk_window_set_functions(m_widget->window, (GdkWMFunction)func);
gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
GTK_SIGNAL_FUNC(gtk_dialog_size_callback), (gpointer)this );
@@ -257,17 +257,17 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event)
// sure to destroy the dialog.
// The default OnCancel (above) simply ends a modal dialog, and hides a modeless dialog.
static wxList closing;
static wxList s_closing;
if (closing.Member(this))
if (s_closing.Member(this))
return; // no loops
closing.Append(this);
s_closing.Append(this);
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( this );
GetEventHandler()->ProcessEvent(cancelEvent);
closing.DeleteObject(this);
s_closing.DeleteObject(this);
}
bool wxDialog::Destroy()