Package ch.bailu.gtk.gtk
Class CellRendererToggle
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gobject.InitiallyUnowned
ch.bailu.gtk.gtk.CellRenderer
ch.bailu.gtk.gtk.CellRendererToggle
- All Implemented Interfaces:
PointerInterface
Renders a toggle button in a cell
`GtkCellRendererToggle` renders a toggle button in a cell. The
button is drawn as a radio or a checkbutton, depending on the
`GtkCellRendererToggle:radio` property.
When activated, it emits the `GtkCellRendererToggle::toggled` signal.
`GtkCellRendererToggle` renders a toggle button in a cell. The
button is drawn as a radio or a checkbutton, depending on the
`GtkCellRendererToggle:radio` property.
When activated, it emits the `GtkCellRendererToggle::toggled` signal.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gtk.CellRenderer
CellRenderer.OnEditingCanceled, CellRenderer.OnEditingStarted
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gtk.CellRenderer
SIGNAL_ON_EDITING_CANCELED, SIGNAL_ON_EDITING_STARTED
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new `GtkCellRendererToggle`.CellRendererToggle
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the cell renderer is activatable.boolean
Returns whether the cell renderer is active.static ClassHandler
static int
static long
static TypeSystem.TypeSize
boolean
getRadio()
Returns whether we’re rendering radio toggles rather than checkboxes.static long
static TypeSystem.TypeSize
Connect to signal "toggled".void
setActivatable
(boolean setting) Makes the cell renderer activatable.void
setActive
(boolean setting) Activates or deactivates a cell renderer.void
setRadio
(boolean radio) If @radio is %TRUE, the cell renderer renders a radio toggle
(i.e. a toggle in a group of mutually-exclusive toggles).Methods inherited from class ch.bailu.gtk.gtk.CellRenderer
activate, activate, getAlignedArea, getAlignment, getFixedSize, getIsExpanded, getIsExpander, getPadding, getPreferredHeight, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getRequestMode, getSensitive, getState, getVisible, isActivatable, onEditingCanceled, onEditingStarted, setAlignment, setFixedSize, setIsExpanded, setIsExpander, setPadding, setSensitive, setVisible, snapshot, startEditing, startEditing, stopEditing
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_TOGGLED
- See Also:
-
-
Constructor Details
-
CellRendererToggle
-
CellRendererToggle
public CellRendererToggle()Creates a new `GtkCellRendererToggle`. Adjust rendering
parameters using object properties. Object properties can be set
globally (with g_object_set()). Also, with `GtkTreeViewColumn`, you
can bind a property to a value in a `GtkTreeModel`. For example, you
can bind the “active” property on the cell renderer to a boolean value
in the model, thus causing the check button to reflect the state of
the model.
-
-
Method Details
-
getClassHandler
-
getActivatable
public boolean getActivatable()Returns whether the cell renderer is activatable. See
gtk_cell_renderer_toggle_set_activatable().- Returns:
- %TRUE if the cell renderer is activatable.
-
getActive
public boolean getActive()Returns whether the cell renderer is active. See
gtk_cell_renderer_toggle_set_active().- Returns:
- %TRUE if the cell renderer is active.
-
getRadio
public boolean getRadio()Returns whether we’re rendering radio toggles rather than checkboxes.- Returns:
- %TRUE if we’re rendering radio toggles rather than checkboxes
-
setActivatable
public void setActivatable(boolean setting) Makes the cell renderer activatable.- Parameters:
setting
- the value to set.
-
setActive
public void setActive(boolean setting) Activates or deactivates a cell renderer.- Parameters:
setting
- the value to set.
-
setRadio
public void setRadio(boolean radio) If @radio is %TRUE, the cell renderer renders a radio toggle
(i.e. a toggle in a group of mutually-exclusive toggles).
If %FALSE, it renders a check toggle (a standalone boolean option).
This can be set globally for the cell renderer, or changed just
before rendering each cell in the model (for `GtkTreeView`, you set
up a per-row setting using `GtkTreeViewColumn` to associate model
columns with cell renderer properties).- Parameters:
radio
- %TRUE to make the toggle look like a radio button
-
onToggled
Connect to signal "toggled".
SeeCellRendererToggle.OnToggled.onToggled(ch.bailu.gtk.type.Str)
for signal description.
FieldSIGNAL_ON_TOGGLED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-