Class CellAreaContext
- All Implemented Interfaces:
Proxy
The GtkCellAreaContext
object is created by a given GtkCellArea
implementation via its GtkCellAreaClass.create_context()
virtual
method and is used to store cell sizes and alignments for a series of
GtkTreeModel
rows that are requested and rendered in the same context.
GtkCellLayout
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 GtkTreeModel
row also be used for the same row when calling other GtkCellArea
APIs
such as gtk_cell_area_render() and gtk_cell_area_event().
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
CellAreaContext.Builder<B extends CellAreaContext.Builder<B>>
Deprecated.Inner class implementing a builder pattern to construct a GObject with properties.static class
Deprecated.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionCellAreaContext
(MemorySegment address) Deprecated.Create a CellAreaContext proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int width, int height) Deprecated.This object will be removed in GTK 5protected CellAreaContext
asParent()
Deprecated.Returns this instance as if it were its parent type.static CellAreaContext.Builder
<? extends CellAreaContext.Builder> builder()
Deprecated.ACellAreaContext.Builder
object constructs aCellAreaContext
with the specified properties.void
getAllocation
(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Deprecated.This object will be removed in GTK 5getArea()
Deprecated.This object will be removed in GTK 5static MemoryLayout
Deprecated.The memory layout of the native struct.void
getPreferredHeight
(@Nullable Out<Integer> minimumHeight, @Nullable Out<Integer> naturalHeight) Deprecated.This object will be removed in GTK 5void
getPreferredHeightForWidth
(int width, @Nullable Out<Integer> minimumHeight, @Nullable Out<Integer> naturalHeight) Deprecated.This object will be removed in GTK 5void
getPreferredWidth
(@Nullable Out<Integer> minimumWidth, @Nullable Out<Integer> naturalWidth) Deprecated.This object will be removed in GTK 5void
getPreferredWidthForHeight
(int height, @Nullable Out<Integer> minimumWidth, @Nullable Out<Integer> naturalWidth) Deprecated.This object will be removed in GTK 5static Type
getType()
Deprecated.Get the GType of the CellAreaContext classvoid
pushPreferredHeight
(int minimumHeight, int naturalHeight) Deprecated.This object will be removed in GTK 5void
pushPreferredWidth
(int minimumWidth, int naturalWidth) Deprecated.This object will be removed in GTK 5void
reset()
Deprecated.This object will be removed in GTK 5Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
CellAreaContext
Deprecated.Create a CellAreaContext proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
Deprecated.Get the GType of the CellAreaContext class- Returns:
- the GType
-
getMemoryLayout
Deprecated.The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Deprecated.Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
allocate
Deprecated.This object will be removed in GTK 5Allocates a width and/or a height for all rows which are to be rendered with this CellAreaContext.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
GtkTreeView
whenGtkTreeView:fixed-height-mode
is enabled.- Parameters:
width
- the allocated width for allGtkTreeModel
rows rendered with this CellAreaContext, or -1height
- the allocated height for allGtkTreeModel
rows rendered with this CellAreaContext, or -1
-
getAllocation
@Deprecated public void getAllocation(@Nullable @Nullable Out<Integer> width, @Nullable @Nullable Out<Integer> height) Deprecated.This object will be removed in GTK 5Fetches the current allocation size for this CellAreaContext.If the context was not allocated in width or height, or if the context was recently reset with gtk_cell_area_context_reset(), the returned value will be -1.
- Parameters:
width
- location to store the allocated widthheight
- location to store the allocated height
-
getArea
Deprecated.This object will be removed in GTK 5Fetches theGtkCellArea
this this CellAreaContext 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
GtkCellAreaContextClass.allocate()
time it’s important to know details about any cell spacing that theGtkCellArea
is configured with in order to compute a proper allocation.- Returns:
- the
GtkCellArea
this context was created by.
-
getPreferredHeight
@Deprecated public void getPreferredHeight(@Nullable @Nullable Out<Integer> minimumHeight, @Nullable @Nullable Out<Integer> naturalHeight) Deprecated.This object will be removed in GTK 5Gets the accumulative preferred height for all rows which have been requested with this context.After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a
GtkCellArea
, the returned values are 0.- Parameters:
minimumHeight
- location to store the minimum heightnaturalHeight
- location to store the natural height
-
getPreferredHeightForWidth
@Deprecated public void getPreferredHeightForWidth(int width, @Nullable @Nullable Out<Integer> minimumHeight, @Nullable @Nullable Out<Integer> naturalHeight) Deprecated.This object will be removed in GTK 5Gets the accumulative preferred height forwidth
for all rows which have been requested for the same saidwidth
with this context.After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a
GtkCellArea
, the returned values are -1.- Parameters:
width
- a proposed width for allocationminimumHeight
- location to store the minimum heightnaturalHeight
- location to store the natural height
-
getPreferredWidth
@Deprecated public void getPreferredWidth(@Nullable @Nullable Out<Integer> minimumWidth, @Nullable @Nullable Out<Integer> naturalWidth) Deprecated.This object will be removed in GTK 5Gets the accumulative preferred width for all rows which have been requested with this context.After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a
GtkCellArea
, the returned values are 0.- Parameters:
minimumWidth
- location to store the minimum widthnaturalWidth
- location to store the natural width
-
getPreferredWidthForHeight
@Deprecated public void getPreferredWidthForHeight(int height, @Nullable @Nullable Out<Integer> minimumWidth, @Nullable @Nullable Out<Integer> naturalWidth) Deprecated.This object will be removed in GTK 5Gets the accumulative preferred width forheight
for all rows which have been requested for the same saidheight
with this context.After gtk_cell_area_context_reset() is called and/or before ever requesting the size of a
GtkCellArea
, the returned values are -1.- Parameters:
height
- a proposed height for allocationminimumWidth
- location to store the minimum widthnaturalWidth
- location to store the natural width
-
pushPreferredHeight
Deprecated.This object will be removed in GTK 5Causes the minimum and/or natural height to grow if the new proposed sizes exceed the current minimum and natural height.This is used by
GtkCellAreaContext
implementations during the request process over a series ofGtkTreeModel
rows to progressively push the requested height over a series of gtk_cell_area_get_preferred_height() requests.- Parameters:
minimumHeight
- the proposed new minimum height for this CellAreaContextnaturalHeight
- the proposed new natural height for this CellAreaContext
-
pushPreferredWidth
Deprecated.This object will be removed in GTK 5Causes the minimum and/or natural width to grow if the new proposed sizes exceed the current minimum and natural width.This is used by
GtkCellAreaContext
implementations during the request process over a series ofGtkTreeModel
rows to progressively push the requested width over a series of gtk_cell_area_get_preferred_width() requests.- Parameters:
minimumWidth
- the proposed new minimum width for this CellAreaContextnaturalWidth
- the proposed new natural width for this CellAreaContext
-
reset
Deprecated.This object will be removed in GTK 5Resets any previously cached request and allocation data.When underlying
GtkTreeModel
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 gtk_cell_area_get_preferred_width().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 gtk_cell_area_get_preferred_height_for_width().
-
builder
Deprecated.ACellAreaContext.Builder
object constructs aCellAreaContext
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withCellAreaContext.Builder.build()
.
-