dirdlg.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/osx/dirdlg.h
  3. // Purpose: wxDirDialog class
  4. // Author: Stefan Csomor
  5. // Modified by:
  6. // Created: 1998-01-01
  7. // Copyright: (c) Stefan Csomor
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_DIRDLG_H_
  11. #define _WX_DIRDLG_H_
  12. #if wxOSX_USE_COCOA
  13. DECLARE_WXCOCOA_OBJC_CLASS(NSOpenPanel);
  14. #endif
  15. class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
  16. {
  17. public:
  18. wxDirDialog() { Init(); }
  19. wxDirDialog(wxWindow *parent,
  20. const wxString& message = wxDirSelectorPromptStr,
  21. const wxString& defaultPath = wxT(""),
  22. long style = wxDD_DEFAULT_STYLE,
  23. const wxPoint& pos = wxDefaultPosition,
  24. const wxSize& size = wxDefaultSize,
  25. const wxString& name = wxDirDialogNameStr)
  26. {
  27. Init();
  28. Create(parent,message,defaultPath,style,pos,size,name);
  29. }
  30. void Create(wxWindow *parent,
  31. const wxString& message = wxDirSelectorPromptStr,
  32. const wxString& defaultPath = wxT(""),
  33. long style = wxDD_DEFAULT_STYLE,
  34. const wxPoint& pos = wxDefaultPosition,
  35. const wxSize& size = wxDefaultSize,
  36. const wxString& name = wxDirDialogNameStr);
  37. #if wxOSX_USE_COCOA
  38. ~wxDirDialog();
  39. #endif
  40. virtual int ShowModal();
  41. #if wxOSX_USE_COCOA
  42. virtual void ShowWindowModal();
  43. virtual void ModalFinishedCallback(void* panel, int returnCode);
  44. #endif
  45. private:
  46. #if wxOSX_USE_COCOA
  47. // Create and initialize NSOpenPanel that we use in both ShowModal() and
  48. // ShowWindowModal().
  49. WX_NSOpenPanel OSXCreatePanel() const;
  50. WX_NSObject m_sheetDelegate;
  51. #endif
  52. // Common part of all ctors.
  53. void Init();
  54. DECLARE_DYNAMIC_CLASS(wxDirDialog)
  55. };
  56. #endif // _WX_DIRDLG_H_