1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-12-01 10:23:56 -05:00
|
|
|
// Name: wx/motif/frame.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxFrame class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
#ifndef _WX_MOTIF_FRAME_H_
|
|
|
|
#define _WX_MOTIF_FRAME_H_
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
1999-02-22 06:01:13 -05:00
|
|
|
{
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
1999-12-01 10:23:56 -05:00
|
|
|
wxFrame() { Init(); }
|
1999-02-22 06:01:13 -05:00
|
|
|
wxFrame(wxWindow *parent,
|
2002-02-05 11:34:33 -05:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr)
|
1999-02-22 06:01:13 -05:00
|
|
|
{
|
1999-12-01 10:23:56 -05:00
|
|
|
Init();
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
Create(parent, id, title, pos, size, style, name);
|
|
|
|
}
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
bool Create(wxWindow *parent,
|
2002-02-05 11:34:33 -05:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
virtual ~wxFrame();
|
2003-01-06 11:36:23 -05:00
|
|
|
|
2004-06-12 19:44:08 -04:00
|
|
|
virtual bool Show(bool show = true);
|
2003-01-06 11:36:23 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Set menu bar
|
|
|
|
void SetMenuBar(wxMenuBar *menu_bar);
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Set title
|
|
|
|
void SetTitle(const wxString& title);
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Set icon
|
2002-03-26 16:54:23 -05:00
|
|
|
virtual void SetIcons(const wxIconBundle& icons);
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
#if wxUSE_STATUSBAR
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void PositionStatusBar();
|
1999-12-01 10:23:56 -05:00
|
|
|
#endif // wxUSE_STATUSBAR
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Create toolbar
|
1999-01-19 14:36:07 -05:00
|
|
|
#if wxUSE_TOOLBAR
|
2003-07-10 06:53:00 -04:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = -1,
|
2004-06-12 19:44:08 -04:00
|
|
|
wxWindowID id = wxID_ANY,
|
2003-01-16 15:41:07 -05:00
|
|
|
const wxString& name = wxToolBarNameStr);
|
|
|
|
virtual void SetToolBar(wxToolBar *toolbar);
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void PositionToolBar();
|
1999-01-19 14:36:07 -05:00
|
|
|
#endif // wxUSE_TOOLBAR
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
// Implementation only from now on
|
|
|
|
// -------------------------------
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
|
|
void OnActivate(wxActivateEvent& event);
|
2003-07-10 06:53:00 -04:00
|
|
|
|
2004-06-12 19:44:08 -04:00
|
|
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
1999-12-01 10:23:56 -05:00
|
|
|
WXWidget GetMenuBarWidget() const;
|
1999-02-22 06:01:13 -05:00
|
|
|
WXWidget GetShellWidget() const { return m_frameShell; }
|
|
|
|
WXWidget GetWorkAreaWidget() const { return m_workArea; }
|
|
|
|
WXWidget GetClientAreaWidget() const { return m_clientArea; }
|
|
|
|
WXWidget GetTopWidget() const { return m_frameShell; }
|
2003-07-10 06:53:00 -04:00
|
|
|
|
2003-01-06 11:36:23 -05:00
|
|
|
virtual WXWidget GetMainWidget() const { return m_mainWidget; }
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// The widget that can have children on it
|
|
|
|
WXWidget GetClientWidget() const;
|
|
|
|
bool GetVisibleStatus() const { return m_visibleStatus; }
|
2003-01-06 11:36:23 -05:00
|
|
|
void SetVisibleStatus( bool status ) { m_visibleStatus = status; }
|
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
bool PreResize();
|
2003-01-06 11:36:23 -05:00
|
|
|
|
|
|
|
// for generic/mdig.h
|
2003-07-10 06:53:00 -04:00
|
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
2008-07-29 08:32:47 -04:00
|
|
|
|
2003-01-06 11:36:23 -05:00
|
|
|
private:
|
1999-12-01 10:23:56 -05:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-03-26 16:54:23 -05:00
|
|
|
|
|
|
|
// set a single icon for the frame
|
|
|
|
void DoSetIcon( const wxIcon& icon );
|
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
//// Motif-specific
|
|
|
|
WXWidget m_frameShell;
|
|
|
|
WXWidget m_workArea;
|
|
|
|
WXWidget m_clientArea;
|
1999-12-01 10:23:56 -05:00
|
|
|
bool m_visibleStatus;
|
|
|
|
bool m_iconized;
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void DoSetSize(int x, int y,
|
2002-02-05 11:34:33 -05:00
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void DoSetClientSize(int width, int height);
|
2003-07-10 06:53:00 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
private:
|
2005-09-25 16:29:58 -04:00
|
|
|
virtual bool XmDoCreateTLW(wxWindow* parent,
|
2005-09-14 10:36:02 -04:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
long style,
|
|
|
|
const wxString& name);
|
|
|
|
|
2003-01-06 11:36:23 -05:00
|
|
|
|
2005-09-20 16:33:47 -04:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2003-01-06 11:36:23 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
2005-09-20 16:33:47 -04:00
|
|
|
#endif // _WX_MOTIF_FRAME_H_
|
|
|
|
|