1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-16 21:31:40 +00:00
|
|
|
// Name: wx/gtk/frame.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
1998-07-23 16:06:23 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKFRAMEH__
|
|
|
|
#define __GTKFRAMEH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-11-16 21:31:40 +00:00
|
|
|
#pragma interface "frame.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1998-07-22 22:13:31 +00:00
|
|
|
class wxMDIChildFrame;
|
1998-07-29 13:21:22 +00:00
|
|
|
class wxMDIClientWindow;
|
|
|
|
class wxMenu;
|
|
|
|
class wxMenuBar;
|
|
|
|
class wxToolBar;
|
|
|
|
class wxStatusBar;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
class wxFrame;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxFrame
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-11-16 21:31:40 +00:00
|
|
|
class wxFrame : public wxFrameBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
1999-11-16 21:31:40 +00:00
|
|
|
// construction
|
1999-05-30 16:20:42 +00:00
|
|
|
wxFrame() { Init(); }
|
1999-11-16 21:31:40 +00:00
|
|
|
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 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 MakeModal(bool modal = TRUE);
|
|
|
|
virtual void Restore();
|
|
|
|
|
2000-09-05 10:51:30 +00:00
|
|
|
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
|
|
|
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
|
|
|
|
1999-11-16 21:31:40 +00:00
|
|
|
virtual void SetMenuBar( wxMenuBar *menuBar );
|
1999-02-22 11:01:13 +00:00
|
|
|
|
1999-06-01 15:32:12 +00:00
|
|
|
#if wxUSE_STATUSBAR
|
2000-02-05 17:56:26 +00:00
|
|
|
virtual void PositionStatusBar();
|
|
|
|
|
1999-11-16 21:31:40 +00:00
|
|
|
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
|
|
|
long style = wxST_SIZEGRIP,
|
|
|
|
wxWindowID id = 0,
|
|
|
|
const wxString& name = wxStatusLineNameStr);
|
1999-06-01 15:32:12 +00:00
|
|
|
#endif // wxUSE_STATUSBAR
|
1999-02-22 11:01:13 +00:00
|
|
|
|
1999-06-01 15:32:12 +00:00
|
|
|
#if wxUSE_TOOLBAR
|
1999-11-16 21:31:40 +00:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxString& name = wxToolBarNameStr);
|
1999-10-09 09:06:35 +00:00
|
|
|
void SetToolBar(wxToolBar *toolbar);
|
1999-06-01 15:32:12 +00:00
|
|
|
#endif // wxUSE_TOOLBAR
|
1999-02-22 11:01:13 +00:00
|
|
|
|
2000-03-06 17:16:12 +00:00
|
|
|
virtual bool Show(bool show = TRUE);
|
1999-02-22 11:01:13 +00:00
|
|
|
|
|
|
|
virtual void SetTitle( const wxString &title );
|
|
|
|
virtual wxString GetTitle() const { return m_title; }
|
|
|
|
|
1999-11-16 21:31:40 +00:00
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
1999-02-22 11:01:13 +00:00
|
|
|
|
1999-12-29 11:52:51 +00:00
|
|
|
// move the window to the specified location and resize it: this is called
|
|
|
|
// from both DoSetSize() and DoSetClientSize()
|
|
|
|
virtual void DoMoveWindow(int x, int y, int width, int height);
|
|
|
|
|
1999-11-16 21:31:40 +00:00
|
|
|
// GTK callbacks
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
|
|
|
wxString m_title;
|
1999-11-16 21:31:40 +00:00
|
|
|
int m_miniEdge,
|
|
|
|
m_miniTitle;
|
1999-04-09 20:26:29 +00:00
|
|
|
GtkWidget *m_mainWidget;
|
1999-04-14 16:56:36 +00:00
|
|
|
bool m_menuBarDetached;
|
|
|
|
bool m_toolBarDetached;
|
1999-05-22 15:13:18 +00:00
|
|
|
bool m_insertInClientArea; /* not from within OnCreateXXX */
|
1999-02-22 11:01:13 +00:00
|
|
|
|
2000-09-13 12:25:42 +00:00
|
|
|
bool m_isIconized;
|
|
|
|
|
2000-09-05 10:51:30 +00:00
|
|
|
bool m_fsIsShowing; /* full screen */
|
|
|
|
long m_fsSaveStyle;
|
|
|
|
long m_fsSaveFlag;
|
|
|
|
wxRect m_fsSaveFrame;
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
1999-05-30 16:20:42 +00:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
1999-11-16 21:31:40 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
// override wxWindow methods to take into account tool/menu/statusbars
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
|
|
|
|
virtual void DoSetClientSize(int width, int height);
|
1999-05-11 20:41:00 +00:00
|
|
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
1999-02-22 11:01:13 +00:00
|
|
|
|
|
|
|
private:
|
1999-11-16 21:31:40 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKFRAMEH__
|