1 /**********************************************************************************************
3 * Filename : modalwindow.h
4 * Purpose : Allow a modalwindow like wxDialog but allowing menus and such.
5 * Author : John A. Mason
6 * Created : 8/27/2008 07:54:12 AM
7 * Copyright : Released under wxWidgets original license.
8 * **********************************************************************************************/
10 #ifndef __wx_ModalWindow_h__
11 #define __wx_ModalWindow_h__
13 #include <wx/wxprec.h>
26 #include <wx/evtloop.h>
28 class wxModalWindow : public wxFrame {
30 // while we are showing a modal window we disable the other windows using
32 wxWindowDisabler *m_windowDisabler;
34 // modal window runs its own event loop
35 wxEventLoop *m_eventLoop;
37 // is modal right now?
38 bool m_isShowingModal;
40 //The return code of a modal window
44 wxModalWindow(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "modalwindow");
45 virtual ~wxModalWindow();
53 void EndModal(int retCode);
54 void SetReturnCode(int retCode);
55 int GetReturnCode() const;
57 // 20140920 Toshi Nagata
58 DECLARE_DYNAMIC_CLASS(wxModalWindow)