filedlg.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/filedlg.h
  3. // Purpose: wxFileDialog class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_FILEDLG_H_
  11. #define _WX_FILEDLG_H_
  12. //-------------------------------------------------------------------------
  13. // wxFileDialog
  14. //-------------------------------------------------------------------------
  15. class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
  16. {
  17. public:
  18. wxFileDialog(wxWindow *parent,
  19. const wxString& message = wxFileSelectorPromptStr,
  20. const wxString& defaultDir = wxEmptyString,
  21. const wxString& defaultFile = wxEmptyString,
  22. const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
  23. long style = wxFD_DEFAULT_STYLE,
  24. const wxPoint& pos = wxDefaultPosition,
  25. const wxSize& sz = wxDefaultSize,
  26. const wxString& name = wxFileDialogNameStr);
  27. virtual void GetPaths(wxArrayString& paths) const;
  28. virtual void GetFilenames(wxArrayString& files) const;
  29. #ifndef __WXWINCE__
  30. virtual bool SupportsExtraControl() const { return true; }
  31. void MSWOnInitDialogHook(WXHWND hwnd);
  32. #endif // __WXWINCE__
  33. virtual int ShowModal();
  34. // wxMSW-specific implementation from now on
  35. // -----------------------------------------
  36. // called from the hook procedure on CDN_INITDONE reception
  37. virtual void MSWOnInitDone(WXHWND hDlg);
  38. // called from the hook procedure on CDN_SELCHANGE.
  39. void MSWOnSelChange(WXHWND hDlg);
  40. protected:
  41. #if !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
  42. virtual void DoMoveWindow(int x, int y, int width, int height);
  43. virtual void DoCentre(int dir);
  44. virtual void DoGetSize( int *width, int *height ) const;
  45. virtual void DoGetPosition( int *x, int *y ) const;
  46. #endif // !(__SMARTPHONE__ && __WXWINCE__)
  47. private:
  48. wxArrayString m_fileNames;
  49. // remember if our SetPosition() or Centre() (which requires special
  50. // treatment) was called
  51. bool m_bMovedWindow;
  52. int m_centreDir; // nothing to do if 0
  53. DECLARE_DYNAMIC_CLASS(wxFileDialog)
  54. wxDECLARE_NO_COPY_CLASS(wxFileDialog);
  55. };
  56. #endif // _WX_FILEDLG_H_