summaryrefslogtreecommitdiff
path: root/src/votann/tab_widget.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/votann/tab_widget.clj')
-rw-r--r--src/votann/tab_widget.clj23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/votann/tab_widget.clj b/src/votann/tab_widget.clj
new file mode 100644
index 0000000..ab6a8ae
--- /dev/null
+++ b/src/votann/tab_widget.clj
@@ -0,0 +1,23 @@
+(ns votann.tab_widget
+ (:require [votann.list-widget :refer [list-view-widget]]
+ [votann.util :refer [get-models unit-file-name]]
+ [votann.unit-widget :refer [unit-view-widget]]
+ [votann.enhancements-widget :refer [enhancements-view-widget]]
+ [cljfx.api :as fx]))
+
+(defn tab-widget [data]
+ (vec (apply merge
+ (vec (apply merge
+ [{:fx/type :tab
+ :text "List"
+ :closable false
+ :content (list-view-widget data)}]
+ (vec (for [unit get-models]
+ {:fx/type :tab
+ :text unit
+ :closable false
+ :content (unit-view-widget (unit-file-name unit))}))))
+ [{:fx/type :tab
+ :text "Enhancements"
+ :closable false
+ :content enhancements-view-widget}])))