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.

38 lines
939 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #if !defined TEXTCONSOLE_H
  9. #define TEXTCONSOLE_H
  10. #pragma once
  11. class CTextConsole
  12. {
  13. public:
  14. CTextConsole() : m_ConsoleVisible( true ) {}
  15. virtual ~CTextConsole() {};
  16. virtual bool Init ();
  17. virtual void ShutDown() = 0;
  18. virtual void Print( char * pszMsg ) = 0;
  19. virtual void SetTitle( char * pszTitle ) = 0;
  20. virtual void SetStatusLine( char * pszStatus ) = 0;
  21. virtual void UpdateStatus() = 0;
  22. // Must be provided by children
  23. virtual char * GetLine( int index, char *buf, int buflen ) = 0;
  24. virtual int GetWidth() = 0;
  25. virtual void SetVisible( bool visible ) { m_ConsoleVisible = visible; }
  26. virtual bool IsVisible() { return m_ConsoleVisible; }
  27. protected:
  28. bool m_ConsoleVisible;
  29. };
  30. #endif // !defined TEXTCONSOLE_H