toplevel.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/toplevel.h
  3. // Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 20.09.01
  7. // Copyright: (c) 2001 Stefan Csomor
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_MSW_TOPLEVEL_H_
  11. #define _WX_MSW_TOPLEVEL_H_
  12. // ----------------------------------------------------------------------------
  13. // wxTopLevelWindowMac
  14. // ----------------------------------------------------------------------------
  15. class WXDLLIMPEXP_CORE wxTopLevelWindowMac : public wxTopLevelWindowBase
  16. {
  17. public:
  18. // constructors and such
  19. wxTopLevelWindowMac() { Init(); }
  20. wxTopLevelWindowMac(wxWindow *parent,
  21. wxWindowID id,
  22. const wxString& title,
  23. const wxPoint& pos = wxDefaultPosition,
  24. const wxSize& size = wxDefaultSize,
  25. long style = wxDEFAULT_FRAME_STYLE,
  26. const wxString& name = wxFrameNameStr)
  27. {
  28. Init();
  29. (void)Create(parent, id, title, pos, size, style, name);
  30. }
  31. virtual ~wxTopLevelWindowMac();
  32. bool Create(wxWindow *parent,
  33. wxWindowID id,
  34. const wxString& title,
  35. const wxPoint& pos = wxDefaultPosition,
  36. const wxSize& size = wxDefaultSize,
  37. long style = wxDEFAULT_FRAME_STYLE,
  38. const wxString& name = wxFrameNameStr);
  39. bool Create(wxWindow *parent, WXWindow nativeWindow);
  40. virtual bool Destroy();
  41. virtual wxPoint GetClientAreaOrigin() const;
  42. // Attracts the users attention to this window if the application is
  43. // inactive (should be called when a background event occurs)
  44. virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
  45. // implement base class pure virtuals
  46. virtual void Maximize(bool maximize = true);
  47. virtual bool IsMaximized() const;
  48. virtual void Iconize(bool iconize = true);
  49. virtual bool IsIconized() const;
  50. virtual void Restore();
  51. virtual bool IsActive();
  52. virtual void ShowWithoutActivating();
  53. virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) ;
  54. virtual bool IsFullScreen() const ;
  55. // implementation from now on
  56. // --------------------------
  57. virtual void SetTitle( const wxString& title);
  58. virtual wxString GetTitle() const;
  59. virtual void SetLabel(const wxString& label) { SetTitle( label ); }
  60. virtual wxString GetLabel() const { return GetTitle(); }
  61. virtual void OSXSetModified(bool modified);
  62. virtual bool OSXIsModified() const;
  63. virtual void SetRepresentedFilename(const wxString& filename);
  64. protected:
  65. // common part of all ctors
  66. void Init();
  67. // is the frame currently iconized?
  68. bool m_iconized;
  69. // should the frame be maximized when it will be shown? set by Maximize()
  70. // when it is called while the frame is hidden
  71. bool m_maximizeOnShow;
  72. private :
  73. DECLARE_EVENT_TABLE()
  74. };
  75. #endif // _WX_MSW_TOPLEVEL_H_