Difference between revisions of "WxHaskell"

From HaskellWiki
Jump to navigation Jump to search
(→‎External links: "Assignment 1 part of the course " now points to an old (Web Archive) version)
m (Updated link)
 
(4 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
wxHaskell is therefore built on top of [http://www.wxwidgets.org wxWidgets] – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel.
 
wxHaskell is therefore built on top of [http://www.wxwidgets.org wxWidgets] – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel.
   
 
The current version of wxHaskell supports wxWidgets 2.9 and 3.0. For wxWidgets 3.0, Windows users can easily install wxWidgets together with wxHaskell, using a [https://sourceforge.net/projects/wxhaskell/files/wxInstall/ wxInstall package].
We maintain two branches of wxHaskell.
 
 
The 0.13 branch supports wxWidgets 2.8.x, and is the easiest to get working. Many Linux distributions come with packaged wxWidgets 2.8.x, and Windows users can download the pre-built [http://wxpack.sourceforge.net wxPack] distribution. This branch is in a maintenance mode, and will not receive significant new development.
 
 
The 0.9x branch supports wxWidgets 2.9 and 3.0. For wxWidgets 3.0, Windows users can easily install wxWidgets together with wxHaskell, using a [https://sourceforge.net/projects/wxhaskell/files/wxInstall/ wxInstall package]. The benefit of wxWidgets 3.0 is that it supports quite a number of new and more modern GUI elements. ''wxHaskell 0.9x is essential if you want to build for 64 bit MacOS X targets (e.g. Lion)''.
 
   
 
== Status ==
 
== Status ==
Line 29: Line 25:
 
The C wrapper is, unfortunately, generated by hand, so there is some (mainly tedious boilerplate) work involved in porting a new set of widgets to wxHaskell. Some work has been done into automating this aspect, but we are far from being able to replicate the approach reliably over then entire API as yet.
 
The C wrapper is, unfortunately, generated by hand, so there is some (mainly tedious boilerplate) work involved in porting a new set of widgets to wxHaskell. Some work has been done into automating this aspect, but we are far from being able to replicate the approach reliably over then entire API as yet.
   
From the perspective of the user (rather than the developer) about 90% of the core wxWidgets functionality is already supported, excluding more "exotic" widgets like dockable windows. The library supports Windows, GTK (Linux) and MacOS X.
+
From the perspective of the user (rather than the developer) about 90% of the core wxWidgets functionality is already supported, excluding more "exotic" widgets like dockable windows. The library supports Windows, GTK (Linux) and macOS X.
   
 
== News ==
 
== News ==
Line 81: Line 77:
 
* Wei Tan: [http://www.cse.unsw.edu.au/~cs4132/lecture/wlta543.pdf GUI programming with wxHaskell] (pdf)
 
* Wei Tan: [http://www.cse.unsw.edu.au/~cs4132/lecture/wlta543.pdf GUI programming with wxHaskell] (pdf)
 
* [https://web.archive.org/web/20091220115259/http://www.cse.chalmers.se/edu/course/afp/lab1.html Assignment 1] part of the course (Web Archive)
 
* [https://web.archive.org/web/20091220115259/http://www.cse.chalmers.se/edu/course/afp/lab1.html Assignment 1] part of the course (Web Archive)
[http://www.cse.chalmers.se/edu/course/afp/index.html Advanced Functional Programming], by [http://www.cse.chalmers.se/~koen/ Koen Lindström Claessen] and [http://www.cse.chalmers.se/alumni/bringert/ Björn Bringert], a portal like page (html)
+
* [http://www.cse.chalmers.se/edu/course/afp/index.html Advanced Functional Programming], by [http://www.cse.chalmers.se/~koen/ Koen Lindström Claessen] and [http://www.cse.chalmers.se/alumni/bringert/ Björn Bringert], a portal like page (html)
 
* [https://en.wordpress.com/tag/wxhaskell/ Blog articles about wxHaskell]
 
* [https://en.wordpress.com/tag/wxhaskell/ Blog articles about wxHaskell]
* [http://stackoverflow.com/questions/tagged/wxhaskell Questions about wxHaskell] on Stack Overflow
+
* [https://stackoverflow.com/questions/tagged/wxhaskell Questions about wxHaskell] on Stack Overflow
 
* Sander Evers, Peter Achten, and Jan Kuper: [https://web.archive.org/web/20110724164915/http://www.st.cs.ru.nl/papers/2005/eves2005-FFormsIFL04.pdf A Functional Programming Technique for Forms in GUI] (PDF, from the Web Archive)
 
* Sander Evers, Peter Achten, and Jan Kuper: [https://web.archive.org/web/20110724164915/http://www.st.cs.ru.nl/papers/2005/eves2005-FFormsIFL04.pdf A Functional Programming Technique for Forms in GUI] (PDF, from the Web Archive)
 
* [http://www.sandr.dds.nl/FunctionalForms/ FunctionalForms], a combinator library/domain specific language for wxHaskell which enables a very concise programming style for forms (not maintained since 2005)
 
* [http://www.sandr.dds.nl/FunctionalForms/ FunctionalForms], a combinator library/domain specific language for wxHaskell which enables a very concise programming style for forms (not maintained since 2005)
Line 93: Line 89:
 
* The [http://packdeps.haskellers.com/reverse/wx reverse dependencies list for wx]
 
* The [http://packdeps.haskellers.com/reverse/wx reverse dependencies list for wx]
 
* [http://hackage.haskell.org/package/wxhnotepad An example of how to implement a basic notepad with wxHaskell]
 
* [http://hackage.haskell.org/package/wxhnotepad An example of how to implement a basic notepad with wxHaskell]
* [http://www.mail-archive.com/wxhaskell-users@lists.sourceforge.net/msg01178.html Reducing linking and startup times]
+
* [https://www.mail-archive.com/wxhaskell-users@lists.sourceforge.net/msg01178.html Reducing linking and startup times]
 
* [http://sourceforge.net/p/wxhaskell/feature-requests/6/ Modified Paint.hs example] to show wxGCDC and graphics path drawing in action.
 
* [http://sourceforge.net/p/wxhaskell/feature-requests/6/ Modified Paint.hs example] to show wxGCDC and graphics path drawing in action.
 
* [https://en.wikibooks.org/wiki/Haskell/GUI The Haskell wikibook GUI chapter]
 
* [https://en.wikibooks.org/wiki/Haskell/GUI The Haskell wikibook GUI chapter]
Line 102: Line 98:
 
* [[GuiTV]]: GUI-based tangible values & composable interfaces, on [[TV]], [[Phooey]] and wxHaskell.
 
* [[GuiTV]]: GUI-based tangible values & composable interfaces, on [[TV]], [[Phooey]] and wxHaskell.
 
* [[wxAsteroids]]: a game demonstrating wxHaskell.
 
* [[wxAsteroids]]: a game demonstrating wxHaskell.
* [[GeBoP]]: the General Boardgames Player, offers a set of board games: Ataxx, Bamp, Halma, Hez, Kram, Nim, Reversi, TicTacToe, and Zenix.
+
* [[GeBoP]]: the General Boardgames Player, offers a set of board games: Ataxx, Bamp, Halma, Hex, Kram, Nim, Reversi, TicTacToe, and Zenix.
 
* [https://github.com/JohnLato/Haskell-BlackBoard/blob/master/README.md Haskell-BlackBoard:] a drawing application for making slideshows and videos, based on wxHaskell and [[Functional Reactive Programming]]
 
* [https://github.com/JohnLato/Haskell-BlackBoard/blob/master/README.md Haskell-BlackBoard:] a drawing application for making slideshows and videos, based on wxHaskell and [[Functional Reactive Programming]]
 
* [[Reactive-banana|reactive-banana]] - FRP library with bindings to wxHaskell.
 
* [[Reactive-banana|reactive-banana]] - FRP library with bindings to wxHaskell.
 
* [http://uu-computerscience.github.io/js-asteroids/ wxHaskell for the web]: a port of a subset of wxHaskell to the web browser.
 
* [http://uu-computerscience.github.io/js-asteroids/ wxHaskell for the web]: a port of a subset of wxHaskell to the web browser.
* [http://stackoverflow.com/questions/15867654/wx-haskell-drag-and-drop-example wxHaskell Drag and Drop example] (Stackoverflow)
+
* [https://stackoverflow.com/questions/15867654/wx-haskell-drag-and-drop-example wxHaskell Drag and Drop example] (Stack Overflow)
* The package [http://hackage.haskell.org/package/binding-wx binding-wx]; binds mutable data and lists to WxHaskell widgets.
+
* The package [http://hackage.haskell.org/package/binding-wx binding-wx]; binds mutable data and lists to wxHaskell widgets.
 
* [http://wxhaskell.sourceforge.net/applications.html Application screenshots]
 
* [http://wxhaskell.sourceforge.net/applications.html Application screenshots]
 
* [http://foswiki.cs.uu.nl/foswiki/Dazzle/WebHome Dazzle] (see also [http://www.cs.uu.nl/dazzle/f08-schrage.pdf Haskell Ready to Dazzle the Real World] (PDF))
 
* [http://foswiki.cs.uu.nl/foswiki/Dazzle/WebHome Dazzle] (see also [http://www.cs.uu.nl/dazzle/f08-schrage.pdf Haskell Ready to Dazzle the Real World] (PDF))
* [https://www.cs.tcd.ie/Andrew.Butterfield/Saoithin/ Unifying Theories of Programming Theorem Prover U·(TP)2]
+
* [https://www.scss.tcd.ie/Andrew.Butterfield/Saoithin/ Unifying Theories of Programming Theorem Prover U·(TP)2]
 
* [https://github.com/bendmorris/pssat Protein Secondary Structure Alignment Tool] - performs a probabilistic alignment of predicted secondary structures, and generates HTML output
 
* [https://github.com/bendmorris/pssat Protein Secondary Structure Alignment Tool] - performs a probabilistic alignment of predicted secondary structures, and generates HTML output
   

Latest revision as of 13:40, 5 May 2018


Wxhaskell-black-medium.png


What is it?

wxHaskell is a portable and native GUI library for Haskell. The goal of the project is to provide an industrial strength GUI library for Haskell, but without the burden of developing (and maintaining) one ourselves.

wxHaskell is therefore built on top of wxWidgets – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel.

The current version of wxHaskell supports wxWidgets 2.9 and 3.0. For wxWidgets 3.0, Windows users can easily install wxWidgets together with wxHaskell, using a wxInstall package.

Status

The core interface of wxHaskell was originally derived from the wxEiffel binding. Work on this has been dormant for several years, but the wxHaskell maintainers now support updates to the wxWidgets API themselves.

There are four key components of wxHaskell from version 0.90 onwards (three in earlier branches).

  • wxdirect parses specially written C headers and generates low level Haskell FFI bindings for the exported functions.
  • wxc is a C language binding for wxWidgets. It is needed because the Haskell FFI can only bind to C as it does not understand C++ name mangling. Because it is a C language wrapper over wxWidgets, and is generated as a standard dynamic library on all supported platforms, wxc could be used as the basis for a wxWidgets wrapper for any language which supports linking to C (so that would be all of them then). In older versions of wxHaskell, the wxc components were built as a monolithic static library with wxcore.
  • wxcore is a set of low-level Haskell bindings to wxc. A large part is generated automatically by wxdirect, with some key abstractions being hand-coded in Haskell. You can program directly to the wxcore interface if you wish (it is sometimes the only way, in fact).
  • wx is a set of higher-level wrappers over wxcore. It is intended to make it easier to write reasonably idiomatic Haskell. Most wxHaskell software is about 80% wx and 20% wxcore.

The C wrapper is, unfortunately, generated by hand, so there is some (mainly tedious boilerplate) work involved in porting a new set of widgets to wxHaskell. Some work has been done into automating this aspect, but we are far from being able to replicate the approach reliably over then entire API as yet.

From the perspective of the user (rather than the developer) about 90% of the core wxWidgets functionality is already supported, excluding more "exotic" widgets like dockable windows. The library supports Windows, GTK (Linux) and macOS X.

News

28 April 2017
wxHaskell 0.92.3 is released.
30 December 2015
wxInstall Achelanne 0.1 and wxHaskell 0.92.2 are released.
9 October 2015
wxInstall Abriline packages and wxHaskell 0.92.1 are released.
27 August 2015
wxHaskell 0.92.0 is released.
12 August 2014
wxHaskell 0.91.0 is released. This version accepts wxWidgets 2.9 and 3.0.
21 March 2014
wxHaskell 0.90.1 is released.

See also Old wxHaskell news

Documentation

Resources

External links

See also