X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34e8f09728ccbc0929cc4da77a9e47d13634eb14..9bb50fd0b04c824fc7ba14c0dc4ba4a2a9a1e6ad:/src/motif/frame.cpp?ds=sidebyside diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 7b325f41da..f17078a2d5 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -111,13 +111,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow) void wxFrame::Init() { - m_iconized = FALSE; + m_iconized = false; //// Motif-specific m_frameShell = (WXWidget) NULL; - m_mainWidget = (WXWidget) NULL;; - m_workArea = (WXWidget) NULL;; - m_clientArea = (WXWidget) NULL;; + m_mainWidget = (WXWidget) NULL; + m_workArea = (WXWidget) NULL; + m_clientArea = (WXWidget) NULL; } bool wxFrame::Create(wxWindow *parent, @@ -130,9 +130,9 @@ bool wxFrame::Create(wxWindow *parent, { if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style, name ) ) - return FALSE; + return false; - m_backgroundColour = + m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE); m_foregroundColour = *wxBLACK; m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); @@ -170,7 +170,7 @@ bool wxFrame::Create(wxWindow *parent, "Created frame (0x%p) with work area 0x%p and client " "area 0x%p", m_mainWidget, m_workArea, m_clientArea); - XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE, + XtAddEventHandler((Widget) m_clientArea, ExposureMask,False, wxUniversalRepaintProc, (XtPointer) this); if (x > -1) @@ -182,7 +182,7 @@ bool wxFrame::Create(wxWindow *parent, if (height > -1) XtVaSetValues((Widget) m_frameShell, XmNheight, height, NULL); - ChangeFont(FALSE); + ChangeFont(false); ChangeBackgroundColour(); @@ -193,15 +193,16 @@ bool wxFrame::Create(wxWindow *parent, GetEventHandler()->ProcessEvent(sizeEvent); - return TRUE; + return true; } -bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name ) +bool wxFrame::XmDoCreateTLW(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) { Widget frameShell; @@ -214,7 +215,7 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id, XmNallowShellResize, True, XmNdeleteResponse, XmDO_NOTHING, XmNmappedWhenManaged, False, - XmNiconic, (style & wxICONIZE) ? TRUE : FALSE, + XmNiconic, (style & wxICONIZE) ? True : False, NULL); m_frameShell = (WXWidget)frameShell; @@ -262,30 +263,25 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id, wxModelessWindows.Append( this ); - return TRUE; + return true; } wxFrame::~wxFrame() { - m_isBeingDeleted = TRUE; + m_isBeingDeleted = true; if (m_clientArea) { - XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE, + XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, False, wxUniversalRepaintProc, (XtPointer) this); } if (GetMainWidget()) - Show(FALSE); + Show(false); if (m_frameMenuBar) { m_frameMenuBar->DestroyMenuBar(); - - // Hack to stop core dump on Ultrix, OSF, for some strange reason. -#if MOTIF_MENUBAR_DELETE_FIX - GetMenuBar()->SetMainWidget((WXWidget) NULL); -#endif delete m_frameMenuBar; m_frameMenuBar = NULL; } @@ -297,11 +293,7 @@ wxFrame::~wxFrame() } PreDestroy(); - DoDestroy(); -} -void wxFrame::DoDestroy() -{ Widget frameShell = (Widget)GetShellWidget(); if( frameShell ) @@ -358,13 +350,13 @@ void wxFrame::DoGetClientSize(int *x, int *y) const //CE found a call here with NULL y pointer if (x) - *x = xx; + *x = xx; if (y) *y = yy; } // Set the client size (i.e. leave the calculation of borders etc. -// to wxWindows) +// to wxWidgets) void wxFrame::DoSetClientSize(int width, int height) { // Calculate how large the new main window should be @@ -430,8 +422,8 @@ void wxFrame::DoSetSize(int x, int y, int width, int height, int WXUNUSED(sizeFl bool wxFrame::Show( bool show ) { - if( !wxTopLevelWindowMotif::Show( show ) ) - return FALSE; + if( !wxWindowBase::Show( show ) ) + return false; m_isShown = show; @@ -442,15 +434,14 @@ bool wxFrame::Show( bool show ) SetVisibleStatus(show); if (show) { - XtMapWidget (shell); - XRaiseWindow (XtDisplay(shell), XtWindow(shell)); + XtPopup(shell, XtGrabNone); } else { - XtUnmapWidget(shell); + XtPopdown(shell); } - return TRUE; + return true; } void wxFrame::SetTitle(const wxString& title) @@ -646,7 +637,7 @@ bool wxFrame::PreResize() PositionStatusBar(); #endif // wxUSE_STATUSBAR - return TRUE; + return true; } WXWidget wxFrame::GetClientWidget() const