-
-
Notifications
You must be signed in to change notification settings - Fork 18
Minor documentation touch-up #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9097579
a4fd979
3a3924a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,8 @@ | |
| @title{@tt{gui-easy}: Declarative GUIs} | ||
| @author[(author+email "Bogdan Popa" "[email protected]")] | ||
|
|
||
| This library provides a declarative API on top of | ||
| @racketmodname[racket/gui]. | ||
| The goal of GUI Easy is to simplify user interface construction in Racket | ||
| by wrapping the existing imperative API (@racketmodname[racket/gui]) in a functional shell. | ||
|
|
||
| @(define-runtime-path youtubestub.tex "youtubestub.tex") | ||
| @(define embed-style | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,16 @@ | |
|
|
||
| @title{Quickstart} | ||
|
|
||
| gui-easy can be broadly split up into two parts: observables and views. | ||
|
|
||
| Observables contain values and notify subscribed observers of changes to | ||
| their contents and Views are representations of Racket GUI widget trees | ||
| that, when rendered, produce concrete instances of those trees and handle | ||
| the details of wiring state and widgets together. | ||
|
|
||
| The core abstractions of observables and views correspond to a model-view-controller | ||
| (MVC) architecture for graphical applications as popularized by Smalltalk-80. | ||
|
|
||
| @section{Hello, World!} | ||
|
|
||
| @centered[@image[(build-path media "1.1-hello-world.png") #:scale 0.5]] | ||
|
|
@@ -154,5 +164,11 @@ individual counter by passing in a derived observable to its | |
|
|
||
| @(define repo-link | ||
| (link "https://github.com/Bogdanp/racket-gui-easy" "Git repository")) | ||
| @(define easygui-publications-funarch23 | ||
|
||
| (link "https://arxiv.org/abs/2308.16024" """D. B. Knoble and B. Popa, ‘Functional Shell and | ||
| Reusable Components for Easy GUIs’""")) | ||
|
|
||
|
|
||
| For more examples, see the "examples" directory in the @|repo-link|. | ||
| For more information about the core concepts of gui-easy and its design, | ||
| see @|easygui-publications-funarch23|. For more examples, see the "examples" | ||
| directory in the @|repo-link|. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,17 @@ | |
| racket/gui/easy/operator | ||
| (prefix-in gui: racket/gui))) | ||
|
|
||
| ; Example links cited within this section | ||
| @(define example-link-tabs | ||
| (link "https://github.com/Bogdanp/racket-gui-easy/blob/master/examples/tabs.rkt" | ||
| @filepath{examples/tabs.rkt})) | ||
| @(define example-link-list | ||
| (link "https://github.com/Bogdanp/racket-gui-easy/blob/master/examples/list.rkt" | ||
| @filepath{examples/list.rkt})) | ||
|
|
||
|
|
||
|
|
||
|
|
||
| @title{Reference} | ||
| @defmodule[racket/gui/easy] | ||
|
|
||
|
|
@@ -64,6 +75,19 @@ | |
|
|
||
| @section{Views} | ||
|
|
||
| @deftech{View}s are functions that return a @racket[view<%>] instance. | ||
|
|
||
| Views might wrap a specific GUI widget, like a text message or button, or | ||
| they might construct a tree of smaller views, forming a larger component. | ||
|
|
||
| Views are typically @tech{Observable}-aware in ways that make sense for ach individual view. | ||
aanastasiou marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| For instance the text view takes as input an observable string and the rendered text label updates | ||
| with changes to that observable. | ||
|
|
||
| Many @racketmodname[racket/gui] widgets are already wrapped by GUI Easy, but programmers can | ||
| implement the @racket[view<%>] interface themselves in order to integrate arbitrary widgets, such as | ||
| those from 3rd-party packages in the Racket ecosystem, into their projects. | ||
|
|
||
| @subsection[#:tag "windows&dialogs"]{Windows & Dialogs} | ||
|
|
||
| @defproc[(window [#:title title (maybe-obs/c string?) "Untitled"] | ||
|
|
@@ -285,7 +309,7 @@ | |
| selection changes to an adjacent tab). When tabs are reordered, the | ||
| choices provided to the action represent the new tab order. | ||
|
|
||
| See @filepath{examples/tabs.rkt} for an example. | ||
| See @|example-link-tabs| for an example. | ||
|
|
||
| @history[ | ||
| #:changed "0.3" @elem{Added the @racket[#:choice=?] argument.} | ||
|
|
@@ -354,7 +378,7 @@ | |
| procedure must return a unique value for each entry in the list, as | ||
| compared using @racket[equal?]. | ||
|
|
||
| See @filepath{examples/list.rkt} for an example. | ||
| See @|example-link-list| for an example. | ||
| } | ||
|
|
||
| @defproc[(observable-view [data (obs/c any/c)] | ||
|
|
@@ -818,7 +842,7 @@ | |
|
|
||
| @section{Observables} | ||
|
|
||
| @deftech{Observables} are containers for values that may change over | ||
| @deftech{Observable}s are containers for values that may change over | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed this this morning, but |
||
| time. Their changes may be observed by arbitrary functions. | ||
|
|
||
| @; Require the private module to avoid requiring racket/gui/base. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.