28#include <unordered_map>
39#include <romfs/romfs.hpp>
45#define AURORE_REGISTER_ENUM_XML_ATTRIBUTE(name, enumType, method, ...) \
46 this->registerStringXMLAttribute(name, [this](std::string value) { \
47 std::unordered_map<std::string, enumType> enumMap = __VA_ARGS__; \
48 if (enumMap.count(value) > 0) \
49 method(enumMap[value]); \
51 aurore::View::fatalXML("Illegal value \"" + value + "\" for XML attribute \"" + name + "\"; expected " + aurore::View::listXMLValues(enumMap)); })
57#define AURORE_REGISTER_CLICK_BY_ID(id, method) \
58 this->getView(id)->registerClickAction([this](aurore::View* view) { return method(view); })
81void nameXMLDocument(
const tinyxml2::XMLDocument* document,
const std::string& name);
91 const tinyxml2::XMLElement* previous;
179 iconPath = std::string(AURORE_RESOURCES) + name;
194 View* hintView =
nullptr;
241 void drawHighlight(NVGcontext* vg,
Theme theme,
float alpha,
Style style,
bool background);
247 float highlightPadding = 0.0f;
248 float highlightCornerRadius = 0.0f;
252 bool highlightShaking =
false;
253 Time highlightShakeStart;
255 float highlightShakeAmplitude;
258 bool inFadeAnimation =
false;
260 Theme* themeOverride =
nullptr;
263 bool focusable =
false;
267 bool hideHighlightBackground =
false;
268 bool hideHighlightBorder =
false;
269 bool hideHighlight =
false;
270 bool hideClickAnimation =
false;
272 bool detached =
false;
273 Point detachedOrigin;
277 bool wireframeEnabled =
false;
278 bool clipsToBounds =
false;
282 void applyScale(NVGcontext* vg,
const Rect&
frame);
284 std::vector<std::shared_ptr<Action>> actions;
285 std::vector<GestureRecognizer*> gestureRecognizers;
291 void* parentUserdata =
nullptr;
295 float aspectRatio = 0;
297 std::unordered_map<std::string, AutoAttributeHandler> autoAttributes;
298 std::unordered_map<std::string, FloatAttributeHandler> percentageAttributes;
299 std::unordered_map<std::string, FloatAttributeHandler> floatAttributes;
300 std::unordered_map<std::string, StringAttributeHandler> stringAttributes;
301 std::unordered_map<std::string, ColorAttributeHandler> colorAttributes;
302 std::unordered_map<std::string, BoolAttributeHandler> boolAttributes;
303 std::unordered_map<std::string, FilePathAttributeHandler> filePathAttributes;
305 std::set<std::string> knownAttributes;
307 void registerCommonAttributes();
314 void ensureCommonAttributes();
315 bool commonAttributesRegistered =
false;
316 bool registeringCommonAttributes =
false;
317 void printXMLAttributeErrorMessage(tinyxml2::XMLElement* element, std::string name, std::string value);
319 unsigned maximumAllowedXMLElements = UINT_MAX;
324 float lineBottom = 0;
333 NVGcolor backgroundEndColor = nvgRGBA(0, 0, 0, 200);
335 std::vector<float> backgroundRadius { 0.0f, 0.0f, 0.0f, 0.0f };
338 float borderThickness = 0.0f;
339 float cornerRadius = 0.0f;
340 std::array<float, 4> cornerRadii = { 0.0f, 0.0f, 0.0f, 0.0f };
342 bool showShadow =
true;
345 std::unordered_map<FocusDirection, std::string> customFocusById;
346 std::unordered_map<FocusDirection, View*> customFocusByPtr;
350 int ptrLockCounter = 0;
368 NVGcolor
a(NVGcolor color);
369 NVGpaint
a(NVGpaint paint);
371 NVGcolor
RGB(
unsigned r,
unsigned g,
unsigned b)
373 return this->
a(nvgRGB(r, g, b));
376 NVGcolor
RGBA(
unsigned r,
unsigned g,
unsigned b,
unsigned a)
378 return this->
a(nvgRGBA(r, g, b,
a));
381 NVGcolor
RGBf(
float r,
float g,
float b)
383 return this->
a(nvgRGBf(r, g, b));
386 NVGcolor
RGBAf(
float r,
float g,
float b,
float a)
388 return this->
a(nvgRGBAf(r, g, b,
a));
422 static constexpr float AUTO = NAN;
640 void setMargins(
float top,
float right,
float bottom,
float left);
848 this->lineColor = color;
859 this->lineTop = thickness;
870 this->lineRight = thickness;
881 this->lineBottom = thickness;
892 this->lineLeft = thickness;
902 this->backgroundColor = color;
913 this->borderColor = color;
927 this->borderThickness = thickness;
932 return this->borderThickness;
943 this->cornerRadius = radius;
944 this->cornerRadii[0] = radius;
945 this->cornerRadii[1] = radius;
946 this->cornerRadii[2] = radius;
947 this->cornerRadii[3] = radius;
954 inline void setCornerRadius(
float topLeft,
float topRight,
float bottomRight,
float bottomLeft)
956 this->cornerRadii[0] = topLeft;
957 this->cornerRadii[1] = topRight;
958 this->cornerRadii[2] = bottomRight;
959 this->cornerRadii[3] = bottomLeft;
960 this->cornerRadius = (topLeft == topRight && topRight == bottomRight && bottomRight == bottomLeft) ? topLeft : 0.0f;
965 return this->cornerRadius;
988 this->shadowType = type;
996 this->showShadow = visible;
1005 this->hideHighlightBackground =
hide;
1013 this->hideHighlightBorder =
hide;
1021 this->hideHighlight =
hide;
1027 this->hideClickAnimation =
hide;
1036 this->highlightPadding = padding;
1044 this->highlightCornerRadius = radius;
1203 static std::shared_ptr<tinyxml2::XMLDocument>
getXMLCache(std::string_view path);
1222 static std::string
describeXMLError(tinyxml2::XMLDocument* document,
const std::string& source =
"");
1240 [[noreturn]]
static void fatalXML(
const std::string& message);
1245 static std::string
closestXMLName(
const std::string& name,
const std::vector<std::string>& known);
1248 template <
typename T>
1249 static std::string
listXMLValues(
const std::unordered_map<std::string, T>& values)
1251 std::vector<std::string> names;
1252 for (
const auto& entry : values)
1253 names.push_back(entry.first);
1254 std::sort(names.begin(), names.end());
1256 for (
const std::string& name : names)
1257 list += (list.empty() ?
"" :
", ") + name;
1282 this->focusable = focusable;
1298 this->focusSound = sound;
1338 return detachedOrigin;
1350 template <
class ButtonType>
1368 template <
class ButtonType,
class ActionType>
1501 virtual void show(std::function<
void(
void)> cb);
1506 virtual void show(std::function<
void(
void)> cb,
bool animate,
float animationDuration);
1533 virtual void hide(std::function<
void(
void)> cb);
1538 virtual void hide(std::function<
void(
void)> cb,
bool animate,
float animationDuration);
1668 this->culled = culled;
1673 return this->culled;
1686 this->backgroundRadius = { topLeft, topRight, bottomRight, bottomLeft };
1731 return &this->appletFrameItem;
1739 return clipsToBounds;
1744 clipsToBounds = value;
1753 virtual void dismiss(std::function<
void(
void)> cb = [] {});
1848 bool bind(
const std::string& spec);
1969 return this->extras && this->startTransition(name, to);
1974 std::shared_ptr<void> alive;
1976 struct ExtrasDeleter
1978 void operator()(Extras* extras)
const;
1980 std::unique_ptr<Extras, ExtrasDeleter> extras;
1981 Extras& getExtras();
1984 void noteStyleState(
StyleState state,
bool on);
1985 void notePress(
bool pressed,
bool releaseLater);
1986 void applyPendingStyles();
1988 bool startTransition(
const char* name,
const StyleValue& to);
1989 void updateStateStyles();
1990 bool bindOne(
const std::string& property,
const std::string& path,
Activity* activity);
1992 static unsigned pendingBindings;
1998 std::string property;
2002 std::unique_ptr<std::vector<ThemeColor>> themeColors;
Definition activity.hpp:45
Definition animation.hpp:42
Definition applet_frame.hpp:39
Definition application.hpp:68
Generic FlexBox layout.
Definition box.hpp:74
Definition frame_context.hpp:30
Definition gesture.hpp:68
Simple wrapper around StyleValues for the array operator.
Definition style.hpp:115
Definition observable.hpp:37
static View * createFromXMLResource(std::string name)
void setAccessibilityValue(const std::string &value)
void setScaleY(float scale)
void setAccessibilityLabel(const std::string &label)
ThemeArea getThemeArea() const
Definition view.hpp:980
void setFocusable(bool focusable)
Definition view.hpp:1280
void setWireframeEnabled(bool wireframe)
virtual View * getView(std::string id)
float getScaleX() const
Definition view.hpp:418
NVGcolor getBorderColor() const
Definition view.hpp:918
virtual bool animateHint()
Definition view.hpp:397
void overrideTheme(Theme *newTheme)
bool setThemeColor(const std::string &property, const std::string &key)
void setBackgroundColor(NVGcolor color)
Definition view.hpp:898
bool hasCustomNavigationRouteByPtr(FocusDirection direction)
virtual float getAlpha(bool child=false)
The opacity drawn: the view's alpha times its parents'.
void setAlpha(float alpha)
The view's opacity, 0 to 1 (a transition when its style has one).
static std::string closestXMLName(const std::string &name, const std::vector< std::string > &known)
void setCustomNavigationRoute(FocusDirection direction, View *target)
void setCustomNavigationRoute(FocusDirection direction, std::string targetId)
bool bind(const std::string &spec)
bool setStateStyle(StyleState state, const std::string &property, const std::string &value)
void registerStringXMLAttribute(std::string name, StringAttributeHandler handler)
void setHeight(float height)
void setParent(Box *parent, void *parentUserdata=nullptr)
The box this view is in (Box::addView sets it; parentUserdata is the box's own).
void setDetachedPositionY(float y)
AccessibilityRole getAccessibilityRole()
See setAccessibilityRole().
void announceAccessibilityValue()
void setPositionRight(float pos)
unsigned getMaximumAllowedXMLElements()
const std::vector< GestureRecognizer * > & getGestureRecognizers()
void interruptGestures(bool onlyIfUnsureState)
virtual void onWindowSizeChanged()
Definition view.hpp:1637
static View * createFromXMLString(std::string_view xml)
virtual void frame(FrameContext *ctx)
void setPositionRightPercentage(float percentage)
const std::string & getId() const
Definition view.hpp:815
static std::shared_ptr< tinyxml2::XMLDocument > getXMLCache(std::string_view path)
float getBorderThickness()
Definition view.hpp:930
Animatable alpha
Definition view.hpp:1647
static constexpr float AUTO
A size or position left to the layout (auto in XML).
Definition view.hpp:422
void setBorderColor(NVGcolor color)
Definition view.hpp:909
static View * createFromXMLFile(std::string path)
void setPositionBottomPercentage(float percentage)
bool isAccessibilitySelected()
std::string getThemeColor(const std::string &property)
void frameHighlight(FrameContext *ctx)
void playClickAnimation(bool reverse=false, bool animateBack=true, bool force=false)
Plays the click animation (the flash over the view).
void setClipsToBounds(bool value)
Definition view.hpp:1742
float getHeight(bool includeCollapse=true)
ActionIdentifier registerAction(const std::string &hintText, ButtonType button, const ActionListener &actionListener, bool hidden=false, bool allowRepeating=false, enum Sound sound=SOUND_NONE)
bool hasStyleState(StyleState state)
bool isHidden()
Whether hide() hid the view.
virtual void draw(NVGcontext *vg, float x, float y, float width, float height, Style style, FrameContext *ctx)=0
virtual std::string getAccessibilityDescription()
void expand(bool animated=true)
NVGcolor getBackgroundColor() const
Definition view.hpp:917
static std::string describeXMLLocation(const tinyxml2::XMLElement *element)
void setDimensions(float width, float height)
virtual bool getAccessibilityPosition(int *index, int *count)
static std::string currentXMLResource
Definition view.hpp:1228
Box * parent
Definition view.hpp:358
float getScaleY() const
Definition view.hpp:419
virtual void onParentFocusGained(View *focusedView)
void setPositionLeftPercentage(float percentage)
void setCornerRadius(float topLeft, float topRight, float bottomRight, float bottomLeft)
Definition view.hpp:954
void setAlignSelf(AlignSelf align)
Animatable collapseState
Definition view.hpp:353
void setBoxSizing(BoxSizing sizing)
void setMaximumAllowedXMLElements(unsigned max)
virtual View * getNextFocus(FocusDirection direction, View *currentView)
void setShrink(float shrink)
ActionIterator getAction(ActionIdentifier identifier)
The action registered under identifier, or getActions().end().
void setMinWidthPercentage(float percentage)
virtual void handleXMLElement(tinyxml2::XMLElement *element)
void setMaxHeight(float maxHeight)
void registerClickAction(const ActionListener &actionListener)
void setPositionLeft(float pos)
Activity * getParentActivity()
The activity the view is in, through its parents; nullptr when none.
bool isFocused()
Whether the view has the focus.
bool isDetached()
See detach().
virtual void onThemeChanged()
bool getClipsToBounds() const
Whether the children are clipped to the view's frame when drawn.
Definition view.hpp:1737
bool transitionStyle(const char *name, const StyleValue &to)
Definition view.hpp:1967
Rect getFrame()
The view's position and size on the screen, after layout (getX(), getY(), getWidth(),...
static std::string listXMLValues(const std::unordered_map< std::string, T > &values)
An enumeration's values, sorted, for an error message.
Definition view.hpp:1249
virtual View * getNearestView(std::string id)
void setMinHeight(float minHeight)
void setActionHidden(enum ControllerButton button, bool hidden)
void setHighlightPadding(float padding)
Definition view.hpp:1034
void setBackgroundCornerRadii(float topLeft, float topRight, float bottomRight, float bottomLeft)
Definition view.hpp:1684
void resolveBindings(Activity *activity=nullptr)
ViewBackground getBackground() const
Definition view.hpp:916
virtual void onFocusGained()
NVGpaint a(NVGpaint paint)
void setHideHighlightBackground(bool hide)
Definition view.hpp:1003
NVGcolor a(NVGcolor color)
Helper functions to apply this view's alpha to a color.
void setPositionType(PositionType type)
bool setTransition(const std::string &spec)
void setHideClickAnimation(bool hide)
No click animation when the view is clicked.
Definition view.hpp:1025
void keepSubscription(Subscription &&subscription)
void setInFadeAnimation(bool translucent)
virtual View * getDefaultFocus()
ActionIdentifier registerAction(AuroreKeyCombination key, const ActionListener &actionListener, bool allowRepeating=false)
An action on a keyboard key (a combination with modifiers): no hint, no sound.
std::weak_ptr< void > aliveToken()
std::string id
Definition view.hpp:365
void setThemeArea(ThemeArea area)
Definition view.hpp:979
bool isCulled()
Definition view.hpp:1671
void setActionAvailable(enum ControllerButton button, bool available)
Turns the action on button on or off (an action off runs nothing and shows no hint).
virtual bool applyXMLAttribute(std::string name, std::string value)
float getX()
The position on the screen, in layout units: the parents' positions and translations added.
NVGcolor shadowColor(NVGcolor color, float opacity)
virtual bool setStyleProperty(const std::string &name, const StyleValue &value)
void setPositionTopPercentage(float percentage)
Activity * parentActivity
Definition view.hpp:357
bool isPtrLocked()
Whether a ptrLock() holds the view.
void setMarginLeft(float left)
void setActionsAvailable(bool available) const
The same for every action of the view.
virtual bool getDefaultAccessibilitySelected()
Definition view.hpp:1960
virtual void hide(std::function< void(void)> cb, bool animate, float animationDuration)
void setStyleState(StyleState state, bool on)
void removeFromSuperView(bool free=true)
bool isFocusable()
Whether the view takes the focus: focusable, and visible.
static std::string getFilePathXMLAttributeValue(std::string value)
void setMinHeightPercentage(float percentage)
Sound gestureRecognizerRequest(TouchState touch, MouseState mouse, View *firstResponder)
void setHideHighlight(bool hide)
Definition view.hpp:1019
void setBackgroundLinearGradient(NVGcolor start, NVGcolor end, ViewBackground direction=ViewBackground::VERTICAL_LINEAR)
virtual float getShowAnimationDuration(TransitionAnimation animation)
void shakeHighlight(FocusDirection direction)
Shakes the focus highlight towards direction: there is nothing to go to there.
std::string describe() const
The class name and the id, for logs: Label (id="title").
void setMarginBottom(float right)
virtual void show(std::function< void(void)> cb)
float getClickAlpha()
Definition view.hpp:1652
void * getParentUserData()
ActionIdentifier registerAction(const std::string &hintText, ControllerButton button, const ActionListener &actionListener, bool hidden=false, bool allowRepeating=false, enum Sound sound=SOUND_NONE)
The same, on a controller button.
virtual void dismiss(std::function< void(void)> cb=[] {})
Pops the AppletFrame's content back to the one before, then runs cb.
virtual std::string getDefaultAccessibilityValue()
Definition view.hpp:1959
virtual void onTextScaleChanged()
Definition view.hpp:1925
void setBackground(ViewBackground background)
How the view's background is drawn: none, the sidebar's, the backdrop, a plain colour or a gradient.
void setWidth(float width)
bool isXMLAttributeValid(std::string attributeName)
void setHideHighlightBorder(bool hide)
Definition view.hpp:1011
void setBorderThickness(float thickness)
Definition view.hpp:923
void setDetachedPositionX(float x)
void setAccessibilitySelected(bool selected)
void setMaxHeightPercentage(float percentage)
void setLineTop(float thickness)
Definition view.hpp:857
static void setHighlightGlide(bool glide)
std::string getCustomNavigationRouteId(FocusDirection direction)
NVGcolor RGBf(float r, float g, float b)
Definition view.hpp:381
virtual void onParentFocusLost(View *focusedView)
void setHighlightCornerRadius(float radius)
Definition view.hpp:1042
void setCulled(bool culled)
Definition view.hpp:1666
static std::string CUSTOM_RESOURCES_PATH
Definition view.hpp:427
virtual std::string getDefaultAccessibilityLabel()
Definition view.hpp:1958
virtual enum Sound getFocusSound()
ActionIterator getAction(ButtonType button)
void setLineBottom(float thickness)
Definition view.hpp:879
virtual void onShowAnimationEnd()
Definition view.hpp:1496
virtual void applyXMLAttributes(tinyxml2::XMLElement *element)
void registerBoolXMLAttribute(std::string name, BoolAttributeHandler handler)
virtual bool setBoundText(const std::string &text)
Definition view.hpp:1853
void setMaxWidthPercentage(float percentage)
std::vector< std::shared_ptr< Action > >::iterator ActionIterator
Definition view.hpp:1348
virtual void onLayout()
Definition view.hpp:471
GenericEvent focusEvent
Definition view.hpp:360
void updateActionHint(enum ControllerButton button, const std::string &hintText)
Changes the hint of the action on button.
void setFocusSound(enum Sound sound)
Definition view.hpp:1296
void present(View *view)
Pushes view as the content of the view's AppletFrame (a page inside the frame).
bool hasCustomNavigationRouteById(FocusDirection direction)
std::string getAccessibilityLabel()
void setTranslationY(float translateY)
void setMarginRight(float right)
void setScale(float scale)
void setMaxWidth(float maxWidth)
void registerFilePathXMLAttribute(std::string name, FilePathAttributeHandler handler)
void registerAutoXMLAttribute(std::string name, AutoAttributeHandler handler)
void setParentActivity(Activity *activity)
void registerColorXMLAttribute(std::string name, ColorAttributeHandler handler)
void setShadowVisibility(bool visible)
Definition view.hpp:994
const std::vector< std::shared_ptr< Action > > & getActions()
The actions registered on the view.
void setLineColor(NVGcolor color)
Definition view.hpp:844
virtual void show(std::function< void(void)> cb, bool animate, float animationDuration)
void freeView()
Deletes the view at the end of the frame (Application::addToFreeQueue).
std::string getClassString() const
The view's class name ("Label", "Box"…).
void setPositionTop(float pos)
GenericEvent focusLostEvent
Definition view.hpp:361
void setScaleX(float scale)
void collapse(bool animated=true)
float getWidth()
The size as laid out by Yoga; the height without the collapse when includeCollapse is false.
virtual void hide(std::function< void(void)> cb)
NVGcolor RGBA(unsigned r, unsigned g, unsigned b, unsigned a)
Definition view.hpp:376
void resetClickAnimation()
std::string getAccessibilityValue()
AppletFrameItem * getAppletFrameItem()
Definition view.hpp:1729
void setAspectRatio(float value)
The width over the height, kept by the layout (values <= 0 are ignored).
static std::string describeXMLError(tinyxml2::XMLDocument *document, const std::string &source="")
void setVisibility(Visibility visibility)
std::string getAccessibilityText()
virtual void invalidate()
void setMinWidth(float minWidth)
void setShadowType(ShadowType type)
Definition view.hpp:986
View * getCustomNavigationRoutePtr(FocusDirection direction)
virtual void willDisappear(bool resetState=false)
Definition view.hpp:1487
float getCornerRadius()
Definition view.hpp:963
void updateAppletFrameItem()
static void forgetXMLCache(const std::string &path)
void setMarginTop(float top)
static std::string getStringXMLAttributeValue(std::string value)
virtual bool getStyleProperty(const std::string &name, StyleValue *value)
bool focused
Definition view.hpp:355
bool isWireframeEnabled()
bool removeGestureRecognizer(GestureRecognizer *recognizer)
virtual AccessibilityRole getDefaultAccessibilityRole()
Definition view.hpp:1957
void setMargins(float top, float right, float bottom, float left)
Rect getLocalFrame()
The position and size in the parent, as laid out by Yoga.
virtual bool isTranslucent()
virtual void onFocusLost()
virtual View * hitTest(Point point)
bool isCollapsed()
Whether collapse() hid the view.
void func(AuroreKeyCombination key)
void setCornerRadius(float radius)
Definition view.hpp:939
NVGcolor RGB(unsigned r, unsigned g, unsigned b)
Definition view.hpp:371
void addGestureRecognizer(GestureRecognizer *recognizer)
void setWidthPercentage(float percentage)
GenericEvent * getFocusEvent()
Fired with the view when it gains the focus.
Visibility getVisibility()
void setId(std::string id)
virtual void willAppear(bool resetState=false)
Definition view.hpp:1475
void setPositionBottom(float pos)
void setAccessibilityRole(AccessibilityRole role)
void registerPercentageXMLAttribute(std::string name, FloatAttributeHandler handler)
void setLineLeft(float thickness)
Definition view.hpp:890
static void fatalXML(const std::string &message)
virtual AppletFrame * getAppletFrame()
The AppletFrame the view is in, or nullptr.
void setLineRight(float thickness)
Definition view.hpp:868
NVGcolor RGBAf(float r, float g, float b, float a)
Definition view.hpp:386
YGNode * ygNode
Definition view.hpp:363
YGNode * getYGNode()
The view's Yoga node.
Point getDetachedPosition() const
Definition view.hpp:1336
void setHeightPercentage(float percentage)
void setDetachedPosition(float x, float y)
static View * createFromXMLElement(tinyxml2::XMLElement *element)
void setTranslationX(float translateX)
GenericEvent * getFocusLostEvent()
Fired with the view when it loses the focus.
void registerFloatXMLAttribute(std::string name, FloatAttributeHandler handler)
void unregisterAction(ActionIdentifier identifier)
Definition actions.hpp:25
std::function< void(float)> FloatAttributeHandler
Definition view.hpp:210
std::function< void(NVGcolor)> ColorAttributeHandler
Definition view.hpp:212
TransitionAnimation
Definition view.hpp:153
@ SLIDE_RIGHT
inverted SLIDE_LEFT
@ FADE
the old activity fades away and the new one fades in
@ SLIDE_LEFT
the old activity slides out to the left and the new one slides in from the right
PositionType
Position attribute behavior.
Definition view.hpp:136
@ ABSOLUTE
position attributes set the absolute coordinates of the view
@ RELATIVE
position attributes offset the view from the base layout
@ STATIC
position attributes are ignored, and absolute children are placed against an ancestor that is not sta...
AccessibilityRole
Definition view_style.hpp:78
const NVGcolor transparent
StyleState
Definition view_style.hpp:31
Visibility
View visibility.
Definition view.hpp:128
@ VISIBLE
the view is visible
@ INVISIBLE
the view is invisible but still takes some space
@ GONE
the view is invisible and doesn't take any space
int ActionIdentifier
Definition actions.hpp:31
ControllerButton
Definition input.hpp:179
ShadowType
A View shape's shadow type.
Definition view.hpp:163
@ CUSTOM
customized shadow (use the provided methods to tweak it)
@ NONE
do not draw any shadow around the shape
@ GENERIC
generic all-purpose shadow
FocusDirection
Focus direction when navigating.
Definition view.hpp:96
Event< View * > GenericEvent
Definition view.hpp:205
std::function< void(void)> AutoAttributeHandler
Definition view.hpp:208
Event VoidEvent
Definition view.hpp:206
const NVGcolor TRANSPARENT
Definition view.hpp:77
std::function< void(bool)> BoolAttributeHandler
Definition view.hpp:213
std::function< void(std::string)> StringAttributeHandler
Definition view.hpp:211
ThemeArea
What a decoration picture is drawn in (View::setThemeArea)
Definition theme.hpp:129
@ SIDEBAR
backdrop.sidebar: the sidebar (Cadran's rail)
ViewBackground
View background.
Definition view.hpp:105
Sound
Definition audio.hpp:23
@ SOUND_NONE
Definition audio.hpp:24
@ SOUND_FOCUS_CHANGE
Definition audio.hpp:26
retro_time_t Time
Definition time.hpp:31
std::function< bool(View *)> ActionListener
Definition actions.hpp:29
void nameXMLDocument(const tinyxml2::XMLDocument *document, const std::string &name)
AlignSelf
Definition view.hpp:115
std::function< void(std::string)> FilePathAttributeHandler
Definition view.hpp:214
std::function< void(int)> IntAttributeHandler
Definition view.hpp:209
BoxSizing
What the width and height of a view measure.
Definition view.hpp:144
@ CONTENT_BOX
the content only, padding and border are added to it
@ BORDER_BOX
the whole view, padding and border included
View * getHintView()
Definition view.hpp:189
void setIconFromFile(std::string path)
Definition view.hpp:183
std::string title
Definition view.hpp:171
std::string iconPath
Definition view.hpp:172
void setIconFromRes(std::string name)
Definition view.hpp:174
void setHintView(View *hintView)
Definition actions.hpp:36
Definition geometry.hpp:26
While it lives, the XML element being read (named in View::fatalXML's errors).
Definition view.hpp:84
ReadingXMLElement(const tinyxml2::XMLElement *element)
ReadingXMLElement & operator=(const ReadingXMLElement &)=delete
ReadingXMLElement(const ReadingXMLElement &)=delete
Definition geometry.hpp:70
Definition geometry.hpp:50
Definition view_style.hpp:41
Type
Definition view_style.hpp:43
static StyleValue of(float number)
Definition view_style.hpp:53