![]() |
Chesto 0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
|


Public Member Functions | |
| AlertDialog (const std::string &title, const std::string &message) | |
| void | show () |
| void | setText (const std::string &newText) |
| virtual void | render (Element *parent) override |
| display the current state of the display More... | |
| virtual bool | process (InputEvents *event) override |
| process any input that is received for this element More... | |
Public Member Functions inherited from Element | |
| virtual bool | process (InputEvents *event) |
| process any input that is received for this element More... | |
| virtual void | render (Element *parent) |
| display the current state of the display More... | |
| bool | onTouchDown (InputEvents *event) |
| bool | onTouchDrag (InputEvents *event) |
| bool | onTouchUp (InputEvents *event) |
| void | hide () |
| void | unhide () |
| void | renderBackground (bool fill=true) |
| void | append (Element *element) |
| void | remove (Element *element) |
| void | removeAll (bool moveToTrash=false) |
| void | position (int x, int y) |
| position the element More... | |
| void | recalcPosition (Element *parent) |
| CST_Rect | getBounds () |
| CST_Renderer * | getRenderer () |
| void | wipeAll (bool delSelf=false) |
| Element * | child (Element *child) |
| Element * | setPosition (int x, int y) |
| Element * | setAction (std::function< void()> func) |
| Element * | centerHorizontallyIn (Element *parent) |
| Element * | centerVerticallyIn (Element *parent) |
| Element * | centerIn (Element *parent) |
| Element * | setAbsolute (bool isAbs) |
| Element * | constrain (int flags, int padding=0) |
| Element * | animate (int durationIn, std::function< void(float)> onStep, std::function< void()> onFinish) |
| Element * | moveToFront () |
| Element * | setTouchable (bool touchable) |
| void | screenshot (std::string path) |
| Take a screenshot of this element and its children, and save it to the given path. More... | |
Public Attributes | |
| std::string | title |
| std::string | message |
| std::function< void()> | onConfirm |
| std::function< void()> | onCancel |
| bool | useAnimation = true |
| CST_Color | blackColor = CST_Color{0, 0, 0, 0xff} |
| TextElement * | messageText = new TextElement("(Placeholder text)", 20, &blackColor, NORMAL, 400) |
| Element * | overlay = new Element() |
| Container * | vStack = new Container(COL_LAYOUT, 50) |
| int | dialogWidth = 450 |
| int | dialogHeight = 200 |
Public Attributes inherited from Element | |
| std::function< void()> | action = NULL |
| the action to call (from binded callback) on touch or button selection https://stackoverflow.com/questions/14189440/c-class-member-callback-simple-examples More... | |
| std::function< void(InputEvents *event)> | actionWithEvents = NULL |
| std::vector< Element * > | elements |
| visible GUI child elements of this element More... | |
| float | scale = 1.0f |
| bool | touchable = false |
| whether or not this element can be touched (highlights bounds) More... | |
| bool | dragging = false |
| whether or not this element is currently being dragged More... | |
| bool | needsRedraw = false |
| whether or not this element needs the screen redrawn next time it's processed More... | |
| int | futureRedrawCounter = 0 |
| whether this element needs a redraw for the next X redraws (decreases each time) (0 is no redraws) More... | |
| int | lastMouseY = 0 |
| the last Y, X coordinate of the mouse (from a drag probably) More... | |
| int | lastMouseX = 0 |
| bool | hasBackground = false |
| rgb | backgroundColor = {0, 0, 0} |
| int | backgroundOpacity = 0xff |
| bool | isAbsolute = false |
| Element * | parent = NULL |
| the parent element (can sometimes be null if it isn't set) More... | |
| bool | hidden = false |
| whether this element should skip rendering or not More... | |
| bool | isProtected = false |
| int | elasticCounter = 0 |
| how much time is left in an elastic-type flick/scroll set by the last distance traveled in a scroll, and counts down every frame More... | |
| int | width = 0 |
| width and height of this element (must be manually set, isn't usually calculated (but is in some cases, like text or images)) More... | |
| int | height = 0 |
| int | x = 0 |
| int | y = 0 |
| int | xAbs = 0 |
| int | yAbs = 0 |
| double | angle = 0 |
| rotation angle in degrees More... | |
| int | xOff = 0 |
| int | yOff = 0 |
| int | cornerRadius = 0 |
| std::vector< Constraint * > | constraints |
| std::vector< Animation * > | animations |
| bool | useColorMask = false |
| whether or not to overlay a color mask on top of this element More... | |
| CST_Color | maskColor = {0,0,0,0} |
| The color to overlay on top. More... | |
Additional Inherited Members | |
Public Types inherited from Element | |
| typedef Element | super |
Definition at line 6 of file AlertDialog.hpp.
| AlertDialog::AlertDialog | ( | const std::string & | title, |
| const std::string & | message | ||
| ) |
Definition at line 6 of file AlertDialog.cpp.
References Element::hidden, TextElement::update(), and Element::width.
|
overridevirtual |
process any input that is received for this element
Reimplemented from Element.
Definition at line 102 of file AlertDialog.cpp.
References Element::process().
|
overridevirtual |
display the current state of the display
Reimplemented from Element.
Definition at line 97 of file AlertDialog.cpp.
References Element::render().
| void AlertDialog::setText | ( | const std::string & | newText | ) |
Definition at line 65 of file AlertDialog.cpp.
| void AlertDialog::show | ( | ) |
Definition at line 70 of file AlertDialog.cpp.
| CST_Color AlertDialog::blackColor = CST_Color{0, 0, 0, 0xff} |
Definition at line 21 of file AlertDialog.hpp.
| int AlertDialog::dialogHeight = 200 |
Definition at line 28 of file AlertDialog.hpp.
| int AlertDialog::dialogWidth = 450 |
Definition at line 27 of file AlertDialog.hpp.
| std::string AlertDialog::message |
Definition at line 14 of file AlertDialog.hpp.
| TextElement* AlertDialog::messageText = new TextElement("(Placeholder text)", 20, &blackColor, NORMAL, 400) |
Definition at line 22 of file AlertDialog.hpp.
| std::function<void()> AlertDialog::onCancel |
Definition at line 16 of file AlertDialog.hpp.
| std::function<void()> AlertDialog::onConfirm |
Definition at line 15 of file AlertDialog.hpp.
Definition at line 23 of file AlertDialog.hpp.
| std::string AlertDialog::title |
Definition at line 13 of file AlertDialog.hpp.
| bool AlertDialog::useAnimation = true |
Definition at line 17 of file AlertDialog.hpp.
Definition at line 24 of file AlertDialog.hpp.