partial implementation of wxTopLevelWindow for wXUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -0,0 +1,62 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/toplevel.h
|
||||||
|
// Purpose: Top level window, abstraction of wxFrame and wxDialog
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// Id: $Id$
|
||||||
|
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __WX_UNIV_TOPLEVEL_H__
|
||||||
|
#define __WX_UNIV_TOPLEVEL_H__
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "univtoplevel.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// wxTopLevelWindow
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxTopLevelWindow : public wxTopLevelWindowNative
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction
|
||||||
|
wxTopLevelWindow() { Init(); }
|
||||||
|
wxTopLevelWindow(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr)
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
|
||||||
|
Create(parent, id, title, pos, size, style, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
|
// implement base class pure virtuals
|
||||||
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||||
|
|
||||||
|
// implementation from now on
|
||||||
|
// --------------------------
|
||||||
|
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxTopLevelWindow)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// common part of all ctors
|
||||||
|
void Init();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __WX_UNIV_TOPLEVEL_H__
|
||||||
|
74
src/univ/topluniv.cpp
Normal file
74
src/univ/topluniv.cpp
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: topluniv.cpp
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// Id: $Id$
|
||||||
|
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "univtoplevel.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
#include "wx/toplevel.h"
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// event tables
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(wxTopLevelWindow, wxWindow)
|
||||||
|
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// implementation
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
void wxTopLevelWindow::Init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wxTopLevelWindow::Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& sizeOrig,
|
||||||
|
long style,
|
||||||
|
const wxString &name)
|
||||||
|
{
|
||||||
|
if ( !wxTopLevelWindowNative::Create(parent, id, title, pos,
|
||||||
|
sizeOrig, style, name) )
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
// FIXME_MGL -- this is temporary; we assume for now that native TLW
|
||||||
|
// can do decorations, which is not true for MGL
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wxTopLevelWindow::ShowFullScreen(bool show, long style)
|
||||||
|
{
|
||||||
|
if ( show == IsFullScreen() ) return FALSE;
|
||||||
|
|
||||||
|
return wxTopLevelWindowNative::ShowFullScreen(show, style);
|
||||||
|
|
||||||
|
// FIXME_MGL -- must handle caption hiding here if not in
|
||||||
|
// native decorations mode
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user