gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Entry.EntryBuffer

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

Text buffer for `Entry`

- Module available since Gtk+ version 2.18

Synopsis

- data EntryBuffer
- class GObjectClass o => EntryBufferClass o
- castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer
- toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer
- entryBufferNew :: GlibString string => Maybe string -> IO EntryBuffer
- entryBufferGetBytes :: EntryBufferClass self => self -> IO Int
- entryBufferInsertText :: (EntryBufferClass self, GlibString string) => self -> Int -> string -> IO Int
- entryBufferDeleteText :: EntryBufferClass self => self -> Int -> Int -> IO Int
- entryBufferEmitDeletedText :: EntryBufferClass self => self -> Int -> Int -> IO ()
- entryBufferEmitInsertedText :: (EntryBufferClass self, GlibString string) => self -> Int -> string -> Int -> IO ()
- entryBufferText :: (EntryBufferClass self, GlibString string) => Attr self string
- entryBufferLength :: EntryBufferClass self => ReadAttr self Int
- entryBufferMaxLength :: EntryBufferClass self => Attr self Int
- entryBufferInsertedText :: (EntryBufferClass self, GlibString string) => Signal self (Int -> string -> Int -> IO ())
- entryBufferDeletedText :: EntryBufferClass self => Signal self (Int -> Int -> IO ())

# Detail

The `EntryBuffer` class contains the actual text displayed in a `Entry` widget.

A single `EntryBuffer` object can be shared by multiple `Entry` widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.

`EntryBuffer` may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable memory, useful in the case of important passwords. Or a derived class could integrate with an application's concept of undo/redo.

# Class Hierarchy

    | GObject
    | +----EntryBuffer

# Types

data EntryBuffer Source #

#### Instances

Instances details

Eq EntryBuffer Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: EntryBuffer -> EntryBuffer -> Bool Source # (/=) :: EntryBuffer -> EntryBuffer -> Bool Source #
Ord EntryBuffer Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: EntryBuffer -> EntryBuffer -> Ordering Source #

(<) :: EntryBuffer -> EntryBuffer -> Bool Source #

(<=) :: EntryBuffer -> EntryBuffer -> Bool Source #

(>) :: EntryBuffer -> EntryBuffer -> Bool Source #

(>=) :: EntryBuffer -> EntryBuffer -> Bool Source #

max :: EntryBuffer -> EntryBuffer -> EntryBuffer Source #

min :: EntryBuffer -> EntryBuffer -> EntryBuffer Source #

GObjectClass EntryBuffer Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: EntryBuffer -> GObject Source # unsafeCastGObject :: GObject -> EntryBuffer Source #
EntryBufferClass EntryBuffer Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class GObjectClass o => EntryBufferClass o Source #

#### Instances

Instances details

EntryBufferClass EntryBuffer Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer Source #

toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer Source #

# Constructors

entryBufferNew Source #

Arguments

:: GlibString string |
=> Maybe string | `initialChars` - initial buffer text or `Nothing`
-> IO EntryBuffer |

Create a new `EntryBuffer` object.

Optionally, specify initial text to set in the buffer.

- Available since Gtk+ version 2.18

# Methods

entryBufferGetBytes Source #

Arguments

:: EntryBufferClass self |
=> self |
-> IO Int | returns The byte length of the buffer.

Retrieves the length in bytes of the buffer. See `entryBufferGetLength`.

- Available since Gtk+ version 2.18

entryBufferInsertText Source #

Arguments

:: (EntryBufferClass self, GlibString string) |
=> self |
-> Int | `position` - the position at which to insert text.
-> string | `chars` - the text to insert into the buffer.
-> IO Int | returns The number of characters actually inserted.

Inserts `chars` into the contents of the buffer, at position `position`.

- Available since Gtk+ version 2.18

entryBufferDeleteText Source #

Arguments

:: EntryBufferClass self |
=> self |
-> Int | `position` - position at which to delete text
-> Int | `nChars` - number of characters to delete
-> IO Int | returns The number of characters deleted.

Deletes a sequence of characters from the buffer. `nChars` characters are deleted starting at `position`. If `nChars` is negative, then all characters until the end of the text are deleted.

- Available since Gtk+ version 2.18

entryBufferEmitDeletedText Source #

Arguments

:: EntryBufferClass self |
=> self |
-> Int | `position` - position at which text was deleted
-> Int | `nChars` - number of characters deleted
-> IO () |

Used when subclassing `EntryBuffer`

- Available since Gtk+ version 2.18

entryBufferEmitInsertedText Source #

Arguments

:: (EntryBufferClass self, GlibString string) |
=> self |
-> Int | `position` - position at which text was inserted
-> string | `chars` - text that was inserted
-> Int | `nChars` - number of characters inserted
-> IO () |

Used when subclassing `EntryBuffer`

- Available since Gtk+ version 2.18

# Attributes

entryBufferText :: (EntryBufferClass self, GlibString string) => Attr self string Source #

The contents of the buffer.

Default value: ""

- Available since Gtk+ version 2.18

entryBufferLength :: EntryBufferClass self => ReadAttr self Int Source #

The length of the text in buffer.

Allowed values: <= 65535

Default value: 0

- Available since Gtk+ version 2.18

entryBufferMaxLength :: EntryBufferClass self => Attr self Int Source #

The maximum length of the text in the buffer.

Allowed values: [0,65535]

Default value: 0

- Available since Gtk+ version 2.18

# Signals

entryBufferInsertedText :: (EntryBufferClass self, GlibString string) => Signal self (Int -> string -> Int -> IO ()) Source #

- Available since Gtk+ version 2.18

entryBufferDeletedText :: EntryBufferClass self => Signal self (Int -> Int -> IO ()) Source #

- Available since Gtk+ version 2.18