void OnPaint(wxPaintEvent& event);
};
+/**
+ Preview frame modality kind.
+
+ The elements of this enum can be used with wxPreviewFrame::Initialize() to
+ indicate how should the preview frame be shown.
+
+ @since 2.9.2
+*/
+enum wxPreviewFrameModalityKind
+{
+ /**
+ Disable all the other top level windows while the preview frame is shown.
+
+ This is the default behaviour.
+ */
+ wxPreviewFrame_AppModal,
+ /**
+ Disable only the parent window while the preview frame is shown.
+ */
+ wxPreviewFrame_WindowModal,
+
+ /**
+ Show the preview frame non-modally and don't disable any other windows.
+ */
+ wxPreviewFrame_NonModal
+};
/**
@class wxPreviewFrame
virtual void CreateControlBar();
/**
- Creates the preview canvas and control bar, and calls wxWindow::MakeModal(@true)
- to disable other top-level windows in the application.
+ Creates the preview canvas and control bar.
+
+ By default also disables the other existing top level windows to
+ prepare for showing the preview frame modally. Since wxWidgets 2.9.2
+ this can be changed by specifying either wxPreviewFrame_WindowModal --
+ to disable just the parent window -- or wxPreviewFrame_NonModal -- to
+ not disable any windows at all -- as @a kind parameter.
+
+ This function must be called by the application prior to showing the frame.
- This function should be called by the application prior to showing the frame.
+ @param kind
+ The modality kind of preview frame. @since 2.9.2
*/
- virtual void Initialize();
+ virtual void Initialize(wxPreviewFrameModalityKind kind
+ = wxPreviewFrame_AppModal);
/**
- Enables the other frames in the application, and deletes the print preview
+ Enables any disabled frames in the application, and deletes the print preview
object, implicitly deleting any printout objects associated with the print
preview object.
*/