Simple windowed application: Difference between revisions
m
syntax highlighting fixup automation
m (→{{header|J}}) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 11:
=={{header|AArch64 Assembly}}==
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
<syntaxhighlight lang="aarch64 assembly">
/* ARM assembly AARCH64 Raspberry PI 3B */
/* program simpleWin64.s link with X11 library */
Line 457:
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
</syntaxhighlight>
=={{header|Ada}}==
Line 466:
Apart from GtkAda, there exist numerous other GUI bindings and libraries:
CLAW, AdaGLUT, GWindow, JEWL, win32ada, QtAda etc.
<
with Gtk.Button; use Gtk.Button;
with Gtk.Label; use Gtk.Label;
Line 532:
Gtk.Main.Main;
end Simple_Windowed_Application;</
=={{header|APL}}==
{{works with|Dyalog APL}}
<
⍝ define a form with a label and a button
Line 553:
}
∇</
{{works with|GNU APL}}
[my-application.apl]
<
⍝ Some GTK API consts for readability
Line 582:
⍝ Launch GUI application
get_NAME_and_POSITION
</syntaxhighlight>
[my-application.css]
<
.BUTTON { color: #F00; background: #4F4; }
/* the OK button */
#OK-button { color: #A22; background: #FFF; }
</syntaxhighlight>
[my-application.glade]
<
<!-- Generated with glade 3.22.1 -->
<interface>
Line 680:
</object>
</interface>
</syntaxhighlight>
=={{header|AppleScript}}==
<syntaxhighlight lang="applescript">
set counter to 0
Line 699:
if theAnswer is "Quit" then exit repeat
end repeat
</syntaxhighlight>
===Description===
Line 706:
=={{header|AutoHotkey}}==
<
Gui, Add, Text, vTextCtl, There have been no clicks yet ; add a Text-Control
Gui, Add, Button, gButtonClick xm, click me ; add a Button-Control
Line 719:
GuiClose: ; the subroutine executed when the Window is closed
ExitApp ; exit this process
Return</
=={{header|AutoIt}}==
<syntaxhighlight lang="autoit">
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
Line 747:
EndSwitch
WEnd
</syntaxhighlight>
=={{header|B4J}}==
<
#Region Project Attributes
#MainFormWidth: 593
Line 783:
Return falseVal
End If
End Sub</
Layout1.fxml (as B4J uses JavaFX's Scene Builder)
<
<?xml version="1.0" encoding="UTF-8"?>
Line 814:
</children>
</AnchorPane>
</syntaxhighlight>
=={{header|BaCon}}==
Requires BaCon version 4.0.1 or higher, using GTK3.
<
PRAGMA GUI gtk3
Line 835:
CALL GUISET(gui, "label", "label", "Button clicks: " & STR$(clicked))
ENDSELECT
WEND</
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
<
INSTALL @lib$+"WINLIB5"
Line 856:
clicks% += 1
SYS "SetDlgItemText", !window%, 100, "Number of clicks = " + STR$(clicks%)
ENDPROC</
=={{header|Beads}}==
<
var g : record // global tracked mutable state
Line 901:
// update our click count
inc g.nclicks
g.label = to_str(g.nclicks)</
=={{header|C}}==
{{libheader|GTK}}
<
#include <gtk/gtk.h>
Line 944:
gtk_main();
return 0;
}</
=={{header|C sharp|C#}}==
<
class RosettaForm : Form
Line 977:
}
}
</syntaxhighlight>
=={{header|C++}}==
Line 983:
{{libheader|Qt}} 4.4 with source files as shown , built from a Makefile generated by the Qt tool qmake
===clickcounter.h===
<
#define CLICKCOUNTER_H
Line 1,003:
void countClicks( ) ;
} ;
#endif</
===clickcounter.cpp===
<
#include <QLabel>
#include <QVBoxLayout>
Line 1,024:
number++ ;
countLabel->setText( QString( "The button has been clicked %1 times!").arg( number ) ) ;
}</
===main.cpp===
<
#include "clickcounter.h"
Line 1,034:
counter.show( ) ;
return app.exec( ) ;
}</
=={{header|Clojure}}==
<
(:import (javax.swing JFrame JLabel JButton)))
Line 1,061:
(.setDefaultCloseOperation JFrame/EXIT_ON_CLOSE)
(.setVisible true))))
</syntaxhighlight>
=={{header|Common Lisp}}==
Line 1,069:
{{works with|McCLIM}}
<
(:use #:clim #:clim-lisp))
(in-package #:rcswa)</
This version uses CLIM's command system:
<
((clicks :initform 0
:accessor clicks-of))
Line 1,093:
(define-simple-windowed-application-command (com-click-me :menu t)
()
(incf (clicks-of *application-frame*)))</
This version uses an explicit pushbutton gadget, and may be used if more direct control over the UI layout and behavior is needed:
<
((clicks :initform 0
:accessor clicks-of))
Line 1,123:
(vertically (:equalize-width nil :align-x :center)
the-label
(spacing (:thickness 10) the-button)))))</
In either case, the window is opened with:
<
=={{header|D}}==
Line 1,133:
{{works with|D|1}}
{{libheader|DFL}}
<
import dfl.all ;
import std.string ;
Line 1,163:
void main() {
Application.run(new MainForm);
}</
===Hybrid===
Line 1,185:
}
SimpleWindow.d:
<
import tango.text.convert.Integer;
import tango.core.Thread; // For Thread.yield
Line 1,220:
Thread.yield();
}
}</
=={{header|Delphi}}==
Line 1,230:
'''NOTE:''' The project name here must match the name of the file.
<
Program SingleWinApp ;
Line 1,316:
Application.Run ;
end. // Program</
=={{header|E}}==
{{libheader|Swing}}
{{works with|E-on-Java}}
<
var clicks := 0
def w := <swing:makeJFrame>("Rosetta Code 'Simple Windowed Application'")
Line 1,336:
w.pack()
w.show()
}</
=={{header|EchoLisp}}==
UI elements are HTML DOM Nodes. '''ui-add''' adds an element to the UI. '''ui-on-event''' adds a (Lisp) event handler to an element.
<
(define (ui-add-button text) ;; helper
(define b (ui-create-element "button" '((type "button"))))
Line 1,363:
(panel)
</syntaxhighlight>
=={{header|Elena}}==
ELENA 5.0:
<
import extensions;
Line 1,407:
lblClicks.Caption := "Clicks: " + clicksCount.toString();
}
}</
=={{header|Euphoria}}==
===EuWinGUI===
{{libheader|EuWinGUI}}
<
Window("EuWinGUI - Simple windowed application",100,100,360,100)
Line 1,430:
end while
CloseApp(0)</
=={{header|F_Sharp|F#}}==
{{trans|C#}}
<
let mutable clickCount = 0
Line 1,449:
form.Controls.Add(button)
Application.Run(form)</
=={{header|Factor}}==
<
sequences ui ui.gadgets ui.gadgets.borders ui.gadgets.buttons
ui.gadgets.grids ui.gadgets.labels ui.gadgets.worlds ;
Line 1,478:
: main ( -- ) 1 n set build-ui ;
MAIN: main</
=={{header|Fantom}}==
<
using fwt
using gfx
Line 1,512:
}
}
</syntaxhighlight>
=={{header|Forth}}==
Line 1,518:
{{works with|bigFORTH}}
{{libheader|MINOS}}
<
text-label ptr click-label
Variable click# click# off
Line 1,528:
click-label assign ]S X" Click me" button new
&2 vabox new panel s" Clicks" assign show endwith ;
click-win</
===The same with Theseus===
{{works with|bigFORTH}}
{{libheader|Theseus}}
<
\ automatic generated code
\ do not edit
Line 1,568:
$1 0 ?DO stop LOOP bye ;
script? [IF] main [THEN]
previous previous previous</
Line 1,576:
Creates a GUI with 'wish' from tk library. Uses pipes on standard input and output (created throw linux system calls).
<
0 value tk-out
variable #clicks
Line 1,610:
s" rm tk-in tk-out" system ;
initiating counting cleaning</
===with iMops===
{{works with|iMops|2.23}}
Macintosh only - Uses native MacOS GUI calls to Cocoa.
<
:class TextView' super{ TextView }
:m put: ( addr len -- )
Line 1,646:
0 ; \ the number of clicks start at zero
go</
=={{header|FreeBASIC}}==
<syntaxhighlight lang="freebasic">
#Include "windows.bi"
Line 1,684:
End
</syntaxhighlight>
=={{header|FutureBasic}}==
<
begin enum 1
Line 1,722:
on dialog fn DoDialog
HandleEvents</
=={{header|Gambas}}==
<
hLabel As Label 'We need a Label
Line 1,761:
hLabel.text = "The button has been clicked " & iCount & " times" 'Display the amount of clicks"
End</
=={{header|Gastona}}==
<
<frames> main, Simple click counter
Line 1,783:
-->, lClicks data!,, //@<NN> clicks so far
</syntaxhighlight>
=={{header|Go}}==
{{libheader|go-gtk}}
<
import (
Line 1,819:
window.ShowAll()
gtk.Main()
}</
=={{header|Groovy}}==
<
count = 0
Line 1,832:
}
}
}</
'''with binding:'''
<
import groovy.beans.Bindable
Line 1,850:
}
}
}</
=={{header|Haskell}}==
{{libheader|Gtk}} from [http://hackage.haskell.org/packages/hackage.html HackageDB]
<
import Data.IORef
Line 1,883:
widgetShowAll window
mainGUI</
=={{header|HicEst}}==
<
DO count = 1, 1E100 ! "forever"
Line 1,893:
ENDDO
END</
==Icon and {{header|Unicon}}==
This version is Unicon-specific:
<
$include "guih.icn"
Line 1,928:
initially
self.Dialog.initially()
end</
=={{header|IDL}}==
<
widget_control, ev.top, get_uvalue=tst
tst[1] = tst[1]+1
Line 1,944:
xmanager, "Simple", Id
end</
=={{header|J}}==
'''J 9.x''' (note: the J 8.x version works fine under J 9.x)<
simple_clicks=: 0 NB. initialize accumulator
wd {{)n
Line 1,957:
simple_run''
simple_click_button=: {{wd 'set message text Button-use count: ',": simple_clicks=: 1+simple_clicks}}</
'''J 8.x'''
<
pc simpleApp;
cc inc button;cn "Click me";
Line 1,978:
simpleApp_cancel=: simpleApp_close
simpleApp_run''</
'''J 6.x'''
<
pc simpleApp;
xywh 131 11 44 12;cc inc button;cn "Click me";
Line 2,002:
simpleApp_cancel=: simpleApp_close
simpleApp_run''</
=={{header|Java}}==
{{libheader|AWT}}
{{libheader|Swing}}
<
import java.awt.Dimension;
import java.awt.event.ActionEvent;
Line 2,044:
);
}
}</
=={{header|JavaFX Script}}==
{{libheader|JavaFX 1.2}}
<
import javafx.scene.*;
import javafx.scene.layout.*;
Line 2,072:
}
}
}</
=={{header|JavaScript}}==
<syntaxhighlight lang="javascript">
<html>
<head>
Line 2,105:
</html>
</syntaxhighlight>
[http://melellington.com/simplewindow/javascript-simple-window.html Javascript Output]
Line 2,113:
=={{header|Julia}}==
Uses the Gtk library.
<
function clickwindow()
Line 2,134:
clickwindow()
</syntaxhighlight>
=={{header|Kotlin}}==
{{trans|Java}}
<
import java.awt.BorderLayout
Line 2,175:
fun main(args: Array<String>) {
Clicks() // call the constructor where all the magic happens
}</
{{libheader|TornadoFX}}
<
import tornadofx.*
Line 2,192:
fun main(args: Array<String>) = launch<ClicksApp>(args)
</syntaxhighlight>
=={{header|Lambdatalk}}==
Line 2,198:
The code is tested in this page: http://epsilonwiki.free.fr/lambdaway/?view=popup
<syntaxhighlight lang="scheme">
1) the label: {div {@ id="label"} There have been no clicks yet }
2) the button: {input {@ type="button" value="click me" onclick="CLICKAPP.inc()" }}
Line 2,212:
return {inc:inc}
})();
</syntaxhighlight>
=={{header|Liberty BASIC}}==
<
button #demo.btn, "Click Me", [btnClick], UL, 20, 50
statictext #demo.num, "There have been no clicks yet.", 20, 100, 240, 30
Line 2,230:
nClicks = nClicks + 1
#demo.num "The button has been clicked ";nClicks;" times."
wait</
=={{header|Lingo}}==
The standard approach in Lingo for creating GUIs and assigning scripts for handling user interaction is to use the graphical IDE/GUI-Builder "Director". But windows and sprites (visual elements) can also be created and scripted programmatically only:
<
-- window settings
Line 2,280:
_movie.stage.visible = 1
end</
Line 2,291:
is in the object's message path so the button works well.
<
on openCard
put empty into count
Line 2,299:
add 1 to count
put count into field "clicks"
end mouseUp</
[http://melellington.com/simplewindow/livecode-simple-window.jpg LiveCode Output]
Line 2,311:
{{works with|MSWlogo}}
<
windowCreate "root "clickWin [Click that button!!!] 0 0 100 100 []
Make "i 0
Line 2,319:
ifelse :i=1 [staticUpdate "clickSt (list "clicked :i "time)] ~
[staticUpdate "clickSt (list "clicked :i "times)]]
end</
The window is opened with:
<syntaxhighlight lang
=={{header|Lua}}==
<
l = iup.label{title="There have been no clicks yet."}
b = iup.button{title="Click me!"}
Line 2,338:
if (not iup.MainLoopLevel or iup.MainLoopLevel()==0) then
iup.MainLoop()
end</
=={{header|M2000 Interpreter}}==
Line 2,348:
<syntaxhighlight lang="m2000 interpreter">
Module CheckIt {
Declare Form1 Form
Line 2,367:
}
Checkit
</syntaxhighlight>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<
CreateDialog[{Dynamic@
TextCell@If[n == 0, "There have been no clicks yet", n],
Button["click me", n++]}]]</
=={{header|MAXScript}}==
<
(
label l "There have been no clicks yet"
Line 2,388:
)
)
createDialog buttonClick</
=={{header|Modula-3}}==
Line 2,394:
This code uses <tt>Trestle</tt>, a windowing toolkit developed for Modula-3.
<
IMPORT Fmt, TextVBT, ButtonVBT, VBT, Axis, HVSplit, TrestleComm, Trestle;
Line 2,413:
Trestle.Install(main);
Trestle.AwaitDelete(main);
END Click.</
To compile the above code, you need to create a file called <tt>m3makefile</tt> which contains:
Line 2,424:
=={{header|Nanoquery}}==
<
// define the necessary objects
Line 2,458:
// show the window
$w.show()</
=={{header|Nim}}==
{{libheader|GTK2}}
<
nim_init()
Line 2,484:
discard button.signal_connect("clicked", SignalFunc clickedMe, label)
win.showAll()
main()</
=={{header|Objective-C}}==
{{works with|GNUstep}}
<
#include <AppKit/AppKit.h>
Line 2,500:
- (BOOL)applicationShouldTerminateAfterLastWindowClosed: (NSNotification *)notification;
- (void)advanceCounter: (id)sender;
@end</
<
-(instancetype) init
{
Line 2,572:
}
return 0;
}</
=={{header|OCaml}}==
* with '''Labltk''', the '''Tk''' OCaml binding:
<
#load "labltk.cma"
Line 2,591:
Tk.pack [Tk.coe label; Tk.coe b];
Tk.mainLoop ();
;;</
* with '''LablGTK2''', the '''GTK2''' OCaml binding:
<
let window = GWindow.window ~border_width:2 ()
Line 2,606:
button#connect#clicked ~callback:window#destroy;
window#show ();
Main.main ()</
=={{header|ooRexx}}==
<
* 18.06.2014 Walter Pachl shortened from Rony Flatscher's bsf4oorexx (see sourceforge) samples
* Look there for ShowCount.rxj
Line 2,693:
Otherwise how_often=userData~i 'times'
End
userData~label~setText("Button was pressed" how_often) -- display text</
=={{header|Oz}}==
<
import
Application
Line 2,714:
{Window show}
end
</syntaxhighlight>
=={{header|Pascal}}==
Line 2,722:
{{libheader|Gtk2}}
Ported from the C example.
<
uses
Line 2,768:
Gtk_widget_show_all(Gtk_WIDGET(win));
Gtk_main();
end.</
=={{header|Perl}}==
==={{libheader|Perl/Tk}}===
<
$main = MainWindow->new;
Line 2,781:
-command => sub { $l->configure(-text => 'Number of clicks: '.(++$count).'.'); },
)->pack;
MainLoop();</
==={{libheader|GTK}} {{works with|Perl/Gtk}}===
<
# Window.
Line 2,810:
# Main loop.
Gtk->main;</
=={{header|Phix}}==
Line 2,817:
{{libheader|Phix/online}}
You can run this online [http://phix.x10.mx/p2js/simplewindow.htm here].
<!--<
<span style="color: #000080;font-style:italic;">-- demo\rosetta\Simple_window.exw</span>
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
Line 2,842:
<span style="color: #7060A8;">IupClose</span><span style="color: #0000FF;">()</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<!--</
The above is cross platform, win/lnx, 32/64 bit, and runs in a browser.
An older win32-only version can be found [[Simple_windowed_application/Arwen|here]].
Line 2,849:
The standard PicoLisp GUI is HTTP based. Connect your browser to
http://localhost:8080 after starting the following script.
<
(load "@ext.l" "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")
Line 2,867:
(server 8080 "!start")
(wait)</
=={{header|Pike}}==
{{libheader|Gtk2}}
<
int clicks;
Line 2,892:
return -1;
}
</syntaxhighlight>
=={{header|PowerShell}}==
===Windows Forms===
{{works with|PowerShell|3}}
<syntaxhighlight lang="powershell">
$Label1 = [System.Windows.Forms.Label]@{
Text = 'There have been no clicks yet'
Line 2,918:
$Result = $Form1.ShowDialog()
</syntaxhighlight>
{{works with|PowerShell|2}}
<syntaxhighlight lang="powershell">
Add-Type -AssemblyName System.Windows.Forms
Line 2,944:
$Result = $Form1.ShowDialog()
</syntaxhighlight>
===WPF===
<syntaxhighlight lang="powershell">
[xml]$Xaml = @"
<Window
Line 2,985:
$Result = $Window1.ShowDialog()
</syntaxhighlight>
=={{header|Processing}}==
<
//Aamrun, 11th July 2022
Line 3,034:
</syntaxhighlight>
=={{header|Prolog}}==
Works with SWI-Prolog and XPCE.
<
dialog('Simple windowed application',
Line 3,080:
send(D, open).
</syntaxhighlight>
=={{header|PureBasic}}==
<
Define window_0_Text_0, window_0_Button_1
Define clicks, txt$, flags
Line 3,109:
EndSelect
ForEver
EndIf</
=={{header|Python}}==
Line 3,115:
==={{libheader|Tkinter}}===
{{works with|Python|3.7}}
<
import tkinter as tk
Line 3,141:
if __name__ == '__main__':
main()
</syntaxhighlight>
The same in OO manner:
<
class ClickCounter(tk.Frame):
Line 3,165:
if __name__ == "__main__":
ClickCounter().mainloop()
</syntaxhighlight>
==={{libheader|PyQt}}===
<
from itertools import count
Line 3,204:
if __name__ == '__main__':
main()
</syntaxhighlight>
==={{libheader|wxPython}}===
<
Line 3,242:
frame.Show()
app.MainLoop()
</syntaxhighlight>
=={{header|R}}==
Line 3,250:
gWidgetsRGtk2 or gWidgetsrJava can be used as an alternative to gWidgetstcltk.
<
library(gWidgetstcltk)
win <- gwindow()
Line 3,259:
svalue(lab) <- ifelse(is.na(val) ,"1", as.character(val + 1))
}
)</
=={{header|Racket}}==
<
#lang racket/gui
Line 3,275:
(new button% [parent frame] [label "Click me"] [callback cb])
(send frame show #t)
</syntaxhighlight>
=={{header|Raku}}==
(formerly Perl 6)
{{libheader|GTK}}
<syntaxhighlight lang="raku"
use GTK::Simple::App;
Line 3,301:
}
$app.run;</
=={{header|RapidQ}}==
RapidQ has form designer that produces RapidQ Basic source code. You can get the same result by writing the code yourself with a text editor. Then compile it either from within IDE or by using the command line compiler.
<
CREATE form AS QForm
Line 3,331:
END SUB
form.ShowModal</
=={{header|REBOL}}==
<
Title: "Simple Windowed Application"
URL: http://rosettacode.org/wiki/Simple_Windowed_Application
Line 3,360:
set-face label reform ["clicks:" clicks]
]
]</
=={{header|Red}}==
<
clicks: 0
Line 3,373:
t/data: rejoin ["clicks: " clicks]
]
]</
=={{header|Ring}}==
<
Load "guilib.ring"
Line 3,398:
num += 1
lineedit1.settext( "you clicked me " + num + " times")
</syntaxhighlight>
Output:
Line 3,405:
=={{header|Ruby}}==
{{libheader|Ruby/Tk}}
<
str = TkVariable.new("no clicks yet")
count = 0
Line 3,415:
pack
end
Tk.mainloop</
{{libheader|Shoes}}
<
stack do
@count = 0
Line 3,427:
end
end
end</
=={{header|Run BASIC}}==
<
[loop] cls ' clear screen
print msg$
Line 3,439:
clicks = clicks + 1
msg$ = "Button has been clicked ";clicks;" times"
goto [loop]</
=={{header|Rust}}==
{{libheader|iced}}
<
button, Button, Column, Element, Length,
Text, Sandbox, Settings, Space,
Line 3,496:
settings.window.size = (600, 400);
Simple::run(settings).unwrap();
}</
=={{header|Scala}}==
{{libheader|Scala}}
<
import scala.swing.event.ButtonClicked
Line 3,521:
}
}
}</
=={{header|Scratch}}==
<syntaxhighlight lang="scratch">
when flag clicked # when program is run
set counter to "0" # initialize counter object to zero
Line 3,534:
hide message # hide the initial message
change counter by 1 # increment the counter object
</syntaxhighlight>
'''Comments and Description:'''<br>
Line 3,546:
=={{header|Sidef}}==
<
# Window.
Line 3,572:
# Main loop.
%s<Gtk2>.main</
=={{header|Smalltalk}}==
{{works with|Smalltalk/X}}
<
clickCount := 0.
Line 3,591:
].
top open</
=={{header|Standard ML}}==
Works with PolyML
<
open Motif ;
Line 3,622:
end;
</syntaxhighlight>
call
countWindow () ;
Line 3,629:
=={{header|Tcl}}==
{{libheader|Tk}}
<
pack [label .l -text "There have been no clicks yet"]
set count 0
Line 3,635:
proc upd {} {
.l configure -text "Number of clicks: [incr ::count]"
}</
=={{header|TI-89 BASIC}}==
Line 3,641:
The Ti-89 does not have general onscreen buttons; this program uses the OK/Cancel choice of a dialog box to implement the UI.
<
Local clicks
0 → clicks
Line 3,652:
clicks + 1 → clicks
EndWhile
EndPrgm</
=={{header|Unicon}}==
<
import gui
$include "guih.icn"
Line 3,688:
d.show_modal()
end
</syntaxhighlight>
=={{header|Vedit macro language}}==
<
#1 = 0
repeat (ALL) {
Line 3,703:
Reg_Set(10, "Clicked", INSERT)
Reg_Set(10, " times", APPEND)
}</
=={{header|Visual Basic}}==
In VB, windows are usually created in the IDE. The generated code is hidden from the user unless viewed outside of VB. For the sake of this task, I have included that code, but normally it is hidden from the programmer.
<
Begin VB.Form Form2
Caption = "There have been no clicks yet"
Line 3,740:
Me.Caption = clicked & " clicks."
End Sub
</syntaxhighlight>
=={{header|Web 68}}==
<
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licence as published by
Line 3,843:
The predefined form was created by the <b>fdesign</b> program for the Xforms library,
and the resulting form definition file was converted to Web 68 by the program
<b>fdtow68</b>.</
=={{header|Wren}}==
{{libheader|DOME}}
<
import "input" for Mouse
import "dome" for Window
Line 3,890:
}
var Game = SimpleWindowedApplication.new(600, 600)</
=={{header|XPL0}}==
<
def Ww=40, Wh=12, Wx=(80-Ww)/2, Wy=(25-Wh)/2; \window width, etc.
def Bw=11, Bh=4, Bx=Wx+(Ww-Bw)/2, By=Wy+3*(Wh-Bh)/4; \button size & position
Line 3,922:
until ChkKey; \keystroke terminates program
SetVid(3); \turn off mouse and turn on flashing cursor
]</
=={{header|Yorick}}==
Yorick does not include a GUI toolkit. However, it does provide a plotting system that can emulate some basic GUI features, such as buttons and labels. The above sample uses a built-in library "button.i", which is itself written in Yorick.
<
window, 0;
Line 3,948:
winkill, 0;
}
} while(!finished);</
{{omit from|ACL2}}
|