Aether
SDL2 based UI Framework for NX
Box.hpp
1 #ifndef AETHER_BOX_HPP
2 #define AETHER_BOX_HPP
3 
4 #include "Aether/base/Texture.hpp"
5 
6 namespace Aether {
11  class Box : public Texture {
12  private:
13  unsigned int border_;
14  unsigned int cornerRadius_;
19  Drawable * renderDrawable();
20 
21  public:
32  Box(const int x, const int y, const int w, const int h, const unsigned int thick = 1, const unsigned int radius = 0);
33 
39  unsigned int thickness();
40 
46  void setThickness(const unsigned int thick);
47 
53  unsigned int cornerRadius();
54 
60  void setCornerRadius(const unsigned int radius);
61 
68  void setBoxSize(const int w, const int h);
69  };
70 };
71 
72 #endif
void setThickness(const unsigned int thick)
Set the border thickness of the box.
unsigned int thickness()
Returns the thickness of the border.
Element for rendering a 'box' (rectangle with no fill).
Definition: Box.hpp:11
unsigned int cornerRadius()
Returns the corner radius of the border.
void setCornerRadius(const unsigned int radius)
Set the corner radius of the border.
Box(const int x, const int y, const int w, const int h, const unsigned int thick=1, const unsigned int radius=0)
Constructs a new Box element.
int w()
Returns width of element.
Stores either a surface or texture which can be drawn on screen by providing a renderer to render()...
Definition: Drawable.hpp:22
int x()
Returns x-coordinate of element.
A Texture is an element that stores a texture to render in the window. It can't be instantiated alone...
Definition: Texture.hpp:24
void setBoxSize(const int w, const int h)
Adjusts the dimensions of the box.
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
int y()
Returns y-coordinate of element.