commit c8035078f20289edefb0ffca1a4767ac4d3700f9
parent 142e64b1abee978636e2291032f16e4dec10a29f
Author: Morel Bérenger <berengermorel76@gmail.com>
Date:   Fri, 27 Nov 2020 20:03:17 +0100
uml: replaced example with a more complete one
Diffstat:
2 files changed, 60 insertions(+), 13 deletions(-)
diff --git a/example/uml.dt b/example/uml.dt
@@ -1,13 +0,0 @@
-private
-class animal
-var int num_paw 4
-var bool have_tail
-virtual bool attack animal meh
-class dog
-class cat
-fun void climb coord:c
-inherit dog animal
-inherit cat animal
-associate cat dog fight
-class muzzle
-aggreg dog muzzle wear
diff --git a/uml.example b/uml.example
@@ -0,0 +1,60 @@
+splines polyline
+class_font Source Code Pro
+package_font Source Code Pro
+link_font Source Code Pro
+
+package comp_tree
+
+	class component
+		var string id
+		# context help: mouse hover, description, etc
+		compose component content helper
+		# widget's human-readable name
+		compose component content label
+		# this allows to "lock" widgets to avoid conflicting
+		# changes
+		associate component focus controller
+
+	class group
+		inherit group component
+		compose group component children
+		associate group group parent
+
+	class set_widget
+		inherit set_widget component
+		compose set_widget content allowed 1:n
+		# value[0] is the real current, value[1] is the current
+		# candidate. This allows for cancelation.
+		associate set_widget content value 2
+
+	class range_widget
+		fun content transform bool:forward content&:src_val
+		inherit range_widget component
+		compose range_widget content range 2
+		# value[0] is the real current, value[1] is the current
+		# candidate. This allows for cancelation.
+		compose range_widget content value 2
+
+	class edit_widget
+		var size_t byte_size
+		inherit edit_widget component
+		# value[0] is the real current, value[1] is the current
+		# candidate. This allows for cancelation.
+		compose edit_widget content value 2
+
+	class content
+		var string mime_type
+		var blob data
+
+	class focus
+
+endpackage
+
+package coco
+	class Parser
+	class Scanner
+	associate Parser Scanner
+endpackage coco
+
+associate Parser focus
+associate focus component target