26#ifndef TGUI_CANVAS_SDL_HPP
27#define TGUI_CANVAS_SDL_HPP
29#include <TGUI/Config.hpp>
30#include <TGUI/Backend/Renderer/SDL_Renderer/BackendTextureSDL.hpp>
31#include <TGUI/Backend/Renderer/BackendRenderTarget.hpp>
32#include <TGUI/Widgets/ClickableWidget.hpp>
34#include <TGUI/extlibs/IncludeSDL.hpp>
70 typedef std::shared_ptr<CanvasSDL>
Ptr;
71 typedef std::shared_ptr<const CanvasSDL>
ConstPtr;
81 CanvasSDL(
const char* typeName =
"CanvasSDL",
bool initRenderer =
true);
170 return m_textureTarget;
186 SDL_Texture* m_textureTarget =
nullptr;
189 std::shared_ptr<BackendTextureSDL> m_backendTexture;
Base class for render targets.
Definition: BackendRenderTarget.hpp:48
Definition: CanvasSDL.hpp:67
void setSize(const Layout2d &size) override
Changes the size of the widget.
static CanvasSDL::Ptr create(Layout2d size={"100%", "100%"})
Creates a new canvas widget.
void draw(BackendRenderTarget &target, RenderStates states) const override
Draw the widget to a render target.
CanvasSDL(CanvasSDL &©)=default
Default move constructor.
bool canGainFocus() const override
Returns whether the widget can gain focus.
SDL_Texture * getTextureTarget()
Access the internal texture on which you can render.
Definition: CanvasSDL.hpp:168
std::shared_ptr< CanvasSDL > Ptr
Shared widget pointer.
Definition: CanvasSDL.hpp:70
static CanvasSDL::Ptr copy(CanvasSDL::ConstPtr canvas)
Makes a copy of another canvas.
Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
CanvasSDL(const CanvasSDL ©)
Copy constructor.
std::shared_ptr< const CanvasSDL > ConstPtr
Shared constant widget pointer.
Definition: CanvasSDL.hpp:71
Class to store the position or size of a widget.
Definition: Layout.hpp:284
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36
States used for drawing.
Definition: RenderStates.hpp:39