|
| DsTextInputDialog (DsView *parent, DsColor dialog_color, uint32_t corner_radius, size_t max_text_length) |
| Creates a DsTextInputDialog view.
|
|
DsTextInputDialog & | setEditGeometry (DsSize edit_size, uint16_t corner_radius, uint8_t border_thickness) |
| Sets the geometry of the edit field.
|
|
DsTextInputDialog & | setEditColors (DsColor edit_color, DsColor border_color, DsColor text_color, DsColor hint_color) |
| Sets the colors used for the edit field.
|
|
DsTextInputDialog & | setCheckColor (DsColor color) |
| Sets the checkmark color of the checkbox used to show the password (if password mode is enabled)
|
|
DsTextInputDialog & | setEditFonts (const ds_bitmap_font_t *font, const ds_bitmap_font_t *hint_font) |
| Sets the fonts used for the edit field.
|
|
DsTextInputDialog & | setEditParams (size_t max_length, const char *hint) |
| Sets the parameters for the edit field.
|
|
DsTextInputDialog & | setPasswordMode (bool enabled, bool allow_show_password) |
| Sets the password mode.
|
|
DsTextInputDialog & | setShowPasswordLabelFont (const ds_bitmap_font_t *font) |
| Sets the show password checkbox label font.
|
|
const char * | getTextValue (void) |
| Returns a pointer to a C string representing the user input.
|
|
void | setTextValue (const char *format,...) |
| Sets the edit field value using the printf() format.
|
|
| DsDialogBase (DsView *parent, DsColor dialog_color, uint32_t corner_radius) |
| Creates a DsDialogBase view.
|
|
DsDialogBase & | setMaskColor (DsColor color) |
| Sets the dimming mask color.
|
|
DsDialogBase & | setDialogColor (DsColor color) |
| Sets the color used to render the dialog panel.
|
|
DsDialogBase & | setDialogCornerRadius (uint16_t radius) |
| Sets the corner radius of the dialog panel.
|
|
DsDialogBase & | setDialogBorderColor (DsColor color) |
| Sets the color used to render the dialog panel border.
|
|
DsDialogBase & | setDialogBorderThickness (uint8_t thickness) |
| Sets the thickness of the dialog panel border.
|
|
DsDialogBase & | setTitleFont (const ds_bitmap_font_t *font) |
| Sets the font used to render the dialog title.
|
|
DsDialogBase & | setTitleColor (DsColor color) |
| Sets the color used to render the dialog title.
|
|
DsDialogBase & | setTitle (const char *title) |
| Sets the dialog title.
|
|
DsDialogBase & | setButtonFonts (const ds_bitmap_font_t *positive_font, const ds_bitmap_font_t *negative_font) |
| Sets the fonts used to render the text of the dialog buttons.
|
|
DsDialogBase & | setButtonColors (DsColor positive_color, DsColor negative_color) |
| Sets the colors used to render the dialog buttons.
|
|
DsDialogBase & | setButtons (const char *positive, const char *negative, const lambda< void(bool)> &cb) |
| Sets the text of the buttons and the callback used to pass the result back.
|
|
| DsView (DsView *parent, const DsPoint &pos=DsPoint(), const DsSize &size=DsSize()) |
| Creates a DsView with an optional position and size.
|
|
| DsView (DsView *parent, DsOrientation layout_orientation) |
| Creates a DsView with the auto-layout mode active. This view can align it's children automatically.
|
|
void | addChild (DsView *view) |
| Adds a child to the current DsView.
|
|
void | removeChild (DsView *view) |
| Removes a child to the current DsView.
|
|
void | removeAllChildren (void) |
| Removes all children of the current DsView.
|
|
void | bringFront (void) |
| Brings the current view to the top of the drawing order.
|
|
void | sendBack (void) |
| Sends the current view to the bottom of the drawing order.
|
|
DsView * | getParent (void) const |
| Returns the parent of the current view.
|
|
void | setParent (DsView *parent) |
| Sets a new parent to the view.
|
|
const DsPoint & | getPosition (void) const |
| Returns the position of the view in parent coordinates.
|
|
DsFPoint | getCenterPoint (void) const |
| Returns the center point of the view in current coordinates.
|
|
DsPoint | translatePositionInParentCoordinates (const DsView *parent, DsPoint pos) const |
| Translates position (x, y) in parent coordinate system.
|
|
DsPoint | translatePositionInParentCoordinates (uint32_t parent_level, DsPoint pos) const |
| Translates position (x, y) in parent coordinate system.
|
|
DsPoint | getPositionInParentCoordinates (const DsView *parent) const |
| Returns the position in the parent's coordinate system.
|
|
void | setPosition (const DsPoint &pos) |
| Sets the position of the view in parent coordinates.
|
|
void | setCenterPosition (const DsPoint &pos) |
| Sets the position of the center of the view in parent coordinates.
|
|
void | centerVertically (DsView *view) |
| Aligns vertically the center of the current view with the center of another view.
|
|
void | centerHorizontally (DsView *view) |
| Aligns horizontally the center of the current view with the center of another view.
|
|
const DsSize & | getParentSize (void) const |
| Returns the size of the parent view.
|
|
const DsSize & | getSize (void) const |
| Returns the size of the view.
|
|
void | setMinimumSize (const DsSize &size) |
| Returns the minimum size of the view.
|
|
void | setSize (const DsSize &size) |
| Sets the size of the view.
|
|
void | setWidth (int32_t width) |
| Sets the width of the view.
|
|
void | setHeight (int32_t height) |
| Sets the height of the view.
|
|
DsRect | getRegion (void) const |
| Returns a rectangle describing the space occupied by the current view in it's own coordinate system (X and Y coordinates are 0).
|
|
DsRect | getRegionInParentCoordinates (const DsView *parent) const |
| Returns a rectangle describing the space occupied by the current view in the parent's coordinate system.
|
|
void | alignInParent (void) |
| Aligns the view relative to it's parent.
|
|
void | alignInParent (const DsAlignment &alignment, int32_t padding_top, int32_t padding_left, int32_t padding_bottom, int32_t padding_right) |
| Aligns the view relative to it's parent.
|
|
DsView * | setPaddingTop (int16_t padding, uint16_t proportion=0) |
| Sets the top padding used by the auto-layout.
|
|
DsView * | setPaddingBottom (int16_t padding, uint16_t proportion=0) |
| Sets the bottom padding used by the auto-layout.
|
|
DsView * | setPaddingLeft (int32_t padding, uint16_t proportion=0) |
| Sets the left padding used by the auto-layout.
|
|
DsView * | setPaddingRight (int16_t padding, uint16_t proportion=0) |
| Sets the right padding used by the auto-layout.
|
|
DsView * | setPadding (int16_t padding, uint16_t proportion=0) |
| Sets the padding used by the auto-layout.
|
|
DsView * | setPaddingHorizontal (int16_t padding, uint16_t proportion=0) |
| Sets the horizontal padding used by the auto-layout.
|
|
DsView * | setPaddingVertical (int16_t padding, uint16_t proportion=0) |
| Sets the vertical padding used by the auto-layout.
|
|
DsView * | setProportion (uint32_t proportion) |
| Sets the view proportion used by the auto-layout.
|
|
DsAlignment | getParentAlignment (void) const |
| Returns parent alignment mode of the view.
|
|
DsView * | setParentAlignment (const DsAlignment &alignment) |
| Sets parent alignment mode of the view.
|
|
void | reserveSpace (bool state) |
| Configures if during auto-layout the view will reserve space even if it's hidden.
|
|
void | setAutoLayout (DsOrientation orientation, bool enable) |
| Enables or disables the auto-layout mode and sets the primary orientation.
|
|
virtual DsSize | fitContent (void) |
| Calculates the minimum size required by the view.
|
|
void | doLayout (void) |
| Runs the auto-layout algorithm.
|
|
void | setBackgroundColor (DsColor color) |
| Sets the background color of the view.
|
|
void | setBackgroundImage (const DsSurface *surface) |
| Sets the background image.
|
|
void | setPanelColor (DsColor color) |
| Sets the color of the panel.
|
|
void | setPanelBorderColor (DsColor color) |
| Sets the color of the panel border.
|
|
void | setPanelCornerRadius (uint16_t radius) |
| Sets the radius of the panel corners.
|
|
void | setPanelBorderThickness (uint8_t thickness) |
| Sets the thickness of the panel border.
|
|
DsScreen & | getScreen (void) |
| Returns a reference to the screen to which this view belongs.
|
|
bool | isFocused (void) |
| Is the view focused?
|
|
bool | getIsVisible (void) const |
| Is the view visibility enabled?
|
|
bool | isVisible (void) const |
| Is the view actually visible on the screen?
|
|
bool | isParentVisible (void) const |
| Is the parent view actually visible on the screen?
|
|
bool | show (void) |
| Shortcut to setVisible(true).
|
|
bool | hide (void) |
| Shortcut to setVisible(false).
|
|
bool | setVisible (bool is_visible) |
| Changes the visibility of the view.
|
|
void | enable (bool state) |
| Enables or disables the view.
|
|
bool | isEnabled (void) const |
| Is the view enabled?
|
|
void | enableTouch (bool state) |
| Enables or disables processing of touch events.
|
|
bool | isTouchEnabled (void) const |
| Is the view enabled to process touch events?
|
|
void | sendTap (DsPoint pos) |
| Sends a tap event to the view.
|
|
void | setOnTapCallback (const lambda< void(const DsPoint &p)> &cb) |
| Sets the lambda to be executed when the user taps on the view.
|
|
void | setOnLongTapCallback (const lambda< void(const DsPoint &p)> &cb) |
| Sets the lambda to be executed when the user taps the view and holds for a specific time (set with setLongTapDetection()).
|
|
void | setOnTouchActiveCallback (const lambda< void(const DsPoint &p)> &cb) |
| Sets the lambda to be executed when the user touches the view.
|
|
void | setOnTouchReleaseCallback (const lambda< void(void)> &cb) |
| Sets the lambda to be executed when the user touch is released.
|
|
void | setLongTapDetection (uint32_t delay_ms) |
| Configures the long tap detection.
|
|
bool | isInputInside (void) const |
| Returns if there is user input (touch) inside the view.
|
|
const DsPoint & | getTouchPosition (void) const |
| Returns the location of the user touch input inside the view.
|
|
void | enableHorizontalScroll (bool state) |
| Enables or disables the horizontal scroll of the view contents.
|
|
void | enableVerticalScroll (bool state) |
| Enables or disables the vertical scroll of the view contents.
|
|
void | setScrollbarColor (DsColor color) |
| Configure the color of the scroll bars.
|
|
virtual void | invalidate (void) |
| Invalidates the view.
|
|
virtual void | invalidateRegion (DsRect region) |
| Invalidates only a region of the view.
|
|
void | addStateObserver (StateObserver *observer) |
| Adds a state observer object.
|
|
void | removeStateObserver (StateObserver *observer) |
| Removes a state observer object.
|
|
DsTextInputDialog is a class that implements a generic dialog for collecting text input from the user.
The dialog view appears on top of a mask covering the entire screen. The mask is used to dim the rest of the screen to allow the dialog to be more visible. The mask color can be configured.