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.

64 lines
1.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IVGUIMODULE_H
  8. #define IVGUIMODULE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "interface.h"
  13. #include <vgui/vgui.h>
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Standard interface to loading vgui modules
  16. //-----------------------------------------------------------------------------
  17. abstract_class IVGuiModule : public IBaseInterface
  18. {
  19. public:
  20. // called first to setup the module with the vgui
  21. // returns true on success, false on failure
  22. virtual bool Initialize(CreateInterfaceFn *vguiFactories, int factoryCount) = 0;
  23. // called after all the modules have been initialized
  24. // modules should use this time to link to all the other module interfaces
  25. virtual bool PostInitialize(CreateInterfaceFn *modules, int factoryCount) = 0;
  26. // called when the module is selected from the menu or otherwise activated
  27. virtual bool Activate() = 0;
  28. // returns true if the module is successfully initialized and available
  29. virtual bool IsValid() = 0;
  30. // requests that the UI is temporarily disabled and all data files saved
  31. virtual void Deactivate() = 0;
  32. // restart from a Deactivate()
  33. virtual void Reactivate() = 0;
  34. // called when the module is about to be shutdown
  35. virtual void Shutdown() = 0;
  36. // returns a handle to the main module panel
  37. virtual vgui::VPANEL GetPanel() = 0;
  38. // sets the parent of the main module panel
  39. virtual void SetParent(vgui::VPANEL parent) = 0;
  40. // messages sent through through the panel returned by GetPanel():
  41. //
  42. // "ConnectedToGame" "ip" "port" "gamedir"
  43. // "DisconnectedFromGame"
  44. // "ActiveGameName" "name"
  45. // "LoadingStarted" "type" "name"
  46. // "LoadingFinished" "type" "name"
  47. };
  48. #define VGUIMODULE_INTERFACE_VERSION "VGuiModule002"
  49. #endif // IVGUIMODULE_H