TextView —
textChildAnchorNew:: IO TextChildAnchor |
textViewNew:: IO TextView |
textChildAnchorGetDeleted:: TextChildAnchor -> IO Bool |
textChildAnchorGetWidgets:: TextChildAnchor -> IO [Widget] |
textViewAddChildAtAnchor:: (TextViewClass tv, WidgetClass w) => tv -> w -> TextChildAnchor -> IO () |
textViewAddChildInWindow:: (TextViewClass tv, WidgetClass w) => tv -> w -> TextWindowType -> Int -> Int -> IO () |
textViewBackwardDisplayLine:: TextViewClass tv => tv -> TextIter -> IO Bool |
textViewBackwardDisplayLineEnd:: TextViewClass tv => tv -> TextIter -> IO Bool |
textViewBackwardDisplayLineStart:: TextViewClass tv => tv -> TextIter -> IO Bool |
textViewBufferToWindowCoords:: TextViewClass tv => tv -> TextWindowType -> (Int,Int) -> IO (Int,Int) |
textViewForwardDisplayLine:: TextViewClass tv => tv -> TextIter -> IO Bool |
textViewForwardDisplayLineEnd:: TextViewClass tv => TextIter -> tv -> IO Bool |
textViewForwardDisplayLineStart:: TextViewClass tv => tv -> TextIter -> IO Bool |
textViewGetBorderWindowSize:: TextViewClass tv => tv -> TextWindowType -> IO Int |
textViewGetCursorVisible:: TextViewClass tv => tv -> IO Bool |
textViewGetEditable:: TextViewClass tv => tv -> IO Bool |
textViewGetIndent:: TextViewClass tv => tv -> IO Int |
textViewGetIterAtLocation:: TextViewClass tv => tv -> Int -> Int -> IO TextIter |
textViewGetIterLocation:: TextViewClass tv => tv -> TextIter -> IO Rectangle |
textViewGetJustification:: TextViewClass tv => tv -> IO Justification |
textViewGetLeftMargin:: TextViewClass tv => tv -> IO Int |
textViewGetLineAtY:: TextViewClass tv => tv -> Int -> IO (TextIter,Int) |
textViewGetLineYrange:: TextViewClass tv => tv -> TextIter -> IO (Int,Int) |
textViewGetPixelsAboveLines:: TextViewClass tv => tv -> IO Int |
textViewGetPixelsBelowLines:: TextViewClass tv => tv -> IO Int |
textViewGetPixelsInsideWrap:: TextViewClass tv => tv -> IO Int |
textViewGetRightMargin:: TextViewClass tv => tv -> IO Int |
textViewGetVisibleRect:: TextViewClass tv => tv -> IO Rectangle |
textViewGetWindow:: TextViewClass tv => tv -> TextWindowType -> IO (Maybe DrawWindow) |
textViewGetWindowType:: TextViewClass tv => tv -> DrawWindow -> IO TextWindowType |
textViewGetWrapMode:: TextViewClass tv => tv -> IO WrapMode |
textViewMoveChild:: (TextViewClass tv, WidgetClass w) => tv -> w -> Int -> Int -> IO () |
textViewMoveMarkOnscreen:: TextViewClass tv => tv -> TextMark -> IO Bool |
textViewMoveVisually:: TextViewClass tv => tv -> TextIter -> Int -> IO Bool |
textViewNewWithBuffer:: TextBuffer -> IO TextView |
textViewPlaceCursorOnscreen:: TextViewClass tv => tv -> IO Bool |
textViewScrollMarkOnscreen:: TextViewClass tv => tv -> TextMark -> IO () |
textViewScrollToIter:: TextViewClass tv => tv -> TextIter -> Double -> Maybe (Double,Double) -> IO Bool |
textViewScrollToMark:: TextViewClass tv => tv -> TextMark -> Double -> Maybe (Double,Double) -> IO () |
textViewSetBorderWindowSize:: TextViewClass tv => tv -> TextWindowType -> Int -> IO () |
textViewSetBuffer:: TextViewClass tv => tv -> TextBuffer -> IO () |
textViewSetCursorVisible:: TextViewClass tv => tv -> Bool -> IO () |
textViewSetEditable:: TextViewClass tv => tv -> Bool -> IO () |
textViewSetIndent:: TextViewClass tv => tv -> Int -> IO () |
textViewSetJustification:: TextViewClass tv => tv -> Justification -> IO () |
textViewSetLeftMargin:: TextViewClass tv => tv -> Int -> IO () |
textViewSetPixelsAboveLines:: TextViewClass tv => tv -> Int -> IO () |
textViewSetPixelsBelowLines:: TextViewClass tv => tv -> Int -> IO () |
textViewSetPixelsInsideWrap:: TextViewClass tv => tv -> Int -> IO () |
textViewSetRightMargin:: TextViewClass tv => tv -> Int -> IO () |
textViewSetWrapMode:: TextViewClass tv => tv -> WrapMode -> IO () |
textViewWindowToBufferCoords:: TextViewClass tv => tv -> TextWindowType -> (Int,Int) -> IO (Int,Int) |
onCopyClipboard:: TextViewClass tv => tv -> IO () -> IO (ConnectId tv) |
onCutClipboard:: TextViewClass tv => tv -> IO () -> IO (ConnectId tv) |
onDeleteFromCursor:: TextViewClass tv => tv -> (DeleteType -> Int -> IO ()) -> IO (ConnectId tv) |
onInsertAtCursor:: TextViewClass tv => tv -> (String -> IO ()) -> IO (ConnectId tv) |
onMoveCursor:: TextViewClass tv => tv -> (MovementStep -> Int -> Bool -> IO ()) -> IO (ConnectId tv) |
onMoveFocus:: TextViewClass tv => tv -> (DirectionType -> IO ()) -> IO (ConnectId tv) |
onPageHorizontally:: TextViewClass tv => tv -> (Int -> Bool -> IO ()) -> IO (ConnectId tv) |
onPasteClipboard:: TextViewClass tv => tv -> IO () -> IO (ConnectId tv) |
onPopulatePopup:: TextViewClass tv => tv -> (Menu -> IO ()) -> IO (ConnectId tv) |
onSetAnchor:: TextViewClass tv => tv -> IO () -> IO (ConnectId tv) |
onSetScrollAdjustments:: TextViewClass tv => tv -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId tv) |
onToggleOverwrite:: TextViewClass tv => tv -> IO () -> IO (ConnectId tv) |
Through out we distinguish between buffer cooridinates which are pixels with the origin at the upper left corner of the first character on the first line. Window coordinates are relative to the top left pixel which is visible in the current TextView. Coordinates from Events are in the latter relation. The conversion can be done with textViewWindowToBufferCoords.
If PangoTabArray is bound: do textViewSetTabs and textViewGetTabs
If TextTags are bound: do textViewGetDefaultAttributes
Create a new TextChildAnchor.
| textChildAnchorNew |
Using textBufferCreateChildAnchor is usually simpler then executing this function and textBufferInsertChildAnchor.
Query if an anchor was deleted.
| textChildAnchorGetDeleted | :: TextChildAnchor | :: IO Bool |
| tca |
Retrieve all Widgets at this TextChildAnchor.
| textChildAnchorGetWidgets | :: TextChildAnchor | :: IO [Widget] |
| tca |
The widgets in the returned list need to be upcasted to what they were.
Add a child widget in the TextBuffer at a given TextChildAnchor.
| textViewAddChildAtAnchor | :: tv | :: w | :: TextChildAnchor | :: IO () |
| tv | w | anchor |
Place a widget in within the text.
| textViewAddChildInWindow | :: tv | :: w | :: TextWindowType | :: Int | :: Int | :: IO () |
| tv | w | twt | x | y |
This function places a Widget at an absolute pixel position into the TextView. Note that any scrolling will leave the widget in the same spot as it was.
The position x, y is relative to the DrawWindow specified by TextWindowType.
Move the iterator backwards by one display line.
| textViewBackwardDisplayLine | :: tv | :: TextIter | :: IO Bool |
| tv | ti |
Move the iterator backwards and to the end.
| textViewBackwardDisplayLineEnd | :: tv | :: TextIter | :: IO Bool |
| tv | ti |
Move the iterator backwards and to the start.
| textViewBackwardDisplayLineStart | :: tv | :: TextIter | :: IO Bool |
| tv | ti |
Convert buffer cooridnates into window coordinates.
| textViewBufferToWindowCoords | :: tv | :: TextWindowType | :: (Int,Int) | :: IO (Int,Int) |
| tv | wt | (x, y) |
Move the iterator forwards by one display line.
| textViewForwardDisplayLine | :: tv | :: TextIter | :: IO Bool |
| tv | ti |
Moves the given TextIter forward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the TextBuffer.
Move the iterator forwards and to the end.
| textViewForwardDisplayLineEnd | :: TextIter | :: tv | :: IO Bool |
| ti | tv |
Like textViewForwardDisplayLine but moves to the end of the line as well.
Move the iterator forwards and to the start.
| textViewForwardDisplayLineStart | :: tv | :: TextIter | :: IO Bool |
| tv | ti |
Like textViewForwardDisplayLine but moves to the start of the line as well.
Retrieve the border width of the specified window.
| textViewGetBorderWindowSize | :: tv | :: TextWindowType | :: IO Int |
| tv | wt |
Retrieve information whether the cursor in a TextView is visible or not.
| textViewGetCursorVisible | :: tv | :: IO Bool |
| tv |
Retrieve information whether a TextView is editable or not.
| textViewGetEditable | :: tv | :: IO Bool |
| tv |
Get the indentation in pixels for the first line in a paragraph.
| textViewGetIndent | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
The indentation may be negative.
Retrieves the TextIter at buffer coordinates x and y.
| textViewGetIterAtLocation | :: tv | :: Int | :: Int | :: IO TextIter |
| tv | x | y |
Get a rectangle that roughly contains the character at TextIter.
| textViewGetIterLocation | :: tv | :: TextIter | :: IO Rectangle |
| tv | tm |
Use textViewBufferToWindowCoords to convert into window cooridnates.
Query how text is wrapped.
| textViewGetJustification | :: tv | :: IO Justification |
| tv |
Get the number of pixels in the margin.
| textViewGetLeftMargin | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
Get the TextIter at the start of the line containing the coordinate y.
| textViewGetLineAtY | :: tv | :: Int | :: IO (TextIter,Int) |
| tv | y |
y is in buffer coordinates.
Returns the TextIter and the top of the line.
Get the y coordinate of the top and the height of the line TextIter is on.
| textViewGetLineYrange | :: tv | :: TextIter | :: IO (Int,Int) |
| tv | ti |
Get the number of pixels above each paragraph.
| textViewGetPixelsAboveLines | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
Get the number of pixels below each paragraph.
| textViewGetPixelsBelowLines | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
Get the number of pixels between lines inside a wraped paragraph.
| textViewGetPixelsInsideWrap | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
Get the number of pixels in the margin.
| textViewGetRightMargin | :: tv | :: IO Int |
| tv |
Tags in the buffer may override this default.
Get the currently visible rectangle.
| textViewGetVisibleRect | :: tv | :: IO Rectangle |
| tv |
Use textViewBufferToWindowCoords to convert into window coordinates.
Get the underlying DrawWindow.
| textViewGetWindow | :: tv | :: TextWindowType | :: IO (Maybe DrawWindow) |
| tv | wt |
The TextWindowType determines which window of the TextWidget we would like to receive.
Returns Nothing if there is no DrawWindow of the specified type.
Retrieve the type of window the TextView widget contains.
| textViewGetWindowType | :: tv | :: DrawWindow | :: IO TextWindowType |
| tv | win |
Usually used to find out which window an event corresponds to. An emission of an event signal of TextView yields a DrawWindow. This function can be used to see if the event actually belongs to the main text window.
Move a child widget within the TextView.
| textViewMoveChild | :: tv | :: w | :: Int | :: Int | :: IO () |
| tv | w | x | y |
Move a TextMark within the buffer until it is in the currently visible area of the widget.
| textViewMoveMarkOnscreen | :: tv | :: TextMark | :: IO Bool |
| tv | tm |
Returns True if the Mark was moved.
Move the iterator a number of lines.
| textViewMoveVisually | :: tv | :: TextIter | :: Int | :: IO Bool |
| tv | ti | count |
count is in display lines. See textViewForwardDisplayLine.
Create a new TextView widget with the given TextBuffer.
| textViewNewWithBuffer | :: TextBuffer | :: IO TextView |
| tb |
Move the cursor within the buffer until it is in the currently visible area of the widget.
| textViewPlaceCursorOnscreen | :: tv | :: IO Bool |
| tv |
Returns True if the Mark was moved.
Scroll the visible area of the widget so the TextMark becomes visible.
| textViewScrollMarkOnscreen | :: tv | :: TextMark | :: IO () |
| tv | tm |
This call is equivalent to textViewScrollToMark tm 0.0 Nothing tv.
Scroll to the position of the supplied TextIter.
| textViewScrollToIter | :: tv | :: TextIter | :: Double | :: Maybe (Double,Double) | :: IO Bool |
| tv | ti | withinMargin | Nothing | ||
| tv | ti | withinMargin | (Just (xalign, yalign)) |
The position might not be correct due to the delayed calculation of the line heights.
Returns True if the function actually scrolled.
Scroll to the position of the supplied TextMark.
| textViewScrollToMark | :: tv | :: TextMark | :: Double | :: Maybe (Double,Double) | :: IO () |
| tv | tm | withinMargin | Nothing | ||
| tv | tm | withinMargin | (Just (xalign, yalign)) |
Supplying xalign, yalign gives a goal position of the TextMark within screen bounds. 0,0 means left, top and 1.0,1.0 means right, bottom.
Supply Nothing if the goal is to bring the position into view with the minimum of scrolling.
withinMargin is within [0.0 .. 0.5) and imposes an extra margin at all four sides of the window within which xalign and yalign are evaluated.
The line distances are calculated in an idle handler. Calling this function ensures that the line heights are indeed evaluated before the scroll is carried out.
Set the border width of the TextView widget.
| textViewSetBorderWindowSize | :: tv | :: TextWindowType | :: Int | :: IO () |
| tv | wt | size |
Sets the width of TextWindowLeft or TextWindowRight, or the height of TextWindowTop or TextWindowBottom. Automatically destroys the corresponding window if the size is set to 0 and creates the window if the size is set to non-zero. This function can only used with the four window types mentioned.
Set the TextBuffer for a given TextView widget.
| textViewSetBuffer | :: tv | :: TextBuffer | :: IO () |
| tv | tb |
Toggle whether the cursor in the TextView is visible or not.
| textViewSetCursorVisible | :: tv | :: Bool | :: IO () |
| tv | editable |
Toggle whether the text in the TextView is editable or not.
| textViewSetEditable | :: tv | :: Bool | :: IO () |
| tv | editable |
Set the indentation in pixels for the first line in a paragraph.
| textViewSetIndent | :: tv | :: Int | :: IO () |
| tv | p |
Tags in the buffer may override this default.
The indentation may be negative.
Specify how to wrap text.
| textViewSetJustification | :: tv | :: Justification | :: IO () |
| tv | j |
Set the number of pixels in the margin.
| textViewSetLeftMargin | :: tv | :: Int | :: IO () |
| tv | p |
Tags in the buffer may override this default.
Set the number of pixels above each paragraph.
| textViewSetPixelsAboveLines | :: tv | :: Int | :: IO () |
| tv | p |
Tags in the buffer may override this default.
Set the number of pixels below each paragraph.
| textViewSetPixelsBelowLines | :: tv | :: Int | :: IO () |
| tv | p |
Tags in the buffer may override this default.
Set the number of pixels between lines inside a wraped paragraph.
| textViewSetPixelsInsideWrap | :: tv | :: Int | :: IO () |
| tv | p |
Tags in the buffer may override this default.
Copying to the clipboard.
| onCopyClipboard | :: tv | :: IO () | :: IO (ConnectId tv) |
This signal is emitted when a selection is copied to the clipboard.
The action itself happens when the TextView processes this signal.
Cutting to the clipboard.
| onCutClipboard | :: tv | :: IO () | :: IO (ConnectId tv) |
This signal is emitted when a selection is cut out and copied to the clipboard. The action itself happens when the textview processed this request.
Deleting text.
| onDeleteFromCursor | :: tv | :: (DeleteType -> Int -> IO ()) | :: IO (ConnectId tv) |
The widget will remove the specified number of units in the text where the meaning of units depends on the kind of deletion.
The action itself happens when the TextView processes this signal.
Inserting text.
| onInsertAtCursor | :: tv | :: (String -> IO ()) | :: IO (ConnectId tv) |
The widget will insert the string into the text where the meaning of units depends on the kind of deletion.
The action itself happens when the TextView processes this signal.
Moving the cursor.
| onMoveCursor | :: tv | :: (MovementStep -> Int -> Bool -> IO ()) | :: IO (ConnectId tv) |
The signal specifies what kind and how many steps the cursor will do. The flag is set to
True
if this movement extends a selection.
The action itself happens when the TextView processes this signal.
Moving the focus.
| onMoveFocus | :: tv | :: (DirectionType -> IO ()) | :: IO (ConnectId tv) |
The action itself happens when the TextView processes this signal.
Page change signals.
| onPageHorizontally | :: tv | :: (Int -> Bool -> IO ()) | :: IO (ConnectId tv) |
The signal specifies how many pages the view should move up or down. The flag is set to
True
if this movement extends a selection.
The action itself happens when the TextView processes this signal.
Figure out why this signal is called horizontally, not vertically.
Pasting from the clipboard.
| onPasteClipboard | :: tv | :: IO () | :: IO (ConnectId tv) |
This signal is emitted when something is pasted from the clipboard.
The action itself happens when the TextView processes this signal.
Add menu entries to context menus.
| onPopulatePopup | :: tv | :: (Menu -> IO ()) | :: IO (ConnectId tv) |
This signal is emitted if a context menu within the TextView is opened. This signal can be used to add application specific menu items to this popup.
Inserting an anchor.
| onSetAnchor | :: tv | :: IO () | :: IO (ConnectId tv) |
This signal is emitted when anchor is inserted into the text.
The action itself happens when the TextView processes this signal.