2004-10-19 09:40:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/palmos/frame.h
|
|
|
|
// Purpose: wxFrame class
|
2005-01-18 16:14:27 -05:00
|
|
|
// Author: William Osborne - minimal working wxPalmOS port
|
2004-10-19 09:40:30 -04:00
|
|
|
// Modified by:
|
|
|
|
// Created: 10/13/04
|
2005-01-18 16:14:27 -05:00
|
|
|
// RCS-ID: $Id$
|
2004-10-19 09:40:30 -04:00
|
|
|
// Copyright: (c) William Osborne
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_FRAME_H_
|
|
|
|
#define _WX_FRAME_H_
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
2004-10-19 09:40:30 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// construction
|
|
|
|
wxFrame() { Init(); }
|
|
|
|
wxFrame(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);
|
|
|
|
|
|
|
|
virtual ~wxFrame();
|
|
|
|
|
|
|
|
// implement base class pure virtuals
|
|
|
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
|
|
|
virtual void Raise();
|
|
|
|
|
|
|
|
// implementation only from now on
|
|
|
|
// -------------------------------
|
|
|
|
|
|
|
|
// event handlers
|
2005-01-18 16:14:27 -05:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// Toolbar
|
|
|
|
#if wxUSE_TOOLBAR
|
|
|
|
virtual wxToolBar* CreateToolBar(long style = -1,
|
2005-02-09 02:07:46 -05:00
|
|
|
wxWindowID id = wxID_ANY,
|
2004-10-19 09:40:30 -04:00
|
|
|
const wxString& name = wxToolBarNameStr);
|
|
|
|
|
|
|
|
virtual void PositionToolBar();
|
|
|
|
#endif // wxUSE_TOOLBAR
|
|
|
|
|
|
|
|
// event handlers
|
|
|
|
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
|
|
|
|
|
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
|
|
|
|
|
|
|
#if wxUSE_MENUS_NATIVE
|
|
|
|
bool HandleMenuOpen();
|
2005-07-01 15:36:58 -04:00
|
|
|
bool HandleMenuSelect(WXEVENTPTR event);
|
2004-10-19 09:40:30 -04:00
|
|
|
#endif // wxUSE_MENUS_NATIVE
|
2005-01-18 16:14:27 -05:00
|
|
|
|
2004-10-19 09:40:30 -04:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
|
|
|
|
|
|
|
// override base class virtuals
|
|
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
|
|
|
virtual void DoSetClientSize(int width, int height);
|
|
|
|
|
|
|
|
#if wxUSE_MENUS_NATIVE
|
|
|
|
// a plug in for MDI frame classes which need to do something special when
|
|
|
|
// the menubar is set
|
|
|
|
virtual void InternalSetMenuBar();
|
|
|
|
#endif // wxUSE_MENUS_NATIVE
|
|
|
|
|
|
|
|
// propagate our state change to all child frames
|
|
|
|
void IconizeChildFrames(bool bIconize);
|
|
|
|
|
2005-01-31 03:04:44 -05:00
|
|
|
virtual bool IsMDIChild() const { return false; }
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// Data to save/restore when calling ShowFullScreen
|
|
|
|
int m_fsStatusBarFields; // 0 for no status bar
|
|
|
|
int m_fsStatusBarHeight;
|
|
|
|
int m_fsToolBarHeight;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// used by IconizeChildFrames(), see comments there
|
|
|
|
bool m_wasMinimized;
|
2005-01-18 16:14:27 -05:00
|
|
|
|
2004-10-19 09:40:30 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_FRAME_H_
|