v0.2.1 c0399be

gtkcolumnview.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gio"
12	"github.com/bnema/puregotk/v4/glib"
13	"github.com/bnema/puregotk/v4/gobject"
14	"github.com/bnema/puregotk/v4/gobject/types"
15)
16
17type ColumnViewClass struct {
18	_ structs.HostLayout
19}
20
21func (x *ColumnViewClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// Presents a large dynamic list of items using multiple columns with headers.
26//
27// `GtkColumnView` uses the factories of its columns to generate a cell widget for
28// each column, for each visible item and displays them together as the row for
29// this item.
30//
31// The [property@Gtk.ColumnView:show-row-separators] and
32// [property@Gtk.ColumnView:show-column-separators] properties offer a simple way
33// to display separators between the rows or columns.
34//
35// `GtkColumnView` allows the user to select items according to the selection
36// characteristics of the model. For models that allow multiple selected items,
37// it is possible to turn on *rubberband selection*, using
38// [property@Gtk.ColumnView:enable-rubberband].
39//
40// The column view supports sorting that can be customized by the user by
41// clicking on column headers. To set this up, the `GtkSorter` returned by
42// [method@Gtk.ColumnView.get_sorter] must be attached to a sort model for the
43// data that the view is showing, and the columns must have sorters attached to
44// them by calling [method@Gtk.ColumnViewColumn.set_sorter]. The initial sort
45// order can be set with [method@Gtk.ColumnView.sort_by_column].
46//
47// The column view also supports interactive resizing and reordering of
48// columns, via Drag-and-Drop of the column headers. This can be enabled or
49// disabled with the [property@Gtk.ColumnView:reorderable] and
50// [property@Gtk.ColumnViewColumn:resizable] properties.
51//
52// To learn more about the list widget framework, see the
53// [overview](section-list-widget.html).
54//
55// # CSS nodes
56//
57// ```
58// columnview[.column-separators][.rich-list][.navigation-sidebar][.data-table]
59// ├── header
60// │   ├── <column header>
61// ┊   ┊
62// │   ╰── <column header>
63// │
64// ├── listview
65// │
66// ┊
67// ╰── [rubberband]
68// ```
69//
70// `GtkColumnView` uses a single CSS node named columnview. It may carry the
71// .column-separators style class, when [property@Gtk.ColumnView:show-column-separators]
72// property is set. Header widgets appear below a node with name header.
73// The rows are contained in a `GtkListView` widget, so there is a listview
74// node with the same structure as for a standalone `GtkListView` widget.
75// If [property@Gtk.ColumnView:show-row-separators] is set, it will be passed
76// on to the list view, causing its CSS node to carry the .separators style class.
77// For rubberband selection, a node with name rubberband is used.
78//
79// The main columnview node may also carry style classes to select
80// the style of [list presentation](section-list-widget.html#list-styles):
81// .rich-list, .navigation-sidebar or .data-table.
82//
83// # Accessibility
84//
85// `GtkColumnView` uses the [enum@Gtk.AccessibleRole.tree_grid] role, header title
86// widgets are using the [enum@Gtk.AccessibleRole.column_header] role. The row widgets
87// are using the [enum@Gtk.AccessibleRole.row] role, and individual cells are using
88// the [enum@Gtk.AccessibleRole.grid_cell] role
89type ColumnView struct {
90	Widget
91}
92
93var xColumnViewGLibType func() types.GType
94
95func ColumnViewGLibType() types.GType {
96	return xColumnViewGLibType()
97}
98
99func ColumnViewNewFromInternalPtr(ptr uintptr) *ColumnView {
100	cls := &ColumnView{}
101	cls.Ptr = ptr
102	return cls
103}
104
105var xNewColumnView func(uintptr) uintptr
106
107// Creates a new `GtkColumnView`.
108//
109// You most likely want to call [method@Gtk.ColumnView.append_column]
110// to add columns next.
111func NewColumnView(ModelVar SelectionModel) *ColumnView {
112	var cls *ColumnView
113
114	cret := xNewColumnView(ModelVar.GoPointer())
115
116	if cret == 0 {
117		return nil
118	}
119	gobject.IncreaseRef(cret)
120	cls = &ColumnView{}
121	cls.Ptr = cret
122	return cls
123}
124
125var xColumnViewAppendColumn func(uintptr, uintptr)
126
127// Appends the @column to the end of the columns in @self.
128func (x *ColumnView) AppendColumn(ColumnVar *ColumnViewColumn) {
129
130	xColumnViewAppendColumn(x.GoPointer(), ColumnVar.GoPointer())
131
132}
133
134var xColumnViewGetColumns func(uintptr) uintptr
135
136// Gets the list of columns in this column view.
137//
138// This list is constant over the lifetime of @self and can be used to
139// monitor changes to the columns of @self by connecting to the
140// [signal@Gio.ListModel::items-changed] signal.
141func (x *ColumnView) GetColumns() *gio.ListModelBase {
142	var cls *gio.ListModelBase
143
144	cret := xColumnViewGetColumns(x.GoPointer())
145
146	if cret == 0 {
147		return nil
148	}
149	gobject.IncreaseRef(cret)
150	cls = &gio.ListModelBase{}
151	cls.Ptr = cret
152	return cls
153}
154
155var xColumnViewGetEnableRubberband func(uintptr) bool
156
157// Returns whether rows can be selected by dragging with the mouse.
158func (x *ColumnView) GetEnableRubberband() bool {
159
160	cret := xColumnViewGetEnableRubberband(x.GoPointer())
161	return cret
162}
163
164var xColumnViewGetHeaderFactory func(uintptr) uintptr
165
166// Gets the factory that's currently used to populate section headers.
167func (x *ColumnView) GetHeaderFactory() *ListItemFactory {
168	var cls *ListItemFactory
169
170	cret := xColumnViewGetHeaderFactory(x.GoPointer())
171
172	if cret == 0 {
173		return nil
174	}
175	gobject.IncreaseRef(cret)
176	cls = &ListItemFactory{}
177	cls.Ptr = cret
178	return cls
179}
180
181var xColumnViewGetModel func(uintptr) uintptr
182
183// Gets the model that's currently used to read the items displayed.
184func (x *ColumnView) GetModel() *SelectionModelBase {
185	var cls *SelectionModelBase
186
187	cret := xColumnViewGetModel(x.GoPointer())
188
189	if cret == 0 {
190		return nil
191	}
192	gobject.IncreaseRef(cret)
193	cls = &SelectionModelBase{}
194	cls.Ptr = cret
195	return cls
196}
197
198var xColumnViewGetReorderable func(uintptr) bool
199
200// Returns whether columns are reorderable.
201func (x *ColumnView) GetReorderable() bool {
202
203	cret := xColumnViewGetReorderable(x.GoPointer())
204	return cret
205}
206
207var xColumnViewGetRowFactory func(uintptr) uintptr
208
209// Gets the factory set via [method@Gtk.ColumnView.set_row_factory].
210func (x *ColumnView) GetRowFactory() *ListItemFactory {
211	var cls *ListItemFactory
212
213	cret := xColumnViewGetRowFactory(x.GoPointer())
214
215	if cret == 0 {
216		return nil
217	}
218	gobject.IncreaseRef(cret)
219	cls = &ListItemFactory{}
220	cls.Ptr = cret
221	return cls
222}
223
224var xColumnViewGetShowColumnSeparators func(uintptr) bool
225
226// Returns whether the list should show separators between columns.
227func (x *ColumnView) GetShowColumnSeparators() bool {
228
229	cret := xColumnViewGetShowColumnSeparators(x.GoPointer())
230	return cret
231}
232
233var xColumnViewGetShowRowSeparators func(uintptr) bool
234
235// Returns whether the list should show separators between rows.
236func (x *ColumnView) GetShowRowSeparators() bool {
237
238	cret := xColumnViewGetShowRowSeparators(x.GoPointer())
239	return cret
240}
241
242var xColumnViewGetSingleClickActivate func(uintptr) bool
243
244// Returns whether rows will be activated on single click and
245// selected on hover.
246func (x *ColumnView) GetSingleClickActivate() bool {
247
248	cret := xColumnViewGetSingleClickActivate(x.GoPointer())
249	return cret
250}
251
252var xColumnViewGetSorter func(uintptr) uintptr
253
254// Returns a special sorter that reflects the users sorting
255// choices in the column view.
256//
257// To allow users to customizable sorting by clicking on column
258// headers, this sorter needs to be set on the sort model underneath
259// the model that is displayed by the view.
260//
261// See [method@Gtk.ColumnViewColumn.set_sorter] for setting up
262// per-column sorting.
263//
264// Here is an example:
265// ```c
266// gtk_column_view_column_set_sorter (column, sorter);
267// gtk_column_view_append_column (view, column);
268// sorter = g_object_ref (gtk_column_view_get_sorter (view)));
269// model = gtk_sort_list_model_new (store, sorter);
270// selection = gtk_no_selection_new (model);
271// gtk_column_view_set_model (view, selection);
272// ```
273func (x *ColumnView) GetSorter() *Sorter {
274	var cls *Sorter
275
276	cret := xColumnViewGetSorter(x.GoPointer())
277
278	if cret == 0 {
279		return nil
280	}
281	gobject.IncreaseRef(cret)
282	cls = &Sorter{}
283	cls.Ptr = cret
284	return cls
285}
286
287var xColumnViewGetTabBehavior func(uintptr) ListTabBehavior
288
289// Gets the behavior set for the <kbd>Tab</kbd> key.
290func (x *ColumnView) GetTabBehavior() ListTabBehavior {
291
292	cret := xColumnViewGetTabBehavior(x.GoPointer())
293	return cret
294}
295
296var xColumnViewInsertColumn func(uintptr, uint, uintptr)
297
298// Inserts a column at the given position in the columns of @self.
299//
300// If @column is already a column of @self, it will be repositioned.
301func (x *ColumnView) InsertColumn(PositionVar uint, ColumnVar *ColumnViewColumn) {
302
303	xColumnViewInsertColumn(x.GoPointer(), PositionVar, ColumnVar.GoPointer())
304
305}
306
307var xColumnViewRemoveColumn func(uintptr, uintptr)
308
309// Removes the @column from the list of columns of @self.
310func (x *ColumnView) RemoveColumn(ColumnVar *ColumnViewColumn) {
311
312	xColumnViewRemoveColumn(x.GoPointer(), ColumnVar.GoPointer())
313
314}
315
316var xColumnViewScrollTo func(uintptr, uint, uintptr, ListScrollFlags, *ScrollInfo)
317
318// Scroll to the row at the given position - or cell if a column is
319// given - and performs the actions specified in @flags.
320//
321// This function works no matter if the columnview is shown or focused.
322// If it isn't, then the changes will take effect once that happens.
323func (x *ColumnView) ScrollTo(PosVar uint, ColumnVar *ColumnViewColumn, FlagsVar ListScrollFlags, ScrollVar *ScrollInfo) {
324
325	xColumnViewScrollTo(x.GoPointer(), PosVar, ColumnVar.GoPointer(), FlagsVar, ScrollVar)
326
327}
328
329var xColumnViewSetEnableRubberband func(uintptr, bool)
330
331// Sets whether selections can be changed by dragging with the mouse.
332func (x *ColumnView) SetEnableRubberband(EnableRubberbandVar bool) {
333
334	xColumnViewSetEnableRubberband(x.GoPointer(), EnableRubberbandVar)
335
336}
337
338var xColumnViewSetHeaderFactory func(uintptr, uintptr)
339
340// Sets the factory to use for populating the
341// [class@Gtk.ListHeader] objects used in section headers.
342//
343// If this factory is set to `NULL`, the list will not show
344// section headers.
345func (x *ColumnView) SetHeaderFactory(FactoryVar *ListItemFactory) {
346
347	xColumnViewSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer())
348
349}
350
351var xColumnViewSetModel func(uintptr, uintptr)
352
353// Sets the model to use.
354//
355// This must be a [iface@Gtk.SelectionModel].
356func (x *ColumnView) SetModel(ModelVar SelectionModel) {
357
358	xColumnViewSetModel(x.GoPointer(), ModelVar.GoPointer())
359
360}
361
362var xColumnViewSetReorderable func(uintptr, bool)
363
364// Sets whether columns should be reorderable by dragging.
365func (x *ColumnView) SetReorderable(ReorderableVar bool) {
366
367	xColumnViewSetReorderable(x.GoPointer(), ReorderableVar)
368
369}
370
371var xColumnViewSetRowFactory func(uintptr, uintptr)
372
373// Sets the factory used for configuring rows.
374//
375// The factory must be for configuring [class@Gtk.ColumnViewRow] objects.
376//
377// If this factory is not set - which is the default - then the defaults
378// will be used.
379//
380// This factory is not used to set the widgets displayed in the individual
381// cells. For that see [method@GtkColumnViewColumn.set_factory] and
382// [class@GtkColumnViewCell].
383func (x *ColumnView) SetRowFactory(FactoryVar *ListItemFactory) {
384
385	xColumnViewSetRowFactory(x.GoPointer(), FactoryVar.GoPointer())
386
387}
388
389var xColumnViewSetShowColumnSeparators func(uintptr, bool)
390
391// Sets whether the list should show separators between columns.
392func (x *ColumnView) SetShowColumnSeparators(ShowColumnSeparatorsVar bool) {
393
394	xColumnViewSetShowColumnSeparators(x.GoPointer(), ShowColumnSeparatorsVar)
395
396}
397
398var xColumnViewSetShowRowSeparators func(uintptr, bool)
399
400// Sets whether the list should show separators between rows.
401func (x *ColumnView) SetShowRowSeparators(ShowRowSeparatorsVar bool) {
402
403	xColumnViewSetShowRowSeparators(x.GoPointer(), ShowRowSeparatorsVar)
404
405}
406
407var xColumnViewSetSingleClickActivate func(uintptr, bool)
408
409// Sets whether rows should be activated on single click and
410// selected on hover.
411func (x *ColumnView) SetSingleClickActivate(SingleClickActivateVar bool) {
412
413	xColumnViewSetSingleClickActivate(x.GoPointer(), SingleClickActivateVar)
414
415}
416
417var xColumnViewSetTabBehavior func(uintptr, ListTabBehavior)
418
419// Sets the <kbd>Tab</kbd> key behavior.
420//
421// This influences how the <kbd>Tab</kbd> and
422// <kbd>Shift</kbd>+<kbd>Tab</kbd> keys move the
423// focus in the columnview.
424func (x *ColumnView) SetTabBehavior(TabBehaviorVar ListTabBehavior) {
425
426	xColumnViewSetTabBehavior(x.GoPointer(), TabBehaviorVar)
427
428}
429
430var xColumnViewSortByColumn func(uintptr, uintptr, SortType)
431
432// Sets the sorting of the view.
433//
434// This function should be used to set up the initial sorting.
435// At runtime, users can change the sorting of a column view
436// by clicking on the list headers.
437//
438// This call only has an effect if the sorter returned by
439// [method@Gtk.ColumnView.get_sorter] is set on a sort model,
440// and [method@Gtk.ColumnViewColumn.set_sorter] has been called
441// on @column to associate a sorter with the column.
442//
443// If @column is unset, the view will be unsorted.
444func (x *ColumnView) SortByColumn(ColumnVar *ColumnViewColumn, DirectionVar SortType) {
445
446	xColumnViewSortByColumn(x.GoPointer(), ColumnVar.GoPointer(), DirectionVar)
447
448}
449
450func (c *ColumnView) GoPointer() uintptr {
451	if c == nil {
452		return 0
453	}
454	return c.Ptr
455}
456
457func (c *ColumnView) SetGoPointer(ptr uintptr) {
458	c.Ptr = ptr
459}
460
461// SetPropertyEnableRubberband sets the "enable-rubberband" property.
462// Allow rubberband selection.
463func (x *ColumnView) SetPropertyEnableRubberband(value bool) {
464	var v gobject.Value
465	v.Init(gobject.TypeBooleanVal)
466	v.SetBoolean(value)
467	x.SetProperty("enable-rubberband", &v)
468}
469
470// GetPropertyEnableRubberband gets the "enable-rubberband" property.
471// Allow rubberband selection.
472func (x *ColumnView) GetPropertyEnableRubberband() bool {
473	var v gobject.Value
474	x.GetProperty("enable-rubberband", &v)
475	return v.GetBoolean()
476}
477
478// SetPropertyReorderable sets the "reorderable" property.
479// Whether columns are reorderable.
480func (x *ColumnView) SetPropertyReorderable(value bool) {
481	var v gobject.Value
482	v.Init(gobject.TypeBooleanVal)
483	v.SetBoolean(value)
484	x.SetProperty("reorderable", &v)
485}
486
487// GetPropertyReorderable gets the "reorderable" property.
488// Whether columns are reorderable.
489func (x *ColumnView) GetPropertyReorderable() bool {
490	var v gobject.Value
491	x.GetProperty("reorderable", &v)
492	return v.GetBoolean()
493}
494
495// SetPropertyShowColumnSeparators sets the "show-column-separators" property.
496// Show separators between columns.
497func (x *ColumnView) SetPropertyShowColumnSeparators(value bool) {
498	var v gobject.Value
499	v.Init(gobject.TypeBooleanVal)
500	v.SetBoolean(value)
501	x.SetProperty("show-column-separators", &v)
502}
503
504// GetPropertyShowColumnSeparators gets the "show-column-separators" property.
505// Show separators between columns.
506func (x *ColumnView) GetPropertyShowColumnSeparators() bool {
507	var v gobject.Value
508	x.GetProperty("show-column-separators", &v)
509	return v.GetBoolean()
510}
511
512// SetPropertyShowRowSeparators sets the "show-row-separators" property.
513// Show separators between rows.
514func (x *ColumnView) SetPropertyShowRowSeparators(value bool) {
515	var v gobject.Value
516	v.Init(gobject.TypeBooleanVal)
517	v.SetBoolean(value)
518	x.SetProperty("show-row-separators", &v)
519}
520
521// GetPropertyShowRowSeparators gets the "show-row-separators" property.
522// Show separators between rows.
523func (x *ColumnView) GetPropertyShowRowSeparators() bool {
524	var v gobject.Value
525	x.GetProperty("show-row-separators", &v)
526	return v.GetBoolean()
527}
528
529// SetPropertySingleClickActivate sets the "single-click-activate" property.
530// Activate rows on single click and select them on hover.
531func (x *ColumnView) SetPropertySingleClickActivate(value bool) {
532	var v gobject.Value
533	v.Init(gobject.TypeBooleanVal)
534	v.SetBoolean(value)
535	x.SetProperty("single-click-activate", &v)
536}
537
538// GetPropertySingleClickActivate gets the "single-click-activate" property.
539// Activate rows on single click and select them on hover.
540func (x *ColumnView) GetPropertySingleClickActivate() bool {
541	var v gobject.Value
542	x.GetProperty("single-click-activate", &v)
543	return v.GetBoolean()
544}
545
546// Emitted when a row has been activated by the user, usually via activating
547// the GtkListBase|list.activate-item action.
548//
549// This allows for a convenient way to handle activation in a columnview.
550// See [method@Gtk.ListItem.set_activatable] for details on how to use this
551// signal.
552func (x *ColumnView) ConnectActivate(cb *func(ColumnView, uint)) uint {
553	cbPtr := uintptr(unsafe.Pointer(cb))
554	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
555		handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
556		glib.SaveHandlerMapping(handlerID, cbPtr)
557		return handlerID
558	}
559
560	fcb := func(clsPtr uintptr, PositionVarp uint) {
561		fa := ColumnView{}
562		fa.Ptr = clsPtr
563		cbFn := *cb
564
565		cbFn(fa, PositionVarp)
566
567	}
568	cbRefPtr := purego.NewCallback(fcb)
569	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
570	handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
571	glib.SaveHandlerMapping(handlerID, cbPtr)
572	return handlerID
573}
574
575// Requests the user's screen reader to announce the given message.
576//
577// This kind of notification is useful for messages that
578// either have only a visual representation or that are not
579// exposed visually at all, e.g. a notification about a
580// successful operation.
581//
582// Also, by using this API, you can ensure that the message
583// does not interrupts the user's current screen reader output.
584func (x *ColumnView) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
585
586	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
587
588}
589
590// Retrieves the accessible parent for an accessible object.
591//
592// This function returns `NULL` for top level widgets.
593func (x *ColumnView) GetAccessibleParent() *AccessibleBase {
594	var cls *AccessibleBase
595
596	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
597
598	if cret == 0 {
599		return nil
600	}
601	cls = &AccessibleBase{}
602	cls.Ptr = cret
603	return cls
604}
605
606// Retrieves the accessible role of an accessible object.
607func (x *ColumnView) GetAccessibleRole() AccessibleRole {
608
609	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
610	return cret
611}
612
613// Retrieves the implementation for the given accessible object.
614func (x *ColumnView) GetAtContext() *ATContext {
615	var cls *ATContext
616
617	cret := XGtkAccessibleGetAtContext(x.GoPointer())
618
619	if cret == 0 {
620		return nil
621	}
622	cls = &ATContext{}
623	cls.Ptr = cret
624	return cls
625}
626
627// Queries the coordinates and dimensions of this accessible
628//
629// This functionality can be overridden by `GtkAccessible`
630// implementations, e.g. to get the bounds from an ignored
631// child widget.
632func (x *ColumnView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
633
634	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
635	return cret
636}
637
638// Retrieves the first accessible child of an accessible object.
639func (x *ColumnView) GetFirstAccessibleChild() *AccessibleBase {
640	var cls *AccessibleBase
641
642	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
643
644	if cret == 0 {
645		return nil
646	}
647	cls = &AccessibleBase{}
648	cls.Ptr = cret
649	return cls
650}
651
652// Retrieves the next accessible sibling of an accessible object
653func (x *ColumnView) GetNextAccessibleSibling() *AccessibleBase {
654	var cls *AccessibleBase
655
656	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
657
658	if cret == 0 {
659		return nil
660	}
661	cls = &AccessibleBase{}
662	cls.Ptr = cret
663	return cls
664}
665
666// Queries a platform state, such as focus.
667//
668// This functionality can be overridden by `GtkAccessible`
669// implementations, e.g. to get platform state from an ignored
670// child widget, as is the case for `GtkText` wrappers.
671func (x *ColumnView) GetPlatformState(StateVar AccessiblePlatformState) bool {
672
673	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
674	return cret
675}
676
677// Resets the accessible property to its default value.
678func (x *ColumnView) ResetProperty(PropertyVar AccessibleProperty) {
679
680	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
681
682}
683
684// Resets the accessible relation to its default value.
685func (x *ColumnView) ResetRelation(RelationVar AccessibleRelation) {
686
687	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
688
689}
690
691// Resets the accessible state to its default value.
692func (x *ColumnView) ResetState(StateVar AccessibleState) {
693
694	XGtkAccessibleResetState(x.GoPointer(), StateVar)
695
696}
697
698// Sets the parent and sibling of an accessible object.
699//
700// This function is meant to be used by accessible implementations that are
701// not part of the widget hierarchy, and but act as a logical bridge between
702// widgets. For instance, if a widget creates an object that holds metadata
703// for each child, and you want that object to implement the `GtkAccessible`
704// interface, you will use this function to ensure that the parent of each
705// child widget is the metadata object, and the parent of each metadata
706// object is the container widget.
707func (x *ColumnView) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
708
709	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
710
711}
712
713// Updates the next accessible sibling.
714//
715// That might be useful when a new child of a custom accessible
716// is created, and it needs to be linked to a previous child.
717func (x *ColumnView) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
718
719	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
720
721}
722
723// Informs ATs that the platform state has changed.
724//
725// This function should be used by `GtkAccessible` implementations that
726// have a platform state but are not widgets. Widgets handle platform
727// states automatically.
728func (x *ColumnView) UpdatePlatformState(StateVar AccessiblePlatformState) {
729
730	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
731
732}
733
734// Updates a list of accessible properties.
735//
736// See the [enum@Gtk.AccessibleProperty] documentation for the
737// value types of accessible properties.
738//
739// This function should be called by `GtkWidget` types whenever
740// an accessible property change must be communicated to assistive
741// technologies.
742//
743// Example:
744// ```c
745// value = gtk_adjustment_get_value (adjustment);
746// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
747//
748//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
749//	-1);
750//
751// ```
752func (x *ColumnView) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
753
754	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
755
756}
757
758// Updates an array of accessible properties.
759//
760// This function should be called by `GtkWidget` types whenever an accessible
761// property change must be communicated to assistive technologies.
762//
763// This function is meant to be used by language bindings.
764func (x *ColumnView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
765
766	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
767
768}
769
770// Updates a list of accessible relations.
771//
772// This function should be called by `GtkWidget` types whenever an accessible
773// relation change must be communicated to assistive technologies.
774//
775// If the [enum@Gtk.AccessibleRelation] requires a list of references,
776// you should pass each reference individually, followed by `NULL`, e.g.
777//
778// ```c
779// gtk_accessible_update_relation (accessible,
780//
781//	GTK_ACCESSIBLE_RELATION_CONTROLS,
782//	  ref1, NULL,
783//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
784//	  ref1, ref2, ref3, NULL,
785//	-1);
786//
787// ```
788func (x *ColumnView) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
789
790	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
791
792}
793
794// Updates an array of accessible relations.
795//
796// This function should be called by `GtkWidget` types whenever an accessible
797// relation change must be communicated to assistive technologies.
798//
799// This function is meant to be used by language bindings.
800func (x *ColumnView) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
801
802	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
803
804}
805
806// Updates a list of accessible states.
807//
808// See the [enum@Gtk.AccessibleState] documentation for the
809// value types of accessible states.
810//
811// This function should be called by `GtkWidget` types whenever
812// an accessible state change must be communicated to assistive
813// technologies.
814//
815// Example:
816//
817// ```c
818// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
819// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
820//
821//	GTK_ACCESSIBLE_STATE_CHECKED, value,
822//	-1);
823//
824// ```
825func (x *ColumnView) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
826
827	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
828
829}
830
831// Updates an array of accessible states.
832//
833// This function should be called by `GtkWidget` types whenever an accessible
834// state change must be communicated to assistive technologies.
835//
836// This function is meant to be used by language bindings.
837func (x *ColumnView) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
838
839	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
840
841}
842
843// Gets the ID of the @buildable object.
844//
845// `GtkBuilder` sets the name based on the ID attribute
846// of the `<object>` tag used to construct the @buildable.
847func (x *ColumnView) GetBuildableId() string {
848
849	cret := XGtkBuildableGetBuildableId(x.GoPointer())
850	return cret
851}
852
853// Returns the size of a non-scrolling border around the
854// outside of the scrollable.
855//
856// An example for this would be treeview headers. GTK can use
857// this information to display overlaid graphics, like the
858// overshoot indication, at the right position.
859func (x *ColumnView) GetBorder(BorderVar *Border) bool {
860
861	cret := XGtkScrollableGetBorder(x.GoPointer(), BorderVar)
862	return cret
863}
864
865// Retrieves the `GtkAdjustment` used for horizontal scrolling.
866func (x *ColumnView) GetHadjustment() *Adjustment {
867	var cls *Adjustment
868
869	cret := XGtkScrollableGetHadjustment(x.GoPointer())
870
871	if cret == 0 {
872		return nil
873	}
874	gobject.IncreaseRef(cret)
875	cls = &Adjustment{}
876	cls.Ptr = cret
877	return cls
878}
879
880// Gets the horizontal `GtkScrollablePolicy`.
881func (x *ColumnView) GetHscrollPolicy() ScrollablePolicy {
882
883	cret := XGtkScrollableGetHscrollPolicy(x.GoPointer())
884	return cret
885}
886
887// Retrieves the `GtkAdjustment` used for vertical scrolling.
888func (x *ColumnView) GetVadjustment() *Adjustment {
889	var cls *Adjustment
890
891	cret := XGtkScrollableGetVadjustment(x.GoPointer())
892
893	if cret == 0 {
894		return nil
895	}
896	gobject.IncreaseRef(cret)
897	cls = &Adjustment{}
898	cls.Ptr = cret
899	return cls
900}
901
902// Gets the vertical `GtkScrollablePolicy`.
903func (x *ColumnView) GetVscrollPolicy() ScrollablePolicy {
904
905	cret := XGtkScrollableGetVscrollPolicy(x.GoPointer())
906	return cret
907}
908
909// Sets the horizontal adjustment of the `GtkScrollable`.
910func (x *ColumnView) SetHadjustment(HadjustmentVar *Adjustment) {
911
912	XGtkScrollableSetHadjustment(x.GoPointer(), HadjustmentVar.GoPointer())
913
914}
915
916// Sets the `GtkScrollablePolicy`.
917//
918// The policy determines whether horizontal scrolling should start
919// below the minimum width or below the natural width.
920func (x *ColumnView) SetHscrollPolicy(PolicyVar ScrollablePolicy) {
921
922	XGtkScrollableSetHscrollPolicy(x.GoPointer(), PolicyVar)
923
924}
925
926// Sets the vertical adjustment of the `GtkScrollable`.
927func (x *ColumnView) SetVadjustment(VadjustmentVar *Adjustment) {
928
929	XGtkScrollableSetVadjustment(x.GoPointer(), VadjustmentVar.GoPointer())
930
931}
932
933// Sets the `GtkScrollablePolicy`.
934//
935// The policy determines whether vertical scrolling should start
936// below the minimum height or below the natural height.
937func (x *ColumnView) SetVscrollPolicy(PolicyVar ScrollablePolicy) {
938
939	XGtkScrollableSetVscrollPolicy(x.GoPointer(), PolicyVar)
940
941}
942
943func init() {
944	core.SetPackageName("GTK", "gtk4")
945	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
946	var libs []uintptr
947	for _, libPath := range core.GetPaths("GTK") {
948		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
949		if err != nil {
950			panic(err)
951		}
952		libs = append(libs, lib)
953	}
954
955	core.PuregoSafeRegister(&xColumnViewGLibType, libs, "gtk_column_view_get_type")
956
957	core.PuregoSafeRegister(&xNewColumnView, libs, "gtk_column_view_new")
958
959	core.PuregoSafeRegister(&xColumnViewAppendColumn, libs, "gtk_column_view_append_column")
960	core.PuregoSafeRegister(&xColumnViewGetColumns, libs, "gtk_column_view_get_columns")
961	core.PuregoSafeRegister(&xColumnViewGetEnableRubberband, libs, "gtk_column_view_get_enable_rubberband")
962	core.PuregoSafeRegister(&xColumnViewGetHeaderFactory, libs, "gtk_column_view_get_header_factory")
963	core.PuregoSafeRegister(&xColumnViewGetModel, libs, "gtk_column_view_get_model")
964	core.PuregoSafeRegister(&xColumnViewGetReorderable, libs, "gtk_column_view_get_reorderable")
965	core.PuregoSafeRegister(&xColumnViewGetRowFactory, libs, "gtk_column_view_get_row_factory")
966	core.PuregoSafeRegister(&xColumnViewGetShowColumnSeparators, libs, "gtk_column_view_get_show_column_separators")
967	core.PuregoSafeRegister(&xColumnViewGetShowRowSeparators, libs, "gtk_column_view_get_show_row_separators")
968	core.PuregoSafeRegister(&xColumnViewGetSingleClickActivate, libs, "gtk_column_view_get_single_click_activate")
969	core.PuregoSafeRegister(&xColumnViewGetSorter, libs, "gtk_column_view_get_sorter")
970	core.PuregoSafeRegister(&xColumnViewGetTabBehavior, libs, "gtk_column_view_get_tab_behavior")
971	core.PuregoSafeRegister(&xColumnViewInsertColumn, libs, "gtk_column_view_insert_column")
972	core.PuregoSafeRegister(&xColumnViewRemoveColumn, libs, "gtk_column_view_remove_column")
973	core.PuregoSafeRegister(&xColumnViewScrollTo, libs, "gtk_column_view_scroll_to")
974	core.PuregoSafeRegister(&xColumnViewSetEnableRubberband, libs, "gtk_column_view_set_enable_rubberband")
975	core.PuregoSafeRegister(&xColumnViewSetHeaderFactory, libs, "gtk_column_view_set_header_factory")
976	core.PuregoSafeRegister(&xColumnViewSetModel, libs, "gtk_column_view_set_model")
977	core.PuregoSafeRegister(&xColumnViewSetReorderable, libs, "gtk_column_view_set_reorderable")
978	core.PuregoSafeRegister(&xColumnViewSetRowFactory, libs, "gtk_column_view_set_row_factory")
979	core.PuregoSafeRegister(&xColumnViewSetShowColumnSeparators, libs, "gtk_column_view_set_show_column_separators")
980	core.PuregoSafeRegister(&xColumnViewSetShowRowSeparators, libs, "gtk_column_view_set_show_row_separators")
981	core.PuregoSafeRegister(&xColumnViewSetSingleClickActivate, libs, "gtk_column_view_set_single_click_activate")
982	core.PuregoSafeRegister(&xColumnViewSetTabBehavior, libs, "gtk_column_view_set_tab_behavior")
983	core.PuregoSafeRegister(&xColumnViewSortByColumn, libs, "gtk_column_view_sort_by_column")
984
985}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close