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
This commit is contained in:
David Webster
2000-02-16 21:51:22 +00:00
parent d0b223a148
commit ea51d98d65
2 changed files with 112 additions and 63 deletions

View File

@@ -27,6 +27,7 @@
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
#include "wx/statusbr.h" #include "wx/statusbr.h"
#include "wx/generic/statusbr.h"
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
@@ -81,62 +82,83 @@ void wxFrame::Init()
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
m_hwndToolTip = 0; m_hwndToolTip = 0;
#endif #endif
} // 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 *parent, bool wxFrame::Create(
wxWindowID id, wxWindow* pParent
const wxString& title, , wxWindowID vId
const wxPoint& pos, , const wxString& rsTitle
const wxSize& size, , const wxPoint& rPos
long style, , const wxSize& rSize
const wxString& name) , long lStyle
, const wxString& rsName
)
{ {
SetName(name); int nX = rPos.x;
m_windowStyle = style; int nY = rPos.y;
int nWidth = rSize.x;
int nHeight = rSize.y;
SWP vSwp;
SetName(rsName);
m_windowStyle = lStyle;
m_frameMenuBar = NULL; m_frameMenuBar = NULL;
m_frameToolBar = NULL; m_frameToolBar = NULL;
m_frameStatusBar = NULL; m_frameStatusBar = NULL;
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
if ( id > -1 ) if (vId > -1 )
m_windowId = id; m_windowId = vId;
else else
m_windowId = (int)NewControlId(); m_windowId = (int)NewControlId();
if (parent) parent->AddChild(this); if (pParent)
pParent->AddChild(this);
int x = pos.x; m_bIconized = FALSE;
int y = pos.y;
int width = size.x;
int height = size.y;
m_iconized = FALSE; //
// We pass NULL as parent to MSWCreate because frames with parents behave
// we pass NULL as parent to MSWCreate because frames with parents behave // very strangely under Win95 shell.
// very strangely under Win95 shell
// Alteration by JACS: keep normal Windows behaviour (float on top of parent) // Alteration by JACS: keep normal Windows behaviour (float on top of parent)
// with this style. // with this style.
//
if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0) if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0)
parent = NULL; pParent = NULL;
if (!parent) if (!pParent)
wxTopLevelWindows.Append(this); wxTopLevelWindows.Append(this);
OS2Create(m_windowId, parent, wxFrameClassName, this, title, OS2Create( m_windowId
x, y, width, height, style); ,pParent
,wxFrameClassName
,this
,rsTitle
,nX
,nY
,nWidth
,nHeight
,lStyle
);
wxModelessWindows.Append(this); wxModelessWindows.Append(this);
return TRUE; return TRUE;
} } // end of wxFrame::Create
wxFrame::~wxFrame() wxFrame::~wxFrame()
{ {
m_isBeingDeleted = TRUE; m_isBeingDeleted = TRUE;
wxTopLevelWindows.DeleteObject(this); wxTopLevelWindows.DeleteObject(this);
// TODO:
/*
DeleteAllBars(); DeleteAllBars();
if (wxTheApp && (wxTopLevelWindows.Number() == 0)) if (wxTheApp && (wxTopLevelWindows.Number() == 0))
@@ -145,24 +167,41 @@ wxFrame::~wxFrame()
if (wxTheApp->GetExitOnFrameDelete()) if (wxTheApp->GetExitOnFrameDelete())
{ {
PostQuitMessage(0); ::WinPostMsg(m_hwnd, WM_QUIT, 0, 0);
} }
} }
wxModelessWindows.DeleteObject(this); wxModelessWindows.DeleteObject(this);
//
// For some reason, wxWindows can activate another task altogether // For some reason, wxWindows can activate another task altogether
// when a frame is destroyed after a modal dialog has been invoked. // when a frame is destroyed after a modal dialog has been invoked.
// Try to bring the parent to the top. // Try to bring the parent to the top.
//
// MT:Only do this if this frame is currently the active window, else weird // MT:Only do this if this frame is currently the active window, else weird
// things start to happen // things start to happen.
//
if (wxGetActiveWindow() == this) if (wxGetActiveWindow() == this)
{
if (GetParent() && GetParent()->GetHWND()) if (GetParent() && GetParent()->GetHWND())
::BringWindowToTop((HWND) 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
);
} }
}
} // end of wxFrame::~wxFrame
//
// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc. // Get size *available for subwindows* i.e. excluding menu bar, toolbar etc.
//
void wxFrame::DoGetClientSize(int *x, int *y) const void wxFrame::DoGetClientSize(int *x, int *y) const
{ {
// TODO: // TODO:

View File

@@ -573,7 +573,7 @@ HTMLLIBOBJS = \
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(NONESSENTIALOBJS) $(OS2OBJS) OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(NONESSENTIALOBJS) $(OS2OBJS)
# Normal, static library # 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 dirs: $(OS2DIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(HTMLDIR)\$D
@@ -1027,7 +1027,17 @@ clean_xpm:
nmake -f makefile.va clean nmake -f makefile.va clean
cd $(WXDIR)\src\os2 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) del $(LIBTARGET)
!if "$(WXMAKINGDLL)" == "1" !if "$(WXMAKINGDLL)" == "1"
erase /N ..\..\lib\wx200.lib erase /N ..\..\lib\wx200.lib