Plutonium framework API  0.1
Simple UI framework for libnx and SDL2
Image.hpp
Go to the documentation of this file.
1 
2 /*
3 
4  Plutonium library
5 
6  @file Image.hpp
7  @brief An Image is an Element showing a picture. (JPEG, PNG, TGA, BMP)
8  @author XorTroll
9 
10  @copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
11 
12 */
13 
14 #pragma once
15 #include <pu/element/Element.hpp>
16 
17 namespace pu::element
18 {
19  class Image : public Element
20  {
21  public:
22  Image(u32 X, u32 Y, std::string Image);
23  ~Image();
24  u32 GetX();
25  void SetX(u32 X);
26  u32 GetY();
27  void SetY(u32 Y);
28  u32 GetWidth();
29  void SetWidth(u32 Width);
30  u32 GetHeight();
31  void SetHeight(u32 Height);
32  std::string GetImage();
33  void SetImage(std::string Image);
34  bool IsImageValid();
35  void OnRender(render::Renderer *Drawer);
36  void OnInput(u64 Down, u64 Up, u64 Held, bool Touch, bool Focus);
37  private:
38  std::string img;
40  u32 x;
41  u32 y;
42  u32 w;
43  u32 h;
44  };
45 }
void OnRender(render::Renderer *Drawer)
void SetImage(std::string Image)
Definition: Renderer.hpp:22
void SetY(u32 Y)
Definition: Button.hpp:18
Definition: Element.hpp:27
std::string GetImage()
SDL_Texture * NativeTexture
Definition: SDL2.hpp:16
void SetHeight(u32 Height)
Image(u32 X, u32 Y, std::string Image)
void OnInput(u64 Down, u64 Up, u64 Held, bool Touch, bool Focus)
Definition: Image.hpp:19
void SetX(u32 X)
void SetWidth(u32 Width)