Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A widget displaying a single row of a GtkTreeModel
A GtkCellView
displays a single row of a GtkTreeModel
using a GtkCellArea
and GtkCellAreaContext
. A GtkCellAreaContext
can be provided to the
GtkCellView
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 each other (like the aligned cells in the menus
of GtkComboBox
).
GtkCellView
is GtkOrientable
in order to decide in which orientation
the underlying GtkCellAreaContext
should be allocated. Taking the GtkComboBox
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)
- 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
- cellViewNewWithText :: (HasCallStack, MonadIO m) => Text -> m CellView
- cellViewNewWithTexture :: (HasCallStack, MonadIO m, IsTexture a) => a -> m CellView
- 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 ()
- 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 | |
type ParentTypes CellView Source # | |
Defined in GI.Gtk.Objects.CellView type ParentTypes CellView = '[Widget, Object, Accessible, Buildable, CellLayout, ConstraintTarget, Orientable] |
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
actionSetEnabled, activate, activateAction, activateDefault, addAttribute, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, clear, clearAttributes, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, packEnd, packStart, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, reorder, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getArea, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getCells, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getDisplayedRow, getDrawSensitive, getFirstAccessibleChild, getFirstChild, getFitModel, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getModel, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setCellDataFunc, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setDisplayedRow, setDrawSensitive, setFitModel, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setModel, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getDisplayedRow
cellViewGetDisplayedRow Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m (Maybe TreePath) | Returns: the currently displayed row |
Deprecated: (Since version 4.10)
Returns a GtkTreePath
referring to the currently
displayed row. If no row is currently displayed,
Nothing
is returned.
getDrawSensitive
cellViewGetDrawSensitive Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m Bool | Returns: whether |
Deprecated: (Since version 4.10)
Gets whether cellView
is configured to draw all of its
cells in a sensitive state.
getFitModel
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m Bool | Returns: whether |
Deprecated: (Since version 4.10)
Gets whether cellView
is configured to request space
to fit the entire GtkTreeModel
.
getModel
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> m (Maybe TreeModel) | Returns: a |
Deprecated: (Since version 4.10)
Returns the model for cellView
. If no model is used Nothing
is
returned.
new
:: (HasCallStack, MonadIO m) | |
=> m CellView | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkCellView
widget.
newWithContext
cellViewNewWithContext Source #
:: (HasCallStack, MonadIO m, IsCellArea a, IsCellAreaContext b) | |
=> a |
|
-> b |
|
-> m CellView | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkCellView
widget with a specific GtkCellArea
to layout cells and a specific GtkCellAreaContext
.
Specifying the same context for a handful of cells lets the underlying area synchronize the geometry for those cells, in this way alignments with cellviews for other rows are possible.
newWithMarkup
cellViewNewWithMarkup Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CellView | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkCellView
widget, adds a GtkCellRendererText
to it, and makes it show markup
. The text can be marked up with
the Pango text markup language.
newWithText
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m CellView | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkCellView
widget, adds a GtkCellRendererText
to it, and makes it show text
.
newWithTexture
cellViewNewWithTexture Source #
:: (HasCallStack, MonadIO m, IsTexture a) | |
=> a |
|
-> m CellView | Returns: A newly created |
Deprecated: (Since version 4.10)
Creates a new GtkCellView
widget, adds a GtkCellRendererPixbuf
to it, and makes it show texture
.
setDisplayedRow
cellViewSetDisplayedRow Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> Maybe TreePath |
|
-> m () |
Deprecated: (Since version 4.10)
Sets the row of the model that is currently displayed
by the GtkCellView
. 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 GtkCellView
becomes temporarily empty.
setDrawSensitive
cellViewSetDrawSensitive Source #
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 4.10)
Sets whether cellView
should draw all of its
cells in a sensitive state, this is used by GtkComboBox
menus
to ensure that rows with insensitive cells that contain
children appear sensitive in the parent menu item.
setFitModel
:: (HasCallStack, MonadIO m, IsCellView a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 4.10)
Sets whether cellView
should request space to fit the entire GtkTreeModel
.
This is used by GtkComboBox
to ensure that the cell view displayed on
the combo box’s button always gets enough space and does not resize
when selection changes.
setModel
:: (HasCallStack, MonadIO m, IsCellView a, IsTreeModel b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Deprecated: (Since version 4.10)
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.
Properties
cellArea
The GtkCellArea
rendering cells
If no area is specified when creating the cell view with cellViewNewWithContext
a horizontally oriented GtkCellArea
Box 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 GtkCellAreaContext
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.
GtkComboBox
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 doesn't 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 ]