Personal tools

WxGeneric

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (change email adress)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:User interfaces]]
 
[[Category:User interfaces]]
  +
[[Category:WxHaskell]]
  +
[[Category:Packages]]
   
The WxGeneric library constructs widgets generically, using [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/syb-with-class-0.5.1 SYB3].
+
Using an algebraic data types structure and field names, this library constructs widgets for wxHaskell. It can handle data types with single or multiple constructors, as well as recursive data types.
  +
  +
The library is designed to integrate smoothly with wxHaskell. First, by making it easy to integrate WxGeneric-widgets into existing wxHaskell programs. Second, by letting a user extend WxGeneric using mostly wxHaskell function.
   
 
= Links =
 
= Links =
Line 7: Line 9:
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/WxGeneric WxGeneric on Hackage]
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/WxGeneric WxGeneric on Hackage]
 
* [http://code.haskell.org/WxGeneric/ WxGeneric on code.haskell.org]
 
* [http://code.haskell.org/WxGeneric/ WxGeneric on code.haskell.org]
  +
* [http://trac.haskell.org/WxGeneric Here you report bug or feature requests]
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ Blog post: "Using WxGeneric" (21st May 2008)]
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ Blog post: "Using WxGeneric" (21st May 2008)]
 
* [http://lindstroem.wordpress.com/2008/05/03/introducing-wxgeneric/ Blog post: "Introducing WxGeneric" (3rd May 2008)]
 
* [http://lindstroem.wordpress.com/2008/05/03/introducing-wxgeneric/ Blog post: "Introducing WxGeneric" (3rd May 2008)]
Line 33: Line 36:
 
Then you is ready to try the examples, see <path to WxGeneric>/examples.
 
Then you is ready to try the examples, see <path to WxGeneric>/examples.
   
= Author =
+
= Examples =
  +
  +
You can find plenty of examples in the [http://code.haskell.org/WxGeneric/examples/ WxGeneric examples folder]. Especially, you can find many small examples are found in [http://code.haskell.org/WxGeneric/examples/Examples.hs Examples.hs in WxGeneric/Examples folder].
  +
  +
= Screenshots =
  +
  +
The simplest possible example is editing an Int:
  +
  +
<center>
  +
[[Image:WxGeneric_AnyInt_Example.png | Int Example]]
  +
</center>
  +
  +
If you have downloaded and installed WxGeneric you can run this example yourself by:
  +
  +
ghc examples/Examples.hs -e anyInt
  +
  +
One nice feature of WxGenerics is that it handles recursive data types. For example:
  +
  +
<haskell>
  +
data MyTree = Branch { left :: MyTree, right :: MyTree }
  +
| Leaf Int Double
  +
deriving Show
  +
</haskell>
  +
  +
will produce a editable widget, such as:
  +
  +
<center>
  +
[[Image:WxGeneric_MyTree.png | MyTree Example]]
  +
</center>
  +
  +
If you have downloaded and installed WxGeneric you can run this example yourself by:
  +
  +
ghc examples/Examples.hs -e tree
  +
  +
= Contact Information =
  +
  +
Questions, ideas or comments should be directed to [https://lists.sourceforge.net/lists/listinfo/wxhaskell-users wxHaskell-users mailing list]. If messages are of a more private nature, you can contact me, the auther of WxGenerics, at [mailto:mads.lindstroem@gmail.com Mads Lindstrøm].
   
The author of this library is [mailto:mads_lindstroem@yahoo.dk Mads Lindstrøm]. Feel free to contact me with questions, ideas, or comments.
+
There is also a [http://trac.haskell.org/WxGeneric bug and feature request -tracker here].

Latest revision as of 20:39, 16 July 2011


Using an algebraic data types structure and field names, this library constructs widgets for wxHaskell. It can handle data types with single or multiple constructors, as well as recursive data types.

The library is designed to integrate smoothly with wxHaskell. First, by making it easy to integrate WxGeneric-widgets into existing wxHaskell programs. Second, by letting a user extend WxGeneric using mostly wxHaskell function.

Contents

[edit] 1 Links

[edit] 2 Download and Install

Before installing WxGeneric you need:

You can get the sources either from hackage or from WxGeneric's Darcs repository:

darcs get http://code.haskell.org/WxGeneric/

After getting the sources do:

cd WxGeneric
runhaskell Setup clean
runhaskell Setup configure --user --prefix=$HOME
runhaskell Setup build
runhaskell Setup install

Then you is ready to try the examples, see <path to WxGeneric>/examples.

[edit] 3 Examples

You can find plenty of examples in the WxGeneric examples folder. Especially, you can find many small examples are found in Examples.hs in WxGeneric/Examples folder.

[edit] 4 Screenshots

The simplest possible example is editing an Int:

Int Example

If you have downloaded and installed WxGeneric you can run this example yourself by:

ghc examples/Examples.hs -e anyInt

One nice feature of WxGenerics is that it handles recursive data types. For example:

data MyTree = Branch { left :: MyTree, right :: MyTree }
            | Leaf Int Double
              deriving Show

will produce a editable widget, such as:

MyTree Example

If you have downloaded and installed WxGeneric you can run this example yourself by:

ghc examples/Examples.hs -e tree

[edit] 5 Contact Information

Questions, ideas or comments should be directed to wxHaskell-users mailing list. If messages are of a more private nature, you can contact me, the auther of WxGenerics, at Mads Lindstrøm.

There is also a bug and feature request -tracker here.