3#include "InputEvents.hpp"
4#include "colorspaces.hpp"
5#include "DrawUtils.hpp"
6#include "Animation.hpp"
12#define DEEP_HIGHLIGHT 200
13#define THICK_HIGHLIGHT 150
18#define RAMFS "resin:/"
23#if defined(_3DS) || defined(_3DS_MOCK)
49 void hide() { this->
hidden =
true; }
51 void unhide() { this->
hidden =
false; }
54 void renderBackground(
bool fill =
true);
59 std::function<void(
InputEvents* event)> actionWithEvents = NULL;
66 void removeAll(
bool moveToTrash =
false);
93 bool hasBackground =
false;
96 rgb backgroundColor = {0, 0, 0};
99 bool isAbsolute =
false;
108 CST_Rect getBounds();
111 bool isProtected =
false;
126 int xAbs = 0, yAbs = 0;
131 int xOff = 0, yOff = 0;
134 CST_Renderer* getRenderer();
140 void wipeAll(
bool delSelf =
false);
144 Element* setPosition(
int x,
int y);
145 Element* setAction(std::function<
void()> func);
151 Element* setAbsolute(
bool isAbs);
154 std::vector<Constraint*> constraints;
155 Element* constrain(
int flags,
int padding = 0);
158 std::vector<Animation*> animations;
161 std::function<
void(
float)> onStep,
162 std::function<
void()> onFinish
virtual bool process(InputEvents *event)
process any input that is received for this element
bool hidden
whether this element should skip rendering or not
bool dragging
whether or not this element is currently being dragged
bool touchable
whether or not this element can be touched (highlights bounds)
void screenshot(std::string path)
Take a screenshot of this element and its children, and save it to the given path.
std::function< void()> action
the action to call (from binded callback) on touch or button selection https://stackoverflow....
int futureRedrawCounter
whether this element needs a redraw for the next X redraws (decreases each time) (0 is no redraws)
int elasticCounter
how much time is left in an elastic-type flick/scroll set by the last distance traveled in a scroll,...
virtual void render(Element *parent)
display the current state of the display
bool useColorMask
whether or not to overlay a color mask on top of this element
int lastMouseY
the last Y, X coordinate of the mouse (from a drag probably)
void position(int x, int y)
position the element
double angle
rotation angle in degrees
bool needsRedraw
whether or not this element needs the screen redrawn next time it's processed
CST_Color maskColor
The color to overlay on top.
int width
width and height of this element (must be manually set, isn't usually calculated (but is in some case...
Element * parent
the parent element (can sometimes be null if it isn't set)
std::vector< Element * > elements
visible GUI child elements of this element