1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-16 16:31:40 -05:00
|
|
|
// Name: wx/gtk/frame.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKFRAMEH__
|
|
|
|
#define __GTKFRAMEH__
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMDIChildFrame;
|
|
|
|
class WXDLLIMPEXP_CORE wxMDIClientWindow;
|
|
|
|
class WXDLLIMPEXP_CORE wxMenu;
|
|
|
|
class WXDLLIMPEXP_CORE wxMenuBar;
|
|
|
|
class WXDLLIMPEXP_CORE wxToolBar;
|
|
|
|
class WXDLLIMPEXP_CORE wxStatusBar;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2001-10-19 16:35:05 -04:00
|
|
|
// wxFrame
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-02-22 06:01:13 -05:00
|
|
|
public:
|
1999-11-16 16:31:40 -05:00
|
|
|
// construction
|
2001-10-19 16:35:05 -04:00
|
|
|
wxFrame() { Init(); }
|
|
|
|
wxFrame(wxWindow *parent,
|
2001-06-26 16:59:19 -04:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr)
|
1999-11-16 16:31:40 -05:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
2001-10-19 16:35:05 -04:00
|
|
|
virtual ~wxFrame();
|
1999-11-16 16:31:40 -05:00
|
|
|
|
1999-06-01 11:32:12 -04:00
|
|
|
#if wxUSE_STATUSBAR
|
1999-11-16 16:31:40 -05:00
|
|
|
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
2004-03-07 12:28:36 -05:00
|
|
|
long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
|
1999-11-16 16:31:40 -05:00
|
|
|
wxWindowID id = 0,
|
|
|
|
const wxString& name = wxStatusLineNameStr);
|
2004-04-18 06:27:11 -04:00
|
|
|
|
|
|
|
void SetStatusBar(wxStatusBar *statbar);
|
1999-06-01 11:32:12 -04:00
|
|
|
#endif // wxUSE_STATUSBAR
|
1999-02-22 06:01:13 -05:00
|
|
|
|
1999-06-01 11:32:12 -04:00
|
|
|
#if wxUSE_TOOLBAR
|
2003-07-10 06:53:00 -04:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = -1,
|
1999-11-16 16:31:40 -05:00
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxString& name = wxToolBarNameStr);
|
1999-10-09 05:06:35 -04:00
|
|
|
void SetToolBar(wxToolBar *toolbar);
|
1999-06-01 11:32:12 -04:00
|
|
|
#endif // wxUSE_TOOLBAR
|
2001-09-19 18:45:14 -04:00
|
|
|
|
|
|
|
wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
|
1999-02-22 06:01:13 -05:00
|
|
|
|
1999-11-16 16:31:40 -05:00
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
1999-02-22 06:01:13 -05:00
|
|
|
|
1999-11-16 16:31:40 -05:00
|
|
|
// GTK callbacks
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void GtkOnSize( int x, int y, int width, int height );
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
1999-04-14 12:56:36 -04:00
|
|
|
bool m_menuBarDetached;
|
2002-12-04 09:11:26 -05:00
|
|
|
int m_menuBarHeight;
|
1999-04-14 12:56:36 -04:00
|
|
|
bool m_toolBarDetached;
|
2000-09-05 06:51:30 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
protected:
|
1999-05-30 12:20:42 -04:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
1999-11-16 16:31:40 -05:00
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
#if wxUSE_STATUSBAR
|
|
|
|
virtual void PositionStatusBar();
|
|
|
|
#endif // wxUSE_STATUSBAR
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
// override wxWindow methods to take into account tool/menu/statusbars
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void DoSetClientSize(int width, int height);
|
1999-05-11 16:41:00 -04:00
|
|
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
1999-02-22 06:01:13 -05:00
|
|
|
|
2001-07-10 08:25:46 -04:00
|
|
|
#if wxUSE_MENUS_NATIVE
|
2002-12-04 09:11:26 -05:00
|
|
|
|
2001-07-10 08:25:46 -04:00
|
|
|
virtual void DetachMenuBar();
|
|
|
|
virtual void AttachMenuBar(wxMenuBar *menubar);
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
// Menu size is dynamic now, call this whenever it might change.
|
|
|
|
void UpdateMenuBarSize();
|
|
|
|
|
2001-07-10 08:25:46 -04:00
|
|
|
#endif // wxUSE_MENUS_NATIVE
|
2001-10-19 16:35:05 -04:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKFRAMEH__
|