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


Public Member Functions | |
| EKeyboard (std::function< void(char)> typeAction) | |
| void | render (Element *parent) |
| display the current state of the display More... | |
| bool | process (InputEvents *event) |
| process any input that is received for this element More... | |
| void | updateSize () |
| void | just_type (const char input) |
| bool | listenForPhysicalKeys (InputEvents *e) |
| const std::string & | getTextInput () |
| int | rowCount () |
| int | rowLength (int row) |
| void | type (int y, int x) |
| void | generateEKeyboard () |
| void | backspace () |
Public Member Functions inherited from Chesto::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 | addNode (std::unique_ptr< Element > node) |
| void | remove (Element *element) |
| void | removeAll () |
| void | position (int x, int y) |
| position the element More... | |
| void | recalcPosition (Element *parent) |
| float | getEffectiveScale () const |
| CST_Rect | getBounds () |
| CST_Renderer * | getRenderer () |
| Element * | setPosition (int x, int y) |
| Element * | setAction (std::function< void()> func) |
| Element * | setAbsolute (bool isAbs) |
| template<typename T , typename... Args> | |
| T * | createNode (Args &&... args) |
| Element * | constrain (int flags, int padding=0) |
| Element * | constrainToTarget (Element *target, 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 | textInput |
| std::function< void(char)> | typeAction = NULL |
| const char * | lower_keys = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./" |
| const char * | upper_keys = "~!@#$\%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?" |
| int | breaks [4] = { 13, 13, 11, 10 } |
| std::vector< std::string * > | rows |
| const CST_Keycode | usbKeys [KEYCODE_COUNT] |
| bool | shiftOn = false |
| bool | capsOn = false |
| int | mode = 0 |
| int | curRow = -1 |
| int | index = -1 |
| int | keyWidth = 0 |
| int | padding = 0 |
| int | textSize = 0 |
| int | dPos = 0 |
| int | dHeight = 0 |
| int | sPos = 0 |
| int | enterPos = 0 |
| int | enterHeight = 0 |
| int | dWidth = 0 |
| int | sWidth = 0 |
| int | enterWidth = 0 |
| int | kXPad = 0 |
| int | kXOff = 0 |
| int | yYOff = 0 |
| int | kYPad = 0 |
| int | ySpacing = 0 |
| bool | hasRoundedKeys = false |
| CST_Font * | roundKeyFont = NULL |
| bool | touchMode = false |
| bool | immersiveMode = false |
| bool | preventEnterAndTab = false |
| bool | storeOwnText = false |
| bool | isTouchDrag = false |
Public Attributes inherited from Chesto::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< std::unique_ptr< Element, std::function< void(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 = nullptr |
| the parent element (reference only, not owned) 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 | cornerRadius = 0 |
| int | tag = 0 |
| std::vector< std::unique_ptr< Constraint > > | constraints |
| std::vector< std::unique_ptr< 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 Chesto::Element | |
| typedef Element | super |
Protected Member Functions inherited from Chesto::Element | |
| void | addStackMember (Element *element) |
Definition at line 9 of file EKeyboard.hpp.
| Chesto::EKeyboard::EKeyboard | ( | ) |
Definition at line 7 of file EKeyboard.cpp.
| Chesto::EKeyboard::EKeyboard | ( | std::function< void(char)> | typeAction | ) |
Definition at line 12 of file EKeyboard.cpp.
| Chesto::EKeyboard::~EKeyboard | ( | ) |
Definition at line 630 of file EKeyboard.cpp.
| void Chesto::EKeyboard::backspace | ( | ) |
Definition at line 606 of file EKeyboard.cpp.
| void Chesto::EKeyboard::generateEKeyboard | ( | ) |
Definition at line 560 of file EKeyboard.cpp.
| const std::string & Chesto::EKeyboard::getTextInput | ( | ) |
Definition at line 625 of file EKeyboard.cpp.
| void Chesto::EKeyboard::just_type | ( | const char | input | ) |
Definition at line 544 of file EKeyboard.cpp.
| bool Chesto::EKeyboard::listenForPhysicalKeys | ( | InputEvents * | e | ) |
Definition at line 353 of file EKeyboard.cpp.
|
virtual |
process any input that is received for this element
Reimplemented from Chesto::Element.
Definition at line 150 of file EKeyboard.cpp.
References Chesto::InputEvents::held(), and Chesto::InputEvents::touchIn().
|
virtual |
display the current state of the display
Reimplemented from Chesto::Element.
Definition at line 28 of file EKeyboard.cpp.
|
inline |
Definition at line 50 of file EKeyboard.hpp.
|
inline |
Definition at line 54 of file EKeyboard.hpp.
| void Chesto::EKeyboard::type | ( | int | y, |
| int | x | ||
| ) |
Definition at line 537 of file EKeyboard.cpp.
| void Chesto::EKeyboard::updateSize | ( | ) |
Definition at line 442 of file EKeyboard.cpp.
| int Chesto::EKeyboard::breaks[4] = { 13, 13, 11, 10 } |
Definition at line 36 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::capsOn = false |
Definition at line 59 of file EKeyboard.hpp.
| int Chesto::EKeyboard::curRow = -1 |
Definition at line 63 of file EKeyboard.hpp.
| int Chesto::EKeyboard::dHeight = 0 |
Definition at line 76 of file EKeyboard.hpp.
| int Chesto::EKeyboard::dPos = 0 |
Definition at line 75 of file EKeyboard.hpp.
| int Chesto::EKeyboard::dWidth = 0 |
Definition at line 80 of file EKeyboard.hpp.
| int Chesto::EKeyboard::enterHeight = 0 |
Definition at line 79 of file EKeyboard.hpp.
| int Chesto::EKeyboard::enterPos = 0 |
Definition at line 78 of file EKeyboard.hpp.
| int Chesto::EKeyboard::enterWidth = 0 |
Definition at line 82 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::hasRoundedKeys = false |
Definition at line 92 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::immersiveMode = false |
Definition at line 96 of file EKeyboard.hpp.
| int Chesto::EKeyboard::index = -1 |
Definition at line 64 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::isTouchDrag = false |
Definition at line 102 of file EKeyboard.hpp.
| int Chesto::EKeyboard::keyWidth = 0 |
Definition at line 70 of file EKeyboard.hpp.
| int Chesto::EKeyboard::kXOff = 0 |
Definition at line 86 of file EKeyboard.hpp.
| int Chesto::EKeyboard::kXPad = 0 |
Definition at line 85 of file EKeyboard.hpp.
| int Chesto::EKeyboard::kYPad = 0 |
Definition at line 88 of file EKeyboard.hpp.
| const char* Chesto::EKeyboard::lower_keys = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./" |
Definition at line 34 of file EKeyboard.hpp.
| int Chesto::EKeyboard::mode = 0 |
Definition at line 60 of file EKeyboard.hpp.
| int Chesto::EKeyboard::padding = 0 |
Definition at line 71 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::preventEnterAndTab = false |
Definition at line 99 of file EKeyboard.hpp.
| CST_Font* Chesto::EKeyboard::roundKeyFont = NULL |
Definition at line 93 of file EKeyboard.hpp.
| std::vector<std::string*> Chesto::EKeyboard::rows |
Definition at line 41 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::shiftOn = false |
Definition at line 58 of file EKeyboard.hpp.
| int Chesto::EKeyboard::sPos = 0 |
Definition at line 77 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::storeOwnText = false |
Definition at line 100 of file EKeyboard.hpp.
| int Chesto::EKeyboard::sWidth = 0 |
Definition at line 81 of file EKeyboard.hpp.
| std::string Chesto::EKeyboard::textInput |
Definition at line 26 of file EKeyboard.hpp.
| int Chesto::EKeyboard::textSize = 0 |
Definition at line 72 of file EKeyboard.hpp.
| bool Chesto::EKeyboard::touchMode = false |
Definition at line 95 of file EKeyboard.hpp.
| std::function<void(char)> Chesto::EKeyboard::typeAction = NULL |
Definition at line 30 of file EKeyboard.hpp.
| const char* Chesto::EKeyboard::upper_keys = "~!@#$\%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?" |
Definition at line 35 of file EKeyboard.hpp.
| const CST_Keycode Chesto::EKeyboard::usbKeys[KEYCODE_COUNT] |
Definition at line 43 of file EKeyboard.hpp.
| int Chesto::EKeyboard::ySpacing = 0 |
Definition at line 89 of file EKeyboard.hpp.
| int Chesto::EKeyboard::yYOff = 0 |
Definition at line 87 of file EKeyboard.hpp.