|
| ~CanvasElement () |
| Destructor.
|
|
| CanvasElement (const CanvasElement &other) |
| Copy constructor.
|
|
| CanvasElement (CanvasElement &&other) |
| Move constructor.
|
|
| CanvasElement (Ui &ui, std::string_view id) |
| Constructor of canvas id. More...
|
|
| CanvasElement (Ui &ui, std::string_view id, const Element &parent) |
| Constructor to create a new CanvasElement. More...
|
|
| CanvasElement (Ui &ui, const Element &parent) |
| Constructor to create a new CanvasElement. More...
|
|
CanvasElement & | operator= (const CanvasElement &other) |
| Copy operator.
|
|
CanvasElement & | operator= (CanvasElement &&other) |
| Move operator.
|
|
std::string | add_image (std::string_view url, const std::function< void(std::string_view id)> &loaded=nullptr) |
| Add an image into HTML DOM tree. More...
|
|
void | paint_image (std::string_view imageId, int x, int y, const Element::Rect &clippingRect={0, 0, 0, 0}) const |
| Draw image at position. More...
|
|
void | paint_image (std::string_view imageId, const Element::Rect &targetRect, const Element::Rect &clippingRect={0, 0, 0, 0}) const |
| Draw image in rectangle. More...
|
|
void | draw (const CommandList &canvasCommands) |
| Draw command list - please prefer. More...
|
|
void | draw (const FrameComposer &frameComposer) |
| Draw Frame Composer. More...
|
|
void | draw (const Bitmap &bmp) |
| Draw bitmap. More...
|
|
void | draw (int x, int y, const Bitmap &bmp) |
| Draw bitmap at position. More...
|
|
void | draw_completed (const DrawCallback &drawCompletedCallback, DrawNotify kick=DrawNotify::NoKick) |
| Set a callback to be called after the draw. More...
|
|
void | erase (bool resized=false) |
| erase bitmap More...
|
|
| Element (const Element &other)=default |
| Copy constructor.
|
|
| Element (Element &&other)=default |
| Move constructor.
|
|
Element & | operator= (const Element &other) |
| Copy operator.
|
|
Element & | operator= (Element &&other) |
| Move operator.
|
|
| Element (Ui &ui, std::string_view id) |
| Constructor for existing elements. More...
|
|
| Element (Ui &ui, std::string_view id, std::string_view htmlElement, const Element &parent) |
| Constructor for exiting elements. More...
|
|
| Element (Ui &ui, std::string_view htmlElement, const Element &parent) |
| Constructor for exiting elements. More...
|
|
virtual | ~Element () |
| Destructor.
|
|
const Ui & | ui () const |
| Get Ui.
|
|
Ui & | ui () |
| Get Ui.
|
|
std::string | id () const |
| Get id of element.
|
|
Element & | subscribe (std::string_view name, const SubscribeFunction &handler, const std::vector< std::string > &properties={}, const std::chrono::milliseconds &throttle=0ms) |
| Subscribe UI event. More...
|
|
Element & | set_html (std::string_view htmlText) |
| Set HTML text value of the element. More...
|
|
HtmlStream | html_stream () |
| get a stream that writes to html part of this element More...
|
|
Element & | set_attribute (std::string_view attr, std::string_view value) |
| Set HTML a attribute of this element. More...
|
|
Element & | set_attribute (std::string_view attr) |
| Set HTML a attribute of this element. More...
|
|
std::optional< Attributes > | attributes () const |
| Get this element attributes.
|
|
Element & | set_style (std::string_view style, std::string_view value) |
| Set CSS style of this element. More...
|
|
Element & | remove_attribute (std::string_view attr) |
| Remove attribute. More...
|
|
std::optional< Values > | styles (const std::vector< std::string > &keys) const |
| Get element styles. More...
|
|
std::optional< Elements > | children () const |
| Get element children.
|
|
std::optional< Values > | values () const |
| Applies to form elements only - receive values bound to the element.
|
|
std::optional< std::string > | html () const |
| Get HTML value bound to this element (does not apply all elements)
|
|
void | remove () |
| Remove this element from UI.
|
|
std::optional< std::string > | type () const |
| Get this element type, mostly a HTML tag.
|
|
std::optional< Rect > | rect () const |
| Get this element UI rect. I.e area it occupies on screen (if applicable)
|
|
std::optional< Element > | parent () const |
| Parent of this element. If query fails, element is root or parent id is not set, nullopt is returned.
|
|