mac toplevel window added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
93b4dc4b14
commit
fe08e59704
@ -66,10 +66,6 @@ public:
|
||||
|
||||
virtual bool Destroy();
|
||||
bool Show(bool show);
|
||||
void Iconize(bool iconize);
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual bool IsTopLevel() const { return TRUE; }
|
||||
|
||||
void SetModal(bool flag);
|
||||
virtual bool IsModal() const;
|
||||
|
@ -58,14 +58,6 @@ public:
|
||||
|
||||
virtual ~wxFrameMac();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void Restore();
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
@ -120,7 +112,6 @@ protected:
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
protected:
|
||||
bool m_iconized;
|
||||
#if wxUSE_STATUSBAR
|
||||
static bool m_useNativeStatusBar;
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
82
include/wx/mac/toplevel.h
Normal file
82
include/wx/mac/toplevel.h
Normal file
@ -0,0 +1,82 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mac/toplevel.h
|
||||
// Purpose: wxTopLevelWindowMac is the MSW implementation of wxTLW
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 20.09.01
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_TOPLEVEL_H_
|
||||
#define _WX_MSW_TOPLEVEL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "toplevel.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMac
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxTopLevelWindowMac : public wxTopLevelWindowBase
|
||||
{
|
||||
public:
|
||||
// constructors and such
|
||||
wxTopLevelWindowMac() { Init(); }
|
||||
|
||||
wxTopLevelWindowMac(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();
|
||||
|
||||
(void)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);
|
||||
|
||||
virtual ~wxTopLevelWindowMac();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = TRUE);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) { return FALSE; }
|
||||
virtual bool IsFullScreen() const { return FALSE; }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_iconized;
|
||||
|
||||
// should the frame be maximized when it will be shown? set by Maximize()
|
||||
// when it is called while the frame is hidden
|
||||
bool m_maximizeOnShow;
|
||||
};
|
||||
|
||||
// list of all frames and modeless dialogs
|
||||
extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
|
||||
|
||||
#endif // _WX_MSW_TOPLEVEL_H_
|
||||
|
@ -24,7 +24,7 @@
|
||||
// Lists to keep track of windows, so we can disable/enable them
|
||||
// for modal dialogs
|
||||
wxList wxModalDialogs;
|
||||
wxList wxModelessWindows; // Frames and modeless dialogs
|
||||
//wxList wxModelessWindows; // Frames and modeless dialogs
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
@ -129,16 +129,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxDialog::Iconize(bool WXUNUSED(iconize))
|
||||
{
|
||||
// mac dialogs cannot be iconized
|
||||
}
|
||||
|
||||
bool wxDialog::IsIconized() const
|
||||
{
|
||||
// mac dialogs cannot be iconized
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxDialog::DoSetClientSize(int width, int height)
|
||||
{
|
||||
|
@ -560,7 +560,11 @@ pascal Boolean CrossPlatformFilterCallback (
|
||||
if (theItem->descriptorType == typeFSS && !theInfo->isFolder)
|
||||
{
|
||||
FSSpec spec;
|
||||
memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
|
||||
#if TARGET_CARBON
|
||||
::AEGetDescData(theItem, &spec, sizeof(FSSpec) ) ;
|
||||
#else
|
||||
memcpy( &spec , (*theItem->dataHandle) , sizeof(FSSpec) ) ;
|
||||
#endif
|
||||
display = CheckFile( spec.name , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <wx/mac/uma.h>
|
||||
|
||||
extern wxList wxModelessWindows;
|
||||
extern wxWindowList wxModelessWindows;
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
@ -164,39 +164,6 @@ bool wxFrameMac::Enable(bool enable)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// Equivalent to maximize/restore in Windows
|
||||
void wxFrameMac::Maximize(bool maximize)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
bool wxFrameMac::IsIconized() const
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxFrameMac::Iconize(bool iconize)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// Is the frame maximized?
|
||||
bool wxFrameMac::IsMaximized(void) const
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxFrameMac::Restore()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxFrameMac::SetIcon(const wxIcon& icon)
|
||||
{
|
||||
wxFrameBase::SetIcon(icon);
|
||||
}
|
||||
|
||||
wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name)
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "wx/menu.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
extern wxList wxModelessWindows;
|
||||
extern wxWindowList wxModelessWindows;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
|
||||
|
@ -24,7 +24,7 @@
|
||||
// Lists to keep track of windows, so we can disable/enable them
|
||||
// for modal dialogs
|
||||
wxList wxModalDialogs;
|
||||
wxList wxModelessWindows; // Frames and modeless dialogs
|
||||
//wxList wxModelessWindows; // Frames and modeless dialogs
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
@ -129,16 +129,6 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxDialog::Iconize(bool WXUNUSED(iconize))
|
||||
{
|
||||
// mac dialogs cannot be iconized
|
||||
}
|
||||
|
||||
bool wxDialog::IsIconized() const
|
||||
{
|
||||
// mac dialogs cannot be iconized
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxDialog::DoSetClientSize(int width, int height)
|
||||
{
|
||||
|
@ -560,7 +560,11 @@ pascal Boolean CrossPlatformFilterCallback (
|
||||
if (theItem->descriptorType == typeFSS && !theInfo->isFolder)
|
||||
{
|
||||
FSSpec spec;
|
||||
memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
|
||||
#if TARGET_CARBON
|
||||
::AEGetDescData(theItem, &spec, sizeof(FSSpec) ) ;
|
||||
#else
|
||||
memcpy( &spec , (*theItem->dataHandle) , sizeof(FSSpec) ) ;
|
||||
#endif
|
||||
display = CheckFile( spec.name , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <wx/mac/uma.h>
|
||||
|
||||
extern wxList wxModelessWindows;
|
||||
extern wxWindowList wxModelessWindows;
|
||||
extern wxList wxPendingDelete;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
@ -164,39 +164,6 @@ bool wxFrameMac::Enable(bool enable)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// Equivalent to maximize/restore in Windows
|
||||
void wxFrameMac::Maximize(bool maximize)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
bool wxFrameMac::IsIconized() const
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxFrameMac::Iconize(bool iconize)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// Is the frame maximized?
|
||||
bool wxFrameMac::IsMaximized(void) const
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void wxFrameMac::Restore()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void wxFrameMac::SetIcon(const wxIcon& icon)
|
||||
{
|
||||
wxFrameBase::SetIcon(icon);
|
||||
}
|
||||
|
||||
wxStatusBar *wxFrameMac::OnCreateStatusBar(int number, long style, wxWindowID id,
|
||||
const wxString& name)
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "wx/menu.h"
|
||||
#include "wx/settings.h"
|
||||
|
||||
extern wxList wxModelessWindows;
|
||||
extern wxWindowList wxModelessWindows;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
|
||||
|
BIN
src/makemac7.mcp
Normal file
BIN
src/makemac7.mcp
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user