├── Android ├── .idea │ ├── .name │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── eugen.xml │ ├── scopes │ │ └── scope_settings.xml │ ├── encodings.xml │ ├── vcs.xml │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── misc.xml │ ├── compiler.xml │ ├── gradle.xml │ └── modules.xml ├── counter │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── sevenguis │ │ │ │ └── counter │ │ │ │ └── MainActivity.java │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── crud-kt │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── name_dialog.xml │ │ │ ├── kotlin │ │ │ │ ├── StateFragment.kt │ │ │ │ ├── ListenerExtensions.kt │ │ │ │ └── FilterableList.kt │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── crud-ng │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── name_dialog.xml │ │ │ ├── java │ │ │ │ └── sevenguis │ │ │ │ │ └── crudng │ │ │ │ │ └── StateFragment.java │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── crud │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── name_dialog.xml │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── timer │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ └── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── flightbooker │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── temperature │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_main.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── sevenguis │ │ │ │ └── temperature │ │ │ │ └── MainActivity.java │ │ └── androidTest │ │ │ └── java │ │ │ └── sevenguis │ │ │ └── counter │ │ │ └── ApplicationTest.java │ ├── build.gradle │ └── proguard-rules.pro ├── .gitignore ├── settings.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── build.gradle ├── app │ └── app.iml ├── Android.iml ├── gradle.properties └── gradlew.bat ├── Elm ├── README.md ├── counter.elm ├── counter3.elm ├── counter2.elm ├── timer.elm ├── util.elm └── flight.elm ├── ClojureScript-Om ├── resources │ └── public │ │ ├── css │ │ └── style.css │ │ └── index.html ├── .gitignore ├── dev_src │ └── counter │ │ └── dev.cljs ├── README.md └── src │ └── counter.cljs ├── Qt5 ├── crud │ ├── source │ │ ├── Item.h │ │ ├── main.cpp │ │ ├── CMakeLists.txt │ │ └── MainWin.h │ ├── README.md │ └── CMakeLists.txt ├── OnlyQML │ ├── README.md │ └── Counter │ │ └── counter.qml ├── circledrawer │ ├── README.md │ ├── source │ │ ├── undo │ │ │ ├── undoableedit.h │ │ │ ├── undomanager.h │ │ │ └── undomanager.cpp │ │ ├── main.cpp │ │ ├── CMakeLists.txt │ │ ├── circle.h │ │ ├── mainwindow.h │ │ ├── circle.cpp │ │ ├── dialog.h │ │ ├── mainwindow.cpp │ │ ├── dialog.cpp │ │ └── renderarea.h │ └── CMakeLists.txt └── OnlyCPP │ ├── counter │ ├── CMakeLists.txt │ └── counter.cpp │ └── README.md ├── C#-WinForms ├── timer │ └── README.md ├── counter │ ├── README.md │ └── counter.cs ├── flightbooker │ └── README.md └── temperature │ ├── README.md │ └── temperature.cs ├── FreePascal ├── README.md ├── timer │ ├── timer.ico │ ├── timer.res │ ├── README.md │ ├── timer.lpr │ ├── unit1.lfm │ ├── unit1.pas │ ├── timer.lpi │ └── timer.lps ├── counter │ ├── counter.ico │ ├── counter.res │ ├── README.md │ ├── counter.lpr │ ├── unit1.lfm │ ├── unit1.pas │ ├── counter.lps │ └── counter.lpi ├── temperature │ ├── temperature.ico │ ├── temperature.res │ ├── temperature.lpr │ ├── README.md │ ├── unit1.lfm │ ├── unit1.pas │ ├── temperature.lps │ └── temperature.lpi └── .gitignore ├── Java8-JavaFX ├── .idea │ ├── ant.xml │ ├── gradle.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── eugen.xml │ ├── scopes │ │ └── scope_settings.xml │ ├── encodings.xml │ ├── vcs.xml │ ├── description.html │ ├── inspectionProfiles │ │ ├── profiles_settings.xml │ │ └── Project_Default.xml │ ├── modules.xml │ ├── libraries │ │ └── reactfx_1_1_3.xml │ ├── codeStyleSettings.xml │ ├── artifacts │ │ └── JavaFXApp.xml │ ├── misc.xml │ └── compiler.xml ├── lib │ ├── easybind-1.0.1.jar │ └── reactfx-1.1.3.jar ├── src │ └── sevenguis │ │ ├── circledrawer │ │ ├── undo │ │ │ ├── UndoableEdit.java │ │ │ └── UndoManager.java │ │ ├── Circle.java │ │ └── CircleDrawer.java │ │ ├── cells │ │ └── Cells.java │ │ ├── cells2 │ │ ├── Cells.java │ │ └── Model.java │ │ ├── flightbooker │ │ ├── Util.java │ │ ├── FlightBooker.java │ │ └── FlightBookerCallback.java │ │ ├── temperature │ │ ├── Util.java │ │ ├── TemperatureConverterReactFX.java │ │ ├── TemperatureConverterCallback.java │ │ ├── TemperatureConverter.java │ │ └── TemperatureConverterReactFX2.java │ │ ├── counter │ │ ├── Counter.java │ │ └── CounterReactFX.java │ │ └── timer │ │ ├── Timer.java │ │ └── TimerReactFX.java └── Java8-JavaFX.iml ├── Red ├── counter.red ├── temperature.red ├── timer-2.red ├── readme.md ├── timer.red ├── launcher.red ├── crud-mini.red ├── crud.red ├── flight-booking.red ├── flight-booking-3.red └── flight-booking-2.red ├── Scala-ScalaFX ├── project │ ├── plugins.sbt │ └── .idea │ │ └── modules │ │ └── project.iml ├── src │ └── main │ │ └── scala │ │ └── sevenguis │ │ ├── counter │ │ ├── Counter.scala │ │ └── CounterReactFX.scala │ │ ├── RxIntegration.scala │ │ ├── temperature │ │ ├── TemperatureRx.scala │ │ ├── Temperature.scala │ │ └── TemperatureReactFX.scala │ │ ├── timer │ │ ├── TimerRx.scala │ │ ├── Timer.scala │ │ └── TimerReactFX.scala │ │ └── flightbooker │ │ ├── FlightBookerRx.scala │ │ ├── FlightBookerReactFX.scala │ │ └── FlightBooker.scala ├── build.sbt ├── README.md └── pom.xml ├── Clojure-Seesaw ├── .gitignore ├── doc │ └── intro.md ├── test │ └── ClojureGUIs │ │ └── core_test.clj ├── src │ └── sevenguis │ │ ├── core.clj │ │ ├── counter.clj │ │ ├── temperature.clj │ │ └── timer.clj ├── project.clj ├── .project └── .classpath ├── README.md ├── Java7-Swing ├── .classpath ├── .project └── src │ └── sevenguis │ ├── cells │ ├── Model.java │ └── Cell.java │ ├── circledrawer │ ├── Circle.java │ └── CircleDrawer.java │ └── counter │ └── Counter.java ├── .gitignore └── Scheme-FrTime └── timer.rkt /Android/.idea/.name: -------------------------------------------------------------------------------- 1 | 7GUIs -------------------------------------------------------------------------------- /Android/counter/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/crud-kt/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/crud-ng/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/crud/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/timer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/flightbooker/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Android/temperature/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Elm/README.md: -------------------------------------------------------------------------------- 1 | Run `elm-server` in this folder. -------------------------------------------------------------------------------- /ClojureScript-Om/resources/public/css/style.css: -------------------------------------------------------------------------------- 1 | /* some style */ 2 | 3 | -------------------------------------------------------------------------------- /Qt5/crud/source/Item.h: -------------------------------------------------------------------------------- 1 | #ifndef ITEM_H 2 | #define ITEM_H 3 | 4 | #endif // ITEM_H 5 | -------------------------------------------------------------------------------- /C#-WinForms/timer/README.md: -------------------------------------------------------------------------------- 1 | To compile under Windows run: 2 | csc.exe /target:winexe timer.cs -------------------------------------------------------------------------------- /C#-WinForms/counter/README.md: -------------------------------------------------------------------------------- 1 | To compile under Windows run: 2 | csc.exe /target:winexe counter.cs -------------------------------------------------------------------------------- /FreePascal/README.md: -------------------------------------------------------------------------------- 1 | Implementation of 7guis https://github.com/eugenkiss/7guis in freepascal. 2 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/ant.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /C#-WinForms/flightbooker/README.md: -------------------------------------------------------------------------------- 1 | To compile under Windows run: 2 | csc.exe /target:winexe flightbooker.cs -------------------------------------------------------------------------------- /C#-WinForms/temperature/README.md: -------------------------------------------------------------------------------- 1 | To compile under Windows run: 2 | csc.exe /target:winexe temperature.cs -------------------------------------------------------------------------------- /FreePascal/timer/timer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/timer/timer.ico -------------------------------------------------------------------------------- /FreePascal/timer/timer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/timer/timer.res -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /FreePascal/counter/counter.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/counter/counter.ico -------------------------------------------------------------------------------- /FreePascal/counter/counter.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/counter/counter.res -------------------------------------------------------------------------------- /Red/counter.red: -------------------------------------------------------------------------------- 1 | Red [author: "Gregg Irwin"] 2 | 3 | view [txt: text data 0 button "Count" [txt/data: txt/data + 1]] -------------------------------------------------------------------------------- /Android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /Java8-JavaFX/lib/easybind-1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/Java8-JavaFX/lib/easybind-1.0.1.jar -------------------------------------------------------------------------------- /Java8-JavaFX/lib/reactfx-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/Java8-JavaFX/lib/reactfx-1.1.3.jar -------------------------------------------------------------------------------- /Android/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Android/.idea/dictionaries/eugen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /FreePascal/temperature/temperature.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/temperature/temperature.ico -------------------------------------------------------------------------------- /FreePascal/temperature/temperature.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggirwin/7guis/HEAD/FreePascal/temperature/temperature.res -------------------------------------------------------------------------------- /Android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':counter', ':temperature', ':flightbooker', ':timer', ':crud', ':crud-ng', ':crud-kt' 2 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/dictionaries/eugen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Qt5/OnlyQML/README.md: -------------------------------------------------------------------------------- 1 | To run the examples, use qmlscene (in the Qt distribution). 2 | 3 | Ex: 4 | 5 | $ qmlscene counter.qml 6 | -------------------------------------------------------------------------------- /Scala-ScalaFX/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | logLevel := Level.Warn 2 | 3 | //addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.2.0") -------------------------------------------------------------------------------- /Clojure-Seesaw/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /classes 3 | /checkouts 4 | pom.xml 5 | pom.xml.asc 6 | *.jar 7 | *.class 8 | /.lein-* 9 | /.nrepl-port 10 | -------------------------------------------------------------------------------- /Clojure-Seesaw/doc/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction to ClojureGUIs 2 | 3 | TODO: write [great documentation](http://jacobian.org/writing/great-documentation/what-to-write/) 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 7GUIs 2 | ===== 3 | 4 | See the [7GUIs Wiki](https://github.com/eugenkiss/7guis/wiki) for more information. 5 | 6 | Each implementation has its own README with further information. -------------------------------------------------------------------------------- /Android/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Qt5/crud/README.md: -------------------------------------------------------------------------------- 1 | Recent CMake and Qt are required to build. 2 | 3 | In Qt Creator (in case you have one installed) open the top-level CMakeLists.txt as an existing project. 4 | -------------------------------------------------------------------------------- /Android/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Qt5/circledrawer/README.md: -------------------------------------------------------------------------------- 1 | Recent CMake and Qt are required to build. 2 | 3 | In Qt Creator (in case you have one installed) open the top-level CMakeLists.txt as an existing project. 4 | -------------------------------------------------------------------------------- /FreePascal/timer/README.md: -------------------------------------------------------------------------------- 1 | The relevant file to read is unit1.pas . The rest of the files are generated by Lazarus/CodeTyphon visual editor. 2 | 3 | To test it in Lazarus/CodeTyphon you have to open timer.lpi 4 | 5 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/description.html: -------------------------------------------------------------------------------- 1 | Simple JavaFX 2.0 application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided. 2 | -------------------------------------------------------------------------------- /ClojureScript-Om/.gitignore: -------------------------------------------------------------------------------- 1 | /resources/public/js/compiled/** 2 | figwheel_server.log 3 | pom.xml 4 | *jar 5 | /lib/ 6 | /classes/ 7 | /out/ 8 | /target/ 9 | .lein-deps-sum 10 | .lein-repl-history 11 | .lein-plugins/ 12 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/circledrawer/undo/UndoableEdit.java: -------------------------------------------------------------------------------- 1 | package sevenguis.circledrawer.undo; 2 | 3 | abstract public class UndoableEdit { 4 | 5 | abstract public void undo(); 6 | abstract public void redo(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /Clojure-Seesaw/test/ClojureGUIs/core_test.clj: -------------------------------------------------------------------------------- 1 | (ns ClojureGUIs.core-test 2 | (:require [clojure.test :refer :all] 3 | [ClojureGUIs.core :refer :all])) 4 | 5 | (deftest a-test 6 | (testing "FIXME, I fail." 7 | (is (= 0 1)))) 8 | -------------------------------------------------------------------------------- /ClojureScript-Om/dev_src/counter/dev.cljs: -------------------------------------------------------------------------------- 1 | (ns counter.dev 2 | (:require 3 | [counter] 4 | [figwheel.client :as fw])) 5 | 6 | (fw/start { 7 | :on-jsload (fn [] 8 | ;; (stop-and-start-my app) 9 | )}) 10 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/undo/undoableedit.h: -------------------------------------------------------------------------------- 1 | #ifndef UNDOABLEEDIT_H 2 | #define UNDOABLEEDIT_H 3 | 4 | class UndoableEdit 5 | { 6 | public: 7 | virtual void undo() = 0; 8 | virtual void redo() = 0; 9 | }; 10 | 11 | #endif // UNDOABLEEDIT_H 12 | -------------------------------------------------------------------------------- /Android/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Android/counter/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/crud-ng/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/crud/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/timer/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/flightbooker/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Android/temperature/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /FreePascal/.gitignore: -------------------------------------------------------------------------------- 1 | #ignore backup files 2 | backup/ 3 | 4 | #ignore files generated by the compiler 5 | lib/ 6 | *.compiled 7 | *.o 8 | *.or 9 | *.ppu 10 | 11 | #ignore debug information files 12 | *.dbg 13 | 14 | #exclude executable output in windows 15 | *.exe 16 | -------------------------------------------------------------------------------- /Android/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /Android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip 7 | -------------------------------------------------------------------------------- /Qt5/crud/source/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "MainWin.h" 5 | int main(int argc, char* argv[]) 6 | { 7 | QApplication app(argc, argv); 8 | MainWin mainWin; 9 | mainWin.show(); 10 | return app.exec(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /Clojure-Seesaw/src/sevenguis/core.clj: -------------------------------------------------------------------------------- 1 | (ns sevenguis.core) 2 | (use 'clojure.repl) 3 | (use 'seesaw.core) 4 | (use 'seesaw.dev) 5 | 6 | (def main-frame (frame)) 7 | 8 | (defn display [content] 9 | (config! main-frame :content content) 10 | (pack! main-frame) 11 | (show! main-frame) 12 | content) 13 | -------------------------------------------------------------------------------- /FreePascal/counter/README.md: -------------------------------------------------------------------------------- 1 | The relevant file to read is in unit1.pas . The rest of the files are generated by lazarus/codetyphon visual editor. 2 | The typed code in the editor is: 3 | 4 | inc(Counter); 5 | Edit1.Caption:=inttostr(Counter); 6 | 7 | To test it in Lazarus/CodeTyphon you have to open counter.lpi 8 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "mainwindow.h" 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | QApplication a(argc, argv); 9 | 10 | auto window = new MainWindow; 11 | 12 | window->show(); 13 | 14 | return a.exec(); 15 | } 16 | -------------------------------------------------------------------------------- /Java7-Swing/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Qt5/OnlyCPP/counter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | project(Counter) 3 | 4 | find_package(Qt5 REQUIRED COMPONENTS Core Widgets) 5 | 6 | add_executable(Counter ${CMAKE_CURRENT_SOURCE_DIR}/counter.cpp) 7 | set_property(TARGET Counter PROPERTY CXX_STANDARD 11) 8 | 9 | target_link_libraries(Counter Qt5::Core Qt5::Widgets) 10 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/kotlin/StateFragment.kt: -------------------------------------------------------------------------------- 1 | package sevenguis.crudkt 2 | 3 | import android.app.Fragment 4 | import android.os.Bundle 5 | 6 | public open class StateFragment : Fragment() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setRetainInstance(true) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Qt5/OnlyCPP/README.md: -------------------------------------------------------------------------------- 1 | To build, a recent CMake and Qt are required. Please refer to the 2 | instructions of both for your platform. 3 | 4 | On an ArchLinux system, it would be as straightforward as : 5 | 6 | $ sudo pacman -S cmake qt5 7 | $ mkdir build 8 | $ cd build 9 | $ cmake ../counter 10 | $ make 11 | $ ./Counter 12 | 13 | 14 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/libraries/reactfx_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Qt5/crud/source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE UI_FILES *.ui) 2 | file(GLOB_RECURSE CODE_FILES *.cpp) 3 | 4 | set(CMAKE_AUTOUIC ON) 5 | 6 | add_executable(${CMAKE_PROJECT_NAME} WIN32 7 | ${UI_HEADERS} 8 | ${CODE_FILES} 9 | ${RESOURCE_FILES} 10 | ${WINDOWS_RES_FILE} 11 | ) 12 | 13 | target_link_libraries(${CMAKE_PROJECT_NAME} 14 | Qt5::Widgets 15 | ) 16 | -------------------------------------------------------------------------------- /Android/crud-ng/src/main/java/sevenguis/crudng/StateFragment.java: -------------------------------------------------------------------------------- 1 | package sevenguis.crudng; 2 | 3 | import android.app.Fragment; 4 | import android.os.Bundle; 5 | 6 | public class StateFragment extends Fragment { 7 | @Override public void onCreate(Bundle savedInstanceState) { 8 | super.onCreate(savedInstanceState); 9 | setRetainInstance(true); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE UI_FILES *.ui) 2 | file(GLOB_RECURSE CODE_FILES *.cpp) 3 | 4 | qt5_wrap_ui(UI_HEADERS ${UI_FILES}) 5 | 6 | add_executable(${CMAKE_PROJECT_NAME} WIN32 7 | ${UI_HEADERS} 8 | ${CODE_FILES} 9 | ${RESOURCE_FILES} 10 | ${WINDOWS_RES_FILE} 11 | ) 12 | 13 | target_link_libraries(${CMAKE_PROJECT_NAME} 14 | Qt5::Widgets 15 | ) 16 | -------------------------------------------------------------------------------- /ClojureScript-Om/resources/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |

Figwheel template

9 |

Checkout your developer console.

10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Android/crud/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Android/timer/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/circle.h: -------------------------------------------------------------------------------- 1 | #ifndef CIRCLE_H 2 | #define CIRCLE_H 3 | 4 | class Circle 5 | { 6 | private: 7 | int x, y, diameter; 8 | 9 | public: 10 | Circle(int x, int y); 11 | ~Circle(); 12 | 13 | int getX(); 14 | void setX(int x); 15 | int getY(); 16 | void setY(int y); 17 | int getDiameter(); 18 | void setDiameter(int diameter); 19 | }; 20 | 21 | #endif // CIRCLE_H 22 | -------------------------------------------------------------------------------- /Android/counter/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Android/crud-ng/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Android/flightbooker/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Android/temperature/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Elm/counter.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Input (..) 2 | import Window 3 | import Util (..) 4 | 5 | clicks = input 0 6 | 7 | display count = 8 | let l = label 20 (show count) 9 | b = button clicks.handle (count + 1) "Count" 10 | in hbox 5 [l, b] 11 | 12 | --main = frame "Counter" <~ Window.dimensions 13 | -- ~ (display <~ clicks.signal) 14 | 15 | main = lift (frame2 "Counter" . display) clicks.signal -------------------------------------------------------------------------------- /ClojureScript-Om/README.md: -------------------------------------------------------------------------------- 1 | 7GUIs in ClojureScript Om 2 | ========================= 3 | 4 | This is an implementation of 7GUIs in ClojureScript with Om, a ClojureScript 5 | interface to Facebook's React library. 6 | 7 | To run this example, first install Leiningen, then in the ClojureScript-Om directory run: 8 | 9 | ```lein figwheel``` 10 | 11 | Now go to http://localhost:3449/ to run the example. 12 | 13 | Currently, only the counter is implemented. -------------------------------------------------------------------------------- /Android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Java7-Swing/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Java7-Swing 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Android/crud/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Android/timer/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Qt5/circledrawer/source/undo/undomanager.h: -------------------------------------------------------------------------------- 1 | #ifndef UNDOMANAGER_H 2 | #define UNDOMANAGER_H 3 | 4 | #include 5 | 6 | #include "undoableedit.h" 7 | 8 | class UndoManager 9 | { 10 | private: 11 | QStack *history; 12 | int cursor; 13 | 14 | public: 15 | UndoManager(); 16 | ~UndoManager(); 17 | 18 | void addEdit(UndoableEdit *edit); 19 | void undo(); 20 | void redo(); 21 | }; 22 | 23 | #endif // UNDOMANAGER_H 24 | -------------------------------------------------------------------------------- /Android/counter/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Android/crud-kt/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Android/crud-ng/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Android/temperature/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /Android/flightbooker/src/androidTest/java/sevenguis/counter/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /FreePascal/timer/timer.lpr: -------------------------------------------------------------------------------- 1 | program timer; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms, Unit1 11 | { you can add units after this }; 12 | 13 | {$R *.res} 14 | 15 | begin 16 | RequireDerivedFormResource := True; 17 | Application.Initialize; 18 | Application.CreateForm(TForm1, Form1); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /FreePascal/counter/counter.lpr: -------------------------------------------------------------------------------- 1 | program counter; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms, Unit1 11 | { you can add units after this }; 12 | 13 | {$R *.res} 14 | 15 | begin 16 | RequireDerivedFormResource := True; 17 | Application.Initialize; 18 | Application.CreateForm(TForm1, Form1); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /Elm/counter3.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Input (..) 2 | import Window 3 | import Util (..) 4 | 5 | -- Impure 6 | --clicks = input 0 7 | 8 | display phantom = 9 | let clicks = input 0 10 | c = count clicks.signal 11 | l = label 20 . show <~ c 12 | b = lift (\c -> button clicks.handle c "Count") c 13 | in hbox 5 <~ combine [l, b] 14 | 15 | --main = frame2 "Counter" . display <~ count clicks.signal 16 | main = frame2 "Counter" . hbox 5 <~ combine [display (), display ()] -------------------------------------------------------------------------------- /FreePascal/temperature/temperature.lpr: -------------------------------------------------------------------------------- 1 | program temperature; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms, Unit1 11 | { you can add units after this }; 12 | 13 | {$R *.res} 14 | 15 | begin 16 | RequireDerivedFormResource := True; 17 | Application.Initialize; 18 | Application.CreateForm(TForm1, Form1); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/codeStyleSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Red/temperature.red: -------------------------------------------------------------------------------- 1 | Red [author: "Gregg Irwin"] 2 | 3 | c-to-f: func [t][t * (9.0 / 5.0) + 32.0] 4 | f-to-c: func [t][t - 32.0 * (5.0 / 9.0)] 5 | t-change: function [in-face out-face fn][ 6 | out-face/text: either number? t: load in-face/text [form round/to fn t .01][""] 7 | ] 8 | view [ 9 | ; Use key-up because on-change doesn't detect event cycles 10 | tc: field on-key-up [t-change tc tf :c-to-f] text "Celsius =" 11 | tf: field on-key-up [t-change tf tc :f-to-c] text "Farenheight" 12 | ] 13 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | #include "renderarea.h" 7 | 8 | class MainWindow : public QMainWindow 9 | { 10 | Q_OBJECT 11 | 12 | private: 13 | QPushButton *undo; 14 | QPushButton *redo; 15 | RenderArea *renderArea; 16 | 17 | public: 18 | explicit MainWindow(QWidget *parent = 0); 19 | ~MainWindow(); 20 | 21 | signals: 22 | 23 | public slots: 24 | }; 25 | 26 | #endif // MAINWINDOW_H 27 | -------------------------------------------------------------------------------- /Elm/counter2.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Input (..) 2 | import Window 3 | import Util (..) 4 | 5 | -- Impure 6 | clicks = input () 7 | 8 | display count = 9 | let l = label 20 (show count) 10 | b = button clicks.handle () "Count" 11 | in hbox 5 [l, b] 12 | 13 | --main = frame "Counter" <~ Window.dimensions 14 | -- ~ (display <~ (count clicks.signal)) 15 | 16 | --main = lift (frame2 "Counter" . display) (count clicks.signal) 17 | 18 | main = frame2 "Counter" . display <~ count clicks.signal -------------------------------------------------------------------------------- /Android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:0.12.2' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Qt5/crud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.11) 2 | 3 | if (NOT CMAKE_BUILD_TYPE) 4 | set(CMAKE_BUILD_TYPE Release CACHE STRING 5 | "None Debug Release RelWithDebInfo MinSizeRel" 6 | FORCE) 7 | endif() 8 | 9 | project(crud) 10 | set(PROJECT_LONGNAME "CRUD") 11 | 12 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 13 | set(CMAKE_AUTOMOC ON) 14 | 15 | find_package(Qt5Widgets REQUIRED) 16 | 17 | if (NOT MSVC) 18 | set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++11) 19 | endif() 20 | 21 | add_subdirectory(source) 22 | -------------------------------------------------------------------------------- /Qt5/circledrawer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.11) 2 | 3 | if (NOT CMAKE_BUILD_TYPE) 4 | set(CMAKE_BUILD_TYPE Release CACHE STRING 5 | "None Debug Release RelWithDebInfo MinSizeRel" 6 | FORCE) 7 | endif() 8 | 9 | project(circledrawer) 10 | set(PROJECT_LONGNAME "Circle Drawer") 11 | 12 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 13 | set(CMAKE_AUTOMOC ON) 14 | 15 | find_package(Qt5Widgets REQUIRED) 16 | 17 | if (NOT MSVC) 18 | set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++11) 19 | endif() 20 | 21 | add_subdirectory(source) 22 | -------------------------------------------------------------------------------- /Clojure-Seesaw/project.clj: -------------------------------------------------------------------------------- 1 | (defproject Clojure-Seesaw "0.1.0-SNAPSHOT" 2 | :description "FIXME: write description" 3 | :url "http://example.com/FIXME" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :repl-options { :init (do 7 | (use 'clojure.repl) 8 | (use 'seesaw.dev))} 9 | :dependencies [[org.clojure/clojure "1.5.1"] 10 | [seesaw "1.4.4"] 11 | [instaparse "1.3.1"] 12 | ]) 13 | -------------------------------------------------------------------------------- /Clojure-Seesaw/src/sevenguis/counter.clj: -------------------------------------------------------------------------------- 1 | (ns sevenguis.counter 2 | (:use [seesaw core] 3 | sevenguis.core)) 4 | 5 | (defn counter-panel [] 6 | (let [counter (text :text "0" :columns 5 :editable? false) 7 | count (button :text "Count")] 8 | (listen count :action (fn [_] 9 | (text! counter (inc (read-string (value counter)))))) 10 | (flow-panel :items [counter count]))) 11 | 12 | (defn -main [& args] 13 | (invoke-later 14 | (-> (frame :title "Counter" :content (counter-panel) :on-close :exit) 15 | pack! 16 | show!))) -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/artifacts/JavaFXApp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/out/artifacts/JavaFXApp 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Java8-JavaFX/Java8-JavaFX.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/cells/Cells.java: -------------------------------------------------------------------------------- 1 | package sevenguis.cells; 2 | 3 | import javafx.application.Application; 4 | import javafx.scene.Scene; 5 | import javafx.stage.Stage; 6 | 7 | public class Cells extends Application { 8 | 9 | public void start(Stage stage) { 10 | stage.setScene(new Scene(new SpreadSheet(100, 26))); 11 | stage.setTitle("Cells"); 12 | stage.setWidth(400); 13 | stage.setHeight(400); 14 | stage.show(); 15 | } 16 | 17 | public static void main(String[] args) { 18 | launch(args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/cells2/Cells.java: -------------------------------------------------------------------------------- 1 | package sevenguis.cells2; 2 | 3 | import javafx.application.Application; 4 | import javafx.scene.Scene; 5 | import javafx.stage.Stage; 6 | 7 | public class Cells extends Application { 8 | 9 | public void start(Stage stage) { 10 | stage.setScene(new Scene(new SpreadSheet(100, 26))); 11 | stage.setTitle("Cells"); 12 | stage.setWidth(400); 13 | stage.setHeight(400); 14 | stage.show(); 15 | } 16 | 17 | public static void main(String[] args) { 18 | launch(args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Java7-Swing/src/sevenguis/cells/Model.java: -------------------------------------------------------------------------------- 1 | package sevenguis.cells; 2 | 3 | import javax.swing.table.DefaultTableModel; 4 | 5 | class Model extends DefaultTableModel { 6 | private Cell[][] cells; 7 | 8 | Model(int height, int width) { 9 | super(height, width); 10 | cells = new Cell[height][width]; 11 | for (int i = 0; i < height; i++) { 12 | for (int j = 0; j < width; j++) { 13 | cells[i][j] = new Cell(this); 14 | } 15 | } 16 | } 17 | 18 | public Cell[][] getCells() { 19 | return cells; 20 | } 21 | } -------------------------------------------------------------------------------- /FreePascal/counter/unit1.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 802 3 | Height = 54 4 | Top = 186 5 | Width = 223 6 | Caption = 'Counter' 7 | ClientHeight = 54 8 | ClientWidth = 223 9 | OnCreate = FormCreate 10 | LCLVersion = '1.3' 11 | object Edit1: TEdit 12 | Left = 16 13 | Height = 24 14 | Top = 16 15 | Width = 80 16 | TabOrder = 0 17 | Text = '0' 18 | end 19 | object Button1: TButton 20 | Left = 128 21 | Height = 25 22 | Top = 17 23 | Width = 75 24 | Caption = 'Count' 25 | OnClick = Button1Click 26 | TabOrder = 1 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /ClojureScript-Om/src/counter.cljs: -------------------------------------------------------------------------------- 1 | (ns ^:figwheel-always counter 2 | (:require[om.core :as om :include-macros true] 3 | [om.dom :as dom :include-macros true])) 4 | 5 | (defonce app-state (atom 0)) 6 | 7 | (defn increment-counter [] 8 | (swap! app-state inc)) 9 | 10 | (defn counter-view [counter owner] 11 | (reify 12 | om/IRender 13 | (render [this] 14 | (dom/div nil 15 | (dom/input #js {:value counter}) 16 | (dom/button #js {:onClick #(increment-counter)} "Count"))))) 17 | 18 | (om/root counter-view app-state 19 | {:target (. js/document (getElementById "app"))}) 20 | 21 | 22 | -------------------------------------------------------------------------------- /Red/timer-2.red: -------------------------------------------------------------------------------- 1 | Red [author: "Gregg Irwin"] 2 | 3 | data: [max 0:0:30 dur 0:0:15 lap 0:0:0] 4 | count-time: does [data/lap: data/lap + (1.0 / ticker/rate)] 5 | tick: does [ 6 | if data/lap < data/dur [count-time] 7 | t/text: form data/lap 8 | p/data: data/lap / data/dur 9 | ] 10 | reset: does [data/lap: 0:0:0 clear t/text p/data: 0%] 11 | view [ 12 | text "Elapsed Time:" p: progress t: text return 13 | text "Duration:" s: slider 50% on-change [ 14 | d/text: form data/dur: data/max * face/data 15 | ] 16 | d: text on-create [face/text: form data/dur] return 17 | button "Reset" [reset] 18 | ticker: base 0x0 rate 10 on-time [tick] 19 | ] -------------------------------------------------------------------------------- /Android/crud/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 19 5 | buildToolsVersion "20.0.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.crud" 9 | minSdkVersion 17 10 | targetSdkVersion 19 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | } 25 | -------------------------------------------------------------------------------- /Android/timer/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 19 5 | buildToolsVersion "20.0.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.timer" 9 | minSdkVersion 16 10 | targetSdkVersion 19 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | } 25 | -------------------------------------------------------------------------------- /Android/counter/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 20 5 | buildToolsVersion "20.0.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.counter" 9 | minSdkVersion 16 10 | targetSdkVersion 19 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | } 25 | -------------------------------------------------------------------------------- /Red/readme.md: -------------------------------------------------------------------------------- 1 | The goal is not just to be smaller, but to be clearer. However, sometimes 2 | idiomatic code in a language is not the clearest code to someone who isn't 3 | familiar with it. It's also nice, sometimes, to see what different 4 | approaches look like. To that end, there may be more than one implementation 5 | of each task. 6 | 7 | Red is available at http://red-lang.org 8 | 9 | If you install Red (single EXE, just drop in a folder), you can run all task 10 | demos from the launcher. The following will run the launcher from the repo. 11 | 12 | ``` 13 | do read https://raw.githubusercontent.com/greggirwin/7guis/master/Red/launcher.red 14 | ``` 15 | -------------------------------------------------------------------------------- /Red/timer.red: -------------------------------------------------------------------------------- 1 | Red [author: "Gregg Irwin"] 2 | 3 | max-time: 0:0:30 4 | duration: 0:0:15 5 | elapsed: 0:0:0 6 | count-time: does [elapsed: elapsed + (1.0 / ticker/rate)] 7 | tick: does [ 8 | if elapsed < duration [count-time] 9 | t/text: form elapsed 10 | p/data: elapsed / duration 11 | ] 12 | reset: does [elapsed: 0:0:0 clear t/text p/data: 0%] 13 | view [ 14 | text "Elapsed Time:" p: progress t: text return 15 | text "Duration:" s: slider 50% on-change [ 16 | d/text: form duration: max-time * face/data 17 | ] 18 | d: text on-create [face/text: form duration] return 19 | button "Reset" [reset] 20 | ticker: base 0x0 rate 10 on-time [tick] 21 | ] 22 | -------------------------------------------------------------------------------- /Android/flightbooker/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 20 5 | buildToolsVersion "20.0.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.flightbooker" 9 | minSdkVersion 16 10 | targetSdkVersion 19 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | } 25 | -------------------------------------------------------------------------------- /Android/temperature/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 20 5 | buildToolsVersion "20.0.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.temperature" 9 | minSdkVersion 16 10 | targetSdkVersion 20 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | } 25 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/circle.cpp: -------------------------------------------------------------------------------- 1 | #include "circle.h" 2 | 3 | Circle::Circle(int x, int y) 4 | { 5 | this->x = x; 6 | this->y = y; 7 | 8 | diameter = 30; 9 | } 10 | 11 | int Circle::getX() 12 | { 13 | return x; 14 | } 15 | 16 | void Circle::setX(int x) 17 | { 18 | this->x = x; 19 | } 20 | 21 | int Circle::getY() 22 | { 23 | return y; 24 | } 25 | 26 | void Circle::setY(int y) 27 | { 28 | this->y = y; 29 | } 30 | 31 | int Circle::getDiameter() 32 | { 33 | return diameter; 34 | } 35 | 36 | void Circle::setDiameter(int diameter) 37 | { 38 | this->diameter = diameter; 39 | } 40 | 41 | Circle::~Circle() 42 | { 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOG_H 2 | #define DIALOG_H 3 | 4 | #include 5 | 6 | #include "circle.h" 7 | 8 | class Dialog : public QWidget 9 | { 10 | Q_OBJECT 11 | 12 | private: 13 | int oldDiameter; 14 | 15 | Circle *selected; 16 | QLabel *info; 17 | QSlider *slider; 18 | 19 | public: 20 | explicit Dialog(Circle *circle, QWidget *parent = 0); 21 | ~Dialog(); 22 | 23 | void closeEvent(QCloseEvent *e); 24 | 25 | signals: 26 | void diameterChanged(Circle*, int); 27 | void closed(Circle *, int); 28 | 29 | public slots: 30 | void sendDiameterChanged(int newDiameter); 31 | 32 | }; 33 | 34 | #endif // DIALOG_H 35 | -------------------------------------------------------------------------------- /Qt5/OnlyCPP/counter/counter.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char** argv) 4 | { 5 | QApplication app{argc, argv}; 6 | QMainWindow window; 7 | auto widget = new QWidget; 8 | window.setCentralWidget(widget); 9 | auto layout = new QHBoxLayout{widget}; 10 | auto label = new QLabel{"0"}; 11 | auto pushbutton = new QPushButton{"Count"}; 12 | 13 | uint32_t count{}; 14 | QObject::connect(pushbutton, &QPushButton::clicked, 15 | [&label, &count] () { 16 | label->setText(QString::number(++count)); 17 | }); 18 | 19 | layout->addWidget(label); 20 | layout->addWidget(pushbutton); 21 | 22 | window.show(); 23 | return app.exec(); 24 | } 25 | -------------------------------------------------------------------------------- /Qt5/OnlyQML/Counter/counter.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.2 2 | import QtQuick.Controls 1.2 3 | import QtQuick.Layouts 1.1 4 | import QtQuick.Window 2.2 5 | 6 | Window { 7 | id: counterWindow 8 | width: 200 9 | height: 100 10 | visible: true 11 | 12 | property int counter: 0 13 | RowLayout { 14 | id: layout 15 | anchors.fill: parent 16 | spacing: 6 17 | Label { 18 | id: theCount 19 | text: String(counterWindow.counter) 20 | } 21 | 22 | Button { 23 | id: theButton 24 | text: "Increment" 25 | onClicked: theCount.text = String(++counterWindow.counter) 26 | } 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Java7-Swing/src/sevenguis/circledrawer/Circle.java: -------------------------------------------------------------------------------- 1 | package sevenguis.circledrawer; 2 | 3 | public class Circle { 4 | private int x, y, d; 5 | 6 | public Circle(int x, int y) { 7 | this.x = x; 8 | this.y = y; 9 | d = 30; 10 | } 11 | 12 | public int getX() { 13 | return x; 14 | } 15 | 16 | public void setX(int x) { 17 | this.x = x; 18 | } 19 | 20 | public int getY() { 21 | return y; 22 | } 23 | 24 | public void setY(int y) { 25 | this.y = y; 26 | } 27 | 28 | public int getDiameter() { 29 | return d; 30 | } 31 | 32 | public void setDiameter(int d) { 33 | this.d = d; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/circledrawer/Circle.java: -------------------------------------------------------------------------------- 1 | package sevenguis.circledrawer; 2 | 3 | public class Circle { 4 | 5 | private int x, y, d; 6 | 7 | public Circle(int x, int y) { 8 | this.x = x; 9 | this.y = y; 10 | d = 30; 11 | } 12 | 13 | public int getX() { 14 | return x; 15 | } 16 | 17 | public void setX(int x) { 18 | this.x = x; 19 | } 20 | 21 | public int getY() { 22 | return y; 23 | } 24 | 25 | public void setY(int y) { 26 | this.y = y; 27 | } 28 | 29 | public int getDiameter() { 30 | return d; 31 | } 32 | 33 | public void setDiameter(int d) { 34 | this.d = d; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Android/crud/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/timer/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Android/counter/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/crud-kt/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/crud-ng/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/timer/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/counter/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Android/flightbooker/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/temperature/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/eugen/tmp/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Android/crud-ng/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 19 5 | buildToolsVersion "21.1.0" 6 | 7 | defaultConfig { 8 | applicationId "sevenguis.crudng" 9 | minSdkVersion 17 10 | targetSdkVersion 19 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | runProguard false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | compile 'com.jakewharton:butterknife:6.0.0' 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Android/flightbooker/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Clojure-Seesaw/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Clojure-Seesaw 4 | 5 | 6 | 7 | 8 | 9 | ccw.builder 10 | 11 | 12 | 13 | 14 | ccw.leiningen.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | ccw.leiningen.nature 27 | ccw.nature 28 | 29 | 30 | -------------------------------------------------------------------------------- /Android/app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Android/temperature/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Android/crud/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Android/crud-ng/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FreePascal/temperature/README.md: -------------------------------------------------------------------------------- 1 | The relevant file to read is unit1.pas . The rest of the files are generated by lazarus/codetyphon visual editor. 2 | The typed code in the editor is: 3 | 4 |

 5 | procedure TForm1.TFChange(Sender: TObject);
 6 | begin
 7 |   if DontChange then
 8 |   begin
 9 |     DontChange := False;
10 |     if trystrtoint(TF.Text, i) then
11 |       TC.Text := IntToStr(trunc((i - 32) * (5 / 9)));
12 |     DontChange := True;
13 |   end;
14 | end;
15 | 
16 | procedure TForm1.TCChange(Sender: TObject);
17 | begin
18 |   if DontChange then
19 |   begin
20 |     DontChange := False;
21 |     if trystrtoint(TC.Text, i) then
22 |       TF.Text := IntToStr(trunc(i * (9 / 5) + 32));
23 |     DontChange := True;
24 |   end;
25 | end;
26 | 
27 | 28 | In Lazarus/codetyphon open temperature.lpi 29 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/flightbooker/Util.java: -------------------------------------------------------------------------------- 1 | package sevenguis.flightbooker; 2 | 3 | import java.time.LocalDate; 4 | import java.time.format.DateTimeFormatter; 5 | import java.time.format.DateTimeParseException; 6 | 7 | public class Util { 8 | 9 | private static final DateTimeFormatter format = DateTimeFormatter.ISO_LOCAL_DATE; 10 | 11 | static String dateToString(LocalDate date) { 12 | return date.format(format); 13 | } 14 | 15 | static LocalDate stringToDate(String string) { 16 | return LocalDate.from(format.parse(string)); 17 | } 18 | 19 | static boolean isDateString(String string) { 20 | try { 21 | format.parse(string); 22 | return true; 23 | } catch (DateTimeParseException e) { 24 | return false; 25 | } 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/undo/undomanager.cpp: -------------------------------------------------------------------------------- 1 | #include "undomanager.h" 2 | 3 | UndoManager::UndoManager() 4 | { 5 | history = new QStack(); 6 | cursor = -1; 7 | } 8 | 9 | void UndoManager::addEdit(UndoableEdit *edit) { 10 | int toPop = history->size() - 1 - cursor; 11 | 12 | while (toPop != 0) 13 | { 14 | history->pop(); 15 | toPop--; 16 | } 17 | 18 | history->push(edit); 19 | cursor++; 20 | } 21 | 22 | void UndoManager::undo() 23 | { 24 | if (cursor >= 0) 25 | { 26 | history->at(cursor)->undo(); 27 | cursor--; 28 | } 29 | } 30 | 31 | void UndoManager::redo() { 32 | if (cursor < history->size()-1) 33 | { 34 | cursor++; 35 | history->at(cursor)->redo(); 36 | } 37 | } 38 | 39 | UndoManager::~UndoManager() 40 | { 41 | 42 | } 43 | -------------------------------------------------------------------------------- /Red/launcher.red: -------------------------------------------------------------------------------- 1 | Red [author: ["Gregg Irwin" "Maxim Velesyuk"]] 2 | 3 | repo: https://raw.githubusercontent.com/greggirwin/7guis/master/Red/ 4 | 5 | ; You don't want to `do` untrusted code, but this shows how you can 6 | ; easily access remote code. In this case, trust depends on the repo. 7 | run-demo: func [file][do either exists? file [file][read repo/(file)]] 8 | 9 | view [ 10 | below 11 | space 2x2 12 | style button: button 125 13 | button "Counter" [run-demo %counter.red] 14 | button "Temperature" [run-demo %temperature.red] 15 | button "Timer" [run-demo %timer.red] 16 | button "CRUD" [run-demo %crud.red] 17 | button "Flight Booking" [run-demo %flight-booking.red] 18 | button "Circle Drawer" [run-demo %circle-drawer.red] 19 | button "Cells" ;[do %cells.red] 20 | pad 0x15 21 | button "Quit" [quit] 22 | ] 23 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/temperature/Util.java: -------------------------------------------------------------------------------- 1 | package sevenguis.temperature; 2 | 3 | public class Util { 4 | 5 | static double cToF(double celsius) { 6 | return (9/5d * celsius) + 32; 7 | } 8 | 9 | static double fToC(double fahrenheit) { 10 | return 5/9d * (fahrenheit - 32); 11 | } 12 | 13 | static String cToF(String celsius) { 14 | return String.valueOf(Math.round(cToF(Double.parseDouble(celsius)))); 15 | } 16 | 17 | static String fToC(String fahrenheit) { 18 | return String.valueOf(Math.round(fToC(Double.parseDouble(fahrenheit)))); 19 | } 20 | 21 | static boolean isNumeric(String string) { 22 | try { 23 | Double.parseDouble(string); 24 | } catch (NumberFormatException e) { 25 | return false; 26 | } 27 | return true; 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /FreePascal/temperature/unit1.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 802 3 | Height = 55 4 | Top = 186 5 | Width = 416 6 | Caption = 'TempConv' 7 | ClientHeight = 55 8 | ClientWidth = 416 9 | LCLVersion = '1.3' 10 | object TC: TEdit 11 | Left = 8 12 | Height = 26 13 | Top = 16 14 | Width = 80 15 | OnChange = TCChange 16 | TabOrder = 0 17 | end 18 | object Label1: TLabel 19 | Left = 104 20 | Height = 20 21 | Top = 22 22 | Width = 57 23 | Caption = 'Celsius=' 24 | ParentColor = False 25 | end 26 | object TF: TEdit 27 | Left = 168 28 | Height = 26 29 | Top = 16 30 | Width = 80 31 | OnChange = TFChange 32 | TabOrder = 1 33 | end 34 | object Label2: TLabel 35 | Left = 264 36 | Height = 20 37 | Top = 22 38 | Width = 70 39 | Caption = 'Fahrenheit' 40 | ParentColor = False 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /FreePascal/counter/unit1.pas: -------------------------------------------------------------------------------- 1 | unit Unit1; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; 9 | 10 | type 11 | 12 | { TForm1 } 13 | 14 | TForm1 = class(TForm) 15 | Button1: TButton; 16 | Edit1: TEdit; 17 | procedure Button1Click(Sender: TObject); 18 | procedure FormCreate(Sender: TObject); 19 | private 20 | { private declarations } 21 | public 22 | { public declarations } 23 | end; 24 | 25 | var 26 | Form1: TForm1; 27 | Counter:integer=0; 28 | 29 | implementation 30 | 31 | {$R *.lfm} 32 | 33 | { TForm1 } 34 | 35 | procedure TForm1.Button1Click(Sender: TObject); 36 | begin 37 | inc(Counter); 38 | Edit1.Caption:=inttostr(Counter); 39 | end; 40 | 41 | procedure TForm1.FormCreate(Sender: TObject); 42 | begin 43 | Edit1.ReadOnly:=True; 44 | end; 45 | 46 | end. 47 | 48 | -------------------------------------------------------------------------------- /Android/Android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Android/counter/src/main/java/sevenguis/counter/MainActivity.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | import android.widget.Button; 7 | import android.widget.TextView; 8 | 9 | 10 | public class MainActivity extends Activity { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_main); 16 | 17 | final TextView count = (TextView) findViewById(R.id.count); 18 | Button countUp = (Button) findViewById(R.id.countUp); 19 | 20 | countUp.setOnClickListener(new View.OnClickListener() { 21 | public void onClick(View view) { 22 | count.setText(1+Integer.parseInt(count.getText().toString())+""); 23 | } 24 | }); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/kotlin/ListenerExtensions.kt: -------------------------------------------------------------------------------- 1 | package sevenguis.crudkt 2 | 3 | import android.view.View 4 | import android.widget.TextView 5 | import android.text.TextWatcher 6 | import android.text.Editable 7 | import android.widget.ListView 8 | 9 | fun View.onClick(f: () -> Unit) { 10 | this.setOnClickListener { f() } 11 | } 12 | 13 | fun TextView.onTextChanged(f: (String) -> Unit) { 14 | this.addTextChangedListener(object : TextWatcher { 15 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } 16 | override fun afterTextChanged(s: Editable?) { } 17 | override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { 18 | f(s.toString()) 19 | } 20 | }) 21 | } 22 | 23 | fun ListView.onItemClick(f: (Int) -> Unit) { 24 | this.setOnItemClickListener { (adapterView, view, i, l) -> f(i) } 25 | } 26 | -------------------------------------------------------------------------------- /Android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Settings specified in this file will override any Gradle settings 5 | # configured through the IDE. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Java 2 | *.class 3 | 4 | # Mobile Tools for Java (J2ME) 5 | .mtj.tmp/ 6 | 7 | # Package Files # 8 | *.jar 9 | *.war 10 | *.ear 11 | 12 | ### Eclipse 13 | *.pydevproject 14 | .metadata 15 | .gradle 16 | bin/ 17 | tmp/ 18 | *.tmp 19 | *.bak 20 | *.swp 21 | *~.nib 22 | local.properties 23 | .settings/ 24 | .loadpath 25 | 26 | # External tool builders 27 | .externalToolBuilders/ 28 | 29 | # Locally stored "Eclipse launch configurations" 30 | *.launch 31 | 32 | # CDT-specific 33 | .cproject 34 | 35 | # PDT-specific 36 | .buildpath 37 | 38 | # sbteclipse plugin 39 | .target 40 | 41 | # TeXlipse plugin 42 | .texlipse 43 | 44 | ### Intellij 45 | **/.idea/workspace.xml 46 | **/.idea/tasks.xml 47 | 48 | ### Scala/sbt 49 | .cache/ 50 | .history/ 51 | .lib/ 52 | dist/* 53 | target/ 54 | lib_managed/ 55 | src_managed/ 56 | project/boot/ 57 | project/plugins/project/ 58 | Scala-ScalaFX/.idea/ 59 | 60 | ### Elm 61 | Elm/cache 62 | Elm/build -------------------------------------------------------------------------------- /Red/crud-mini.red: -------------------------------------------------------------------------------- 1 | Red [Author: "Gregg Irwin"] 2 | 3 | db: sort copy ["Rakocevic, Nenad" "Xie, Qingtian" "Wooster, Bertie" "Wood, Peter"] 4 | 5 | cmd-filter: refresh: does [ ; 2 names for clearer meaning in use 6 | lst/data: copy db 7 | if not empty? f-filter/text [ 8 | remove-each val lst/data [not find/match val f-filter/text] 9 | ] 10 | ] 11 | make-rec: does [rejoin [f-surname/text ", " f-name/text]] 12 | selected-name: does [pick lst/data lst/selected] 13 | 14 | view [ 15 | style text: text 60 16 | style field: field 120 17 | text "Filter prefix:" f-filter: field on-change [cmd-filter] return 18 | lst: text-list 200x150 data db 19 | panel [ 20 | text "Name:" f-name: field return 21 | text "Surname:" f-surname: field 22 | ] return 23 | button "Create" [append db make-rec refresh] 24 | button "Update" [change find db selected-name make-rec refresh] 25 | button "Delete" [remove find db selected-name refresh] 26 | ] 27 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/circledrawer/undo/UndoManager.java: -------------------------------------------------------------------------------- 1 | package sevenguis.circledrawer.undo; 2 | 3 | import java.util.Stack; 4 | 5 | public class UndoManager { 6 | 7 | Stack history; 8 | int cursor; 9 | 10 | public UndoManager() { 11 | history = new Stack<>(); 12 | cursor = -1; 13 | } 14 | 15 | public void addEdit(UndoableEdit edit) { 16 | int toPop = history.size()-1 - cursor; 17 | while (toPop != 0) { 18 | history.pop(); 19 | toPop--; 20 | } 21 | history.push(edit); 22 | cursor++; 23 | } 24 | 25 | public void undo() { 26 | if (cursor >= 0) { 27 | history.get(cursor).undo(); 28 | cursor--; 29 | } 30 | } 31 | 32 | public void redo() { 33 | if (cursor < history.size()-1) { 34 | cursor++; 35 | history.get(cursor).redo(); 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Scala-ScalaFX/src/main/scala/sevenguis/counter/Counter.scala: -------------------------------------------------------------------------------- 1 | package sevenguis.counter 2 | 3 | import scalafx.application.JFXApp 4 | import scalafx.application.JFXApp.PrimaryStage 5 | import scalafx.scene.Scene 6 | import scalafx.scene.control.{Button, TextField} 7 | import scalafx.scene.layout.HBox 8 | import scalafx.geometry.Insets 9 | import scalafx.event.ActionEvent 10 | import scalafx.Includes._ 11 | 12 | object Counter extends JFXApp { 13 | val count = new TextField { 14 | text = "0" 15 | editable = false 16 | prefWidth = 50 17 | } 18 | val countUp = new Button("Count") 19 | 20 | countUp.onAction = (event: ActionEvent) => { 21 | count.text = (1 + count.text().toInt).toString 22 | } 23 | 24 | stage = new PrimaryStage { 25 | title = "Counter" 26 | scene = new Scene { 27 | content = new HBox(10) { 28 | padding = Insets(10) 29 | content = Seq(count, countUp) 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Qt5/crud/source/MainWin.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWIN_H 2 | #define MAINWIN_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | class MainWin : public QWidget { 13 | Q_OBJECT 14 | public: 15 | QLabel* filterLabel; 16 | QLabel* nameLabel; 17 | QLabel* surnameLabel; 18 | QTableWidget* dataTable; 19 | QPushButton* createButton; 20 | QPushButton* updateButton; 21 | QPushButton* deleteButton; 22 | QLineEdit* filterLine; 23 | QLineEdit* nameLine; 24 | QLineEdit* surnameLine; 25 | QHBoxLayout* hBox; 26 | QVBoxLayout* vBox; 27 | QGridLayout* grid; 28 | MainWin(); 29 | void createTable(); 30 | private slots: 31 | void createPerson(); 32 | void updatePerson(); 33 | void deletePerson(); 34 | void getInformation(); 35 | void searchPerson(); 36 | }; 37 | 38 | 39 | #endif // MAINWIN_H 40 | -------------------------------------------------------------------------------- /Android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/counter/Counter.java: -------------------------------------------------------------------------------- 1 | package sevenguis.counter; 2 | 3 | import javafx.application.Application; 4 | import javafx.geometry.Insets; 5 | import javafx.scene.Scene; 6 | import javafx.scene.control.Button; 7 | import javafx.scene.control.TextField; 8 | import javafx.scene.layout.HBox; 9 | import javafx.stage.Stage; 10 | 11 | public class Counter extends Application { 12 | 13 | public void start(Stage stage) { 14 | TextField count = new TextField("0"); 15 | count.setEditable(false); 16 | count.setPrefWidth(50); 17 | Button countUp = new Button("Count"); 18 | 19 | countUp.setOnAction(e -> 20 | count.setText(1+Integer.parseInt(count.getText())+"")); 21 | 22 | HBox root = new HBox(10, count, countUp); 23 | root.setPadding(new Insets(10)); 24 | 25 | stage.setScene(new Scene(root)); 26 | stage.setTitle("Counter"); 27 | stage.show(); 28 | } 29 | 30 | public static void main(String[] args) { 31 | launch(args); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Scheme-FrTime/timer.rkt: -------------------------------------------------------------------------------- 1 | #lang frtime 2 | (require frtime/gui/simple) 3 | 4 | (current-widget-parent (new ft-frame% (width 200) (stretchable-width #t))) 5 | 6 | (define-values-rec 7 | [elapsed (min duration (- seconds 8 | (hold 9 | (map-e (lambda (_) (value-now seconds)) 10 | reset) 11 | (value-now seconds))))] 12 | [gauge (mode widget ft-gauge% 13 | (label "Timer") 14 | (value elapsed) 15 | (range duration) 16 | (stretchable-width #t))] 17 | [msg (mode widget ft-message% 18 | (label (format "~as" (number->string elapsed))) 19 | (stretchable-width #t))] 20 | [slider (mode widget ft-slider% 21 | (label "Duration") 22 | (min-value 5) 23 | (max-value 60))] 24 | [duration (send slider get-value-b)] 25 | [reset (mode value-e ft-button% (label "Reset"))]) 26 | 27 | 28 | (send (current-widget-parent) show #t) 29 | -------------------------------------------------------------------------------- /Qt5/circledrawer/source/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | MainWindow::MainWindow(QWidget *parent) 4 | : QMainWindow(parent) 5 | { 6 | setWindowTitle("Circle Drawer"); 7 | 8 | auto centralWidget = new QWidget; 9 | setCentralWidget(centralWidget); 10 | 11 | auto rootLayout = new QVBoxLayout; 12 | centralWidget->setLayout(rootLayout); 13 | 14 | undo = new QPushButton("undo"); 15 | redo = new QPushButton("redo"); 16 | renderArea = new RenderArea; 17 | 18 | connect(undo, SIGNAL(clicked()), renderArea, SLOT(undo())); 19 | connect(redo, SIGNAL(clicked()), renderArea, SLOT(redo())); 20 | 21 | auto buttonsLayout = new QHBoxLayout; 22 | buttonsLayout->addWidget(undo); 23 | buttonsLayout->addWidget(redo); 24 | buttonsLayout->setContentsMargins(0, 0, 10, 0); 25 | buttonsLayout->setAlignment(Qt::AlignLeft); 26 | 27 | rootLayout->addLayout(buttonsLayout); 28 | rootLayout->addWidget(renderArea); 29 | rootLayout->setContentsMargins(10, 10, 10, 10); 30 | } 31 | 32 | MainWindow::~MainWindow() 33 | { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Red/crud.red: -------------------------------------------------------------------------------- 1 | Red [author: "Gregg Irwin"] 2 | 3 | db: sort copy [ 4 | "Rakocevic, Nenad" 5 | "Xie, Qingtian" 6 | "Wooster, Bertie" 7 | "Irwin, Gregg" 8 | "Wood, Peter" 9 | ] 10 | 11 | cmd-filter: does [ 12 | lst/data: copy db 13 | if not empty? f-filter/text [ 14 | remove-each val lst/data [not find/match val f-filter/text] 15 | ] 16 | ] 17 | 18 | cmd-create: does [append db make-rec refresh] 19 | cmd-update: does [change find db selected-name make-rec refresh] 20 | cmd-delete: does [remove find db selected-name refresh] 21 | make-rec: does [rejoin [f-surname/text ", " f-name/text]] 22 | refresh: does [cmd-filter] 23 | selected-name: does [pick lst/data lst/selected] 24 | 25 | view [ 26 | style text: text 60 27 | style field: field 120 28 | text "Filter prefix:" f-filter: field on-change [cmd-filter] return 29 | lst: text-list 200x150 data db 30 | panel [ 31 | text "Name:" f-name: field return 32 | text "Surname:" f-surname: field 33 | ] return 34 | button "Create" [cmd-create] 35 | button "Update" [cmd-update] 36 | button "Delete" [cmd-delete] 37 | ] 38 | -------------------------------------------------------------------------------- /C#-WinForms/counter/counter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | 5 | namespace Counter 6 | { 7 | static class Program 8 | { 9 | [STAThread] 10 | static void Main() 11 | { 12 | Application.EnableVisualStyles(); 13 | Application.SetCompatibleTextRenderingDefault(false); 14 | 15 | var textBox = new TextBox(); 16 | textBox.Location = new Point(12, 14); 17 | textBox.Text = "0"; 18 | textBox.ReadOnly = true; 19 | 20 | var button = new Button(); 21 | button.Location = new Point(121, 12); 22 | button.Text = "Count"; 23 | button.Click += (sender, args) => { textBox.Text = (int.Parse(textBox.Text) + 1).ToString(); }; 24 | 25 | var form = new Form(); 26 | form.ClientSize = new Size(208, 46); 27 | form.Text = "Counter"; 28 | form.Controls.Add(textBox); 29 | form.Controls.Add(button); 30 | 31 | Application.Run(form); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Android/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Java8-JavaFX/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /Android/crud-kt/src/main/res/layout/name_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /Android/crud-ng/src/main/res/layout/name_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /Android/crud/src/main/res/layout/name_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 29 | -------------------------------------------------------------------------------- /Java8-JavaFX/src/sevenguis/circledrawer/CircleDrawer.java: -------------------------------------------------------------------------------- 1 | package sevenguis.circledrawer; 2 | 3 | import javafx.application.Application; 4 | import javafx.geometry.Insets; 5 | import javafx.scene.Scene; 6 | import javafx.scene.control.Button; 7 | import javafx.scene.layout.BorderPane; 8 | import javafx.scene.layout.HBox; 9 | import javafx.stage.Stage; 10 | 11 | public class CircleDrawer extends Application { 12 | 13 | public void start(Stage stage) { 14 | Button undo = new Button("Undo"); 15 | Button redo = new Button("Redo"); 16 | CircleDrawerCanvas canvas = new CircleDrawerCanvas(); 17 | 18 | undo.setOnAction(e -> canvas.undo()); 19 | redo.setOnAction(e -> canvas.redo()); 20 | 21 | BorderPane root = new BorderPane(); 22 | root.setPadding(new Insets(10)); 23 | HBox top = new HBox(10, undo, redo); 24 | top.setPadding(new Insets(0, 0, 10, 0)); 25 | root.setTop(top); 26 | root.setCenter(canvas); 27 | 28 | stage.setScene(new Scene(root)); 29 | stage.setTitle("Circle Drawer"); 30 | stage.show(); 31 | } 32 | 33 | public static void main(String[] args) { 34 | launch(args); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Android/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Clojure-Seesaw/src/sevenguis/temperature.clj: -------------------------------------------------------------------------------- 1 | (ns seveguis.temperature 2 | (:use [seesaw core] 3 | sevenguis.core) 4 | (:require [seesaw.bind :as b])) 5 | 6 | (defn numeric? [s] 7 | (try (Double/parseDouble (.trim s)) true 8 | (catch NumberFormatException e false))) 9 | 10 | (defn f-to-c [f] 11 | (* (- f 32) 5/9)) 12 | 13 | (defn c-to-f [c] 14 | (+ (* c 9/5) 32)) 15 | 16 | (defn parse-temp [s] 17 | (Double/parseDouble (.trim s))) 18 | 19 | (defn display-temp [n] 20 | (str (Math/round (float n)))) 21 | 22 | (defn convert-panel [] 23 | (let [celsius (text :columns 5) 24 | fahrenheit (text :columns 5)] 25 | (b/bind 26 | celsius 27 | (b/filter #(and (.isFocusOwner celsius) (numeric? %))) 28 | (b/transform #(-> % parse-temp c-to-f display-temp)) 29 | fahrenheit) 30 | (b/bind 31 | fahrenheit 32 | (b/filter #(and (.isFocusOwner fahrenheit) (numeric? %))) 33 | (b/transform #(-> % parse-temp f-to-c display-temp)) 34 | celsius) 35 | (flow-panel 36 | :items [celsius "Celsius" "=" fahrenheit "Fahrenheit"]))) 37 | 38 | (defn -main [& args] 39 | (invoke-later (-> (frame :title "Temperature Converter" :content (convert-panel) :on-close :exit) pack! show!))) -------------------------------------------------------------------------------- /FreePascal/temperature/unit1.pas: -------------------------------------------------------------------------------- 1 | unit Unit1; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | interface 6 | 7 | uses 8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; 9 | 10 | type 11 | 12 | { TForm1 } 13 | 14 | TForm1 = class(TForm) 15 | TC: TEdit; 16 | TF: TEdit; 17 | Label1: TLabel; 18 | Label2: TLabel; 19 | procedure TCChange(Sender: TObject); 20 | procedure TFChange(Sender: TObject); 21 | private 22 | { private declarations } 23 | public 24 | { public declarations } 25 | end; 26 | 27 | var 28 | Form1: TForm1; 29 | DontChange: boolean = True; 30 | i: integer = 0; 31 | 32 | implementation 33 | 34 | {$R *.lfm} 35 | 36 | { TForm1 } 37 | 38 | procedure TForm1.TFChange(Sender: TObject); 39 | begin 40 | if DontChange then 41 | begin 42 | DontChange := False; 43 | if trystrtoint(TF.Text, i) then 44 | TC.Text := IntToStr(trunc((i - 32) * (5 / 9))); 45 | DontChange := True; 46 | end; 47 | end; 48 | 49 | procedure TForm1.TCChange(Sender: TObject); 50 | begin 51 | if DontChange then 52 | begin 53 | DontChange := False; 54 | if trystrtoint(TC.Text, i) then 55 | TF.Text := IntToStr(trunc(i * (9 / 5) + 32)); 56 | DontChange := True; 57 | end; 58 | end; 59 | 60 | end. 61 | -------------------------------------------------------------------------------- /Scala-ScalaFX/build.sbt: -------------------------------------------------------------------------------- 1 | name := "Scala-ScalaFX" 2 | 3 | version := "1.0" 4 | 5 | //scalaVersion := "2.10.3" 6 | 7 | scalaVersion := "2.11.0" 8 | 9 | // http://stackoverflow.com/questions/19208942/enforcing-java-version-for-scala-project-in-sbt 10 | //initialize := { 11 | // val _ = initialize.value // run the previous initialization 12 | // val specVersion = sys.props("java.specification.version").toDouble 13 | // assert(specVersion >= 1.8, "Java 8 or above required") 14 | //} 15 | 16 | resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" 17 | 18 | libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.1" 19 | 20 | libraryDependencies += "org.fxmisc.easybind" % "easybind" % "1.0.1" 21 | 22 | libraryDependencies += "org.reactfx" % "reactfx" % "1.2.0" 23 | 24 | libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.0-R4" 25 | 26 | libraryDependencies += "com.scalarx" % "scalarx_2.10" % "0.2.3" 27 | 28 | resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/" 29 | 30 | libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.2" 31 | 32 | //unmanagedJars in Compile += Attributed.blank(file(System.getenv("JAVA_HOME") + "/jre/lib/jfxrt.jar")) 33 | 34 | fork := true -------------------------------------------------------------------------------- /Scala-ScalaFX/README.md: -------------------------------------------------------------------------------- 1 | 7GUIs in Scala-ScalaFX 2 | ====================== 3 | 4 | This is an implementation of 7GUIs in Scala version 2.10 with ScalaFX in 5 | version 8.0.0-R4 as the toolkit. There is one package for each task with one 6 | or more Scala files. The solutions follow the functional paradigm as far as 7 | reasonable. 8 | 9 | 10 | Setup Instructions 11 | ------------------ 12 | 13 | The project requires JDK 8. You also need sbt or maven to build the project. 14 | Please make sure that your sbt installation uses JDK 8. If you are not sure 15 | the following link might help you: http://stackoverflow.com/a/7705091/283607 16 | 17 | To run the code from the command line with sbt enter `sbt run`. You will be 18 | prompted with a list of executable files. By entering a corresponding number 19 | you can run a file. 20 | 21 | You can import the project into Intellij IDEA or Netbeans as both these 22 | IDEs natively support sbt Scala projects. 23 | 24 | To import the project into Eclipse or Scala IDE execute `sbt eclipse` 25 | (uncomment the corresponding line in `project/plugins.sbt`). 26 | This command will create Eclipse project files. After that you should 27 | be able to import the project into Eclipse. 28 | 29 | There is also a `pom.xml` so that you should be able to work with maven. -------------------------------------------------------------------------------- /Qt5/circledrawer/source/dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | 3 | Dialog::Dialog(Circle *circle, QWidget *parent) : QWidget(parent) 4 | { 5 | setWindowFlags(Qt::WindowCloseButtonHint); 6 | setWindowTitle("Diameter..."); 7 | 8 | this->selected = circle; 9 | oldDiameter = selected->getDiameter(); 10 | 11 | info = new QLabel(QString("Adjust diameter of circle at (%1, %2)"). 12 | arg(selected->getX()). 13 | arg(selected->getY())); 14 | 15 | slider = new QSlider(); 16 | slider->setOrientation(Qt::Horizontal); 17 | slider->setMinimum(10); 18 | slider->setMaximum(50); 19 | slider->setValue(selected->getDiameter()); 20 | 21 | connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sendDiameterChanged(int))); 22 | 23 | auto *rootLayout = new QVBoxLayout(); 24 | rootLayout->addWidget(info); 25 | rootLayout->addWidget(slider); 26 | rootLayout->setContentsMargins(10, 10, 10, 10); 27 | 28 | setLayout(rootLayout); 29 | } 30 | 31 | void Dialog::closeEvent(QCloseEvent *e) 32 | { 33 | emit closed(selected, oldDiameter); 34 | hide(); 35 | } 36 | 37 | void Dialog::sendDiameterChanged(int newDiameter) 38 | { 39 | emit diameterChanged(selected, newDiameter); 40 | } 41 | 42 | Dialog::~Dialog() 43 | { 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Scala-ScalaFX/src/main/scala/sevenguis/RxIntegration.scala: -------------------------------------------------------------------------------- 1 | package sevenguis 2 | 3 | import rx._ 4 | import javafx.beans.value.{ObservableValue, ChangeListener} 5 | 6 | object RxIntegration { 7 | val observers: scala.collection.mutable.Buffer[Obs] = scala.collection.mutable.Buffer() 8 | 9 | implicit class PropertyExtensions[T,J](p: scalafx.beans.property.Property[T,J]) { 10 | def |=(x: => T) { 11 | val rx = Rx{x} 12 | observers += Obs(rx) { p() = rx() } 13 | } 14 | } 15 | 16 | implicit class ReadOnlyPropertyExtensions[T,J](p: scalafx.beans.property.ReadOnlyProperty[T,J]) { 17 | def rx(): Rx[T] = { 18 | val v = Var(p.value) 19 | p.addListener(new ChangeListener[J] { 20 | override def changed(observable: ObservableValue[_ <: J], oldValue: J, newValue: J): Unit = { 21 | v.update(p.value) 22 | } 23 | }) 24 | v 25 | } 26 | } 27 | 28 | implicit class ReadOnlyPropertyExtensionsJ[T](p: javafx.beans.property.ReadOnlyProperty[T]) { 29 | def rx(): Rx[T] = { 30 | val v = Var(p.getValue) 31 | p.addListener(new ChangeListener[T] { 32 | override def changed(observable: ObservableValue[_ <: T], oldValue: T, newValue: T): Unit = { 33 | v.update(p.getValue) 34 | } 35 | }) 36 | v 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /FreePascal/counter/counter.lps: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Android/counter/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 |