7#ifndef _DS_DIALOG_BASE_H
8#define _DS_DIALOG_BASE_H
14#include <ds_divider.h>
164 class Dialog:
public DsView
167 Dialog(
DsView* parent,
DsColor dialog_color, uint32_t corner_radius);
173 uint32_t mCornerRadius;
174 lambda<void(
bool)> mCallback;
185 void onShow(
void)
override final;
191 void onPaint(
DsRenderer &renderer)
override final;
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsDialogBase is a class that implements a generic dialog base class.
Definition ds_dialog_base.h:24
DsDialogBase & setTitleColor(DsColor color)
Sets the color used to render the dialog title.
DsDialogBase & setDialogColor(DsColor color)
Sets the color used to render the dialog panel.
void enablePositiveButton(bool enable)
Enable or disable the positive button (for validating the input)
DsView * getInnerDialogView(void)
Get a pointer to the inner dialog view.
DsDialogBase & setDialogBorderThickness(uint8_t thickness)
Sets the thickness of the dialog panel border.
DsDialogBase & setDialogCornerRadius(uint16_t radius)
Sets the corner radius of the dialog panel.
DsDialogBase & setTitleFont(const ds_bitmap_font_t *font)
Sets the font used to render the dialog title.
DsView * getBodyView(void)
Get a pointer to the body view.
DsDialogBase & setButtonColors(DsColor positive_color, DsColor negative_color)
Sets the colors used to render the dialog buttons.
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 & 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.
DsDialogBase & setMaskColor(DsColor color)
Sets the dimming mask color.
DsDialogBase & setDialogBorderColor(DsColor color)
Sets the color used to render the dialog panel border.
DsDialogBase & setTitle(const char *title)
Sets the dialog title.
DsDialogBase(DsView *parent, DsColor dialog_color, uint32_t corner_radius)
Creates a DsDialogBase view.
DsDivider is a class representing a simple line divider.
Definition ds_divider.h:17
DsLabel is a class that represents a text label view.
Definition ds_label.h:21
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40
void enable(bool state)
Enables or disables the view.
Definition ds_types_lambda.h:24
This structure implements a touch event.
Definition ds_event.h:25