Plutonium framework API  0.3
Simple UI framework for libnx and SDL2
elm_Rectangle.hpp
Go to the documentation of this file.
1 
2 /*
3 
4  Plutonium library
5 
6  @file Rectangle.hpp
7  @brief A Rectangle is an Element which simply draws a filled rectangle.
8  @author XorTroll
9 
10  @copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
11 
12 */
13 
14 #pragma once
16 
17 namespace pu::ui::elm
18 {
19  class Rectangle : public Element
20  {
21  public:
22  Rectangle(i32 X, i32 Y, i32 Width, i32 Height, Color RecColor, i32 BorderRadius = 0);
24 
25  i32 GetX();
26  void SetX(i32 X);
27  i32 GetY();
28  void SetY(i32 Y);
29  i32 GetWidth();
30  void SetWidth(i32 Width);
31  i32 GetHeight();
32  void SetHeight(i32 Height);
34  void SetBorderRadius(i32 Radius);
35  Color GetColor();
36  void SetColor(Color RecColor);
37  void OnRender(render::Renderer::Ref &Drawer, i32 X, i32 Y);
38  void OnInput(u64 Down, u64 Up, u64 Held, Touch Pos);
39  private:
40  i32 borderr;
41  i32 x;
42  i32 y;
43  i32 w;
44  i32 h;
45  Color clr;
46  };
47 }
Definition: elm_Button.hpp:19
Definition: elm_Rectangle.hpp:19
void SetBorderRadius(i32 Radius)
Definition: ui_Types.hpp:24
Definition: ui_Types.hpp:38
void SetHeight(i32 Height)
void OnInput(u64 Down, u64 Up, u64 Held, Touch Pos)
void OnRender(render::Renderer::Ref &Drawer, i32 X, i32 Y)
s32 i32
Definition: pu_Macros.hpp:17
#define PU_SMART_CTOR(type)
Definition: pu_Macros.hpp:8
void SetColor(Color RecColor)
void SetWidth(i32 Width)
Definition: elm_Element.hpp:34
Rectangle(i32 X, i32 Y, i32 Width, i32 Height, Color RecColor, i32 BorderRadius=0)