gi-gtk-3.0.17: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.CellView

Contents

Description

A CellView displays a single row of a TreeModel using a CellArea and CellAreaContext. A CellAreaContext can be provided to the CellView at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with eachother (like the aligned cells in the menus of ComboBox).

CellView is Orientable in order to decide in which orientation the underlying CellAreaContext should be allocated. Taking the ComboBox menu as an example, cellviews should be oriented horizontally if the menus are listed top-to-bottom and thus all share the same width but may have separate individual heights (left-to-right menus should be allocated vertically since they all share the same height but may have variable widths).

CSS nodes

GtkCellView has a single CSS node with name cellview.

Synopsis

Exported types

Methods

getDisplayedRow

cellViewGetDisplayedRow Source #

Arguments

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

cellView: a CellView

-> m (Maybe TreePath)

Returns: the currently displayed row or Nothing

Returns a TreePath referring to the currently displayed row. If no row is currently displayed, Nothing is returned.

Since: 2.6

getDrawSensitive

cellViewGetDrawSensitive Source #

Arguments

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

cellView: a CellView

-> m Bool

Returns: whether cellView draws all of its cells in a sensitive state

Gets whether cellView is configured to draw all of its cells in a sensitive state.

Since: 3.0

getFitModel

cellViewGetFitModel Source #

Arguments

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

cellView: a CellView

-> m Bool

Returns: whether cellView requests space to fit the entire TreeModel.

Gets whether cellView is configured to request space to fit the entire TreeModel.

Since: 3.0

getModel

cellViewGetModel Source #

Arguments

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

cellView: a CellView

-> m (Maybe TreeModel)

Returns: a TreeModel used or Nothing

Returns the model for cellView. If no model is used Nothing is returned.

Since: 2.16

getSizeOfRow

cellViewGetSizeOfRow Source #

Arguments

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

cellView: a CellView

-> TreePath

path: a TreePath

-> m (Bool, Requisition)

Returns: True

Deprecated: (Since version 3.0)Combo box formerly used this to calculate thesizes for cellviews, now you can achieve this by either usingthe CellView:fit-model property or by setting the currentlydisplayed row of the CellView and using widgetGetPreferredSize.

Sets requisition to the size needed by cellView to display the model row pointed to by path.

Since: 2.6

new

cellViewNew Source #

Arguments

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

Returns: A newly created CellView widget.

Creates a new CellView widget.

Since: 2.6

newWithContext

cellViewNewWithContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellArea a, IsCellAreaContext b) 
=> a

area: the CellArea to layout cells

-> b

context: the CellAreaContext in which to calculate cell geometry

-> m CellView

Returns: A newly created CellView widget.

Creates a new CellView widget with a specific CellArea to layout cells and a specific CellAreaContext.

Specifying the same context for a handfull of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible.

Since: 2.6

newWithMarkup

cellViewNewWithMarkup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

markup: the text to display in the cell view

-> m CellView

Returns: A newly created CellView widget.

Creates a new CellView widget, adds a CellRendererText to it, and makes it show markup. The text can be marked up with the [Pango text markup language][PangoMarkupFormat].

Since: 2.6

newWithPixbuf

cellViewNewWithPixbuf Source #

Arguments

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

pixbuf: the image to display in the cell view

-> m CellView

Returns: A newly created CellView widget.

Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show pixbuf.

Since: 2.6

newWithText

cellViewNewWithText Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

text: the text to display in the cell view

-> m CellView

Returns: A newly created CellView widget.

Creates a new CellView widget, adds a CellRendererText to it, and makes it show text.

Since: 2.6

setBackgroundColor

cellViewSetBackgroundColor Source #

Arguments

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

cellView: a CellView

-> Color

color: the new background color

-> m () 

Deprecated: (Since version 3.4)Use cellViewSetBackgroundRgba instead.

Sets the background color of view.

Since: 2.6

setBackgroundRgba

cellViewSetBackgroundRgba Source #

Arguments

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

cellView: a CellView

-> RGBA

rgba: the new background color

-> m () 

Sets the background color of cellView.

Since: 3.0

setDisplayedRow

cellViewSetDisplayedRow Source #

Arguments

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

cellView: a CellView

-> Maybe TreePath

path: a TreePath or Nothing to unset.

-> m () 

Sets the row of the model that is currently displayed by the CellView. If the path is unset, then the contents of the cellview “stick” at their last value; this is not normally a desired result, but may be a needed intermediate state if say, the model for the CellView becomes temporarily empty.

Since: 2.6

setDrawSensitive

cellViewSetDrawSensitive Source #

Arguments

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

cellView: a CellView

-> Bool

drawSensitive: whether to draw all cells in a sensitive state.

-> m () 

Sets whether cellView should draw all of its cells in a sensitive state, this is used by ComboBox menus to ensure that rows with insensitive cells that contain children appear sensitive in the parent menu item.

Since: 3.0

setFitModel

cellViewSetFitModel Source #

Arguments

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

cellView: a CellView

-> Bool

fitModel: whether cellView should request space for the whole model.

-> m () 

Sets whether cellView should request space to fit the entire TreeModel.

This is used by ComboBox to ensure that the cell view displayed on the combo box’s button always gets enough space and does not resize when selection changes.

Since: 3.0

setModel

cellViewSetModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsCellView a, IsTreeModel b) 
=> a

cellView: a CellView

-> Maybe b

model: a TreeModel

-> m () 

Sets the model for cellView. If cellView already has a model set, it will remove it before setting the new model. If model is Nothing, then it will unset the old model.

Since: 2.6

Properties

background

backgroundGdk

backgroundRgba

backgroundSet

cellArea

cellAreaContext

drawSensitive

fitModel

model

setCellViewModel :: (MonadIO m, IsCellView o, IsTreeModel a) => o -> a -> m () Source #