first pass of wxUniv merge - nothing works, most parts don't even compile

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-06-26 20:59:19 +00:00
parent aeb313f31c
commit 1e6feb95a7
409 changed files with 42065 additions and 6675 deletions

107
src/univ/framuniv.cpp Normal file
View File

@@ -0,0 +1,107 @@
///////////////////////////////////////////////////////////////////////////////
// Name: univ/frame.cpp
// Purpose: wxFrame class for wxUniversal
// Author: Vadim Zeitlin
// Modified by:
// Created: 19.05.01
// RCS-ID: $Id$
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ===========================================================================
// declarations
// ===========================================================================
// ---------------------------------------------------------------------------
// headers
// ---------------------------------------------------------------------------
#ifdef __GNUG__
#pragma implementation "univframe.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#endif // WX_PRECOMP
// ============================================================================
// implementation
// ============================================================================
BEGIN_EVENT_TABLE(wxFrame, wxFrameNative)
EVT_SIZE(wxFrame::OnSize)
END_EVENT_TABLE()
#if defined(__WXMSW__)
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMSW)
#elif defined(__WXGTK__)
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameGTK)
#endif
// ----------------------------------------------------------------------------
// ctors
// ----------------------------------------------------------------------------
wxFrame::wxFrame()
{
}
wxFrame::wxFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
: wxFrameNative(parent, id, title, pos, size, style, name)
{
m_renderer = NULL;
}
// ----------------------------------------------------------------------------
// geometry
// ----------------------------------------------------------------------------
void wxFrame::OnSize(wxSizeEvent& event)
{
PositionMenuBar();
event.Skip();
}
void wxFrame::PositionMenuBar()
{
#if wxUSE_MENUS
if ( m_frameMenuBar )
{
// the menubar is positioned above the client size, hence the negative
// y coord
m_frameMenuBar->SetSize(0, -m_frameMenuBar->GetSize().y,
GetClientSize().x, -1);
}
#endif // wxUSE_MENUS
}
wxPoint wxFrame::GetClientAreaOrigin() const
{
wxPoint pt = wxFrameNative::GetClientAreaOrigin();
#if wxUSE_MENUS
if ( m_frameMenuBar )
{
pt.y += m_frameMenuBar->GetSize().y;
}
#endif // wxUSE_MENUS
return pt;
}