Counter Strike : Global Offensive Source Code
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.

67 lines
1.8 KiB

  1. //===== Copyright 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Allows you to browse a directory structure, showing perforce files
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef PERFORCEFILEEXPLORER_H
  8. #define PERFORCEFILEEXPLORER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tier1/utlstring.h"
  13. #include "vgui_controls/Frame.h"
  14. namespace vgui
  15. {
  16. //-----------------------------------------------------------------------------
  17. // Forward declarations
  18. //-----------------------------------------------------------------------------
  19. class PerforceFileList;
  20. class ComboBox;
  21. class Button;
  22. //-----------------------------------------------------------------------------
  23. // Contains a list of files, determines their perforce status
  24. //-----------------------------------------------------------------------------
  25. class PerforceFileExplorer : public vgui::Frame
  26. {
  27. DECLARE_CLASS_SIMPLE( PerforceFileExplorer, Frame );
  28. public:
  29. // The context keyvalues are added to all messages sent by this dialog if they are specified
  30. PerforceFileExplorer( Panel *parent, const char *pPanelName );
  31. ~PerforceFileExplorer();
  32. // Inherited from Frame
  33. virtual void ApplySchemeSettings( IScheme *pScheme );
  34. virtual void PerformLayout();
  35. protected:
  36. MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", kv );
  37. MESSAGE_FUNC( OnItemDoubleClicked, "ItemDoubleClicked" );
  38. MESSAGE_FUNC( OnFolderUp, "FolderUp" );
  39. void PopulateFileList();
  40. void PopulateDriveList();
  41. // Returns the current directory
  42. void SetCurrentDirectory( const char *pCurrentDirectory );
  43. Button *m_pFolderUpButton;
  44. ComboBox *m_pFullPathCombo;
  45. PerforceFileList *m_pFileList;
  46. CUtlString m_CurrentDirectory;
  47. };
  48. } // namespace vgui
  49. #endif // PERFORCEFILEEXPLORER_H