removed unneeded junk copied from MSW port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
771be77f9a
commit
9b5d7dfcaf
@ -64,26 +64,6 @@ public:
|
|||||||
virtual void PositionToolBar();
|
virtual void PositionToolBar();
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
// Status bar
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
|
|
||||||
long style = wxST_SIZEGRIP,
|
|
||||||
wxWindowID id = 0,
|
|
||||||
const wxString& name = wxStatusLineNameStr);
|
|
||||||
|
|
||||||
virtual void PositionStatusBar();
|
|
||||||
|
|
||||||
// Hint to tell framework which status bar to use: the default is to use
|
|
||||||
// native one for the platforms which support it (Win32), the generic one
|
|
||||||
// otherwise
|
|
||||||
|
|
||||||
// TODO: should this go into a wxFrameworkSettings class perhaps?
|
|
||||||
static void UseNativeStatusBar(bool useNative)
|
|
||||||
{ m_useNativeStatusBar = useNative; };
|
|
||||||
static bool UsesNativeStatusBar()
|
|
||||||
{ return m_useNativeStatusBar; };
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
WXHMENU GetWinMenu() const { return m_hMenu; }
|
WXHMENU GetWinMenu() const { return m_hMenu; }
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
@ -143,11 +123,6 @@ protected:
|
|||||||
// get default (wxWidgets) icon for the frame
|
// get default (wxWidgets) icon for the frame
|
||||||
virtual WXHICON GetDefaultIcon() const;
|
virtual WXHICON GetDefaultIcon() const;
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
static bool m_useNativeStatusBar;
|
|
||||||
wxStatusBar *StatusBar;
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
// Data to save/restore when calling ShowFullScreen
|
// Data to save/restore when calling ShowFullScreen
|
||||||
int m_fsStatusBarFields; // 0 for no status bar
|
int m_fsStatusBarFields; // 0 for no status bar
|
||||||
int m_fsStatusBarHeight;
|
int m_fsStatusBarHeight;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Author: William Osborne
|
// Author: William Osborne
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 10/13/04
|
// Created: 10/13/04
|
||||||
// RCS-ID: $Id:
|
// RCS-ID: $Id:
|
||||||
// Copyright: (c) William Osborne
|
// Copyright: (c) William Osborne
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
|
||||||
EVT_PAINT(wxFrame::OnPaint)
|
EVT_PAINT(wxFrame::OnPaint)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
@ -86,7 +86,7 @@ wxBEGIN_FLAGS( wxFrameStyle )
|
|||||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||||
|
|
||||||
// old style border flags
|
// old style border flags
|
||||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||||
@ -136,7 +136,7 @@ wxEND_PROPERTIES_TABLE()
|
|||||||
wxBEGIN_HANDLERS_TABLE(wxFrame)
|
wxBEGIN_HANDLERS_TABLE(wxFrame)
|
||||||
wxEND_HANDLERS_TABLE()
|
wxEND_HANDLERS_TABLE()
|
||||||
|
|
||||||
wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle)
|
wxCONSTRUCTOR_6( wxFrame , wxWindow* , Parent , wxWindowID , Id , wxString , Title , wxPoint , Position , wxSize , Size , long , WindowStyle)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
||||||
@ -146,25 +146,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// static class members
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
#if wxUSE_NATIVE_STATUSBAR
|
|
||||||
bool wxFrame::m_useNativeStatusBar = TRUE;
|
|
||||||
#else
|
|
||||||
bool wxFrame::m_useNativeStatusBar = FALSE;
|
|
||||||
#endif
|
|
||||||
#endif // wxUSE_NATIVE_STATUSBAR
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// creation/destruction
|
// creation/destruction
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxFrame::Init()
|
void wxFrame::Init()
|
||||||
{
|
{
|
||||||
StatusBar=NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::Create(wxWindow *parent,
|
bool wxFrame::Create(wxWindow *parent,
|
||||||
@ -177,7 +164,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name, this) )
|
if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name, this) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,38 +198,6 @@ void wxFrame::SendSizeEvent()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
|
||||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number,
|
|
||||||
long style,
|
|
||||||
wxWindowID id,
|
|
||||||
const wxString& name)
|
|
||||||
{
|
|
||||||
wxStatusBar *statusBar = NULL;
|
|
||||||
|
|
||||||
#if wxUSE_NATIVE_STATUSBAR
|
|
||||||
if ( !UsesNativeStatusBar() )
|
|
||||||
{
|
|
||||||
statusBar = (wxStatusBar *)new wxStatusBarGeneric(this, id, style);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
statusBar = new wxStatusBar(this, id, style, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
statusBar->SetFieldsCount(number);
|
|
||||||
|
|
||||||
StatusBar=statusBar;
|
|
||||||
return statusBar;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxFrame::PositionStatusBar()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif // wxUSE_STATUSBAR
|
|
||||||
|
|
||||||
#if wxUSE_MENUS_NATIVE
|
#if wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
void wxFrame::AttachMenuBar(wxMenuBar *menubar)
|
||||||
@ -264,7 +219,7 @@ bool wxFrame::HandleMenuOpen()
|
|||||||
{
|
{
|
||||||
if(!m_frameMenuBar)
|
if(!m_frameMenuBar)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_frameMenuBar->LoadMenu();
|
m_frameMenuBar->LoadMenu();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -280,9 +235,9 @@ bool wxFrame::HandleMenuSelect(int ItemID)
|
|||||||
|
|
||||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, item);
|
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, item);
|
||||||
commandEvent.SetEventObject(this);
|
commandEvent.SetEventObject(this);
|
||||||
|
|
||||||
GetEventHandler()->ProcessEvent(commandEvent);
|
GetEventHandler()->ProcessEvent(commandEvent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
@ -294,12 +249,12 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
|
|
||||||
void wxFrame::OnPaint(wxPaintEvent& event)
|
void wxFrame::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
if(StatusBar!=NULL)
|
if( m_frameStatusBar )
|
||||||
StatusBar->DrawStatusBar();
|
m_frameStatusBar->DrawStatusBar();
|
||||||
#endif
|
#endif // wxUSE_STATUSBAR
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass TRUE to show full screen, FALSE to restore.
|
// Pass TRUE to show full screen, FALSE to restore.
|
||||||
bool wxFrame::ShowFullScreen(bool show, long style)
|
bool wxFrame::ShowFullScreen(bool show, long style)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user