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 |
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 :: IsCellView o => o -> IO CellView
- noCellView :: Maybe CellView
- data CellViewGetDisplayedRowMethodInfo
- cellViewGetDisplayedRow :: (HasCallStack, MonadIO m, IsCellView a) => a -> m (Maybe TreePath)
- data CellViewGetDrawSensitiveMethodInfo
- cellViewGetDrawSensitive :: (HasCallStack, MonadIO m, IsCellView a) => a -> m Bool
- data CellViewGetFitModelMethodInfo
- cellViewGetFitModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> m Bool
- data CellViewGetModelMethodInfo
- cellViewGetModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> m (Maybe TreeModel)
- data CellViewGetSizeOfRowMethodInfo
- 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
- data CellViewSetBackgroundColorMethodInfo
- cellViewSetBackgroundColor :: (HasCallStack, MonadIO m, IsCellView a) => a -> Color -> m ()
- data CellViewSetBackgroundRgbaMethodInfo
- cellViewSetBackgroundRgba :: (HasCallStack, MonadIO m, IsCellView a) => a -> RGBA -> m ()
- data CellViewSetDisplayedRowMethodInfo
- cellViewSetDisplayedRow :: (HasCallStack, MonadIO m, IsCellView a) => a -> Maybe TreePath -> m ()
- data CellViewSetDrawSensitiveMethodInfo
- cellViewSetDrawSensitive :: (HasCallStack, MonadIO m, IsCellView a) => a -> Bool -> m ()
- data CellViewSetFitModelMethodInfo
- cellViewSetFitModel :: (HasCallStack, MonadIO m, IsCellView a) => a -> Bool -> m ()
- data CellViewSetModelMethodInfo
- cellViewSetModel :: (HasCallStack, MonadIO m, IsCellView a, IsTreeModel b) => a -> Maybe b -> m ()
- data CellViewBackgroundPropertyInfo
- cellViewBackground :: AttrLabelProxy "background"
- clearCellViewBackground :: (MonadIO m, IsCellView o) => o -> m ()
- constructCellViewBackground :: IsCellView o => Text -> IO (GValueConstruct o)
- setCellViewBackground :: (MonadIO m, IsCellView o) => o -> Text -> m ()
- data CellViewBackgroundGdkPropertyInfo
- cellViewBackgroundGdk :: AttrLabelProxy "backgroundGdk"
- 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 ()
- data CellViewBackgroundRgbaPropertyInfo
- cellViewBackgroundRgba :: AttrLabelProxy "backgroundRgba"
- constructCellViewBackgroundRgba :: IsCellView o => RGBA -> IO (GValueConstruct o)
- getCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> m (Maybe RGBA)
- setCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> RGBA -> m ()
- data CellViewBackgroundSetPropertyInfo
- cellViewBackgroundSet :: AttrLabelProxy "backgroundSet"
- constructCellViewBackgroundSet :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- data CellViewCellAreaPropertyInfo
- cellViewCellArea :: AttrLabelProxy "cellArea"
- constructCellViewCellArea :: (IsCellView o, IsCellArea a) => a -> IO (GValueConstruct o)
- getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea)
- data CellViewCellAreaContextPropertyInfo
- cellViewCellAreaContext :: AttrLabelProxy "cellAreaContext"
- constructCellViewCellAreaContext :: (IsCellView o, IsCellAreaContext a) => a -> IO (GValueConstruct o)
- getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext)
- data CellViewDrawSensitivePropertyInfo
- cellViewDrawSensitive :: AttrLabelProxy "drawSensitive"
- constructCellViewDrawSensitive :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- data CellViewFitModelPropertyInfo
- cellViewFitModel :: AttrLabelProxy "fitModel"
- constructCellViewFitModel :: IsCellView o => Bool -> IO (GValueConstruct o)
- getCellViewFitModel :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewFitModel :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- data CellViewModelPropertyInfo
- cellViewModel :: AttrLabelProxy "model"
- 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
GObject CellView Source # | |
IsImplementorIface CellView Source # | |
IsObject CellView Source # | |
IsWidget CellView Source # | |
IsOrientable CellView Source # | |
IsCellLayout CellView Source # | |
IsBuildable CellView Source # | |
IsCellView CellView Source # | |
((~) * info (ResolveCellViewMethod t CellView), MethodInfo * info CellView p) => IsLabel t (CellView -> p) Source # | |
((~) * info (ResolveCellViewMethod t CellView), MethodInfo * info CellView p) => IsLabelProxy t (CellView -> p) Source # | |
HasAttributeList * CellView Source # | |
type AttributeList CellView Source # | |
type SignalList CellView Source # | |
class GObject o => IsCellView o Source #
(GObject a, UnknownAncestorError Constraint CellView a) => IsCellView a Source # | |
IsCellView CellView Source # | |
toCellView :: IsCellView o => o -> IO CellView Source #
Methods
getDisplayedRow
data CellViewGetDisplayedRowMethodInfo Source #
((~) * signature (m (Maybe TreePath)), MonadIO m, IsCellView a) => MethodInfo * CellViewGetDisplayedRowMethodInfo a signature Source # | |
cellViewGetDisplayedRow Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m (Maybe TreePath) | Returns: the currently displayed row or |
getDrawSensitive
data CellViewGetDrawSensitiveMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCellView a) => MethodInfo * CellViewGetDrawSensitiveMethodInfo a signature Source # | |
cellViewGetDrawSensitive Source #
:: (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
data CellViewGetFitModelMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCellView a) => MethodInfo * CellViewGetFitModelMethodInfo a signature Source # | |
:: (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
data CellViewGetModelMethodInfo Source #
((~) * signature (m (Maybe TreeModel)), MonadIO m, IsCellView a) => MethodInfo * CellViewGetModelMethodInfo a signature Source # | |
:: (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
data CellViewGetSizeOfRowMethodInfo Source #
((~) * signature (TreePath -> m (Bool, Requisition)), MonadIO m, IsCellView a) => MethodInfo * CellViewGetSizeOfRowMethodInfo a signature Source # | |
:: (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
:: (HasCallStack, MonadIO m) | |
=> m CellView | Returns: A newly created |
Creates a new CellView
widget.
Since: 2.6
newWithContext
cellViewNewWithContext Source #
:: (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 #
:: (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 #
:: (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
:: (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
data CellViewSetBackgroundColorMethodInfo Source #
((~) * signature (Color -> m ()), MonadIO m, IsCellView a) => MethodInfo * CellViewSetBackgroundColorMethodInfo a signature Source # | |
cellViewSetBackgroundColor Source #
:: (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
data CellViewSetBackgroundRgbaMethodInfo Source #
((~) * signature (RGBA -> m ()), MonadIO m, IsCellView a) => MethodInfo * CellViewSetBackgroundRgbaMethodInfo a signature Source # | |
cellViewSetBackgroundRgba Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> RGBA |
|
-> m () |
Sets the background color of cellView
.
Since: 3.0
setDisplayedRow
data CellViewSetDisplayedRowMethodInfo Source #
((~) * signature (Maybe TreePath -> m ()), MonadIO m, IsCellView a) => MethodInfo * CellViewSetDisplayedRowMethodInfo a signature Source # | |
cellViewSetDisplayedRow Source #
:: (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
data CellViewSetDrawSensitiveMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsCellView a) => MethodInfo * CellViewSetDrawSensitiveMethodInfo a signature Source # | |
cellViewSetDrawSensitive Source #
:: (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
data CellViewSetFitModelMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsCellView a) => MethodInfo * CellViewSetFitModelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> Bool |
|
-> m () |
setModel
data CellViewSetModelMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsCellView a, IsTreeModel b) => MethodInfo * CellViewSetModelMethodInfo a signature Source # | |
:: (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
data CellViewBackgroundPropertyInfo Source #
cellViewBackground :: AttrLabelProxy "background" Source #
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
data CellViewBackgroundGdkPropertyInfo Source #
cellViewBackgroundGdk :: AttrLabelProxy "backgroundGdk" Source #
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
data CellViewBackgroundRgbaPropertyInfo Source #
cellViewBackgroundRgba :: AttrLabelProxy "backgroundRgba" Source #
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
data CellViewBackgroundSetPropertyInfo Source #
cellViewBackgroundSet :: AttrLabelProxy "backgroundSet" Source #
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
data CellViewCellAreaPropertyInfo Source #
cellViewCellArea :: AttrLabelProxy "cellArea" Source #
constructCellViewCellArea :: (IsCellView o, IsCellArea a) => a -> IO (GValueConstruct o) Source #
getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea) Source #
cellAreaContext
data CellViewCellAreaContextPropertyInfo Source #
cellViewCellAreaContext :: AttrLabelProxy "cellAreaContext" Source #
constructCellViewCellAreaContext :: (IsCellView o, IsCellAreaContext a) => a -> IO (GValueConstruct o) Source #
getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext) Source #
drawSensitive
data CellViewDrawSensitivePropertyInfo Source #
cellViewDrawSensitive :: AttrLabelProxy "drawSensitive" Source #
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
data CellViewFitModelPropertyInfo Source #
cellViewFitModel :: AttrLabelProxy "fitModel" Source #
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
data CellViewModelPropertyInfo Source #
cellViewModel :: AttrLabelProxy "model" Source #
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 #