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.

71 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // The copyright to the contents herein is the property of Valve, L.L.C.
  4. // The contents may be used and/or copied only with the written permission of
  5. // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
  6. // the agreement/contract under which the contents have been supplied.
  7. //
  8. // $Header: $
  9. // $NoKeywords: $
  10. //
  11. // Material editor
  12. //=============================================================================
  13. #ifndef VGUIMATSYSAPP_H
  14. #define VGUIMATSYSAPP_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. #include "appframework/tier3app.h"
  19. //-----------------------------------------------------------------------------
  20. // The application object
  21. //-----------------------------------------------------------------------------
  22. class CVguiMatSysApp : public CVguiSteamApp
  23. {
  24. typedef CVguiSteamApp BaseClass;
  25. public:
  26. CVguiMatSysApp();
  27. // Methods of IApplication
  28. virtual bool Create();
  29. virtual bool PreInit();
  30. virtual void PostShutdown();
  31. virtual void Destroy();
  32. // Returns the window handle (HWND in Win32)
  33. void* GetAppWindow();
  34. // Gets the window size
  35. int GetWindowWidth() const;
  36. int GetWindowHeight() const;
  37. protected:
  38. void AppPumpMessages();
  39. // Sets the video mode
  40. bool SetVideoMode( );
  41. // Sets up the game path
  42. bool SetupSearchPaths( const char *pStartingDir, bool bOnlyUseStartingDir, bool bIsTool );
  43. private:
  44. // Returns the app name
  45. virtual const char *GetAppName() = 0;
  46. virtual bool AppUsesReadPixels() { return false; }
  47. // Creates the app window
  48. virtual void *CreateAppWindow( char const *pTitle, bool bWindowed, int w, int h );
  49. void *m_HWnd;
  50. int m_nWidth;
  51. int m_nHeight;
  52. };
  53. #endif // VGUIMATSYSAPP_H