|
| enum class | DrawNotify { NoKick
, Kick
} |
| | set initial draw, More...
|
| |
|
using | Command = std::variant< std::string, double, int > |
| | Canvas draw command type.
|
| |
|
using | CommandList = std::vector< Command > |
| | List of Canvas draw commands.
|
| |
| using | DrawCallback = std::function< void()> |
| | Function type for draw notifies.
|
| |
|
using | Attributes = std::unordered_map< std::string, std::string > |
| | Attribute key, value pairs.
|
| |
|
using | Values = std::unordered_map< std::string, std::string > |
| | Value key, value pairs.
|
| |
|
using | Elements = std::vector< Element > |
| | Vector of Elements.
|
| |
| using | SubscribeFunction = std::function< void(const Event &)> |
| | Callback function for event subscriptions.
|
| |
| using | Rect = Gempyre::Rect |
| | compatibility
|
| |
|
|
| ~CanvasElement () |
| | Destructor.
|
| |
|
| CanvasElement (const CanvasElement &other) |
| | Copy constructor.
|
| |
|
| CanvasElement (CanvasElement &&other) |
| | Move constructor.
|
| |
| | CanvasElement (Ui &ui, std::string_view id) |
| | Constructor of canvas id.
|
| |
| | CanvasElement (Ui &ui, std::string_view id, const Element &parent) |
| | Constructor to create a new CanvasElement.
|
| |
| | CanvasElement (Ui &ui, const Element &parent) |
| | Constructor to create a new CanvasElement.
|
| |
|
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.
|
| |
| void | paint_image (std::string_view imageId, int x, int y, const Element::Rect &clippingRect={0, 0, 0, 0}) const |
| | Draw image at position.
|
| |
| void | paint_image (std::string_view imageId, const Element::Rect &targetRect, const Element::Rect &clippingRect={0, 0, 0, 0}) const |
| | Draw image in rectangle.
|
| |
| void | draw (const CommandList &canvasCommands) |
| | Draw command list - please prefer.
|
| |
| void | draw (const FrameComposer &frameComposer) |
| | Draw Frame Composer.
|
| |
| void | draw (const Bitmap &bmp) |
| | Draw bitmap.
|
| |
| void | draw (int x, int y, const Bitmap &bmp) |
| | Draw bitmap at position.
|
| |
| void | draw_completed (const DrawCallback &drawCompletedCallback, DrawNotify kick=DrawNotify::NoKick) |
| | Set a callback to be called after the draw.
|
| |
| void | erase (bool resized=false) |
| | erase bitmap
|
| |
|
| 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.
|
| |
| | Element (Ui &ui, std::string_view id, std::string_view htmlElement, const Element &parent) |
| | Constructor for exiting elements.
|
| |
| | Element (Ui &ui, std::string_view htmlElement, const Element &parent) |
| | Constructor for exiting elements.
|
| |
|
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.
|
| |
| Element & | set_html (std::string_view htmlText) |
| | Set HTML text value of the element.
|
| |
| HtmlStream | html_stream () |
| | get a stream that writes to html part of this element
|
| |
| Element & | set_attribute (std::string_view attr, std::string_view value) |
| | Set HTML a attribute of this element.
|
| |
| Element & | set_attribute (std::string_view attr) |
| | Set HTML a attribute of this element.
|
| |
|
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.
|
| |
| Element & | remove_attribute (std::string_view attr) |
| | Remove attribute.
|
| |
| std::optional< Values > | styles (const std::vector< std::string > &keys) const |
| | Get element styles.
|
| |
|
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.
|
| |