2002-02-08 07:00:11 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/x11/toplevel.h
|
|
|
|
// Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW
|
2002-02-05 11:34:33 -05:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
2002-02-08 07:00:11 -05:00
|
|
|
// Created: 20.09.01
|
2002-02-05 11:34:33 -05:00
|
|
|
// RCS-ID: $Id$
|
2002-02-08 07:00:11 -05:00
|
|
|
// Copyright: (c) 2002 Julian Smart
|
2002-02-05 11:34:33 -05:00
|
|
|
// Licence: wxWindows licence
|
2002-02-08 07:00:11 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
#ifndef _WX_X11_TOPLEVEL_H_
|
|
|
|
#define _WX_X11_TOPLEVEL_H_
|
2002-02-05 11:34:33 -05:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2002-02-08 07:00:11 -05:00
|
|
|
#pragma interface "toplevel.h"
|
2002-02-05 11:34:33 -05:00
|
|
|
#endif
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTopLevelWindowX11
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxTopLevelWindowX11 : public wxTopLevelWindowBase
|
2002-02-05 11:34:33 -05:00
|
|
|
{
|
|
|
|
public:
|
2002-02-08 07:00:11 -05:00
|
|
|
// constructors and such
|
|
|
|
wxTopLevelWindowX11() { Init(); }
|
|
|
|
|
|
|
|
wxTopLevelWindowX11(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr)
|
2002-02-05 11:34:33 -05:00
|
|
|
{
|
|
|
|
Init();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
|
|
|
(void)Create(parent, id, title, pos, size, style, name);
|
2002-02-05 11:34:33 -05:00
|
|
|
}
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
bool Create(wxWindow *parent,
|
2002-02-08 07:00:11 -05:00
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_FRAME_STYLE,
|
|
|
|
const wxString& name = wxFrameNameStr);
|
|
|
|
|
|
|
|
virtual ~wxTopLevelWindowX11();
|
|
|
|
|
|
|
|
// implement base class pure virtuals
|
|
|
|
virtual void Maximize(bool maximize = TRUE);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual bool IsMaximized() const;
|
2002-02-08 07:00:11 -05:00
|
|
|
virtual void Iconize(bool iconize = TRUE);
|
|
|
|
virtual bool IsIconized() const;
|
2002-03-26 16:54:23 -05:00
|
|
|
virtual void SetIcon(const wxIcon& icon) { SetIcons( wxIconBundle( icon ) ); }
|
|
|
|
virtual void SetIcons(const wxIconBundle& icons);
|
2002-02-05 11:34:33 -05:00
|
|
|
virtual void Restore();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
virtual bool Show( bool show = TRUE );
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
2002-02-08 07:00:11 -05:00
|
|
|
virtual bool IsFullScreen() const { return m_fsIsShowing; }
|
|
|
|
|
2002-02-09 20:03:45 -05:00
|
|
|
virtual void SetTitle( const wxString& title);
|
|
|
|
virtual wxString GetTitle() const;
|
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
// implementation
|
|
|
|
void SetNeedResizeInIdle( bool set = TRUE ) { m_needResizeInIdle = set; }
|
2002-02-17 16:09:04 -05:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init();
|
2002-02-08 07:00:11 -05:00
|
|
|
|
2002-03-26 16:54:23 -05:00
|
|
|
// set the icon for the window
|
|
|
|
void DoSetIcon( const wxIcon& icon );
|
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
// For implementation purposes - sometimes decorations make the
|
|
|
|
// client area smaller
|
2002-02-12 07:59:14 -05:00
|
|
|
virtual wxPoint GetClientAreaOrigin() const;
|
|
|
|
|
2002-03-13 13:25:11 -05:00
|
|
|
// For implementation of delayed resize events
|
|
|
|
bool m_needResizeInIdle;
|
|
|
|
virtual void OnInternalIdle();
|
|
|
|
|
2002-02-12 07:59:14 -05:00
|
|
|
virtual void DoGetClientSize( int *width, int *height ) const;
|
|
|
|
virtual void DoSetClientSize(int width, int height);
|
2002-02-14 13:06:50 -05:00
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
virtual void DoGetPosition( int *x, int *y ) const;
|
2002-02-12 07:59:14 -05:00
|
|
|
|
2002-02-17 16:09:04 -05:00
|
|
|
// Is the frame currently iconized?
|
2002-02-08 07:00:11 -05:00
|
|
|
bool m_iconized;
|
|
|
|
|
2002-02-17 16:09:04 -05:00
|
|
|
// Should the frame be maximized when it will be shown? set by Maximize()
|
2002-02-08 07:00:11 -05:00
|
|
|
// when it is called while the frame is hidden
|
|
|
|
bool m_maximizeOnShow;
|
|
|
|
|
|
|
|
// Data to save/restore when calling ShowFullScreen
|
2002-02-17 16:09:04 -05:00
|
|
|
long m_fsStyle; // Passed to ShowFullScreen
|
2002-02-08 07:00:11 -05:00
|
|
|
wxRect m_fsOldSize;
|
|
|
|
bool m_fsIsMaximized;
|
|
|
|
bool m_fsIsShowing;
|
2002-02-09 20:03:45 -05:00
|
|
|
wxString m_title;
|
2002-02-05 11:34:33 -05:00
|
|
|
};
|
|
|
|
|
2002-02-11 06:06:50 -05:00
|
|
|
// list of all frames and modeless dialogs
|
|
|
|
//extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
#endif // _WX_X11_TOPLEVEL_H_
|
|
|
|
|