diff --git a/annotated.html b/annotated.html index 57fa9364..e552ff84 100644 --- a/annotated.html +++ b/annotated.html @@ -87,22 +87,22 @@
▼NGempyre | |||||||||||||||||||||||
CEventQueue | |||||||||||||||||||||||
CIdList | |||||||||||||||||||||||
CEventMap | |||||||||||||||||||||||
▼CElement | Represents all HTML elements on UI | ||||||||||||||||||||||
CRect | Rect | ||||||||||||||||||||||
CEvent | Event received | ||||||||||||||||||||||
CUi | The application UI | ||||||||||||||||||||||
CCanvasElement | Graphics element | ||||||||||||||||||||||
CBitmap | Bitmap for Gempyre Graphics | ||||||||||||||||||||||
CFrameComposer |
CElement | Represents all HTML elements on UI | CEvent | Event received | CUi | The application UI | CBitmap | Bitmap for Gempyre Graphics | CDialog | Dialogs for file access | CCanvasElement | Graphics element | CFrameComposer | CDialog | Dialogs for file access | CRect | Rect | ▼NGempyreUtils | CLogWriter | Parent class for LogWriters | |
Bitmap for Gempyre Graphics. More...
-#include <gempyre_graphics.h>
#include <gempyre_bitmap.h>
Public Member Functions | swap (Bitmap &other) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Swap bitmap data with another. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-void | draw_rect (const Element::Rect &rect, Color::type color) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Draw a rect with a color in bitmap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+void | draw_rect (const Gempyre::Rect &rect, Color::type color) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Draw a rect with a color in bitmap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
void | merge (int x, int y, const Bitmap &other) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Draw a Bitmap on this bitmap - merge alpha. @@ -192,10 +192,10 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Draw a Bitmap withing extents on this bitmap - replace area. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-Bitmap | clip (const Element::Rect &rect) const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a new bitmap from part of bitmap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+Bitmap | clip (const Gempyre::Rect &rect) const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a new bitmap from part of bitmap. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bool | empty () const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return true if there is not data @@ -469,7 +469,7 @@ gempyre_graphics.h
+parent() const | Gempyre::Element | rect() const | Gempyre::Element | remove() | Gempyre::Element | remove_attribute(const std::string &attr) | Gempyre::Element | set_attribute(const std::string &attr, const std::string &value) | Gempyre::Element | set_attribute(const std::string &attr) | Gempyre::Element | set_html(const std::string &htmlText) | Gempyre::Element | set_style(const std::string &style, const std::string &value) | Gempyre::Element | styles(const std::vector< std::string > &keys) const | Gempyre::Element | subscribe(const std::string &name, const SubscribeFunction &handler, const std::vector< std::string > &properties={}, const std::chrono::milliseconds &throttle=0ms) | Gempyre::Element | SubscribeFunction typedef | Gempyre::Element | type() const | Gempyre::Element | ui() const | Gempyre::Element | inline | ui() | Gempyre::Element | inline | values() const | Gempyre::Element | Values typedef | Gempyre::Element | ~CanvasElement() | Gempyre::CanvasElement | ~Element() | Gempyre::Element | virtual | Rect typedef | Gempyre::Element | rect() const | Gempyre::Element | remove() | Gempyre::Element | remove_attribute(const std::string &attr) | Gempyre::Element | set_attribute(const std::string &attr, const std::string &value) | Gempyre::Element | set_attribute(const std::string &attr) | Gempyre::Element | set_html(const std::string &htmlText) | Gempyre::Element | set_style(const std::string &style, const std::string &value) | Gempyre::Element | styles(const std::vector< std::string > &keys) const | Gempyre::Element | subscribe(const std::string &name, const SubscribeFunction &handler, const std::vector< std::string > &properties={}, const std::chrono::milliseconds &throttle=0ms) | Gempyre::Element | SubscribeFunction typedef | Gempyre::Element | type() const | Gempyre::Element | ui() const | Gempyre::Element | inline | ui() | Gempyre::Element | inline | values() const | Gempyre::Element | Values typedef | Gempyre::Element | ~CanvasElement() | Gempyre::CanvasElement | | paint_image(const std::string &imageId, int x, int y, const Element::Rect &clippingRect={0, 0, 0, 0}) const | Gempyre::CanvasElement | paint_image(const std::string &imageId, const Element::Rect &targetRect, const Element::Rect &clippingRect={0, 0, 0, 0}) const | Gempyre::CanvasElement | ~Element() | Gempyre::Element | virtual |
Public Member Functions | ||||
std::string | add_image (const std::string &url, const std::function< void(const std::string &id)> &loaded=nullptr) | |||
Add an image into HTML DOM tree. More... | ||||
void | paint_image (const std::string &imageId, int x, int y, const Element::Rect &clippingRect={0, 0, 0, 0}) const | |||
void | paint_image (const std::string &imageId, int x, int y, const Element::Rect &clippingRect={0, 0, 0, 0}) const | |||
Draw image at position. More... | ||||
void | paint_image (const std::string &imageId, const Element::Rect &targetRect, const Element::Rect &clippingRect={0, 0, 0, 0}) const | |||
void | paint_image (const std::string &imageId, const Element::Rect &targetRect, const Element::Rect &clippingRect={0, 0, 0, 0}) const | |||
Draw image in rectangle. More... | ||||
void | draw (const CommandList &canvasCommands) | |||
Get this element type, mostly a HTML tag. | ||||
-std::optional< Rect > | rect () const | rect () const | ||
Get this element UI rect. I.e area it occupies on screen (if applicable) | ||||
@@ -683,7 +686,7 @@
canvas_element.draw_completed([this]() {draw_frame();}, Gempyre::CanvasElement::DrawNotify::Kick);
-
+
TimerId start_periodic(const std::chrono::milliseconds &ms, const std::function< void(TimerId id)> &timerFunc) Start a periodic timer. |
- | const Element::Rect & | +const Element::Rect & | targetRect, |
- | const Element::Rect & | +const Element::Rect & | clippingRect = {0, 0, 0, 0} |
|
- | const Element::Rect & | +const Element::Rect & | clippingRect = {0, 0, 0, 0} |
|
operator=(Element &&other) | Gempyre::Element | inline | ||
parent() const | Gempyre::Element | |||
rect() const | Gempyre::Element | |||
remove() | Gempyre::Element | |||
remove_attribute(const std::string &attr) | Gempyre::Element | |||
set_attribute(const std::string &attr, const std::string &value) | Gempyre::Element | |||
set_attribute(const std::string &attr) | Gempyre::Element | |||
set_html(const std::string &htmlText) | Gempyre::Element | |||
set_style(const std::string &style, const std::string &value) | Gempyre::Element | |||
styles(const std::vector< std::string > &keys) const | Gempyre::Element | |||
subscribe(const std::string &name, const SubscribeFunction &handler, const std::vector< std::string > &properties={}, const std::chrono::milliseconds &throttle=0ms) | Gempyre::Element | |||
SubscribeFunction typedef | Gempyre::Element | |||
type() const | Gempyre::Element | |||
ui() const | Gempyre::Element | inline | ||
ui() | Gempyre::Element | inline | ||
values() const | Gempyre::Element | |||
Values typedef | Gempyre::Element | |||
~Element() | Gempyre::Element | virtual | ||
Rect typedef | Gempyre::Element | |||
remove() | Gempyre::Element | |||
remove_attribute(const std::string &attr) | Gempyre::Element | |||
set_attribute(const std::string &attr, const std::string &value) | Gempyre::Element | |||
set_attribute(const std::string &attr) | Gempyre::Element | |||
set_html(const std::string &htmlText) | Gempyre::Element | |||
set_style(const std::string &style, const std::string &value) | Gempyre::Element | |||
styles(const std::vector< std::string > &keys) const | Gempyre::Element | |||
subscribe(const std::string &name, const SubscribeFunction &handler, const std::vector< std::string > &properties={}, const std::chrono::milliseconds &throttle=0ms) | Gempyre::Element | |||
SubscribeFunction typedef | Gempyre::Element | |||
type() const | Gempyre::Element | |||
ui() const | Gempyre::Element | inline | ||
ui() | Gempyre::Element | inline | ||
values() const | Gempyre::Element | |||
Values typedef | Gempyre::Element | |||
~Element() | Gempyre::Element | virtual |
-Classes | |
struct | Rect |
Rect. More... | |
Public Types | |
@@ -127,6 +120,9 @@ | |
using | SubscribeFunction = std::function< void(const Event &)> |
Callback function for event subscriptions. More... | |
using | Rect = Gempyre::Rect |
compatibility More... | |
Public Member Functions | |
Get this element type, mostly a HTML tag. | |
-std::optional< Rect > | rect () const | rect () const |
Get this element UI rect. I.e area it occupies on screen (if applicable) | |
@@ -234,6 +230,23 @@
Detailed DescriptionRepresents all HTML elements on UI. Member Typedef Documentation+ +◆ Rect+ +
+
+
+
+
+compatibility +
◆ SubscribeFunctiondiff --git a/classGempyre_1_1Element.js b/classGempyre_1_1Element.js index 9fe076e9..15267b21 100644 --- a/classGempyre_1_1Element.js +++ b/classGempyre_1_1Element.js @@ -1,8 +1,8 @@ var classGempyre_1_1Element = [ - [ "Rect", "structGempyre_1_1Element_1_1Rect.html", "structGempyre_1_1Element_1_1Rect" ], [ "Attributes", "classGempyre_1_1Element.html#a37b71d8798552e875ee55384433f5847", null ], [ "Elements", "classGempyre_1_1Element.html#aa6c53fa35f8b2d3bac68e16b3ae57715", null ], + [ "Rect", "classGempyre_1_1Element.html#ad661778373709e125ae4ae2c304984fe", null ], [ "SubscribeFunction", "classGempyre_1_1Element.html#a0871ed2126a4911a895080d967df32a5", null ], [ "Values", "classGempyre_1_1Element.html#afb2ecf9f84e40c7fb2df08a789b4e3be", null ], [ "Element", "classGempyre_1_1Element.html#ae0c0152d289b144d76d81e9bd6335c27", null ], diff --git a/classGempyre_1_1FrameComposer.html b/classGempyre_1_1FrameComposer.html index d76735ff..66077d19 100644 --- a/classGempyre_1_1FrameComposer.html +++ b/classGempyre_1_1FrameComposer.html @@ -117,21 +117,21 @@ | |
Copy constructor. | |
-FrameComposer | stroke_rect (const Gempyre::Element::Rect &r) | stroke_rect (const Gempyre::Element::Rect &r) |
Visit the Mozialla documentation | |
FrameComposer | stroke_rect (double x, double y, double w, double h) |
-FrameComposer | clear_rect (const Gempyre::Element::Rect &r) | clear_rect (const Gempyre::Element::Rect &r) |
Visit the Mozialla documentation | |
FrameComposer | clear_rect (double x, double y, double w, double h) |
-FrameComposer | fill_rect (const Gempyre::Element::Rect &r) | fill_rect (const Gempyre::Element::Rect &r) |
Visit the Mozialla documentation | |
@@ -182,7 +182,7 @@ | |
Visit the Mozialla documentation | |
-FrameComposer | rect (const Gempyre::Element::Rect &r) | rect (const Gempyre::Element::Rect &r) |
Visit the Mozialla documentation | |
@@ -241,14 +241,14 @@ | |
Visit the Mozialla documentation | |
-FrameComposer | draw_image (const std::string &id, const Gempyre::Element::Rect &rect) | draw_image (const std::string &id, const Gempyre::Element::Rect &rect) |
Visit the Mozialla documentation | |
FrameComposer | draw_image (const std::string &id, double x, double y, double w, double h) |
-FrameComposer | draw_image (const std::string &id, const Gempyre::Element::Rect &clip, const Gempyre::Element::Rect &rect) | draw_image (const std::string &id, const Gempyre::Element::Rect &clip, const Gempyre::Element::Rect &rect) |
Visit the Mozialla documentation | |
diff --git a/classes.html b/classes.html
index a5cdb834..13d4f28f 100644
--- a/classes.html
+++ b/classes.html
@@ -111,7 +111,7 @@
| |
file | gempyre.h [code] |
file | gempyre_bitmap.h [code] |
file | gempyre_graphics.h [code] |
file | gempyre_utils.h [code] |
▼ include | |
gempyre.h | |
gempyre_client.h | |
gempyre_graphics.h | |
gempyre_utils.h | |
gempyre_bitmap.h | |
gempyre_client.h | |
gempyre_graphics.h | |
gempyre_types.h | |
gempyre_utils.h |
#include <optional>
#include <vector>
#include <tuple>
#include <gempyre_types.h>
+ gempyre
+ 1.3.8
+
+ |
+
#include <string>
#include <algorithm>
#include <gempyre_types.h>
Go to the source code of this file.
++Classes | |
class | Gempyre::Bitmap |
Bitmap for Gempyre Graphics. More... | |
+Namespaces | |
Gempyre::Color | |
RGB handling. | |
+Macros | |
+#define | gempyre_graphics_assert(b, x) ((b) || GempyreUtils::do_fatal(x, nullptr, __FILE__, __LINE__)); |
+Typedefs | |
+using | Gempyre::Color::type = Gempyre::dataT |
pixel type | |
gempyre_utils_graphics.h API for common graphics classes
+
+ gempyre
+ 1.3.8
+
+ |
+
-Namespaces | |
Gempyre::Color | |
RGB handling. | |
-Macros | |
-#define | gempyre_graphics_assert(b, x) ((b) || GempyreUtils::do_fatal(x, nullptr, __FILE__, __LINE__)); |
Typedefs | |
using | Gempyre::CanvasDataPtr = std::shared_ptr< CanvasData > |
-using | Gempyre::Color::type = Gempyre::dataT |
pixel type | |
+ gempyre
+ 1.3.8
+
+ |
+
Q: How to do multiple Gempyre::FrameComposer
in a single draw? My second draw is not visible A: Do you call erase? See CanvasElement::draw_completed above. You may also try to call your drawn in a
Ui::after` timer with 0ms delay, that should ensure the correct drawing order.
Q: Why my dynamic HTML <select>
does not work with numbers? A: The UI select uses strings, and hence the values has to be quoted strings.
Within Gempyre you normally build in the HTML and other resources, to compose a single file executable. It is preferred that Gempyre is statically linked in, thus the application is just a single file. Therefore distributing and executing Gempyre applications shall be very easy: just run it! There are no runtimes to install nor DLLs to be dependent on; just a single binary executable.
-The resource composing is done in CMakeLists.txt (single line), yet here the generated header is included, it contains a ‘Hellohtml’ std::string
object that will be passed then to the Gempyre::Ui
constructor.
The resource composing is done in CMakeLists.txt (single line), yet here the generated header is included, it contains a Hellohtml
, a std::string
object that will be passed then to the Gempyre::Ui
constructor.
In the constructor, you provide a mapping between file names and generated data and the HTML page that will be shown.
HTML elements are represented by Gempyre::Element
. The element constructor takes a HTML id to refer to the corresponding element in the UI. Here we refer to the text area and button as defined in the HTML code above. The Gempyre::Element
represents any of the HTML elements. It's only inherited class is Gempyre::CanvasElement
that implements specific graphics functionalities.
Applying an initial value is trivial:
Please note that as each event has a lot of properties, you have to list what you need. For a selection change (as well as most of the inputs) a value is used.
diff --git a/inherit_graph_3.map b/inherit_graph_3.map
index b657547c..e0bbfe69 100644
--- a/inherit_graph_3.map
+++ b/inherit_graph_3.map
@@ -1,3 +1,3 @@
diff --git a/inherit_graph_3.md5 b/inherit_graph_3.md5
index 10268c76..bf94f1d8 100644
--- a/inherit_graph_3.md5
+++ b/inherit_graph_3.md5
@@ -1 +1 @@
-b5050b8584a2ba52ebd0115e006fd5ed
\ No newline at end of file
+183864c163b41658e344371613cba3db
\ No newline at end of file
diff --git a/inherit_graph_3.svg b/inherit_graph_3.svg
index 8e13b7b0..b3dc2285 100644
--- a/inherit_graph_3.svg
+++ b/inherit_graph_3.svg
@@ -4,16 +4,16 @@
-
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/namespaces.html b/namespaces.html
index e0fe793c..113694c0 100644
--- a/namespaces.html
+++ b/namespaces.html
@@ -87,23 +87,23 @@
▼NGempyre | |||||||||||||||||||||||
NColor | RGB handling | ||||||||||||||||||||||
CEventQueue | |||||||||||||||||||||||
CIdList | |||||||||||||||||||||||
CEventMap | |||||||||||||||||||||||
▼CElement | Represents all HTML elements on UI | ||||||||||||||||||||||
CRect | Rect | ||||||||||||||||||||||
CEvent | Event received | ||||||||||||||||||||||
CUi | The application UI | ||||||||||||||||||||||
CCanvasElement | Graphics element | ||||||||||||||||||||||
CBitmap | Bitmap for Gempyre Graphics | ||||||||||||||||||||||
CFrameComposer |
CElement | Represents all HTML elements on UI | CEvent | Event received | CUi | The application UI | CBitmap | Bitmap for Gempyre Graphics | CDialog | Dialogs for file access | CCanvasElement | Graphics element | CFrameComposer | CDialog | Dialogs for file access | CRect | Rect | ▼NGempyreUtils | CLogWriter | Parent class for LogWriters | |
This is the complete list of members for Gempyre::Element::Rect, including all inherited members.
+This is the complete list of members for Gempyre::Rect, including all inherited members.
height | Gempyre::Element::Rect | |
width | Gempyre::Element::Rect | |
x | Gempyre::Element::Rect | |
y | Gempyre::Element::Rect | |
height | Gempyre::Rect | |
width | Gempyre::Rect | |
x | Gempyre::Rect | |
y | Gempyre::Rect |
#include <gempyre.h>
#include <gempyre_types.h>
Public Attributes | |
-int | x |
rectangle x coordinate. | |
-int | y |
rectangle y coordinate. | |
-int | width |
rectangle width. | |
-int | height |
rectangle height. | |
+int | x |
rectangle x coordinate. | |
+int | y |
rectangle y coordinate. | |
+int | width |
rectangle width. | |
+int | height |
rectangle height. | |
Rect.
+Rect.