docmdi.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: docmdi.h
  3. // Purpose: interface of wxDocMDIParentFrame and wxDocMDIChildFrame
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. @class wxDocMDIParentFrame
  9. The wxDocMDIParentFrame class provides a default top-level frame for
  10. applications using the document/view framework. This class can only be used
  11. for MDI parent frames.
  12. It cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate
  13. classes.
  14. @library{wxcore}
  15. @category{docview}
  16. @see @ref overview_docview, @ref page_samples_docview, wxMDIParentFrame
  17. */
  18. class wxDocMDIParentFrame : public wxMDIParentFrame
  19. {
  20. public:
  21. //@{
  22. /**
  23. Constructor.
  24. */
  25. wxDocMDIParentFrame();
  26. wxDocMDIParentFrame(wxDocManager* manager, wxFrame* parent,
  27. wxWindowID id,
  28. const wxString& title,
  29. const wxPoint& pos = wxDefaultPosition,
  30. const wxSize& size = wxDefaultSize,
  31. long style = wxDEFAULT_FRAME_STYLE,
  32. const wxString& name = wxFrameNameStr);
  33. //@}
  34. /**
  35. Destructor.
  36. */
  37. virtual ~wxDocMDIParentFrame();
  38. /**
  39. Creates the window.
  40. */
  41. bool Create(wxDocManager* manager, wxFrame* parent,
  42. wxWindowID id, const wxString& title,
  43. const wxPoint& pos = wxDefaultPosition,
  44. const wxSize& size = wxDefaultSize,
  45. long style = wxDEFAULT_FRAME_STYLE,
  46. const wxString& name = wxFrameNameStr);
  47. };
  48. /**
  49. @class wxDocMDIChildFrame
  50. The wxDocMDIChildFrame class provides a default frame for displaying
  51. documents on separate windows. This class can only be used for MDI child
  52. frames.
  53. The class is part of the document/view framework supported by wxWidgets,
  54. and cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate
  55. classes.
  56. @library{wxcore}
  57. @category{docview}
  58. @see @ref overview_docview, @ref page_samples_docview, wxMDIChildFrame
  59. */
  60. class wxDocMDIChildFrame : public wxMDIChildFrame
  61. {
  62. public:
  63. /**
  64. Constructor.
  65. */
  66. wxDocMDIChildFrame(wxDocument* doc, wxView* view,
  67. wxMDIParentFrame* parent, wxWindowID id,
  68. const wxString& title,
  69. const wxPoint& pos = wxDefaultPosition,
  70. const wxSize& size = wxDefaultSize,
  71. long style = wxDEFAULT_FRAME_STYLE,
  72. const wxString& name = wxFrameNameStr);
  73. /**
  74. Destructor.
  75. */
  76. virtual ~wxDocMDIChildFrame();
  77. /**
  78. Returns the document associated with this frame.
  79. */
  80. wxDocument* GetDocument() const;
  81. /**
  82. Returns the view associated with this frame.
  83. */
  84. wxView* GetView() const;
  85. /**
  86. Sets the document for this frame.
  87. */
  88. void SetDocument(wxDocument* doc);
  89. /**
  90. Sets the view for this frame.
  91. */
  92. void SetView(wxView* view);
  93. };