dialog.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/dialog.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Created:
  6. // Copyright: (c) 1998 Robert Roebling
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef __GTKDIALOGH__
  10. #define __GTKDIALOGH__
  11. //-----------------------------------------------------------------------------
  12. // wxDialog
  13. //-----------------------------------------------------------------------------
  14. class WXDLLIMPEXP_CORE wxDialog: public wxDialogBase
  15. {
  16. public:
  17. wxDialog() { Init(); }
  18. wxDialog( wxWindow *parent, wxWindowID id,
  19. const wxString &title,
  20. const wxPoint &pos = wxDefaultPosition,
  21. const wxSize &size = wxDefaultSize,
  22. long style = wxDEFAULT_DIALOG_STYLE,
  23. const wxString &name = wxDialogNameStr );
  24. bool Create( wxWindow *parent, wxWindowID id,
  25. const wxString &title,
  26. const wxPoint &pos = wxDefaultPosition,
  27. const wxSize &size = wxDefaultSize,
  28. long style = wxDEFAULT_DIALOG_STYLE,
  29. const wxString &name = wxDialogNameStr );
  30. virtual ~wxDialog() {}
  31. void OnApply( wxCommandEvent &event );
  32. void OnCancel( wxCommandEvent &event );
  33. void OnOK( wxCommandEvent &event );
  34. void OnPaint( wxPaintEvent& event );
  35. void OnCloseWindow( wxCloseEvent& event );
  36. /*
  37. void OnCharHook( wxKeyEvent& event );
  38. */
  39. virtual bool Show( bool show = TRUE );
  40. virtual int ShowModal();
  41. virtual void EndModal( int retCode );
  42. virtual bool IsModal() const;
  43. void SetModal( bool modal );
  44. // implementation
  45. // --------------
  46. bool m_modalShowing;
  47. protected:
  48. // common part of all ctors
  49. void Init();
  50. private:
  51. DECLARE_EVENT_TABLE()
  52. DECLARE_DYNAMIC_CLASS(wxDialog)
  53. };
  54. #endif // __GTKDIALOGH__