From 2345853554620e8d05cf8228dce053f116261871 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Aug 2018 09:25:39 +0700 Subject: [PATCH] version bump --- README.md | 22 ++++++++++++++++++++-- uibuilder.nimble | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3aa3ee1..bbdf21e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,25 @@ $ nimble install uibuilder UIBuilder contains a library for load glade file and construct UI on-the-fly, another part - `uibuilder` binary - which generates a Nim module from glade file. -#### Load Glade file +#### Construct UI at compile-time +This method is prefered: +- Glade file compiled into AST at compile-time +- No more glade files in your distribution package +- Output module wont depends on UIBuilder +- Binary size reduced 50% + + +```nim +import ui, ospaths, uibuilderpkg/codegen + +const path = joinPath(staticExec("pwd"), "test.glade") + +init() +build(path) +mainLoop() +``` + +#### Load Glade on run-ime file ```nim import ui, uibuilder @@ -56,5 +74,5 @@ You can defined ajustment for `Slider` and `SpinBox` with `GtkAdjustment` ### Todos - [ ] Better event handling -- [ ] Code generator for static layout +- [x] Code generator for static layout - [ ] Support QT Designer layout file diff --git a/uibuilder.nimble b/uibuilder.nimble index 645559c..f1ae99e 100644 --- a/uibuilder.nimble +++ b/uibuilder.nimble @@ -1,6 +1,6 @@ # Package -version = "0.1.1" +version = "0.2.0" author = "Huy Doan" description = "UI building with Gnome\'s Glade" license = "MIT" @@ -10,4 +10,4 @@ bin = @["uibuilder"] requires "nim >= 0.18.1" requires "ui >= 0.9.2" -requires "https://github.com/ba0f3/xml.nim >= 0.1.1" +requires "https://github.com/ba0f3/xml.nim@#devel"