WebRenderHandler.h 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include <Atomic/Graphics/Texture2D.h>
  3. #include <Atomic/Graphics/Material.h>
  4. class CefRenderHandler;
  5. namespace Atomic
  6. {
  7. class WebClient;
  8. /// Base class for various WebRenderHandlers
  9. class ATOMIC_API WebRenderHandler : public Object
  10. {
  11. OBJECT(WebRenderHandler);
  12. public:
  13. /// Construct.
  14. WebRenderHandler(Context* context);
  15. /// Destruct.
  16. virtual ~WebRenderHandler();
  17. /// Get the current renderer width
  18. virtual int GetWidth() const = 0;
  19. /// Get the current renderer height
  20. virtual int GetHeight() const = 0;
  21. /// Get the WebClient associated with the render handler
  22. WebClient* GetWebClient() const;
  23. /// Set the dimensions of the render handler
  24. virtual void SetSize(int width, int height) = 0;
  25. /// Set the render handlers WebClient
  26. void SetWebClient(WebClient* webClient);
  27. /// Get the (internal) CEFRenderHandler
  28. virtual CefRenderHandler* GetCEFRenderHandler() = 0;
  29. protected:
  30. WeakPtr<WebClient> webClient_;
  31. };
  32. }