Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef IFILESYSTEMOPENDIALOG_H
  7. #define IFILESYSTEMOPENDIALOG_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #define FILESYSTEMOPENDIALOG_VERSION "FileSystemOpenDlg003"
  12. class IFileSystem;
  13. abstract_class IFileSystemOpenDialog
  14. {
  15. public:
  16. // You must call this first to set the hwnd.
  17. virtual void Init( CreateInterfaceFn factory, void *parentHwnd ) = 0;
  18. // Call this to free the dialog.
  19. virtual void Release() = 0;
  20. // Use these to configure the dialog.
  21. virtual void AddFileMask( const char *pMask ) = 0;
  22. virtual void SetInitialDir( const char *pDir, const char *pPathID = NULL ) = 0;
  23. virtual void SetFilterMdlAndJpgFiles( bool bFilter ) = 0;
  24. virtual void GetFilename( char *pOut, int outLen ) const = 0; // Get the filename they chose.
  25. // Call this to make the dialog itself. Returns true if they clicked OK and false
  26. // if they canceled it.
  27. virtual bool DoModal() = 0;
  28. // This uses the standard windows file open dialog.
  29. virtual bool DoModal_WindowsDialog() = 0;
  30. };
  31. #endif // IFILESYSTEMOPENDIALOG_H