gi-gtk-3.0.11: 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.CellAreaContext

Contents

Description

The CellAreaContext object is created by a given CellArea implementation via its CellAreaClass.create_context() virtual method and is used to store cell sizes and alignments for a series of TreeModel rows that are requested and rendered in the same context.

CellLayout widgets can create any number of contexts in which to request and render groups of data rows. However, it’s important that the same context which was used to request sizes for a given TreeModel row also be used for the same row when calling other CellArea APIs such as cellAreaRender and cellAreaEvent.

Synopsis

Exported types

Methods

allocate

cellAreaContextAllocate Source #

Arguments

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

context: a CellAreaContext

-> Int32

width: the allocated width for all TreeModel rows rendered with context, or -1.

-> Int32

height: the allocated height for all TreeModel rows rendered with context, or -1.

-> m () 

Allocates a width and/or a height for all rows which are to be rendered with context.

Usually allocation is performed only horizontally or sometimes vertically since a group of rows are usually rendered side by side vertically or horizontally and share either the same width or the same height. Sometimes they are allocated in both horizontal and vertical orientations producing a homogeneous effect of the rows. This is generally the case for TreeView when TreeView:fixed-height-mode is enabled.

Since 3.0

getAllocation

cellAreaContextGetAllocation Source #

Arguments

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

context: a CellAreaContext

-> m (Int32, Int32) 

Fetches the current allocation size for context.

If the context was not allocated in width or height, or if the context was recently reset with cellAreaContextReset, the returned value will be -1.

Since: 3.0

getArea

cellAreaContextGetArea Source #

Arguments

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

context: a CellAreaContext

-> m CellArea

Returns: the CellArea this context was created by.

Fetches the CellArea this context was created by.

This is generally unneeded by layouting widgets; however, it is important for the context implementation itself to fetch information about the area it is being used for.

For instance at CellAreaContextClass.allocate() time it’s important to know details about any cell spacing that the CellArea is configured with in order to compute a proper allocation.

Since: 3.0

getPreferredHeight

cellAreaContextGetPreferredHeight Source #

Arguments

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

context: a CellAreaContext

-> m (Int32, Int32) 

Gets the accumulative preferred height for all rows which have been requested with this context.

After cellAreaContextReset is called and/or before ever requesting the size of a CellArea, the returned values are 0.

Since: 3.0

getPreferredHeightForWidth

cellAreaContextGetPreferredHeightForWidth Source #

Arguments

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

context: a CellAreaContext

-> Int32

width: a proposed width for allocation

-> m (Int32, Int32) 

Gets the accumulative preferred height for width for all rows which have been requested for the same said width with this context.

After cellAreaContextReset is called and/or before ever requesting the size of a CellArea, the returned values are -1.

Since: 3.0

getPreferredWidth

cellAreaContextGetPreferredWidth Source #

Arguments

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

context: a CellAreaContext

-> m (Int32, Int32) 

Gets the accumulative preferred width for all rows which have been requested with this context.

After cellAreaContextReset is called and/or before ever requesting the size of a CellArea, the returned values are 0.

Since: 3.0

getPreferredWidthForHeight

cellAreaContextGetPreferredWidthForHeight Source #

Arguments

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

context: a CellAreaContext

-> Int32

height: a proposed height for allocation

-> m (Int32, Int32) 

Gets the accumulative preferred width for height for all rows which have been requested for the same said height with this context.

After cellAreaContextReset is called and/or before ever requesting the size of a CellArea, the returned values are -1.

Since: 3.0

pushPreferredHeight

cellAreaContextPushPreferredHeight Source #

Arguments

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

context: a CellAreaContext

-> Int32

minimumHeight: the proposed new minimum height for context

-> Int32

naturalHeight: the proposed new natural height for context

-> m () 

Causes the minimum and/or natural height to grow if the new proposed sizes exceed the current minimum and natural height.

This is used by CellAreaContext implementations during the request process over a series of TreeModel rows to progressively push the requested height over a series of cellAreaGetPreferredHeight requests.

Since: 3.0

pushPreferredWidth

cellAreaContextPushPreferredWidth Source #

Arguments

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

context: a CellAreaContext

-> Int32

minimumWidth: the proposed new minimum width for context

-> Int32

naturalWidth: the proposed new natural width for context

-> m () 

Causes the minimum and/or natural width to grow if the new proposed sizes exceed the current minimum and natural width.

This is used by CellAreaContext implementations during the request process over a series of TreeModel rows to progressively push the requested width over a series of cellAreaGetPreferredWidth requests.

Since: 3.0

reset

cellAreaContextReset Source #

Arguments

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

context: a CellAreaContext

-> m () 

Resets any previously cached request and allocation data.

When underlying TreeModel data changes its important to reset the context if the content size is allowed to shrink. If the content size is only allowed to grow (this is usually an option for views rendering large data stores as a measure of optimization), then only the row that changed or was inserted needs to be (re)requested with cellAreaGetPreferredWidth.

When the new overall size of the context requires that the allocated size changes (or whenever this allocation changes at all), the variable row sizes need to be re-requested for every row.

For instance, if the rows are displayed all with the same width from top to bottom then a change in the allocated width necessitates a recalculation of all the displayed row heights using cellAreaGetPreferredHeightForWidth.

Since 3.0

Properties

area

data CellAreaContextAreaPropertyInfo Source #

Instances

AttrInfo CellAreaContextAreaPropertyInfo Source # 
type AttrOrigin CellAreaContextAreaPropertyInfo Source # 
type AttrLabel CellAreaContextAreaPropertyInfo Source # 
type AttrGetType CellAreaContextAreaPropertyInfo Source # 
type AttrBaseTypeConstraint CellAreaContextAreaPropertyInfo Source # 
type AttrSetTypeConstraint CellAreaContextAreaPropertyInfo Source # 
type AttrAllowedOps CellAreaContextAreaPropertyInfo Source # 

minimumHeight

data CellAreaContextMinimumHeightPropertyInfo Source #

Instances

AttrInfo CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrOrigin CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrLabel CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrGetType CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrBaseTypeConstraint CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrSetTypeConstraint CellAreaContextMinimumHeightPropertyInfo Source # 
type AttrAllowedOps CellAreaContextMinimumHeightPropertyInfo Source # 

minimumWidth

data CellAreaContextMinimumWidthPropertyInfo Source #

Instances

AttrInfo CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrOrigin CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrLabel CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrGetType CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrBaseTypeConstraint CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrSetTypeConstraint CellAreaContextMinimumWidthPropertyInfo Source # 
type AttrAllowedOps CellAreaContextMinimumWidthPropertyInfo Source # 

naturalHeight

data CellAreaContextNaturalHeightPropertyInfo Source #

Instances

AttrInfo CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrOrigin CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrLabel CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrGetType CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrBaseTypeConstraint CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrSetTypeConstraint CellAreaContextNaturalHeightPropertyInfo Source # 
type AttrAllowedOps CellAreaContextNaturalHeightPropertyInfo Source # 

naturalWidth

data CellAreaContextNaturalWidthPropertyInfo Source #

Instances

AttrInfo CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrOrigin CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrLabel CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrGetType CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrBaseTypeConstraint CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrSetTypeConstraint CellAreaContextNaturalWidthPropertyInfo Source # 
type AttrAllowedOps CellAreaContextNaturalWidthPropertyInfo Source #