gtk2hs-rpn 0.1 → 0.2
raw patch · 8 files changed
+12/−83 lines, 8 filesdep ~basedep ~cairodep ~glib
Dependency ranges changed: base, cairo, glib, gtk, mtl
Files
- .hg_archival.txt +0/−2
- .hgtags +0/−3
- examples/Setup.hs +0/−5
- examples/example1.hs +0/−56
- examples/examples.cabal +0/−12
- gtk2hs-rpn.cabal +10/−2
- src/CanBeCasted.hs +0/−1
- src/Graphics/UI/Gtk/Layout/Rpn.hs +2/−2
− .hg_archival.txt
@@ -1,2 +0,0 @@-repo: 73f9f23123106e581edbcf74b725d9a23e2eb1f4-node: bd4d9234cf7e7a1fa4b8c5a47f711348d0192a7c
− .hgtags
@@ -1,3 +0,0 @@-9e2bed8ab08ad6f310093bec0c339ae8f6ddb142 0.0.2-6ad8883193562cd2d520d765028713a689fe43b1 0.1-8a3c94fd99a61ca2a002f71edaa0594fa8d54e27 0.1
− examples/Setup.hs
@@ -1,5 +0,0 @@-#!/usr/bin/env runhaskell--import Distribution.Simple--main = defaultMain
− examples/example1.hs
@@ -1,56 +0,0 @@-module Main where-import Graphics.UI.Gtk-import Graphics.UI.Gtk.Gdk.EventM-import Graphics.Rendering.Cairo-import Graphics.UI.Gtk.Layout.Rpn-import Data.Monoid--title :: String -> [AttrOp Window]-title s = [windowTitle := s]-pressed :: Signal Widget (EventM EButton Bool)-pressed = buttonPressEvent--main = do- initGUI-- -- Create a new operator that takes a label- -- and a button and pack then - -- in a horizontal box .-- let line s = mconcat [- rLABEL s,- rRIGHT,- rBUTTON s $ return (),- rCENTER,- rHBOX [PackGrow,PackGrow]- ]-- -- Create a new operator that packs many 'line'- -- in a vertical box .-- let column = mconcat $ [- line "One Button",- line "Another Button",- line "Yet Another Button",- line "Last Button",- rVBOX $ replicate 4 PackGrow- ]-- -- Take two copies of 'column' and add then- -- to a notebook . Then create a stock button- -- and attach a action to an event . Then- -- join the notebook and that button in a vertical box.- -- Insert everything in a main window , and- -- finally make everything into widgets .-- [mainWindow] <- widgetsFromRpn [- column,- column,- rNOTEBOOK ["First Page","Second Page"],- rBUTTON stockQuit mainQuit,- rVBOX [PackGrow,PackNatural],- rMAIN "Layout.Rpn Example"- ]-- widgetShowAll mainWindow- mainGUI
− examples/examples.cabal
@@ -1,12 +0,0 @@-cabal-Version: >= 1.2-name: gtk2hs-rpn-examples-version: 1-build-type: Simple-license: PublicDomain-maintainer: Maurício CA <mauricio.antunes@gmail.com>-Executable example1- main-is: example1.hs- build-depends: base, gtk, gtk2hs-rpn, mtl, cairo- hs-source-dirs: .- extensions:- NoMonomorphismRestriction
gtk2hs-rpn.cabal view
@@ -1,6 +1,7 @@ cabal-Version: >= 1.2 name: gtk2hs-rpn-version: 0.1+version: 0.2+homepage: http://bitbucket.org/mauricio/gtk2hs-rpn synopsis: Adds a module to gtk2hs allowing layouts to be defined using reverse polish notation.@@ -18,11 +19,18 @@ license-file: LICENSE maintainer: Maurício CA <mauricio.antunes@gmail.com> category: GUI+bug-reports: http://bitbucket.org/mauricio/gtk2hs-rpn/issues Library- build-depends: base, gtk >= 0.10, cairo, mtl, glib+ build-depends:+ base >= 4 && < 5,+ gtk >= 0.11 && < 0.12,+ cairo >= 0.11 && < 0.12,+ glib >= 0.11 && < 0.12,+ mtl >= 1.1.0.2 && < 1.2 hs-source-dirs: src extensions: NoMonomorphismRestriction+ ScopedTypeVariables exposed-modules: Graphics.UI.Gtk.Layout.Rpn other-modules: RPN, Basic, CanBeCasted
src/CanBeCasted.hs view
@@ -4,7 +4,6 @@ CanBeCasted (glibCast) ) where import Graphics.UI.Gtk-import Graphics.UI.Gtk.Types -- | 'CanBeCasted' class allows casting between some -- 'System.Glib.GObject.GObjectClass' instances.
src/Graphics/UI/Gtk/Layout/Rpn.hs view
@@ -137,7 +137,7 @@ configScale io w = do set w [rangeUpdatePolicy := UpdateDelayed]- adj <- A.get w rangeAdjustment+ (adj::Adjustment) <- A.get w rangeAdjustment v1 <- A.get adj adjustmentLower v2 <- A.get adj adjustmentUpper set w [rangeValue := (v2+v1)/2]@@ -197,7 +197,7 @@ tCBKSPIN $ configSpin io] configSpin io w = do- adj <- A.get w spinButtonAdjustment+ (adj::Adjustment) <- A.get w spinButtonAdjustment v1 <- A.get adj adjustmentLower v2 <- A.get adj adjustmentUpper set w [spinButtonValue := (v2+v1)/2]