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
|
1999-06-08 15:10:37 -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
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2002-02-05 11:34:33 -05:00
|
|
|
#pragma interface "frame.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
#endif
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
class WXDLLEXPORT 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();
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
Create(parent, id, title, pos, size, style, name);
|
|
|
|
}
|
2002-02-05 11:34:33 -05: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);
|
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
virtual ~wxFrame();
|
2003-01-06 11:36:23 -05:00
|
|
|
|
2000-03-06 12:16:12 -05: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);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Set title
|
|
|
|
void SetTitle(const wxString& title);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Set icon
|
|
|
|
virtual void SetIcon(const wxIcon& 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
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
// Create toolbar
|
1999-01-19 14:36:07 -05:00
|
|
|
#if wxUSE_TOOLBAR
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
|
|
|
virtual void PositionToolBar();
|
1999-01-19 14:36:07 -05:00
|
|
|
#endif // wxUSE_TOOLBAR
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
// Implementation only from now on
|
|
|
|
// -------------------------------
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
|
|
void OnActivate(wxActivateEvent& event);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
|
|
|
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; }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2003-01-06 11:36:23 -05:00
|
|
|
virtual WXWidget GetMainWidget() const { return m_mainWidget; }
|
2002-02-05 11:34:33 -05: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
|
|
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
|
|
|
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;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-12-01 10:23:56 -05:00
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
|
|
|
virtual void DoGetPosition(int *x, int *y) 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);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-02-22 06:01:13 -05:00
|
|
|
private:
|
2003-01-06 11:36:23 -05:00
|
|
|
virtual bool DoCreate( wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
long style,
|
|
|
|
const wxString& name );
|
|
|
|
virtual void DoDestroy();
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_MOTIF_FRAME_H_
|