On Fri, Feb 24, 2023 at 12:13 AM Andy Maleh via ruby-talk < ruby-talk@ml.ruby-lang.org> wrote:
Andy Nutter-Upham, I just realized I didn't answer this exact question by
you in full details (I read the original message on the phone while being
quite busy with something a couple of weeks ago, and I somehow missed some
of intricacies of your question):
"If I missed the documentation and someone knows where it is, I'd love to
read it. I think though that since this is a wrapper library there is
instead reference to the underlying documentation (whose method names are a
bit different, and whose arguments are a bit different) and I find that
translation very challenging; especially since glimmer-dsl-libui is not yet
complete, so your run into ineffective keywords if you rely on the
underlying glimmer docs."
Glimmer DSL for LibUI actually does have full documentation for the Ruby
API:
GitHub - AndyObtiva/glimmer-dsl-libui: Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library - The Quickest Way From Zero To GUI - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works)
Someone asked me to add the documentation early on when the project was
new, and I added it to that person's satisfaction. I hope it's helpful to
you too.
By the way, I also do mention under the "Original API" section that you
could use the LibUI Go documentation as a reference:
ui package - github.com/andlabs/ui - Go Packages
But, the most complete reference is the actual C headers:
libui/ui.h at master · andlabs/libui · GitHub
And, the C headers are exposed as low-level FFI functions in Ruby as per
the Original API (but it's not recommended that you use these method
directly of course):
GitHub - AndyObtiva/glimmer-dsl-libui: Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library - The Quickest Way From Zero To GUI - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works)
To give you an example of how the mapping from the C API to Ruby happens,
suppose we have this C function:
uiWindowSetTitle('My Application')
The word before the "Set" or "Get" operation is the control object (e.g.
window), and the word after it is the attribute (e.g. title).
So, the equivalent of that in the Glimmer GUI DSL:
window {
title 'My Application'
}
Basically, we are declaring a window control with one nested attribute of
title having the value 'My Application'
The C API is procedural and imperative whereas the Glimmer GUI DSL is
object-oriented and declarative, better mapping to the way we think of
concepts visually while looking at a screen given that you could nest
controls (widgets) within each other.
If you need further help, do not hesitate to ask further questions at the
Glimmer Gitter chat:
https://app.gitter.im/#/room/\#AndyObtiva\_glimmer:gitter\.im
You shouldn't really get bogged down unless you are missing foundational
grounding in software engineering concepts relating to desktop development
in general, like MVC (Model View Controller). I've done GUI development
professionally in older technologies like Java Swing in the past, and by
comparison, Glimmer lets me leapfrog past productivity by 4x at least,
sometimes 10x or even more (and it's that much faster in productivity than
web development too, so it's great for building quick local apps or tools
that don't need the web as it's much simpler, demanding a tiny fraction of
web code only). But, it does assume you know MVC (Model View Controller)
very well, and it benefits from also knowing MVP (Model View Presenter).
Once you get the main ideas behind Glimmer, everything clicks, and things
like exact APIs or detailed documentation wouldn't matter much anymore
because the way you think with MVC/MVP is you start with the View layer
from a GUI mockup to support a specific user workflow, and you either use
native controls (like text and button, by looking them up in examples or
the docs mentioned above) or you invent your own custom controls (both
options are available in Glimmer DSL for LibUI). Of course, the native
controls are only as complete as what is implemented by the underlying
LibUI library. I know the authors of it are working on adding many new
features, like a Tree control, Table sorting listeners, and some other
missing features. They will all be added to Glimmer DSL for LibUI in due
time when they get released in C LibUI. But, that shouldn't stop someone
from learning the library and using whatever is available in it for now, or
at least mastering the current features until more features are added in
the future (especially given that you could always temporarily polyfill
missing features by building your own custom controls if really needed).
Cheers,
Andy Maleh
On Tue, Feb 14, 2023 at 9:27 PM grigoris charam <xargrigoris@gmail.com> > wrote:
Stop reply all
On Feb 15, 2023, at 03:05, Andy Maleh via ruby-talk < >> ruby-talk@ml.ruby-lang.org> wrote:
The Glimmer Gitter Chat:
https://app.gitter.im/#/room/\#AndyObtiva\_glimmer:gitter\.im
If you create any Glimmer related projects, libraries, or tools, you
could alert of us of them in the Gitter Chat.
And, you can open issues or pull requests on any of the Glimmer projects
if needed:
<glimmer.png>
AndyObtiva/glimmer: DSL Framework consisting of a DSL Engine and a
Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development
GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for
LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL
for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK
(Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML),
and Glimmer DSL for CSS <https://github.com/AndyObtiva/glimmer>
github.com <https://github.com/AndyObtiva/glimmer>
<https://github.com/AndyObtiva/glimmer>
Andy Maleh
LinkedIn: https://www.linkedin.com/in/andymaleh
<https://www.linkedin.com/in/andymaleh>
Blog: https://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub
Twitter: https://www.twitter.com/AndyObtiva
On Feb 14, 2023, at 7:51 PM, Fellipe Fingoli via ruby-talk < >> ruby-talk@ml.ruby-lang.org> wrote:
really good content! I want to help to develop this ecosystem. Does
anybody know where I can reach the community?
Em ter., 7 de fev. de 2023 às 18:29, Andy Maleh via ruby-talk < >> ruby-talk@ml.ruby-lang.org> escreveu:
My RubyConf 2022 talk video on "Building Native GUI Apps in Ruby" using
the Fukuoka Award Winning Glimmer DSL for LibUI has just been released!
RubyConf 2022: Building Native GUI Apps in Ruby by Andy Maleh - YouTube
Andy Maleh
LinkedIn: https://www.linkedin.com/in/andymaleh
<https://www.linkedin.com/in/andymaleh>
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub
Twitter: @AndyObtiva <https://twitter.com/AndyObtiva>
______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info --
Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org
--
Fellipe Fingoli
______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info --
Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org
______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info --
Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org
--
Andy Maleh
LinkedIn: https://www.linkedin.com/in/andymaleh
<https://www.linkedin.com/in/andymaleh>
Blog: http://andymaleh.blogspot.com
GitHub: AndyObtiva (Andy Maleh) · GitHub
Twitter: @AndyObtiva <https://twitter.com/AndyObtiva>
______________________________________________
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org
To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org
ruby-talk info --
Info | ruby-talk@ml.ruby-lang.org - ml.ruby-lang.org