diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/vgui_controls/PerforceFileExplorer.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/vgui_controls/PerforceFileExplorer.h')
| -rw-r--r-- | sp/src/public/vgui_controls/PerforceFileExplorer.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/sp/src/public/vgui_controls/PerforceFileExplorer.h b/sp/src/public/vgui_controls/PerforceFileExplorer.h new file mode 100644 index 00000000..4e44d7da --- /dev/null +++ b/sp/src/public/vgui_controls/PerforceFileExplorer.h @@ -0,0 +1,67 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Allows you to browse a directory structure, showing perforce files
+//
+// $NoKeywords: $
+//===========================================================================//
+
+#ifndef PERFORCEFILEEXPLORER_H
+#define PERFORCEFILEEXPLORER_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "tier1/utlstring.h"
+#include "vgui_controls/Frame.h"
+
+
+namespace vgui
+{
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class PerforceFileList;
+class ComboBox;
+class Button;
+
+
+//-----------------------------------------------------------------------------
+// Contains a list of files, determines their perforce status
+//-----------------------------------------------------------------------------
+class PerforceFileExplorer : public vgui::Frame
+{
+ DECLARE_CLASS_SIMPLE( PerforceFileExplorer, Frame );
+
+public:
+ // The context keyvalues are added to all messages sent by this dialog if they are specified
+ PerforceFileExplorer( Panel *parent, const char *pPanelName );
+ ~PerforceFileExplorer();
+
+ // Inherited from Frame
+ virtual void ApplySchemeSettings( IScheme *pScheme );
+ virtual void PerformLayout();
+
+protected:
+ MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", kv );
+ MESSAGE_FUNC( OnItemDoubleClicked, "ItemDoubleClicked" );
+ MESSAGE_FUNC( OnFolderUp, "FolderUp" );
+
+ void PopulateFileList();
+ void PopulateDriveList();
+
+ // Returns the current directory
+ void SetCurrentDirectory( const char *pCurrentDirectory );
+
+ Button *m_pFolderUpButton;
+ ComboBox *m_pFullPathCombo;
+ PerforceFileList *m_pFileList;
+ CUtlString m_CurrentDirectory;
+};
+
+
+} // namespace vgui
+
+#endif // PERFORCEFILEEXPLORER_H
|