toplevel.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/toplevel.h
  3. // Purpose: wxTopLevelWindow Motif implementation
  4. // Author: Mattia Barbon
  5. // Modified by:
  6. // Created: 12/10/2002
  7. // Copyright: (c) Mattia Barbon
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef __MOTIFTOPLEVELH__
  11. #define __MOTIFTOPLEVELH__
  12. class WXDLLIMPEXP_CORE wxTopLevelWindowMotif : public wxTopLevelWindowBase
  13. {
  14. public:
  15. wxTopLevelWindowMotif() { Init(); }
  16. wxTopLevelWindowMotif( wxWindow* parent, wxWindowID id,
  17. const wxString& title,
  18. const wxPoint& pos = wxDefaultPosition,
  19. const wxSize& size = wxDefaultSize,
  20. long style = wxDEFAULT_FRAME_STYLE,
  21. const wxString& name = wxFrameNameStr )
  22. {
  23. Init();
  24. Create( parent, id, title, pos, size, style, name );
  25. }
  26. bool Create( wxWindow* parent, wxWindowID id,
  27. const wxString& title,
  28. const wxPoint& pos = wxDefaultPosition,
  29. const wxSize& size = wxDefaultSize,
  30. long style = wxDEFAULT_FRAME_STYLE,
  31. const wxString& name = wxFrameNameStr );
  32. virtual ~wxTopLevelWindowMotif();
  33. virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
  34. virtual bool IsFullScreen() const;
  35. virtual void Maximize(bool maximize = true);
  36. virtual void Restore();
  37. virtual void Iconize(bool iconize = true);
  38. virtual bool IsMaximized() const;
  39. virtual bool IsIconized() const;
  40. virtual void Raise();
  41. virtual void Lower();
  42. virtual wxString GetTitle() const { return m_title; }
  43. virtual void SetTitle( const wxString& title ) { m_title = title; }
  44. virtual bool SetShape( const wxRegion& region );
  45. WXWidget GetShellWidget() const;
  46. protected:
  47. // common part of all constructors
  48. void Init();
  49. // common part of wxDialog/wxFrame destructors
  50. void PreDestroy();
  51. virtual void DoGetPosition(int* x, int* y) const;
  52. virtual void DoSetSizeHints(int minW, int minH,
  53. int maxW, int maxH,
  54. int incW, int incH);
  55. private:
  56. // really create the Motif widget for TLW
  57. virtual bool XmDoCreateTLW(wxWindow* parent,
  58. wxWindowID id,
  59. const wxString& title,
  60. const wxPoint& pos,
  61. const wxSize& size,
  62. long style,
  63. const wxString& name) = 0;
  64. wxString m_title;
  65. };
  66. #endif // __MOTIFTOPLEVELH__