gi-clutter-1.0.2: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.Text

Description

The Text struct contains only private data.

Since: 1.0

Synopsis

Exported types

newtype Text Source #

Memory-managed wrapper type.

Constructors

Text (ManagedPtr Text) 

Instances

Instances details
Eq Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

Methods

(==) :: Text -> Text -> Bool #

(/=) :: Text -> Text -> Bool #

GObject Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

ManagedPtrNewtype Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

TypedObject Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

Methods

glibType :: IO GType #

HasParentTypes Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

IsGValue (Maybe Text) Source #

Convert Text to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.Text

type ParentTypes Text Source # 
Instance details

Defined in GI.Clutter.Objects.Text

class (GObject o, IsDescendantOf Text o) => IsText o Source #

Type class for types which can be safely cast to Text, for instance with toText.

Instances

Instances details
(GObject o, IsDescendantOf Text o) => IsText o Source # 
Instance details

Defined in GI.Clutter.Objects.Text

toText :: (MonadIO m, IsText o) => o -> m Text Source #

Cast to Text, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, addAction, addActionWithName, addActor, addChild, addConstraint, addConstraintWithName, addEffect, addEffectWithName, addTransition, allocate, allocateAlignFill, allocateAvailableSize, allocatePreferredSize, animateProperty, animateWithAlphav, animateWithTimelinev, animatev, applyRelativeTransformToPoint, applyTransformToPoint, bindModel, bindProperty, bindPropertyFull, childGetProperty, childNotify, childSetProperty, clearActions, clearConstraints, clearEffects, contains, continuePaint, coordsToPosition, createChildMeta, createPangoContext, createPangoLayout, deleteChars, deleteSelection, deleteText, destroy, destroyAllChildren, destroyChildMeta, detachAnimation, event, findChildByName, findProperty, forceFloating, foreach, foreachWithInternals, freezeNotify, getv, grabKeyFocus, hasActions, hasAllocation, hasClip, hasConstraints, hasEffects, hasKeyFocus, hasOverlaps, hasPointer, hide, hideAll, insertChildAbove, insertChildAtIndex, insertChildBelow, insertText, insertUnichar, interpolateValue, isFloating, isInClonePaint, isMapped, isRealized, isRotated, isScaled, isVisible, lower, lowerBottom, lowerChild, map, moveAnchorPoint, moveAnchorPointFromGravity, moveBy, needsExpand, notify, notifyByPspec, paint, parseCustomNode, popInternal, positionToCoords, pushInternal, queueRedraw, queueRedrawWithClip, queueRelayout, raise, raiseChild, raiseTop, realize, ref, refSink, removeAction, removeActionByName, removeActor, removeAllChildren, removeAllTransitions, removeChild, removeClip, removeConstraint, removeConstraintByName, removeEffect, removeEffectByName, removeTransition, reparent, replaceChild, restoreEasingState, runDispose, saveEasingState, shouldPickPaint, show, showAll, sortDepthOrder, stealData, stealQdata, thawNotify, transformStagePoint, unmap, unparent, unrealize, unref, unsetFlags, watchClosure.

Getters

getAbsAllocationVertices, getAccessible, getAction, getActions, getActivatable, getAllocationBox, getAllocationGeometry, getAllocationVertices, getAnchorPoint, getAnchorPointGravity, getAnimation, getAttributes, getBackgroundColor, getBuffer, getChars, getChildAtIndex, getChildMeta, getChildTransform, getChildren, getClip, getClipToAllocation, getColor, getConstraint, getConstraints, getContent, getContentBox, getContentGravity, getContentRepeat, getContentScalingFilters, getCursorColor, getCursorPosition, getCursorRect, getCursorSize, getCursorVisible, getData, getDefaultPaintVolume, getDepth, getEasingDelay, getEasingDuration, getEasingMode, getEditable, getEffect, getEffects, getEllipsize, getFirstChild, getFixedPositionSet, getFlags, getFontDescription, getFontName, getGeometry, getGid, getHeight, getId, getInitialState, getJustify, getLastChild, getLayout, getLayoutManager, getLayoutOffsets, getLineAlignment, getLineWrap, getLineWrapMode, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxLength, getNChildren, getName, getNextSibling, getOffscreenRedirect, getOpacity, getPaintBox, getPaintOpacity, getPaintVisibility, getPaintVolume, getPangoContext, getParent, getPasswordChar, getPivotPoint, getPivotPointZ, getPosition, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreviousSibling, getProperty, getQdata, getReactive, getRequestMode, getRotation, getRotationAngle, getScale, getScaleCenter, getScaleGravity, getScaleZ, getSelectable, getSelectedTextColor, getSelection, getSelectionBound, getSelectionColor, getShader, getSingleLineMode, getSize, getStage, getText, getTextDirection, getTransform, getTransformationMatrix, getTransformedPaintVolume, getTransformedPosition, getTransformedSize, getTransition, getTranslation, getUseMarkup, getWidth, getX, getXAlign, getXExpand, getY, getYAlign, getYExpand, getZPosition, getZRotationGravity.

Setters

setActivatable, setAllocation, setAnchorPoint, setAnchorPointFromGravity, setAttributes, setBackgroundColor, setBuffer, setChildAboveSibling, setChildAtIndex, setChildBelowSibling, setChildTransform, setClip, setClipToAllocation, setColor, setContent, setContentGravity, setContentRepeat, setContentScalingFilters, setCursorColor, setCursorPosition, setCursorSize, setCursorVisible, setCustomProperty, setData, setDataFull, setDepth, setEasingDelay, setEasingDuration, setEasingMode, setEditable, setEllipsize, setFinalState, setFixedPositionSet, setFlags, setFontDescription, setFontName, setGeometry, setHeight, setId, setJustify, setLayoutManager, setLineAlignment, setLineWrap, setLineWrapMode, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMarkup, setMaxLength, setName, setOffscreenRedirect, setOpacity, setParent, setPasswordChar, setPivotPoint, setPivotPointZ, setPosition, setPreeditString, setProperty, setReactive, setRequestMode, setRotation, setRotationAngle, setScale, setScaleFull, setScaleWithGravity, setScaleZ, setSelectable, setSelectedTextColor, setSelection, setSelectionBound, setSelectionColor, setShader, setShaderParam, setShaderParamFloat, setShaderParamInt, setSingleLineMode, setSize, setText, setTextDirection, setTransform, setTranslation, setUseMarkup, setWidth, setX, setXAlign, setXExpand, setY, setYAlign, setYExpand, setZPosition, setZRotationFromGravity.

activate

textActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the activate signal has been emitted, and False otherwise

Emits the activate signal, if self has been set as activatable using textSetActivatable.

This function can be used to emit the activate signal inside a capturedEvent or keyPressEvent signal handlers before the default signal handler for the Text is invoked.

Since: 1.0

coordsToPosition

textCoordsToPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Float

x: the X coordinate, relative to the actor

-> Float

y: the Y coordinate, relative to the actor

-> m Int32

Returns: the position of the character

Retrieves the position of the character at the given coordinates.

Since: 1.10

deleteChars

textDeleteChars Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Word32

nChars: the number of characters to delete

-> m () 

Deletes nChars inside a Text actor, starting from the current cursor position.

Somewhat awkwardly, the cursor position is decremented by the same number of characters you've deleted.

Since: 1.0

deleteSelection

textDeleteSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if text was deleted or if the text actor is empty, and False otherwise

Deletes the currently selected text

This function is only useful in subclasses of Text

Since: 1.0

deleteText

textDeleteText Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int64

startPos: starting position

-> Int64

endPos: ending position

-> m () 

Deletes the text inside a Text actor between startPos and endPos.

The starting and ending positions are expressed in characters, not in bytes.

Since: 1.0

getActivatable

textGetActivatable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the actor is activatable

Retrieves whether a Text is activatable or not.

Since: 1.0

getAttributes

textGetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m AttrList

Returns: the attribute list, or Nothing if none was set. The returned value is owned by the Text and should not be unreferenced.

Gets the attribute list that was set on the Text actor textSetAttributes, if any.

Since: 1.0

getBuffer

textGetBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m TextBuffer

Returns: A GtkEntryBuffer object.

Get the TextBuffer object which holds the text for this widget.

Since: 1.10

getChars

textGetChars Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int64

startPos: start of text, in characters

-> Int64

endPos: end of text, in characters

-> m Text

Returns: a newly allocated string with the contents of the text actor between the specified positions. Use free to free the resources when done

Retrieves the contents of the Text actor between startPos and endPos, but not including endPos.

The positions are specified in characters, not in bytes.

Since: 1.0

getColor

textGetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Color 

Retrieves the text color as set by textSetColor.

Since: 1.0

getCursorColor

textGetCursorColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Color 

Retrieves the color of the cursor of a Text actor.

Since: 1.0

getCursorPosition

textGetCursorPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Int32

Returns: the cursor position, in characters

Retrieves the cursor position.

Since: 1.0

getCursorRect

textGetCursorRect Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Rect 

Retrieves the rectangle that contains the cursor.

The coordinates of the rectangle's origin are in actor-relative coordinates.

Since: 1.16

getCursorSize

textGetCursorSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Word32

Returns: the size of the cursor, in pixels

Retrieves the size of the cursor of a Text actor.

Since: 1.0

getCursorVisible

textGetCursorVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the cursor is visible

Retrieves whether the cursor of a Text actor is visible.

Since: 1.0

getEditable

textGetEditable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the actor is editable

Retrieves whether a Text is editable or not.

Since: 1.0

getEllipsize

textGetEllipsize Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m EllipsizeMode

Returns: EllipsizeMode

Returns the ellipsizing position of a Text actor, as set by textSetEllipsize.

Since: 1.0

getFontDescription

textGetFontDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m FontDescription

Returns: a FontDescription. The returned value is owned by the Text actor and it should not be modified or freed

Retrieves the FontDescription used by self

Since: 1.2

getFontName

textGetFontName Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Text

Returns: a string containing the font name. The returned string is owned by the Text actor and should not be modified or freed

Retrieves the font name as set by textSetFontName.

Since: 1.0

getJustify

textGetJustify Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the text should be justified

Retrieves whether the Text actor should justify its contents on both margins.

Since: 0.6

getLayout

textGetLayout Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Layout

Returns: a Layout. The returned object is owned by the Text actor and should not be modified or freed

Retrieves the current Layout used by a Text actor.

Since: 1.0

getLayoutOffsets

textGetLayoutOffsets Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m (Int32, Int32) 

Obtains the coordinates where the Text will draw the Layout representing the text.

Since: 1.8

getLineAlignment

textGetLineAlignment Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Alignment

Returns: a Alignment

Retrieves the alignment of a Text, as set by textSetLineAlignment.

Since: 1.0

getLineWrap

textGetLineWrap Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the Text actor should wrap its contents

Retrieves the value set using textSetLineWrap.

Since: 1.0

getLineWrapMode

textGetLineWrapMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m WrapMode

Returns: the wrap mode used by the Text

Retrieves the line wrap mode used by the Text actor.

See clutter_text_set_line_wrap_mode ().

Since: 1.0

getMaxLength

textGetMaxLength Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Int32

Returns: the maximum number of characters.

Gets the maximum length of text that can be set into a text actor.

See textSetMaxLength.

Since: 1.0

getPasswordChar

textGetPasswordChar Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Char

Returns: a Unicode character or 0 if the password character is not set

Retrieves the character to use in place of the actual text as set by textSetPasswordChar.

Since: 1.0

getSelectable

textGetSelectable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the actor is selectable

Retrieves whether a Text is selectable or not.

Since: 1.0

getSelectedTextColor

textGetSelectedTextColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Color 

Retrieves the color of selected text of a Text actor.

Since: 1.8

getSelection

textGetSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Text

Returns: a newly allocated string containing the currently selected text, or Nothing. Use free to free the returned string.

Retrieves the currently selected text.

Since: 1.0

getSelectionBound

textGetSelectionBound Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Int32

Returns: the position of the other end of the selection

Retrieves the other end of the selection of a Text actor, in characters from the current cursor position.

Since: 1.0

getSelectionColor

textGetSelectionColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Color 

Retrieves the color of the selection of a Text actor.

Since: 1.0

getSingleLineMode

textGetSingleLineMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the Text actor is in single line mode

Retrieves whether the Text actor is in single line mode.

Since: 1.0

getText

textGetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Text

Returns: the contents of the actor. The returned string is owned by the Text actor and should never be modified or freed

Retrieves a pointer to the current contents of a Text actor.

If you need a copy of the contents for manipulating, either use strdup on the returned string, or use:

  copy = clutter_text_get_chars (text, 0, -1);

Which will return a newly allocated string.

If the Text actor is empty, this function will return an empty string, and not Nothing.

Since: 1.0

getUseMarkup

textGetUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> m Bool

Returns: True if the contents will be parsed for markup

Retrieves whether the contents of the Text actor should be parsed for the Pango text markup.

Since: 1.0

insertText

textInsertText Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Text

text: the text to be inserted

-> Int64

position: the position of the insertion, or -1

-> m () 

Inserts text into a Actor at the given position.

If position is a negative number, the text will be appended at the end of the current contents of the Text.

The position is expressed in characters, not in bytes.

Since: 1.0

insertUnichar

textInsertUnichar Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Char

wc: a Unicode character

-> m () 

Inserts wc at the current cursor position of a Text actor.

Since: 1.0

new

textNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: the newly created Text actor

Creates a new Text actor. This actor can be used to display and edit text.

Since: 1.0

newFull

textNewFull Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

fontName: a string with a font description

-> Text

text: the contents of the actor

-> Color

color: the color to be used to render text

-> m Text

Returns: the newly created Text actor

Creates a new Text actor, using fontName as the font description; text will be used to set the contents of the actor; and color will be used as the color to render text.

This function is equivalent to calling textNew, textSetFontName, textSetText and textSetColor.

Since: 1.0

newWithBuffer

textNewWithBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextBuffer a) 
=> a

buffer: The buffer to use for the new Text.

-> m Text

Returns: a new Text

Creates a new entry with the specified text buffer.

Since: 1.10

newWithText

textNewWithText Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

fontName: a string with a font description

-> Text

text: the contents of the actor

-> m Text

Returns: the newly created Text actor

Creates a new Text actor, using fontName as the font description; text will be used to set the contents of the actor.

This function is equivalent to calling textNew, textSetFontName, and textSetText.

Since: 1.0

positionToCoords

textPositionToCoords Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int32

position: position in characters

-> m (Bool, Float, Float, Float)

Returns: True if the conversion was successful

Retrieves the coordinates of the given position.

Since: 1.0

setActivatable

textSetActivatable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

activatable: whether the Text actor should be activatable

-> m () 

Sets whether a Text actor should be activatable.

An activatable Text actor will emit the activate signal whenever the 'Enter' (or 'Return') key is pressed; if it is not activatable, a new line will be appended to the current content.

An activatable Text must also be set as editable using textSetEditable.

Since: 1.0

setAttributes

textSetAttributes Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe AttrList

attrs: a AttrList or Nothing to unset the attributes

-> m () 

Sets the attributes list that are going to be applied to the Text contents.

The Text actor will take a reference on the AttrList passed to this function.

Since: 1.0

setBuffer

textSetBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a, IsTextBuffer b) 
=> a

self: a Text

-> b

buffer: a TextBuffer

-> m () 

Set the TextBuffer object which holds the text for this widget.

Since: 1.10

setColor

textSetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Color

color: a Color

-> m () 

Sets the color of the contents of a Text actor.

The overall opacity of the Text actor will be the result of the alpha value of color and the composited opacity of the actor itself on the scenegraph, as returned by actorGetPaintOpacity.

Since: 1.0

setCursorColor

textSetCursorColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Color

color: the color of the cursor, or Nothing to unset it

-> m () 

Sets the color of the cursor of a Text actor.

If color is Nothing, the cursor color will be the same as the text color.

Since: 1.0

setCursorPosition

textSetCursorPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int32

position: the new cursor position, in characters

-> m () 

Sets the cursor of a Text actor at position.

The position is expressed in characters, not in bytes.

Since: 1.0

setCursorSize

textSetCursorSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int32

size: the size of the cursor, in pixels, or -1 to use the default value

-> m () 

Sets the size of the cursor of a Text. The cursor will only be visible if the Text:cursor-visible property is set to True.

Since: 1.0

setCursorVisible

textSetCursorVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

cursorVisible: whether the cursor should be visible

-> m () 

Sets whether the cursor of a Text actor should be visible or not.

The color of the cursor will be the same as the text color unless textSetCursorColor has been called.

The size of the cursor can be set using textSetCursorSize.

The position of the cursor can be changed programmatically using textSetCursorPosition.

Since: 1.0

setEditable

textSetEditable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

editable: whether the Text should be editable

-> m () 

Sets whether the Text actor should be editable.

An editable Text with key focus set using actorGrabKeyFocus or stageSetKeyFocus will receive key events and will update its contents accordingly.

Since: 1.0

setEllipsize

textSetEllipsize Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> EllipsizeMode

mode: a EllipsizeMode

-> m () 

Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire contents of a Text actor

Since: 1.0

setFontDescription

textSetFontDescription Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> FontDescription

fontDesc: a FontDescription

-> m () 

Sets fontDesc as the font description for a Text

The FontDescription is copied by the Text actor so you can safely call fontDescriptionFree on it after calling this function.

Since: 1.2

setFontName

textSetFontName Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Text

fontName: a font name, or Nothing to set the default font name

-> m () 

Sets the font used by a Text. The fontName string must either be Nothing, which means that the font name from the default Backend will be used; or be something that can be parsed by the fontDescriptionFromString function, like:

 // Set the font to the system's Sans, 10 points
 clutter_text_set_font_name (text, "Sans 10");

 // Set the font to the system's Serif, 16 pixels
 clutter_text_set_font_name (text, "Serif 16px");

 // Set the font to Helvetica, 10 points
 clutter_text_set_font_name (text, "Helvetica 10");

Since: 1.0

setJustify

textSetJustify Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

justify: whether the text should be justified

-> m () 

Sets whether the text of the Text actor should be justified on both margins. This setting is ignored if Clutter is compiled against Pango < 1.18.

Since: 1.0

setLineAlignment

textSetLineAlignment Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Alignment

alignment: A Alignment

-> m () 

Sets the way that the lines of a wrapped label are aligned with respect to each other. This does not affect the overall alignment of the label within its allocated or specified width.

To align a Text actor you should add it to a container that supports alignment, or use the anchor point.

Since: 1.0

setLineWrap

textSetLineWrap Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

lineWrap: whether the contents should wrap

-> m () 

Sets whether the contents of a Text actor should wrap, if they don't fit the size assigned to the actor.

Since: 1.0

setLineWrapMode

textSetLineWrapMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> WrapMode

wrapMode: the line wrapping mode

-> m () 

If line wrapping is enabled (see textSetLineWrap) this function controls how the line wrapping is performed. The default is WrapModeWord which means wrap on word boundaries.

Since: 1.0

setMarkup

textSetMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Text

markup: a string containing Pango markup. Passing Nothing is the same as passing "" (the empty string)

-> m () 

Sets markup as the contents of a Text.

This is a convenience function for setting a string containing Pango markup, and it is logically equivalent to:

 /* the order is important */
 clutter_text_set_text (CLUTTER_TEXT (actor), markup);
 clutter_text_set_use_markup (CLUTTER_TEXT (actor), TRUE);

Since: 1.0

setMaxLength

textSetMaxLength Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int32

max: the maximum number of characters allowed in the text actor; 0 to disable or -1 to set the length of the current string

-> m () 

Sets the maximum allowed length of the contents of the actor. If the current contents are longer than the given length, then they will be truncated to fit.

Since: 1.0

setPasswordChar

textSetPasswordChar Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Char

wc: a Unicode character, or 0 to unset the password character

-> m () 

Sets the character to use in place of the actual text in a password text actor.

If wc is 0 the text will be displayed as it is entered in the Text actor.

Since: 1.0

setPreeditString

textSetPreeditString Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Text

preeditStr: the pre-edit string, or Nothing to unset it

-> Maybe AttrList

preeditAttrs: the pre-edit string attributes

-> Word32

cursorPos: the cursor position for the pre-edit string

-> m () 

Sets, or unsets, the pre-edit string. This function is useful for input methods to display a string (with eventual specific Pango attributes) before it is entered inside the Text buffer.

The preedit string and attributes are ignored if the Text actor is not editable.

This function should not be used by applications

Since: 1.2

setSelectable

textSetSelectable Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

selectable: whether the Text actor should be selectable

-> m () 

Sets whether a Text actor should be selectable.

A selectable Text will allow selecting its contents using the pointer or the keyboard.

Since: 1.0

setSelectedTextColor

textSetSelectedTextColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Color

color: the selected text color, or Nothing to unset it

-> m () 

Sets the selected text color of a Text actor.

If color is Nothing, the selected text color will be the same as the selection color, which then falls back to cursor, and then text color.

Since: 1.8

setSelection

textSetSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int64

startPos: start of the selection, in characters

-> Int64

endPos: end of the selection, in characters

-> m () 

Selects the region of text between startPos and endPos.

This function changes the position of the cursor to match startPos and the selection bound to match endPos.

Since: 1.0

setSelectionBound

textSetSelectionBound Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Int32

selectionBound: the position of the end of the selection, in characters

-> m () 

Sets the other end of the selection, starting from the current cursor position.

If selectionBound is -1, the selection unset.

Since: 1.0

setSelectionColor

textSetSelectionColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Color

color: the color of the selection, or Nothing to unset it

-> m () 

Sets the color of the selection of a Text actor.

If color is Nothing, the selection color will be the same as the cursor color, or if no cursor color is set either then it will be the same as the text color.

Since: 1.0

setSingleLineMode

textSetSingleLineMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

singleLine: whether to enable single line mode

-> m () 

Sets whether a Text actor should be in single line mode or not. Only editable Texts can be in single line mode.

A text actor in single line mode will not wrap text and will clip the visible area to the predefined size. The contents of the text actor will scroll to display the end of the text if its length is bigger than the allocated width.

When setting the single line mode the Text:activatable property is also set as a side effect. Instead of entering a new line character, the text actor will emit the activate signal.

Since: 1.0

setText

textSetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Maybe Text

text: the text to set. Passing Nothing is the same as passing "" (the empty string)

-> m () 

Sets the contents of a Text actor.

If the Text:use-markup property was set to True it will be reset to False as a side effect. If you want to maintain the Text:use-markup you should use the textSetMarkup function instead

Since: 1.0

setUseMarkup

textSetUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsText a) 
=> a

self: a Text

-> Bool

setting: True if the text should be parsed for markup.

-> m () 

Sets whether the contents of the Text actor contains markup in <link linkend="PangoMarkupFormat">Pango's text markup language</link>.

Setting Text:use-markup on an editable Text will not have any effect except hiding the markup.

See also Text:use-markup.

Since: 1.0

Properties

activatable

Toggles whether return invokes the activate signal or not.

Since: 1.0

constructTextActivatable :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “activatable” property. This is rarely needed directly, but it is used by new.

getTextActivatable :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “activatable” property. When overloading is enabled, this is equivalent to

get text #activatable

setTextActivatable :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “activatable” property. When overloading is enabled, this is equivalent to

set text [ #activatable := value ]

attributes

A list of PangoStyleAttributes to be applied to the contents of the Text actor.

Since: 1.0

clearTextAttributes :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “attributes” property to Nothing. When overloading is enabled, this is equivalent to

clear #attributes

constructTextAttributes :: (IsText o, MonadIO m) => AttrList -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “attributes” property. This is rarely needed directly, but it is used by new.

getTextAttributes :: (MonadIO m, IsText o) => o -> m AttrList Source #

Get the value of the “attributes” property. When overloading is enabled, this is equivalent to

get text #attributes

setTextAttributes :: (MonadIO m, IsText o) => o -> AttrList -> m () Source #

Set the value of the “attributes” property. When overloading is enabled, this is equivalent to

set text [ #attributes := value ]

buffer

The buffer which stores the text for this Text.

If set to Nothing, a default buffer will be created.

Since: 1.8

constructTextBuffer :: (IsText o, MonadIO m, IsTextBuffer a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “buffer” property. This is rarely needed directly, but it is used by new.

getTextBuffer :: (MonadIO m, IsText o) => o -> m TextBuffer Source #

Get the value of the “buffer” property. When overloading is enabled, this is equivalent to

get text #buffer

setTextBuffer :: (MonadIO m, IsText o, IsTextBuffer a) => o -> a -> m () Source #

Set the value of the “buffer” property. When overloading is enabled, this is equivalent to

set text [ #buffer := value ]

color

The color used to render the text.

Since: 1.0

constructTextColor :: (IsText o, MonadIO m) => Color -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “color” property. This is rarely needed directly, but it is used by new.

getTextColor :: (MonadIO m, IsText o) => o -> m (Maybe Color) Source #

Get the value of the “color” property. When overloading is enabled, this is equivalent to

get text #color

setTextColor :: (MonadIO m, IsText o) => o -> Color -> m () Source #

Set the value of the “color” property. When overloading is enabled, this is equivalent to

set text [ #color := value ]

cursorColor

The color of the cursor.

Since: 1.0

clearTextCursorColor :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “cursor-color” property to Nothing. When overloading is enabled, this is equivalent to

clear #cursorColor

constructTextCursorColor :: (IsText o, MonadIO m) => Color -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cursor-color” property. This is rarely needed directly, but it is used by new.

getTextCursorColor :: (MonadIO m, IsText o) => o -> m (Maybe Color) Source #

Get the value of the “cursor-color” property. When overloading is enabled, this is equivalent to

get text #cursorColor

setTextCursorColor :: (MonadIO m, IsText o) => o -> Color -> m () Source #

Set the value of the “cursor-color” property. When overloading is enabled, this is equivalent to

set text [ #cursorColor := value ]

cursorColorSet

Will be set to True if Text:cursor-color has been set.

Since: 1.0

getTextCursorColorSet :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “cursor-color-set” property. When overloading is enabled, this is equivalent to

get text #cursorColorSet

cursorPosition

The current input cursor position. -1 is taken to be the end of the text

Since: 1.12

constructTextCursorPosition :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cursor-position” property. This is rarely needed directly, but it is used by new.

getTextCursorPosition :: (MonadIO m, IsText o) => o -> m Int32 Source #

Get the value of the “cursor-position” property. When overloading is enabled, this is equivalent to

get text #cursorPosition

setTextCursorPosition :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #

Set the value of the “cursor-position” property. When overloading is enabled, this is equivalent to

set text [ #cursorPosition := value ]

cursorSize

The size of the cursor, in pixels. If set to -1 the size used will be the default cursor size of 2 pixels.

Since: 1.0

constructTextCursorSize :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cursor-size” property. This is rarely needed directly, but it is used by new.

getTextCursorSize :: (MonadIO m, IsText o) => o -> m Int32 Source #

Get the value of the “cursor-size” property. When overloading is enabled, this is equivalent to

get text #cursorSize

setTextCursorSize :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #

Set the value of the “cursor-size” property. When overloading is enabled, this is equivalent to

set text [ #cursorSize := value ]

cursorVisible

Whether the input cursor is visible or not.

The cursor will only be visible if this property and either the Text:editable or the Text:selectable properties are set to True.

Since: 1.0

constructTextCursorVisible :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “cursor-visible” property. This is rarely needed directly, but it is used by new.

getTextCursorVisible :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “cursor-visible” property. When overloading is enabled, this is equivalent to

get text #cursorVisible

setTextCursorVisible :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “cursor-visible” property. When overloading is enabled, this is equivalent to

set text [ #cursorVisible := value ]

editable

Whether key events delivered to the actor causes editing.

Since: 1.0

constructTextEditable :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “editable” property. This is rarely needed directly, but it is used by new.

getTextEditable :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “editable” property. When overloading is enabled, this is equivalent to

get text #editable

setTextEditable :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “editable” property. When overloading is enabled, this is equivalent to

set text [ #editable := value ]

ellipsize

The preferred place to ellipsize the contents of the Text actor

Since: 1.0

constructTextEllipsize :: (IsText o, MonadIO m) => EllipsizeMode -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “ellipsize” property. This is rarely needed directly, but it is used by new.

getTextEllipsize :: (MonadIO m, IsText o) => o -> m EllipsizeMode Source #

Get the value of the “ellipsize” property. When overloading is enabled, this is equivalent to

get text #ellipsize

setTextEllipsize :: (MonadIO m, IsText o) => o -> EllipsizeMode -> m () Source #

Set the value of the “ellipsize” property. When overloading is enabled, this is equivalent to

set text [ #ellipsize := value ]

fontDescription

The FontDescription that should be used by the Text

If you have a string describing the font then you should look at Text:font-name instead

Since: 1.2

constructTextFontDescription :: (IsText o, MonadIO m) => FontDescription -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “font-description” property. This is rarely needed directly, but it is used by new.

getTextFontDescription :: (MonadIO m, IsText o) => o -> m (Maybe FontDescription) Source #

Get the value of the “font-description” property. When overloading is enabled, this is equivalent to

get text #fontDescription

setTextFontDescription :: (MonadIO m, IsText o) => o -> FontDescription -> m () Source #

Set the value of the “font-description” property. When overloading is enabled, this is equivalent to

set text [ #fontDescription := value ]

fontName

The font to be used by the Text, as a string that can be parsed by fontDescriptionFromString.

If set to Nothing, the default system font will be used instead.

Since: 1.0

clearTextFontName :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “font-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #fontName

constructTextFontName :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “font-name” property. This is rarely needed directly, but it is used by new.

getTextFontName :: (MonadIO m, IsText o) => o -> m Text Source #

Get the value of the “font-name” property. When overloading is enabled, this is equivalent to

get text #fontName

setTextFontName :: (MonadIO m, IsText o) => o -> Text -> m () Source #

Set the value of the “font-name” property. When overloading is enabled, this is equivalent to

set text [ #fontName := value ]

justify

Whether the contents of the Text should be justified on both margins.

Since: 1.0

constructTextJustify :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “justify” property. This is rarely needed directly, but it is used by new.

getTextJustify :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “justify” property. When overloading is enabled, this is equivalent to

get text #justify

setTextJustify :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “justify” property. When overloading is enabled, this is equivalent to

set text [ #justify := value ]

lineAlignment

The preferred alignment for the text. This property controls the alignment of multi-line paragraphs.

Since: 1.0

constructTextLineAlignment :: (IsText o, MonadIO m) => Alignment -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “line-alignment” property. This is rarely needed directly, but it is used by new.

getTextLineAlignment :: (MonadIO m, IsText o) => o -> m Alignment Source #

Get the value of the “line-alignment” property. When overloading is enabled, this is equivalent to

get text #lineAlignment

setTextLineAlignment :: (MonadIO m, IsText o) => o -> Alignment -> m () Source #

Set the value of the “line-alignment” property. When overloading is enabled, this is equivalent to

set text [ #lineAlignment := value ]

lineWrap

Whether to wrap the lines of Text:text if the contents exceed the available allocation. The wrapping strategy is controlled by the Text:line-wrap-mode property.

Since: 1.0

constructTextLineWrap :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “line-wrap” property. This is rarely needed directly, but it is used by new.

getTextLineWrap :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “line-wrap” property. When overloading is enabled, this is equivalent to

get text #lineWrap

setTextLineWrap :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “line-wrap” property. When overloading is enabled, this is equivalent to

set text [ #lineWrap := value ]

lineWrapMode

If Text:line-wrap is set to True, this property will control how the text is wrapped.

Since: 1.0

constructTextLineWrapMode :: (IsText o, MonadIO m) => WrapMode -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “line-wrap-mode” property. This is rarely needed directly, but it is used by new.

getTextLineWrapMode :: (MonadIO m, IsText o) => o -> m WrapMode Source #

Get the value of the “line-wrap-mode” property. When overloading is enabled, this is equivalent to

get text #lineWrapMode

setTextLineWrapMode :: (MonadIO m, IsText o) => o -> WrapMode -> m () Source #

Set the value of the “line-wrap-mode” property. When overloading is enabled, this is equivalent to

set text [ #lineWrapMode := value ]

maxLength

The maximum length of the contents of the Text actor.

Since: 1.0

constructTextMaxLength :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “max-length” property. This is rarely needed directly, but it is used by new.

getTextMaxLength :: (MonadIO m, IsText o) => o -> m Int32 Source #

Get the value of the “max-length” property. When overloading is enabled, this is equivalent to

get text #maxLength

setTextMaxLength :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #

Set the value of the “max-length” property. When overloading is enabled, this is equivalent to

set text [ #maxLength := value ]

passwordChar

If non-zero, the character that should be used in place of the actual text in a password text actor.

Since: 1.0

constructTextPasswordChar :: (IsText o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “password-char” property. This is rarely needed directly, but it is used by new.

getTextPasswordChar :: (MonadIO m, IsText o) => o -> m Word32 Source #

Get the value of the “password-char” property. When overloading is enabled, this is equivalent to

get text #passwordChar

setTextPasswordChar :: (MonadIO m, IsText o) => o -> Word32 -> m () Source #

Set the value of the “password-char” property. When overloading is enabled, this is equivalent to

set text [ #passwordChar := value ]

position

The current input cursor position. -1 is taken to be the end of the text

Since: 1.0

constructTextPosition :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “position” property. This is rarely needed directly, but it is used by new.

getTextPosition :: (MonadIO m, IsText o) => o -> m Int32 Source #

Get the value of the “position” property. When overloading is enabled, this is equivalent to

get text #position

setTextPosition :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #

Set the value of the “position” property. When overloading is enabled, this is equivalent to

set text [ #position := value ]

selectable

Whether it is possible to select text, either using the pointer or the keyboard.

This property depends on the Actor:reactive property being set to True.

Since: 1.0

constructTextSelectable :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selectable” property. This is rarely needed directly, but it is used by new.

getTextSelectable :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “selectable” property. When overloading is enabled, this is equivalent to

get text #selectable

setTextSelectable :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “selectable” property. When overloading is enabled, this is equivalent to

set text [ #selectable := value ]

selectedTextColor

The color of selected text.

Since: 1.8

clearTextSelectedTextColor :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “selected-text-color” property to Nothing. When overloading is enabled, this is equivalent to

clear #selectedTextColor

constructTextSelectedTextColor :: (IsText o, MonadIO m) => Color -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selected-text-color” property. This is rarely needed directly, but it is used by new.

getTextSelectedTextColor :: (MonadIO m, IsText o) => o -> m (Maybe Color) Source #

Get the value of the “selected-text-color” property. When overloading is enabled, this is equivalent to

get text #selectedTextColor

setTextSelectedTextColor :: (MonadIO m, IsText o) => o -> Color -> m () Source #

Set the value of the “selected-text-color” property. When overloading is enabled, this is equivalent to

set text [ #selectedTextColor := value ]

selectedTextColorSet

Will be set to True if Text:selected-text-color has been set.

Since: 1.8

getTextSelectedTextColorSet :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “selected-text-color-set” property. When overloading is enabled, this is equivalent to

get text #selectedTextColorSet

selectionBound

The current input cursor position. -1 is taken to be the end of the text

Since: 1.0

constructTextSelectionBound :: (IsText o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selection-bound” property. This is rarely needed directly, but it is used by new.

getTextSelectionBound :: (MonadIO m, IsText o) => o -> m Int32 Source #

Get the value of the “selection-bound” property. When overloading is enabled, this is equivalent to

get text #selectionBound

setTextSelectionBound :: (MonadIO m, IsText o) => o -> Int32 -> m () Source #

Set the value of the “selection-bound” property. When overloading is enabled, this is equivalent to

set text [ #selectionBound := value ]

selectionColor

The color of the selection.

Since: 1.0

clearTextSelectionColor :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “selection-color” property to Nothing. When overloading is enabled, this is equivalent to

clear #selectionColor

constructTextSelectionColor :: (IsText o, MonadIO m) => Color -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “selection-color” property. This is rarely needed directly, but it is used by new.

getTextSelectionColor :: (MonadIO m, IsText o) => o -> m (Maybe Color) Source #

Get the value of the “selection-color” property. When overloading is enabled, this is equivalent to

get text #selectionColor

setTextSelectionColor :: (MonadIO m, IsText o) => o -> Color -> m () Source #

Set the value of the “selection-color” property. When overloading is enabled, this is equivalent to

set text [ #selectionColor := value ]

selectionColorSet

Will be set to True if Text:selection-color has been set.

Since: 1.0

getTextSelectionColorSet :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “selection-color-set” property. When overloading is enabled, this is equivalent to

get text #selectionColorSet

singleLineMode

Whether the Text actor should be in single line mode or not. A single line Text actor will only contain a single line of text, scrolling it in case its length is bigger than the allocated size.

Setting this property will also set the Text:activatable property as a side-effect.

The Text:single-line-mode property is used only if the Text:editable property is set to True.

Since: 1.0

constructTextSingleLineMode :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “single-line-mode” property. This is rarely needed directly, but it is used by new.

getTextSingleLineMode :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “single-line-mode” property. When overloading is enabled, this is equivalent to

get text #singleLineMode

setTextSingleLineMode :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “single-line-mode” property. When overloading is enabled, this is equivalent to

set text [ #singleLineMode := value ]

text

The text to render inside the actor.

Since: 1.0

clearTextText :: (MonadIO m, IsText o) => o -> m () Source #

Set the value of the “text” property to Nothing. When overloading is enabled, this is equivalent to

clear #text

constructTextText :: (IsText o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text” property. This is rarely needed directly, but it is used by new.

getTextText :: (MonadIO m, IsText o) => o -> m Text Source #

Get the value of the “text” property. When overloading is enabled, this is equivalent to

get text #text

setTextText :: (MonadIO m, IsText o) => o -> Text -> m () Source #

Set the value of the “text” property. When overloading is enabled, this is equivalent to

set text [ #text := value ]

useMarkup

Whether the text includes Pango markup.

For more informations about the Pango markup format, see layoutSetMarkup in the Pango documentation.

It is not possible to round-trip this property between True and False. Once a string with markup has been set on a Text actor with :use-markup set to True, the markup is stripped from the string.

Since: 1.0

constructTextUseMarkup :: (IsText o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “use-markup” property. This is rarely needed directly, but it is used by new.

getTextUseMarkup :: (MonadIO m, IsText o) => o -> m Bool Source #

Get the value of the “use-markup” property. When overloading is enabled, this is equivalent to

get text #useMarkup

setTextUseMarkup :: (MonadIO m, IsText o) => o -> Bool -> m () Source #

Set the value of the “use-markup” property. When overloading is enabled, this is equivalent to

set text [ #useMarkup := value ]

Signals

activate

type TextActivateCallback = IO () Source #

The activate signal is emitted each time the actor is 'activated' by the user, normally by pressing the 'Enter' key. The signal is emitted only if Text:activatable is set to True.

Since: 1.0

afterTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #activate callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextActivate :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextActivateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #activate callback

cursorChanged

type TextCursorChangedCallback = IO () Source #

The cursorChanged signal is emitted whenever the cursor position or size changes.

Since: 1.16

afterTextCursorChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCursorChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cursorChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #cursorChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextCursorChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCursorChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cursorChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #cursorChanged callback

cursorEvent

type TextCursorEventCallback Source #

Arguments

 = Geometry

geometry: the coordinates of the cursor

-> IO () 

Deprecated: (Since version 1.16)Use the cursorChanged signal instead

The cursorEvent signal is emitted whenever the cursor position changes inside a Text actor. Inside geometry it is stored the current position and size of the cursor, relative to the actor itself.

Since: 1.0

afterTextCursorEvent :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCursorEventCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cursorEvent signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #cursorEvent callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextCursorEvent :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextCursorEventCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cursorEvent signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #cursorEvent callback

deleteText

type TextDeleteTextCallback Source #

Arguments

 = Int32

startPos: the starting position

-> Int32

endPos: the end position

-> IO () 

This signal is emitted when text is deleted from the actor by the user. It is emitted before self text changes.

Since: 1.2

afterTextDeleteText :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteTextCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteText signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #deleteText callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextDeleteText :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextDeleteTextCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteText signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #deleteText callback

insertText

type TextInsertTextCallback Source #

Arguments

 = Text

newText: the new text to insert

-> Int32

newTextLength: the length of the new text, in bytes, or -1 if new_text is nul-terminated

-> Ptr ()

position: the position, in characters, at which to insert the new text. this is an in-out parameter. After the signal emission is finished, it should point after the newly inserted text.

-> IO () 

This signal is emitted when text is inserted into the actor by the user. It is emitted before self text changes.

Since: 1.2

afterTextInsertText :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertTextCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertText signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #insertText callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextInsertText :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextInsertTextCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertText signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #insertText callback

textChanged

type TextTextChangedCallback = IO () Source #

The textChanged signal is emitted after actor's text changes

Since: 1.0

afterTextTextChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the textChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after text #textChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextTextChanged :: (IsText a, MonadIO m) => a -> ((?self :: a) => TextTextChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the textChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on text #textChanged callback