From: David Webster Date: Wed, 16 Feb 2000 21:51:22 +0000 (+0000) Subject: Start of actual filling in of wxFrame. Makefile now supports tiff X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ea51d98d659465219574b290015390b8783afe51?ds=sidebyside Start of actual filling in of wxFrame. Makefile now supports tiff git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 47bfc39c75..a6df32f406 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -27,6 +27,7 @@ #if wxUSE_STATUSBAR #include "wx/statusbr.h" + #include "wx/generic/statusbr.h" #endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR @@ -81,88 +82,126 @@ void wxFrame::Init() #if wxUSE_TOOLTIPS m_hwndToolTip = 0; #endif -} - -bool wxFrame::Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name) -{ - SetName(name); - m_windowStyle = style; - m_frameMenuBar = NULL; - m_frameToolBar = NULL; - m_frameStatusBar = NULL; - - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - - if ( id > -1 ) - m_windowId = id; - else - m_windowId = (int)NewControlId(); - - if (parent) parent->AddChild(this); - - int x = pos.x; - int y = pos.y; - int width = size.x; - int height = size.y; + // Data to save/restore when calling ShowFullScreen + m_lFsStyle = 0L; + m_lFsOldWindowStyle = 0L; + m_nFsStatusBarFields = 0; + m_nFsStatusBarHeight = 0; + m_nFsToolBarHeight = 0; + m_bFsIsMaximized = FALSE; + m_bFsIsShowing = FALSE; +} // end of wxFrame::Init + +bool wxFrame::Create( + wxWindow* pParent +, wxWindowID vId +, const wxString& rsTitle +, const wxPoint& rPos +, const wxSize& rSize +, long lStyle +, const wxString& rsName +) +{ + int nX = rPos.x; + int nY = rPos.y; + int nWidth = rSize.x; + int nHeight = rSize.y; + SWP vSwp; + + SetName(rsName); + m_windowStyle = lStyle; + m_frameMenuBar = NULL; + m_frameToolBar = NULL; + m_frameStatusBar = NULL; - m_iconized = FALSE; - - // we pass NULL as parent to MSWCreate because frames with parents behave - // very strangely under Win95 shell - // Alteration by JACS: keep normal Windows behaviour (float on top of parent) - // with this style. - if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0) - parent = NULL; - - if (!parent) - wxTopLevelWindows.Append(this); - - OS2Create(m_windowId, parent, wxFrameClassName, this, title, - x, y, width, height, style); + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); - wxModelessWindows.Append(this); - return TRUE; -} + if (vId > -1 ) + m_windowId = vId; + else + m_windowId = (int)NewControlId(); + + if (pParent) + pParent->AddChild(this); + + m_bIconized = FALSE; + + // + // We pass NULL as parent to MSWCreate because frames with parents behave + // very strangely under Win95 shell. + // Alteration by JACS: keep normal Windows behaviour (float on top of parent) + // with this style. + // + if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0) + pParent = NULL; + + if (!pParent) + wxTopLevelWindows.Append(this); + + OS2Create( m_windowId + ,pParent + ,wxFrameClassName + ,this + ,rsTitle + ,nX + ,nY + ,nWidth + ,nHeight + ,lStyle + ); + + wxModelessWindows.Append(this); + return TRUE; +} // end of wxFrame::Create wxFrame::~wxFrame() { - m_isBeingDeleted = TRUE; - wxTopLevelWindows.DeleteObject(this); + m_isBeingDeleted = TRUE; + wxTopLevelWindows.DeleteObject(this); -// TODO: -/* - DeleteAllBars(); + DeleteAllBars(); - if (wxTheApp && (wxTopLevelWindows.Number() == 0)) - { - wxTheApp->SetTopWindow(NULL); + if (wxTheApp && (wxTopLevelWindows.Number() == 0)) + { + wxTheApp->SetTopWindow(NULL); - if (wxTheApp->GetExitOnFrameDelete()) + if (wxTheApp->GetExitOnFrameDelete()) + { + ::WinPostMsg(m_hwnd, WM_QUIT, 0, 0); + } + } + wxModelessWindows.DeleteObject(this); + + // + // For some reason, wxWindows can activate another task altogether + // when a frame is destroyed after a modal dialog has been invoked. + // Try to bring the parent to the top. + // + // MT:Only do this if this frame is currently the active window, else weird + // things start to happen. + // + if (wxGetActiveWindow() == this) { - PostQuitMessage(0); + if (GetParent() && GetParent()->GetHWND()) + { + ::WinQueryWindowPos( (HWND) GetParent()->GetHWND() + ,&vSwp + ); + ::WinSetWindowPos( (HWND) GetParent()->GetHWND() + ,HWND_TOP + ,vSwp.x + ,vSwp.y + ,vSwp.cx + ,vSwp,cy + ,SWP_ACTIVATE | SWP_MOVE | SWP_SIZE | SWP_SHOW + ); + } } - } - - wxModelessWindows.DeleteObject(this); - - // For some reason, wxWindows can activate another task altogether - // when a frame is destroyed after a modal dialog has been invoked. - // Try to bring the parent to the top. - // MT:Only do this if this frame is currently the active window, else weird - // things start to happen - if ( wxGetActiveWindow() == this ) - if (GetParent() && GetParent()->GetHWND()) - ::BringWindowToTop((HWND) GetParent()->GetHWND()); -*/ -} +} // end of wxFrame::~wxFrame +// // Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. +// void wxFrame::DoGetClientSize(int *x, int *y) const { // TODO: diff --git a/src/os2/makefile.va b/src/os2/makefile.va index 1c79306dda..9f938f704c 100644 --- a/src/os2/makefile.va +++ b/src/os2/makefile.va @@ -573,7 +573,7 @@ HTMLLIBOBJS = \ OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(NONESSENTIALOBJS) $(OS2OBJS) # Normal, static library -all: $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib jpeg xpm $(LIBTARGET) +all: $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib jpeg xpm tiff $(LIBTARGET) dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D @@ -1027,7 +1027,17 @@ clean_xpm: nmake -f makefile.va clean cd $(WXDIR)\src\os2 -clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm +tiff: + cd $(WXDIR)\src\tiff + nmake -f makefile.va FINAL=$(FINAL) DLL=$(DLL) WXMAKINGDLL=$(WXMAKINGDLL) + cd $(WXDIR)\src\os2 + +clean_tiff: + cd $(WXDIR)\src\tiff + nmake -f makefile.va clean + cd $(WXDIR)\src\os2 + +clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm clean_tiff del $(LIBTARGET) !if "$(WXMAKINGDLL)" == "1" erase /N ..\..\lib\wx200.lib