{"size": 3928, "ext": "scrbl", "max_stars_repo_path": "gui-doc/scribblings/gui/widget-gallery.scrbl", "max_stars_repo_name": "jjsimpso/gui", "max_stars_repo_stars_event_min_datetime": "2015-03-17T22:11:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T15:09:34.000Z", "max_issues_repo_path": "gui-doc/scribblings/gui/widget-gallery.scrbl", "max_issues_repo_name": "jjsimpso/gui", "max_issues_repo_issues_event_min_datetime": "2015-01-09T15:53:25.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:21:29.000Z", "max_forks_repo_path": "gui-doc/scribblings/gui/widget-gallery.scrbl", "max_forks_repo_name": "jjsimpso/gui", "max_forks_repo_forks_event_min_datetime": "2015-01-08T13:03:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T21:49:09.000Z"}
{"max_stars_count": 65, "max_issues_count": 231, "max_forks_count": 89, "avg_line_length": 27.661971831, "max_line_length": 76, "alphanum_fraction": 0.4635947047}
#lang scribble/doc
@(require "common.rkt"
          "widget-gallery.rkt")

@title[#:style '(toc quiet)]{Widget Gallery}

@; Note: Instructions for taking widget screenshots are avaiable at:
@;   collects/meta/images/taking-screenshots/instructions

This section shows the main widgets available in the Racket Graphical User
Interface Toolkit. Each image is a link to the documentation of the relevant
widget.

@(showcase-widget button%
(define button (new button%
                    (parent panel)
                    (label "Button")))
)

@(showcase-widget check-box%
(define check-box (new check-box%
                       (parent panel)
                       (label "Check Box")
                       (value #t)))
)

@(showcase-widget choice%
(define choice (new choice%
                    (label "Choice")
                    (parent panel)
                    (choices (list "Item 0"))))
)

@(showcase-widget combo-field%
(define combo-field (new combo-field%
                         (label "Combo")
                         (parent panel)
                         (choices (list "Field"))
                         (init-value "Field")))
)

@(showcase-widget editor-canvas%
(define editor-canvas (new editor-canvas%
                           (parent panel)
                           (label "Editor Canvas")))
(define text (new text%))
(send text insert "Editor Canvas")
(send editor-canvas set-editor text)
)


@(showcase-widget gauge%
(define gauge (new gauge%
                   (label "Gauge")
                   (parent panel)
                   (range 100)))
(send gauge set-value 42)
)

@(showcase-widget group-box-panel%
(define group-box-panel (new group-box-panel%
                             (parent panel)
                             (label "Group Box Panel")))
)

@(showcase-widget list-box%
(define list-box (new list-box%
                      (label "List Box")
                      (parent (new horizontal-panel%
                                   (parent panel)
                                   (style (list 'border))))
                      (choices (list "Item 0"
                                     "Item 1"
                                     "Item 2"))
                      (style (list 'single
                                   'column-headers))
                      (columns (list "First Column"))))
)

@(showcase-widget menu-bar%
(define menu-bar (new menu-bar%
                      (parent frame)))
(new menu%
     (label "&File")
     (parent menu-bar))
(new menu%
     (label "&Edit")
     (parent menu-bar))
(new menu%
     (label "&Help")
     (parent menu-bar))
)

@(showcase-widget message%
(define message (new message%
                     (parent panel)
                     (label "Message")))
)

@(showcase-widget panel%
(define a-panel (new panel%
                     (parent panel)
                     (style (list 'border))))
(new message%
     (parent a-panel)
     (label "Panel"))
)


@(showcase-widget radio-box%
(define radio-box (new radio-box%
                       (label "Radio Box")
                       (parent panel)
                       (choices (list "Button 0"
                                      "Button 1"
                                      "Button 2"))))
)

@(showcase-widget slider%
(define slider (new slider%
                    (label "Slider")
                    (parent panel)
                    (min-value 0)
                    (max-value 100)
                    (init-value 42)))
)

@(showcase-widget tab-panel%
(define tab-panel (new tab-panel%
                       (parent panel)
                       (choices (list "Tab 0"
                                      "Tab 1"
                                      "Tab 2"))))
)

@(showcase-widget text-field%
(define text-field (new text-field%
                        (label "Text")
                        (parent panel)
                        (init-value "Field")))
)
