Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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.
Synopsis
- newtype CellView = CellView (ManagedPtr CellView)
- class (GObject o, IsDescendantOf CellView o) => IsCellView o
- toCellView :: (MonadIO m, IsCellView o) => o -> m 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, MonadIO m) => Text -> m (GValueConstruct o)
- setCellViewBackground :: (MonadIO m, IsCellView o) => o -> Text -> m ()
- clearCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m ()
- constructCellViewBackgroundGdk :: (IsCellView o, MonadIO m) => Color -> m (GValueConstruct o)
- getCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m (Maybe Color)
- setCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> Color -> m ()
- constructCellViewBackgroundRgba :: (IsCellView o, MonadIO m) => RGBA -> m (GValueConstruct o)
- getCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> m (Maybe RGBA)
- setCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> RGBA -> m ()
- constructCellViewBackgroundSet :: (IsCellView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- constructCellViewCellArea :: (IsCellView o, MonadIO m, IsCellArea a) => a -> m (GValueConstruct o)
- getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea)
- constructCellViewCellAreaContext :: (IsCellView o, MonadIO m, IsCellAreaContext a) => a -> m (GValueConstruct o)
- getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext)
- constructCellViewDrawSensitive :: (IsCellView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> m Bool
- setCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> Bool -> m ()
- constructCellViewFitModel :: (IsCellView o, MonadIO m) => Bool -> m (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, MonadIO m, IsTreeModel a) => a -> m (GValueConstruct o)
- getCellViewModel :: (MonadIO m, IsCellView o) => o -> m (Maybe TreeModel)
- setCellViewModel :: (MonadIO m, IsCellView o, IsTreeModel a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq CellView Source # | |
GObject CellView Source # | |
Defined in GI.Gtk.Objects.CellView | |
ManagedPtrNewtype CellView Source # | |
Defined in GI.Gtk.Objects.CellView toManagedPtr :: CellView -> ManagedPtr CellView | |
TypedObject CellView Source # | |
Defined in GI.Gtk.Objects.CellView | |
HasParentTypes CellView Source # | |
Defined in GI.Gtk.Objects.CellView | |
IsGValue (Maybe CellView) Source # | Convert |
Defined in GI.Gtk.Objects.CellView gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CellView -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CellView) | |
type ParentTypes CellView Source # | |
Defined in GI.Gtk.Objects.CellView |
class (GObject o, IsDescendantOf CellView o) => IsCellView o Source #
Type class for types which can be safely cast to CellView
, for instance with toCellView
.
Instances
(GObject o, IsDescendantOf CellView o) => IsCellView o Source # | |
Defined in GI.Gtk.Objects.CellView |
toCellView :: (MonadIO m, IsCellView o) => o -> m CellView Source #
Methods
Click to display all available methods, including inherited ones
Methods
activate, addAccelerator, addAttribute, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, clear, clearAttributes, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, packEnd, packStart, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorder, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getArea, getCanDefault, getCanFocus, getCells, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDisplayedRow, getDoubleBuffered, getDrawSensitive, getEvents, getFitModel, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModel, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeOfRow, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBackgroundColor, setBackgroundRgba, setBuildableProperty, setCanDefault, setCanFocus, setCellDataFunc, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDisplayedRow, setDoubleBuffered, setDrawSensitive, setEvents, setFitModel, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setModel, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
getDisplayedRow
cellViewGetDisplayedRow Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m (Maybe TreePath) | Returns: the currently displayed row or |
getDrawSensitive
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
:: (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
:: (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
:: (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
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
cellViewSetBackgroundRgba Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> RGBA |
|
-> m () |
Sets the background color of cellView
.
Since: 3.0
setDisplayedRow
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
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
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> Bool |
|
-> m () |
setModel
:: (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
No description available in the introspection data.
clearCellViewBackground :: (MonadIO m, IsCellView o) => o -> m () Source #
Set the value of the “background
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#background
constructCellViewBackground :: (IsCellView o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “background
” property. This is rarely needed directly, but it is used by new
.
setCellViewBackground :: (MonadIO m, IsCellView o) => o -> Text -> m () Source #
Set the value of the “background
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #background:=
value ]
backgroundGdk
The background color as a Color
clearCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m () Source #
Set the value of the “background-gdk
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#backgroundGdk
constructCellViewBackgroundGdk :: (IsCellView o, MonadIO m) => Color -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “background-gdk
” property. This is rarely needed directly, but it is used by new
.
getCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> m (Maybe Color) Source #
Get the value of the “background-gdk
” property.
When overloading is enabled, this is equivalent to
get
cellView #backgroundGdk
setCellViewBackgroundGdk :: (MonadIO m, IsCellView o) => o -> Color -> m () Source #
Set the value of the “background-gdk
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #backgroundGdk:=
value ]
backgroundRgba
The background color as a RGBA
Since: 3.0
constructCellViewBackgroundRgba :: (IsCellView o, MonadIO m) => RGBA -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “background-rgba
” property. This is rarely needed directly, but it is used by new
.
getCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> m (Maybe RGBA) Source #
Get the value of the “background-rgba
” property.
When overloading is enabled, this is equivalent to
get
cellView #backgroundRgba
setCellViewBackgroundRgba :: (MonadIO m, IsCellView o) => o -> RGBA -> m () Source #
Set the value of the “background-rgba
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #backgroundRgba:=
value ]
backgroundSet
No description available in the introspection data.
constructCellViewBackgroundSet :: (IsCellView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “background-set
” property. This is rarely needed directly, but it is used by new
.
getCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> m Bool Source #
Get the value of the “background-set
” property.
When overloading is enabled, this is equivalent to
get
cellView #backgroundSet
setCellViewBackgroundSet :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
Set the value of the “background-set
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #backgroundSet:=
value ]
cellArea
The CellArea
rendering cells
If no area is specified when creating the cell view with cellViewNewWithContext
a horizontally oriented CellAreaBox
will be used.
since 3.0
constructCellViewCellArea :: (IsCellView o, MonadIO m, IsCellArea a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “cell-area
” property. This is rarely needed directly, but it is used by new
.
getCellViewCellArea :: (MonadIO m, IsCellView o) => o -> m (Maybe CellArea) Source #
Get the value of the “cell-area
” property.
When overloading is enabled, this is equivalent to
get
cellView #cellArea
cellAreaContext
The CellAreaContext
used to compute the geometry of the cell view.
A group of cell views can be assigned the same context in order to ensure the sizes and cell alignments match across all the views with the same context.
ComboBox
menus uses this to assign the same context to all cell views
in the menu items for a single menu (each submenu creates its own
context since the size of each submenu does not depend on parent
or sibling menus).
since 3.0
constructCellViewCellAreaContext :: (IsCellView o, MonadIO m, IsCellAreaContext a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “cell-area-context
” property. This is rarely needed directly, but it is used by new
.
getCellViewCellAreaContext :: (MonadIO m, IsCellView o) => o -> m (Maybe CellAreaContext) Source #
Get the value of the “cell-area-context
” property.
When overloading is enabled, this is equivalent to
get
cellView #cellAreaContext
drawSensitive
Whether all cells should be draw as sensitive for this view regardless of the actual cell properties (used to make menus with submenus appear sensitive when the items in submenus might be insensitive).
since 3.0
constructCellViewDrawSensitive :: (IsCellView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “draw-sensitive
” property. This is rarely needed directly, but it is used by new
.
getCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> m Bool Source #
Get the value of the “draw-sensitive
” property.
When overloading is enabled, this is equivalent to
get
cellView #drawSensitive
setCellViewDrawSensitive :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
Set the value of the “draw-sensitive
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #drawSensitive:=
value ]
fitModel
Whether the view should request enough space to always fit the size of every row in the model (used by the combo box to ensure the combo box size doesnt change when different items are selected).
since 3.0
constructCellViewFitModel :: (IsCellView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “fit-model
” property. This is rarely needed directly, but it is used by new
.
getCellViewFitModel :: (MonadIO m, IsCellView o) => o -> m Bool Source #
Get the value of the “fit-model
” property.
When overloading is enabled, this is equivalent to
get
cellView #fitModel
setCellViewFitModel :: (MonadIO m, IsCellView o) => o -> Bool -> m () Source #
Set the value of the “fit-model
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #fitModel:=
value ]
model
The model for cell view
since 2.10
clearCellViewModel :: (MonadIO m, IsCellView o) => o -> m () Source #
Set the value of the “model
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#model
constructCellViewModel :: (IsCellView o, MonadIO m, IsTreeModel a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “model
” property. This is rarely needed directly, but it is used by new
.
getCellViewModel :: (MonadIO m, IsCellView o) => o -> m (Maybe TreeModel) Source #
Get the value of the “model
” property.
When overloading is enabled, this is equivalent to
get
cellView #model
setCellViewModel :: (MonadIO m, IsCellView o, IsTreeModel a) => o -> a -> m () Source #
Set the value of the “model
” property.
When overloading is enabled, this is equivalent to
set
cellView [ #model:=
value ]