Renames to avoid object files with duplicate filenames. (Should we just make everything in this dir _osx for consistency?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
158
src/osx/toplevel_osx.cpp
Normal file
158
src/osx/toplevel_osx.cpp
Normal file
@@ -0,0 +1,158 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/osx/toplevel.cpp
|
||||
// Purpose: implements wxTopLevelWindow for Mac
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 24.09.01
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2001-2004 Stefan Csomor
|
||||
// License: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/toplevel.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/settings.h"
|
||||
#include "wx/strconv.h"
|
||||
#include "wx/control.h"
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
#include "wx/tooltip.h"
|
||||
#include "wx/dnd.h"
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
#include "wx/sysopt.h"
|
||||
#endif
|
||||
|
||||
// for targeting OSX
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// ============================================================================
|
||||
// wxTopLevelWindowMac implementation
|
||||
// ============================================================================
|
||||
|
||||
BEGIN_EVENT_TABLE(wxTopLevelWindowMac, wxTopLevelWindowBase)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMac creation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
void wxTopLevelWindowMac::Init()
|
||||
{
|
||||
m_iconized =
|
||||
m_maximizeOnShow = false;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name)
|
||||
{
|
||||
if ( !wxNonOwnedWindow::Create(parent, id, pos, size, style, name) )
|
||||
return false;
|
||||
|
||||
wxWindow::SetLabel( title ) ;
|
||||
m_nowpeer->SetTitle(title, GetFont().GetEncoding() );
|
||||
wxTopLevelWindows.Append(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxTopLevelWindowMac::~wxTopLevelWindowMac()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMac maximize/minimize
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxTopLevelWindowMac::Maximize(bool maximize)
|
||||
{
|
||||
if ( IsMaximized() != maximize )
|
||||
m_nowpeer->Maximize(maximize);
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::IsMaximized() const
|
||||
{
|
||||
return m_nowpeer->IsMaximized();
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::Iconize(bool iconize)
|
||||
{
|
||||
if ( IsIconized() != iconize )
|
||||
m_nowpeer->Iconize(iconize);
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::IsIconized() const
|
||||
{
|
||||
return m_nowpeer->IsIconized();
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::Restore()
|
||||
{
|
||||
if ( IsMaximized() )
|
||||
Maximize(false);
|
||||
else if ( IsIconized() )
|
||||
Iconize(false);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMac misc
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxPoint wxTopLevelWindowMac::GetClientAreaOrigin() const
|
||||
{
|
||||
return wxPoint(0, 0) ;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
||||
{
|
||||
wxWindow::SetLabel( title ) ;
|
||||
m_nowpeer->SetTitle(title, GetFont().GetEncoding() );
|
||||
}
|
||||
|
||||
wxString wxTopLevelWindowMac::GetTitle() const
|
||||
{
|
||||
return wxWindow::GetLabel();
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::ShowFullScreen(bool show, long style)
|
||||
{
|
||||
return m_nowpeer->ShowFullScreen(show, style);
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMac::IsFullScreen() const
|
||||
{
|
||||
return m_nowpeer->IsFullScreen();
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::RequestUserAttention(int flags)
|
||||
{
|
||||
return m_nowpeer->RequestUserAttention(flags);
|
||||
}
|
||||
Reference in New Issue
Block a user