| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
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.
- newtype CellView = CellView (ManagedPtr CellView)
- class GObject o => IsCellView o
- toCellView :: (MonadIO m, IsCellView o) => o -> m CellView
- noCellView :: Maybe CellView
- cellViewGetDisplayedRow :: (HasCallStack, MonadIO m, IsCellView a) => a -> m (Maybe TreePath)
- cellViewGetDrawSensitive :: (HasCallStack, MonadIO m, IsCellView a) => a -> m Bool
- cellViewGetFitModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> m Bool
- cellViewGetModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> m (Maybe TreeModel)
- cellViewGetSizeOfRow :: (HasCallStack, MonadIO m, IsCellView a) => a -> TreePath -> m (Bool, Requisition)
- cellViewNew :: (HasCallStack, MonadIO m) => m CellView
- cellViewNewWithContext :: (HasCallStack, MonadIO m, IsCellArea a, IsCellAreaContext b) => a -> b -> m CellView
- cellViewNewWithMarkup :: (HasCallStack, MonadIO m) => Text -> m CellView
- cellViewNewWithPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => a -> m CellView
- cellViewNewWithText :: (HasCallStack, MonadIO m) => Text -> m CellView
- cellViewSetBackgroundColor :: (HasCallStack, MonadIO m, IsCellView a) => a -> Color -> m ()
- cellViewSetBackgroundRgba :: (HasCallStack, MonadIO m, IsCellView a) => a -> RGBA -> m ()
- cellViewSetDisplayedRow :: (HasCallStack, MonadIO m, IsCellView a) => a -> Maybe TreePath -> m ()
- cellViewSetDrawSensitive :: (HasCallStack, MonadIO m, IsCellView a) => a -> Bool -> m ()
- cellViewSetFitModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> Bool -> m ()
- cellViewSetModel :: (HasCallStack, MonadIO m, IsCellView a, IsTreeModel b) => a -> Maybe b -> m ()
- clearCellViewBackground :: (MonadIO m, IsCellView o) => o -> m ()
- constructCellViewBackground :: IsCellView o => Text -> IO (GValueConstruct o)
- setCellViewBackground :: (MonadIO m, IsCellView o) => o -> Text -> m ()
- clearCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m ()
- constructCellViewBackgroundGdk :: IsCellView o => Color -> IO (GValueConstruct o)
- getCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m (Maybe Color)
- setCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> Color -> m ()
- constructCellViewBackgroundRgba :: IsCellView o => RGBA -> IO (GValueConstruct o)
- getCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> m (Maybe RGBA)
- setCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> RGBA -> m ()
- constructCellViewBackgroundSet :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- constructCellViewCellArea :: (IsCellView o, IsCellArea a) => a -> IO (GValueConstruct o)
- getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea)
- constructCellViewCellAreaContext :: (IsCellView o, IsCellAreaContext a) => a -> IO (GValueConstruct o)
- getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext)
- constructCellViewDrawSensitive :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- constructCellViewFitModel :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewFitModel :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewFitModel :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- clearCellViewModel :: (MonadIO m, IsCellView o) => o -> m ()
- constructCellViewModel :: (IsCellView o, IsTreeModel a) => a -> IO (GValueConstruct o)
- getCellViewModel :: (MonadIO m, IsCellView o) => o -> m (Maybe TreeModel)
- setCellViewModel :: (MonadIO m, IsCellView o, IsTreeModel a) => o -> a -> m ()
Exported types
Constructors
| CellView (ManagedPtr CellView) |
class GObject o => IsCellView o Source #
Instances
| (GObject a, UnknownAncestorError Constraint CellView a) => IsCellView a Source # | |
| IsCellView CellView Source # | |
toCellView :: (MonadIO m, IsCellView o) => o -> m CellView Source #
Methods
getDisplayedRow
cellViewGetDisplayedRow Source #
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> m (Maybe TreePath) | Returns: the currently displayed row or |
getDrawSensitive
cellViewGetDrawSensitive Source #
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> m Bool | Returns: whether |
Gets whether cellView is configured to draw all of its
cells in a sensitive state.
Since: 3.0
getFitModel
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> m Bool | Returns: whether |
Gets whether cellView is configured to request space
to fit the entire TreeModel.
Since: 3.0
getModel
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> m (Maybe TreeModel) |
Returns the model for cellView. If no model is used Nothing is
returned.
Since: 2.16
getSizeOfRow
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> TreePath |
|
| -> m (Bool, Requisition) | Returns: |
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m CellView | Returns: A newly created |
Creates a new CellView widget.
Since: 2.6
newWithContext
cellViewNewWithContext Source #
Arguments
| :: (HasCallStack, MonadIO m, IsCellArea a, IsCellAreaContext b) | |
| => a |
|
| -> b |
|
| -> m CellView | Returns: A newly created |
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 |
|
| -> m CellView | Returns: A newly created |
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 |
|
| -> m CellView | Returns: A newly created |
Creates a new CellView widget, adds a CellRendererPixbuf
to it, and makes it show pixbuf.
Since: 2.6
newWithText
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m CellView | Returns: A newly created |
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 |
|
| -> 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 |
|
| -> RGBA |
|
| -> m () |
Sets the background color of cellView.
Since: 3.0
setDisplayedRow
cellViewSetDisplayedRow Source #
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> Maybe TreePath | |
| -> 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 |
|
| -> Bool |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a) | |
| => a |
|
| -> Bool |
|
| -> m () |
setModel
Arguments
| :: (HasCallStack, MonadIO m, IsCellView a, IsTreeModel b) | |
| => a |
|
| -> Maybe b |
|
| -> 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
clearCellViewBackground :: (MonadIO m, IsCellView o) => o -> m () Source #
constructCellViewBackground :: IsCellView o => Text -> IO (GValueConstruct o) Source #
setCellViewBackground :: (MonadIO m, IsCellView o) => o -> Text -> m () Source #
backgroundGdk
clearCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m () Source #
constructCellViewBackgroundGdk :: IsCellView o => Color -> IO (GValueConstruct o) Source #
getCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m (Maybe Color) Source #
setCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> Color -> m () Source #
backgroundRgba
constructCellViewBackgroundRgba :: IsCellView o => RGBA -> IO (GValueConstruct o) Source #
getCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> m (Maybe RGBA) Source #
setCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> RGBA -> m () Source #
backgroundSet
constructCellViewBackgroundSet :: IsCellView o => Bool -> IO (GValueConstruct o) Source #
getCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> m Bool Source #
setCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
cellArea
constructCellViewCellArea :: (IsCellView o, IsCellArea a) => a -> IO (GValueConstruct o) Source #
getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea) Source #
cellAreaContext
constructCellViewCellAreaContext :: (IsCellView o, IsCellAreaContext a) => a -> IO (GValueConstruct o) Source #
getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext) Source #
drawSensitive
constructCellViewDrawSensitive :: IsCellView o => Bool -> IO (GValueConstruct o) Source #
getCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> m Bool Source #
setCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
fitModel
constructCellViewFitModel :: IsCellView o => Bool -> IO (GValueConstruct o) Source #
getCellViewFitModel :: (MonadIO m, IsCellView o) => o -> m Bool Source #
setCellViewFitModel :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
model
clearCellViewModel :: (MonadIO m, IsCellView o) => o -> m () Source #
constructCellViewModel :: (IsCellView o, IsTreeModel a) => a -> IO (GValueConstruct o) Source #
getCellViewModel :: (MonadIO m, IsCellView o) => o -> m (Maybe TreeModel) Source #
setCellViewModel :: (MonadIO m, IsCellView o, IsTreeModel a) => o -> a -> m () Source #