From: Duncan C. <dun...@us...> - 2005-03-13 19:35:18
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30354/gtk/Graphics/UI/Gtk/Multiline Modified Files: TextBuffer.chs TextMark.chs TextTag.chs.pp TextView.chs Log Message: Add properties. For the first round, just the easy properties that are implemented in terms of existing getter/setter functions and where there are no issues with NULL/Maybe types. Add Attributes file to glib package and modify Makefile.am accordingly. Index: TextView.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextView.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TextView.chs 25 Feb 2005 22:53:42 -0000 1.4 +++ TextView.chs 13 Mar 2005 19:34:36 -0000 1.5 @@ -128,6 +128,19 @@ textViewGetIndent, textViewGetDefaultAttributes, +-- * Properties + textViewPixelsAboveLines, + textViewPixelsBelowLines, + textViewPixelsInsideWrap, + textViewEditable, + textViewWrapMode, + textViewJustification, + textViewLeftMargin, + textViewRightMargin, + textViewIndent, + textViewCursorVisible, + textViewBuffer, + -- * Signals onCopyClipboard, afterCopyClipboard, @@ -159,6 +172,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import Graphics.UI.Gtk.Abstract.Object (makeNewObject) import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} @@ -731,6 +745,120 @@ >>= makeNewTextAttributes +-------------------- +-- Properties + +-- | Pixels of blank space above paragraphs. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewPixelsAboveLines :: Attr TextView Int +textViewPixelsAboveLines = Attr + textViewGetPixelsAboveLines + textViewSetPixelsAboveLines + +-- | Pixels of blank space below paragraphs. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewPixelsBelowLines :: Attr TextView Int +textViewPixelsBelowLines = Attr + textViewGetPixelsBelowLines + textViewSetPixelsBelowLines + +-- | Pixels of blank space between wrapped lines in a paragraph. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewPixelsInsideWrap :: Attr TextView Int +textViewPixelsInsideWrap = Attr + textViewGetPixelsInsideWrap + textViewSetPixelsInsideWrap + +-- | Whether the text can be modified by the user. +-- +-- Default value: @True@ +-- +textViewEditable :: Attr TextView Bool +textViewEditable = Attr + textViewGetEditable + textViewSetEditable + +-- | Whether to wrap lines never, at word boundaries, or at character +-- boundaries. +-- +-- Default value: 'WrapNone' +-- +textViewWrapMode :: Attr TextView WrapMode +textViewWrapMode = Attr + textViewGetWrapMode + textViewSetWrapMode + +-- | Left, right, or center justification. +-- +-- Default value: 'JustifyLeft' +-- +textViewJustification :: Attr TextView Justification +textViewJustification = Attr + textViewGetJustification + textViewSetJustification + +-- | Width of the left margin in pixels. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewLeftMargin :: Attr TextView Int +textViewLeftMargin = Attr + textViewGetLeftMargin + textViewSetLeftMargin + +-- | Width of the right margin in pixels. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewRightMargin :: Attr TextView Int +textViewRightMargin = Attr + textViewGetRightMargin + textViewSetRightMargin + +-- | Amount to indent the paragraph, in pixels. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +textViewIndent :: Attr TextView Int +textViewIndent = Attr + textViewGetIndent + textViewSetIndent + +-- | If the insertion cursor is shown. +-- +-- Default value: @True@ +-- +textViewCursorVisible :: Attr TextView Bool +textViewCursorVisible = Attr + textViewGetCursorVisible + textViewSetCursorVisible + +-- | The buffer which is displayed. +-- +textViewBuffer :: Attr TextView TextBuffer +textViewBuffer = Attr + textViewGetBuffer + textViewSetBuffer + +-------------------- -- Signals -- | Copying to the clipboard. Index: TextMark.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextMark.chs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TextMark.chs 25 Feb 2005 01:11:36 -0000 1.3 +++ TextMark.chs 13 Mar 2005 19:34:36 -0000 1.4 @@ -70,14 +70,18 @@ textMarkGetDeleted, textMarkGetName, textMarkGetBuffer, - textMarkGetLeftGravity + textMarkGetLeftGravity, + +-- * Properties + textMarkVisible ) where import Monad (liftM) import System.Glib.FFI import System.Glib.UTFString -import System.Glib.GObject (makeNewGObject) +import System.Glib.Attributes (Attr(..)) +import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -136,3 +140,12 @@ textMarkGetLeftGravity tm = liftM toBool $ {#call unsafe text_mark_get_left_gravity#} (toTextMark tm) +-------------------- +-- Properties + +-- | \'visible\' property. See 'textMarkGetVisible' and 'textMarkSetVisible' +-- +textMarkVisible :: Attr TextMark Bool +textMarkVisible = Attr + textMarkGetVisible + textMarkSetVisible Index: TextTag.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TextTag.chs.pp 25 Feb 2005 22:53:42 -0000 1.4 +++ TextTag.chs.pp 13 Mar 2005 19:34:36 -0000 1.5 @@ -67,12 +67,16 @@ TextAttributes(..), textAttributesNew, makeNewTextAttributes, --internal + +-- * Properties + textTagPriority ) where import Monad (liftM) import System.Glib.FFI -import System.Glib.GObject (makeNewGObject) +import System.Glib.Attributes (Attr(..)) +import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -150,3 +154,13 @@ text_attributes_unref :: Ptr TextAttributes -> IO () #endif + +-------------------- +-- Properties + +-- | \'priority\' property. See 'textTagGetPriority' and 'textTagSetPriority' +-- +textTagPriority :: Attr TextTag Int +textTagPriority = Attr + textTagGetPriority + textTagSetPriority Index: TextBuffer.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TextBuffer.chs 25 Feb 2005 22:53:42 -0000 1.4 +++ TextBuffer.chs 13 Mar 2005 19:34:35 -0000 1.5 @@ -130,6 +130,9 @@ textBufferBeginUserAction, textBufferEndUserAction, +-- * Properties + textBufferModified, + -- * Signals onApplyTag, afterApplyTag, @@ -160,6 +163,7 @@ import System.Glib.FFI import System.Glib.UTFString +import System.Glib.Attributes (Attr(..)) import System.Glib.GObject (makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -601,6 +605,17 @@ toTextBuffer -------------------- +-- Properties + +-- | \'modified\' property. See 'textBufferGetModified' and +-- 'textBufferSetModified' +-- +textBufferModified :: Attr TextBuffer Bool +textBufferModified = Attr + textBufferGetModified + textBufferSetModified + +-------------------- -- Signals -- | A 'TextTag' was applied to a region of |