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.

161 lines
3.6 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //===========================================================================//
  7. #ifndef CONTROLS_H
  8. #define CONTROLS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui/vgui.h>
  13. #include <vgui/IPanel.h>
  14. #include <vstdlib/ikeyvaluessystem.h>
  15. #include "tier1/interface.h"
  16. #include "vgui/MouseCode.h"
  17. #include "vgui/KeyCode.h"
  18. #include "tier3/tier3.h"
  19. namespace vgui
  20. {
  21. // handles the initialization of the vgui interfaces
  22. // interfaces (listed below) are first attempted to be loaded from primaryProvider, then secondaryProvider
  23. // moduleName should be the name of the module that this instance of the vgui_controls has been compiled into
  24. bool VGui_InitInterfacesList( const char *moduleName, CreateInterfaceFn *factoryList, int numFactories );
  25. // returns the name of the module as specified above
  26. const char *GetControlsModuleName();
  27. class IPanel;
  28. class IInput;
  29. class ISchemeManager;
  30. class ISurface;
  31. class ISystem;
  32. class IVGui;
  33. //-----------------------------------------------------------------------------
  34. // Backward compat interfaces, use the interfaces grabbed in tier3
  35. // set of accessor functions to vgui interfaces
  36. // the appropriate header file for each is listed above the item
  37. //-----------------------------------------------------------------------------
  38. // #include <vgui/IInput.h>
  39. inline vgui::IInput *input()
  40. {
  41. return g_pVGuiInput;
  42. }
  43. // #include <vgui/IScheme.h>
  44. inline vgui::ISchemeManager *scheme()
  45. {
  46. return g_pVGuiSchemeManager;
  47. }
  48. // #include <vgui/ISurface.h>
  49. inline vgui::ISurface *surface()
  50. {
  51. return g_pVGuiSurface;
  52. }
  53. // #include <vgui/ISystem.h>
  54. inline vgui::ISystem *system()
  55. {
  56. return g_pVGuiSystem;
  57. }
  58. // #include <vgui/IVGui.h>
  59. inline vgui::IVGui *ivgui()
  60. {
  61. return g_pVGui;
  62. }
  63. // #include <vgui/IPanel.h>
  64. inline vgui::IPanel *ipanel()
  65. {
  66. return g_pVGuiPanel;
  67. }
  68. // predeclare all the vgui control class names
  69. class AnalogBar;
  70. class AnimatingImagePanel;
  71. class AnimationController;
  72. class BuildModeDialog;
  73. class Button;
  74. class CheckButton;
  75. class CheckButtonList;
  76. class CircularProgressBar;
  77. template< class T >class CvarToggleCheckButton;
  78. class ComboBox;
  79. class DirectorySelectDialog;
  80. class Divider;
  81. class EditablePanel;
  82. class FileOpenDialog;
  83. class Frame;
  84. class GraphPanel;
  85. class HTML;
  86. class ImagePanel;
  87. class Label;
  88. class ListPanel;
  89. class ListViewPanel;
  90. class Menu;
  91. class MenuBar;
  92. class MenuButton;
  93. class MenuItem;
  94. class MessageBox;
  95. class Panel;
  96. class PanelListPanel;
  97. class ProgressBar;
  98. class ProgressBox;
  99. class PropertyDialog;
  100. class PropertyPage;
  101. class PropertySheet;
  102. class QueryBox;
  103. class RadioButton;
  104. class RichText;
  105. class ScalableImagePanel;
  106. class ScrollBar;
  107. class ScrollBarSlider;
  108. class SectionedListPanel;
  109. class Slider;
  110. class Splitter;
  111. class TextEntry;
  112. class ToggleButton;
  113. class BaseTooltip;
  114. class TextTooltip;
  115. class TreeView;
  116. class CTreeViewListControl;
  117. class URLLabel;
  118. class WizardPanel;
  119. class WizardSubPanel;
  120. // vgui controls helper classes
  121. class BuildGroup;
  122. class FocusNavGroup;
  123. class IBorder;
  124. class IImage;
  125. class Image;
  126. class ImageList;
  127. class TextImage;
  128. } // namespace vgui
  129. // hotkeys disabled until we work out exactly how we want to do them
  130. #define VGUI_HOTKEYS_ENABLED
  131. #define VGUI_DRAW_HOTKEYS_ENABLED
  132. #define USING_BUILD_FACTORY( className ) \
  133. extern className *g_##className##LinkerHack; \
  134. className *g_##className##PullInModule = g_##className##LinkerHack;
  135. #define USING_BUILD_FACTORY_ALIAS( className, factoryName ) \
  136. extern className *g_##factoryName##LinkerHack; \
  137. className *g_##factoryName##PullInModule = g_##factoryName##LinkerHack;
  138. #endif // CONTROLS_H