minifram.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: minifram.h
  3. // Purpose: interface of wxMiniFrame
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxMiniFrame
  9. A miniframe is a frame with a small title bar.
  10. It is suitable for floating toolbars that must not take up too much screen area.
  11. An example of mini frame can be seen in the @ref page_samples_dialogs
  12. using the "Mini frame" command of the "Generic dialogs" submenu.
  13. @beginStyleTable
  14. @style{wxICONIZE}
  15. Display the frame iconized (minimized) (Windows only).
  16. @style{wxCAPTION}
  17. Puts a caption on the frame.
  18. @style{wxMINIMIZE}
  19. Identical to wxICONIZE.
  20. @style{wxMINIMIZE_BOX}
  21. Displays a minimize box on the frame (Windows and Motif only).
  22. @style{wxMAXIMIZE}
  23. Displays the frame maximized (Windows only).
  24. @style{wxMAXIMIZE_BOX}
  25. Displays a maximize box on the frame (Windows and Motif only).
  26. @style{wxCLOSE_BOX}
  27. Displays a close box on the frame.
  28. @style{wxSTAY_ON_TOP}
  29. Stay on top of other windows (Windows only).
  30. @style{wxSYSTEM_MENU}
  31. Displays a system menu (Windows and Motif only).
  32. @style{wxRESIZE_BORDER}
  33. Displays a resizable border around the window.
  34. @endStyleTable
  35. @remarks
  36. This class has miniframe functionality under Windows and GTK, i.e. the presence
  37. of mini frame will not be noted in the task bar and focus behaviour is different.
  38. On other platforms, it behaves like a normal frame.
  39. @library{wxcore}
  40. @category{managedwnd}
  41. @see wxMDIParentFrame, wxMDIChildFrame, wxFrame, wxDialog
  42. */
  43. class wxMiniFrame : public wxFrame
  44. {
  45. public:
  46. /**
  47. Default ctor.
  48. */
  49. wxMiniFrame();
  50. /**
  51. Constructor, creating the window.
  52. @param parent
  53. The window parent. This may be @NULL. If it is non-@NULL, the frame will
  54. always be displayed on top of the parent window on Windows.
  55. @param id
  56. The window identifier. It may take a value of -1 to indicate a default value.
  57. @param title
  58. The caption to be displayed on the frame's title bar.
  59. @param pos
  60. The window position. The value wxDefaultPosition indicates a default position,
  61. chosen by either the windowing system or wxWidgets, depending on platform.
  62. @param size
  63. The window size. The value wxDefaultSize indicates a default size, chosen by
  64. either the windowing system or wxWidgets, depending on platform.
  65. @param style
  66. The window style. See wxMiniFrame.
  67. @param name
  68. The name of the window. This parameter is used to associate a name with
  69. the item, allowing the application user to set Motif resource values for
  70. individual windows.
  71. @remarks The frame behaves like a normal frame on non-Windows platforms.
  72. @see Create()
  73. */
  74. wxMiniFrame(wxWindow* parent, wxWindowID id,
  75. const wxString& title,
  76. const wxPoint& pos = wxDefaultPosition,
  77. const wxSize& size = wxDefaultSize,
  78. long style = wxCAPTION | wxRESIZE_BORDER,
  79. const wxString& name = wxFrameNameStr);
  80. /**
  81. Destructor. Destroys all child windows and menu bar if present.
  82. */
  83. virtual ~wxMiniFrame();
  84. /**
  85. Used in two-step frame construction.
  86. See wxMiniFrame() for further details.
  87. */
  88. bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
  89. const wxPoint& pos = wxDefaultPosition,
  90. const wxSize& size = wxDefaultSize,
  91. long style = wxCAPTION | wxRESIZE_BORDER,
  92. const wxString& name = wxFrameNameStr);
  93. };