1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-12-01 15:23:56 +00:00
|
|
|
// Name: wx/motif/frame.h
|
1998-09-18 10:19:10 +00:00
|
|
|
// Purpose: wxFrame class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
1999-06-08 19:10:37 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
#ifndef _WX_MOTIF_FRAME_H_
|
|
|
|
#define _WX_MOTIF_FRAME_H_
|
1998-09-18 10:19:10 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2002-02-05 16:34:33 +00:00
|
|
|
#pragma interface "frame.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
#endif
|
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
class WXDLLEXPORT wxFrame : public wxFrameBase
|
1999-02-22 11:01:13 +00:00
|
|
|
{
|
1998-09-18 10:19:10 +00:00
|
|
|
public:
|
1999-12-01 15:23:56 +00:00
|
|
|
wxFrame() { Init(); }
|
1999-02-22 11:01:13 +00:00
|
|
|
wxFrame(wxWindow *parent,
|
2002-02-05 16:34:33 +00: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 11:01:13 +00:00
|
|
|
{
|
1999-12-01 15:23:56 +00:00
|
|
|
Init();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
Create(parent, id, title, pos, size, style, name);
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
bool Create(wxWindow *parent,
|
2002-02-05 16:34:33 +00: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 15:23:56 +00:00
|
|
|
virtual ~wxFrame();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2000-03-06 17:16:12 +00:00
|
|
|
virtual bool Show(bool show = TRUE);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Set menu bar
|
|
|
|
void SetMenuBar(wxMenuBar *menu_bar);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Set title
|
|
|
|
void SetTitle(const wxString& title);
|
|
|
|
wxString GetTitle() const { return m_title; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Set icon
|
|
|
|
virtual void SetIcon(const wxIcon& icon);
|
2002-03-26 21:54:23 +00:00
|
|
|
virtual void SetIcons(const wxIconBundle& icons);
|
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
#if wxUSE_STATUSBAR
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void PositionStatusBar();
|
1999-12-01 15:23:56 +00:00
|
|
|
#endif // wxUSE_STATUSBAR
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Create toolbar
|
1999-01-19 19:36:07 +00:00
|
|
|
#if wxUSE_TOOLBAR
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = -1, const wxString& name = wxToolBarNameStr);
|
|
|
|
virtual void PositionToolBar();
|
1999-01-19 19:36:07 +00:00
|
|
|
#endif // wxUSE_TOOLBAR
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Iconize
|
|
|
|
virtual void Iconize(bool iconize);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
virtual bool IsIconized() const;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Is the frame maximized? Returns FALSE under Motif (but TRUE for
|
|
|
|
// wxMDIChildFrame due to the tabbed implementation).
|
1999-12-01 15:23:56 +00:00
|
|
|
virtual bool IsMaximized() const;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void Maximize(bool maximize);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void Raise();
|
|
|
|
virtual void Lower();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
virtual void Restore();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
// Implementation only from now on
|
|
|
|
// -------------------------------
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
|
|
void OnActivate(wxActivateEvent& event);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
1999-12-01 15:23:56 +00:00
|
|
|
WXWidget GetMenuBarWidget() const;
|
1999-02-22 11:01:13 +00: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 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
virtual WXWidget GetMainWidget() const { return m_frameWidget; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// The widget that can have children on it
|
|
|
|
WXWidget GetClientWidget() const;
|
|
|
|
bool GetVisibleStatus() const { return m_visibleStatus; }
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
bool PreResize();
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-10-28 09:15:42 +00:00
|
|
|
protected:
|
1999-12-01 15:23:56 +00:00
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-03-26 21:54:23 +00:00
|
|
|
|
|
|
|
// set a single icon for the frame
|
|
|
|
void DoSetIcon( const wxIcon& icon );
|
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
//// Motif-specific
|
|
|
|
WXWidget m_frameShell;
|
|
|
|
WXWidget m_frameWidget;
|
|
|
|
WXWidget m_workArea;
|
|
|
|
WXWidget m_clientArea;
|
|
|
|
wxString m_title;
|
1999-12-01 15:23:56 +00:00
|
|
|
bool m_visibleStatus;
|
|
|
|
bool m_iconized;
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-12-01 15:23:56 +00:00
|
|
|
virtual void DoGetClientSize(int *width, int *height) const;
|
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
|
|
|
virtual void DoGetPosition(int *x, int *y) const;
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetSize(int x, int y,
|
2002-02-05 16:34:33 +00:00
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void DoSetClientSize(int width, int height);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
2002-02-05 16:34:33 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxFrame)
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_MOTIF_FRAME_H_
|