diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/public/matsys_controls/gamefiletreeview.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/public/matsys_controls/gamefiletreeview.h')
| -rw-r--r-- | mp/src/public/matsys_controls/gamefiletreeview.h | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/mp/src/public/matsys_controls/gamefiletreeview.h b/mp/src/public/matsys_controls/gamefiletreeview.h index a1f01b4a..a9563cef 100644 --- a/mp/src/public/matsys_controls/gamefiletreeview.h +++ b/mp/src/public/matsys_controls/gamefiletreeview.h @@ -1,81 +1,81 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================
-
-#ifndef GAMEFILETREEVIEW_H
-#define GAMEFILETREEVIEW_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#include "tier1/utlstring.h"
-#include "vgui_controls/TreeView.h"
-#include "vgui_controls/ImageList.h"
-
-
-//-----------------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------------
-namespace vgui
-{
- class IScheme;
-}
-
-
-//-----------------------------------------------------------------------------
-// Purpose: Handles file view for game files
-//-----------------------------------------------------------------------------
-class CGameFileTreeView : public vgui::TreeView
-{
- DECLARE_CLASS_SIMPLE( CGameFileTreeView, vgui::TreeView );
-
-public:
- CGameFileTreeView( vgui::Panel *parent, const char *name, const char *pRootFolderName, const char *pRootDir, const char *pExtension = NULL );
-
- // Inherited from base classes
- virtual void GenerateChildrenOfNode( int itemIndex );
- virtual void GenerateContextMenu( int itemIndex, int x, int y );
- virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
-
- // Purpose: Refreshes the active file list
- void RefreshFileList();
-
- // Sets an item to be colored as if its a menu
- void SetItemColorForDirectories( int itemID );
-
- // Gets the number of root directories
- int GetRootDirectoryCount();
-
- // Gets the ith root directory
- const char *GetRootDirectory( int nIndex );
-
- // Selects the root folder
- void SelectRoot();
-
-private:
- // Populate the root node (necessary since tree view can't have multiple roots)
- void PopulateRootNode( int itemIndex );
-
- // Populate the root node with directories
- void AddDirectoriesOfNode( int itemIndex, const char *pFilePath );
-
- // Populate the root node with directories
- bool DoesDirectoryHaveSubdirectories( const char *pFilePath );
-
- // Populate the root node with files
- void AddFilesOfNode( int itemIndex, const char *pFilePath, const char *pExt );
-
- CUtlString m_RootDir;
- CUtlString m_Ext;
- CUtlString m_RootFolderName;
- vgui::ImageList m_Images;
- bool m_bUseExt; // To differentiate "" from NULL in m_Ext
-};
-
-
-#endif // GAMEFILETREEVIEW_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef GAMEFILETREEVIEW_H +#define GAMEFILETREEVIEW_H + +#ifdef _WIN32 +#pragma once +#endif + + +#include "tier1/utlstring.h" +#include "vgui_controls/TreeView.h" +#include "vgui_controls/ImageList.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +namespace vgui +{ + class IScheme; +} + + +//----------------------------------------------------------------------------- +// Purpose: Handles file view for game files +//----------------------------------------------------------------------------- +class CGameFileTreeView : public vgui::TreeView +{ + DECLARE_CLASS_SIMPLE( CGameFileTreeView, vgui::TreeView ); + +public: + CGameFileTreeView( vgui::Panel *parent, const char *name, const char *pRootFolderName, const char *pRootDir, const char *pExtension = NULL ); + + // Inherited from base classes + virtual void GenerateChildrenOfNode( int itemIndex ); + virtual void GenerateContextMenu( int itemIndex, int x, int y ); + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + + // Purpose: Refreshes the active file list + void RefreshFileList(); + + // Sets an item to be colored as if its a menu + void SetItemColorForDirectories( int itemID ); + + // Gets the number of root directories + int GetRootDirectoryCount(); + + // Gets the ith root directory + const char *GetRootDirectory( int nIndex ); + + // Selects the root folder + void SelectRoot(); + +private: + // Populate the root node (necessary since tree view can't have multiple roots) + void PopulateRootNode( int itemIndex ); + + // Populate the root node with directories + void AddDirectoriesOfNode( int itemIndex, const char *pFilePath ); + + // Populate the root node with directories + bool DoesDirectoryHaveSubdirectories( const char *pFilePath ); + + // Populate the root node with files + void AddFilesOfNode( int itemIndex, const char *pFilePath, const char *pExt ); + + CUtlString m_RootDir; + CUtlString m_Ext; + CUtlString m_RootFolderName; + vgui::ImageList m_Images; + bool m_bUseExt; // To differentiate "" from NULL in m_Ext +}; + + +#endif // GAMEFILETREEVIEW_H + |