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.

48 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CONSOLEWND_H
  8. #define CONSOLEWND_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class IConsoleWnd
  13. {
  14. public:
  15. virtual void Release() = 0;
  16. // Print a message to the console.
  17. virtual void PrintToConsole( const char *pMsg ) = 0;
  18. // Set the window title.
  19. virtual void SetTitle( const char *pTitle ) = 0;
  20. // Show and hide the console window.
  21. virtual void SetVisible( bool bVisible ) = 0;
  22. virtual bool IsVisible() const = 0;
  23. // Normally, the window just hides itself when closed. You can use this to make the window
  24. // automatically go away when they close it.
  25. virtual void SetDeleteOnClose( bool bDelete ) = 0;
  26. };
  27. // Utility functions.
  28. // Clear the contents of the edit control.
  29. void ClearEditControl( void *hWnd );
  30. // This converts adds \r's where necessary and sends the text to the edit control.
  31. void FormatAndSendToEditControl( void *hWnd, const char *pText );
  32. IConsoleWnd* CreateConsoleWnd( void *hInstance, int dialogResourceID, int editControlID, bool bVisible );
  33. #endif // CONSOLEWND_H