packages feed

wx 0.13.2.3 → 0.90

raw patch · 3 files changed

+38/−25 lines, 3 filesdep ~wxcore

Dependency ranges changed: wxcore

Files

src/Graphics/UI/WX/Controls.hs view
@@ -1,4 +1,3 @@- {-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-} -------------------------------------------------------------------------------- {-|	Module      :  Controls@@ -61,6 +60,8 @@       , MediaCtrlBackend(..), MediaCtrl, mediaCtrl, mediaCtrlWithBackend, mediaCtrlEx       -- ** StyledTextCtrl       , StyledTextCtrl, stcEvent, styledTextCtrl, styledTextCtrlEx+      -- ** PropertyGrid+      , PropertyGrid, propertyGrid, propertyGridEvent     ) where  import Graphics.UI.WXCore hiding (Event)@@ -76,7 +77,6 @@  import Control.Monad (forM_) import Data.Dynamic  -- for "alignment"-import System.Info (os)   defaultStyle@@ -315,27 +315,15 @@     = newAttr "enabled" textCtrlIsEditable textCtrlSetEditable -} --- Workaround for Unexpected TextCtrl behaviour (https://github.com/jodonoghue/wxHaskell/issues/1#issuecomment-5202439)--- Problem arises from the fact that wxTE_RICH is needed only on Windows platforms, but is essential there. However, on--- wxMac > 2.9, wxTE_RICH seems not to be ignored as the documentation claims.-getRichTE =  if (os == "mingw32") || (os == "win32")-             then wxTE_RICH-             else 0--getRichTE2 = if (os == "mingw32") || (os == "win32")-             then wxTE_RICH2-             else 0- -- | Create a single-line text entry control. Note: 'alignment' has to -- be set at creation time (or the entry has default alignment (=left) ).--- This is an alias for textEntry -- -- * Instances: 'Wrap', 'Aligned', 'Commanding' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child', --             'Able', 'Tipped', 'Identity', 'Styled', 'Reactive', 'Paint'. -- entry :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) entry parent props-  = textCtrlEx parent getRichTE props+  = textCtrlEx parent wxTE_RICH props  -- | Create a single-line text entry control. Note: 'alignment' has to -- be set at creation time (or the entry has default alignment (=left) ).@@ -345,7 +333,7 @@ -- textEntry :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textEntry parent props-  = textCtrlEx parent getRichTE props+  = textCtrlEx parent wxTE_RICH props  -- | Create a multi-line text control. Note: the 'wrap' and 'alignment' -- have to be set at creation time or the default to 'WrapNone' and 'AlignLeft' respectively.@@ -355,7 +343,7 @@ -- textCtrl :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textCtrl parent props-  = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE) props+  = textCtrlEx parent (wxTE_MULTILINE .+. wxTE_RICH) props   -- | Create a multi-line text rich-text control with a certain wrap mode@@ -368,7 +356,7 @@ -- textCtrlRich :: Window a -> [Prop (TextCtrl ())] -> IO (TextCtrl ()) textCtrlRich parent props-  = textCtrlEx parent (wxTE_MULTILINE .+. getRichTE2) props+  = textCtrlEx parent (wxTE_MULTILINE .+. wxTE_RICH2) props  -- | Create a generic text control given a certain style. --@@ -379,10 +367,9 @@ textCtrlEx parent stl props   = feed2 props stl $     initialWindow    $ \id rect ->-    initialText      $ \txt ->     initialWrap      $     initialAlignment $ \props flags ->-    do e <- textCtrlCreate parent id txt rect flags+    do e <- textCtrlCreate parent id "" rect flags        set e props        return e @@ -1298,3 +1285,28 @@     do s <- styledTextCtrlCreate parent id "" rect style        set s props        return s++{--------------------------------------------------------------------------------+  PropertyGrid+--------------------------------------------------------------------------------}++-- | PropertyGrid control events.+propertyGridEvent :: Event (PropertyGrid a) (EventPropertyGrid -> IO ())+propertyGridEvent+  = newEvent "propertyGridEvent" propertyGridGetOnPropertyGridEvent propertyGridOnPropertyGridEvent++-- | Create a property grid.+--+-- * Attributes: 'propertyGridEvent',+--+-- * Instances: 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child',+--             'Able', 'Tipped', 'Identity', 'Styled', 'Reactive', 'Paint'.+--+propertyGrid :: Window a -> [Prop (PropertyGrid ())] -> IO (PropertyGrid ())+propertyGrid parent props+  = feed2 props wxPG_DEFAULT_STYLE $+    initialContainer $ \id rect -> \props flags ->+    do l <- propertyGridCreate parent id rect flags+       set l props+       return l+
src/Graphics/UI/WX/Window.hs view
@@ -131,7 +131,7 @@         = ifInstanceOf w classComboBox             (\cb -> (comboBoxGetValue cb, \s -> do comboBoxClear cb; comboBoxAppend cb s)) $           ifInstanceOf w classTextCtrl-            (\tc -> (textCtrlGetValue tc, \s -> do textCtrlChangeValue tc s)) $+            (\tc -> (textCtrlGetValue tc, \s -> do textCtrlClear tc; textCtrlWriteText tc s)) $             (windowGetLabel w,windowSetLabel w)    appendText w s
wx.cabal view
@@ -1,5 +1,5 @@ Name:           wx-Version:        0.13.2.3+Version:        0.90 License:        OtherLicense License-file:   license.txt Homepage:       http://haskell.org/haskellwiki/WxHaskell@@ -11,7 +11,7 @@                 It is built on top of wxWidgets - a comprehensive C++                 library that is portable across all major GUI platforms;                 including GTK, Windows, X11, and MacOS X.  This version-                works with wxWidgets 2.8.+                works with wxWidgets 2.9 only. Maintainer:     wxhaskell-devel@lists.sourceforge.net Synopsis:       wxHaskell Data-Files:     wx.cabal@@ -24,7 +24,7 @@  Library     if flag(splitBase)-        build-depends: wxcore >= 0.13.2.3 && < 0.90,+        build-depends: wxcore >= 0.90,                        stm         if flag(newBase)             build-depends:@@ -34,7 +34,7 @@                 base >= 3 && < 4     else         build-depends: base <  3, -                       wxcore >= 0.12.1.6 && < 0.90,+                       wxcore >= 0.90,                        stm   Exposed-Modules:@@ -54,4 +54,5 @@   Graphics.UI.WX.Timer   Graphics.UI.WX.Menu   Graphics.UI.WX+  Hs-Source-Dirs: src