2023-02-05 23:01:01 +01:00
|
|
|
|
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
|
|
|
|
//
|
|
|
|
|
// Purpose:
|
|
|
|
|
//
|
|
|
|
|
// $NoKeywords: $
|
|
|
|
|
//===========================================================================//
|
|
|
|
|
|
|
|
|
|
#ifndef AUTOCOMPLETEFILELIST_H
|
|
|
|
|
#define AUTOCOMPLETEFILELIST_H
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
#pragma once
|
|
|
|
|
#endif
|
|
|
|
|
#include "public/iconvar.h"
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
// Purpose: Simple helper class for doing autocompletion of all files in a specific directory by extension
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2023-02-19 13:26:38 +01:00
|
|
|
|
class CBaseAutoCompleteFileList
|
2023-02-05 23:01:01 +01:00
|
|
|
|
{
|
|
|
|
|
public:
|
2023-02-19 13:26:38 +01:00
|
|
|
|
CBaseAutoCompleteFileList(const char* cmdname, const char* subdir, const char* extension)
|
2023-02-05 23:01:01 +01:00
|
|
|
|
{
|
|
|
|
|
m_pszCommandName = cmdname;
|
|
|
|
|
m_pszSubDir = subdir;
|
|
|
|
|
m_pszExtension = extension;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int AutoCompletionFunc(const char* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const char* m_pszCommandName;
|
|
|
|
|
const char* m_pszSubDir;
|
|
|
|
|
const char* m_pszExtension;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // AUTOCOMPLETEFILELIST_H
|