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.

56 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #if !defined( IMESSAGECHARS_H )
  14. #define IMESSAGECHARS_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. #include <vgui/vgui.h>
  19. namespace vgui
  20. {
  21. class Panel;
  22. typedef unsigned long HFont;
  23. }
  24. abstract_class IMessageChars
  25. {
  26. public:
  27. enum
  28. {
  29. MESSAGESTRINGID_NONE = -1,
  30. MESSAGESTRINGID_BASE = 0
  31. };
  32. virtual void Create( vgui::VPANEL parent ) = 0;
  33. virtual void Destroy( void ) = 0;
  34. // messageID can be MESSAGESTRINGID_NONE or MESSAGESTRINGID_BASE plus some offset. You can refer to the message by
  35. // its ID later.
  36. virtual int DrawString( vgui::HFont pCustomFont, int x, int y, int r, int g, int b, int a, const char *fmt, int messageID, ... ) = 0;
  37. virtual int DrawString( vgui::HFont pCustomFont, int x, int y, const char *fmt, int messageID, ... ) = 0;
  38. virtual int DrawStringForTime( float flTime, vgui::HFont pCustomFont, int x, int y, int r, int g, int b, int a, const char *fmt, int messageID, ... ) = 0;
  39. virtual int DrawStringForTime( float flTime, vgui::HFont pCustomFont, int x, int y, const char *fmt, int messageID, ... ) = 0;
  40. // Remove all messages with the specified ID (passed into DrawStringForTime).
  41. virtual void RemoveStringsByID( int messageID ) = 0;
  42. virtual void GetStringLength( vgui::HFont pCustomFont, int *width, int *height, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
  43. virtual void Clear( void ) = 0;
  44. };
  45. extern IMessageChars *messagechars;
  46. #endif // IMESSAGECHARS_H