v0.2.1 c0399be

gtktogglebutton.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/glib"
12	"github.com/bnema/puregotk/v4/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14)
15
16type ToggleButtonClass struct {
17	_ structs.HostLayout
18
19	ParentClass ButtonClass
20
21	xToggled uintptr
22
23	Padding [8]uintptr
24}
25
26func (x *ToggleButtonClass) GoPointer() uintptr {
27	return uintptr(unsafe.Pointer(x))
28}
29
30// OverrideToggled sets the "toggled" callback function.
31func (x *ToggleButtonClass) OverrideToggled(cb func(*ToggleButton)) {
32	if cb == nil {
33		x.xToggled = 0
34	} else {
35		x.xToggled = purego.NewCallback(func(ToggleButtonVarp uintptr) {
36			cb(ToggleButtonNewFromInternalPtr(ToggleButtonVarp))
37		})
38	}
39}
40
41// GetToggled gets the "toggled" callback function.
42func (x *ToggleButtonClass) GetToggled() func(*ToggleButton) {
43	if x.xToggled == 0 {
44		return nil
45	}
46	var rawCallback func(ToggleButtonVarp uintptr)
47	purego.RegisterFunc(&rawCallback, x.xToggled)
48	return func(ToggleButtonVar *ToggleButton) {
49		rawCallback(ToggleButtonVar.GoPointer())
50	}
51}
52
53// Shows a button which remains “pressed-in” when clicked.
54//
55// <picture>
56//
57//	<source srcset="toggle-button-dark.png" media="(prefers-color-scheme: dark)">
58//	<img alt="Example GtkToggleButtons" src="toggle-button.png">
59//
60// </picture>
61//
62// Clicking again will cause the toggle button to return to its normal state.
63//
64// A toggle button is created by calling either [ctor@Gtk.ToggleButton.new] or
65// [ctor@Gtk.ToggleButton.new_with_label]. If using the former, it is advisable
66// to pack a widget, (such as a `GtkLabel` and/or a `GtkImage`), into the toggle
67// button’s container. (See [class@Gtk.Button] for more information).
68//
69// The state of a `GtkToggleButton` can be set specifically using
70// [method@Gtk.ToggleButton.set_active], and retrieved using
71// [method@Gtk.ToggleButton.get_active].
72//
73// ## Grouping
74//
75// Toggle buttons can be grouped together, to form mutually exclusive
76// groups - only one of the buttons can be toggled at a time, and toggling
77// another one will switch the currently toggled one off.
78//
79// To add a `GtkToggleButton` to a group, use [method@Gtk.ToggleButton.set_group].
80//
81// ## CSS nodes
82//
83// `GtkToggleButton` has a single CSS node with name button. To differentiate
84// it from a plain `GtkButton`, it gets the `.toggle` style class.
85//
86// ## Accessibility
87//
88// `GtkToggleButton` uses the [enum@Gtk.AccessibleRole.toggle_button] role.
89//
90// ## Creating two `GtkToggleButton` widgets.
91//
92// ```c
93// static void
94// output_state (GtkToggleButton *source,
95//
96//	gpointer         user_data)
97//
98//	{
99//	  g_print ("Toggle button "%s" is active: %s",
100//	           gtk_button_get_label (GTK_BUTTON (source)),
101//	           gtk_toggle_button_get_active (source) ? "Yes" : "No");
102//	}
103//
104// static void
105// make_toggles (void)
106//
107//	{
108//	  GtkWidget *window, *toggle1, *toggle2;
109//	  GtkWidget *box;
110//	  const char *text;
111//
112//	  window = gtk_window_new ();
113//	  box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
114//
115//	  text = "Hi, I’m toggle button one";
116//	  toggle1 = gtk_toggle_button_new_with_label (text);
117//
118//	  g_signal_connect (toggle1, "toggled",
119//	                    G_CALLBACK (output_state),
120//	                    NULL);
121//	  gtk_box_append (GTK_BOX (box), toggle1);
122//
123//	  text = "Hi, I’m toggle button two";
124//	  toggle2 = gtk_toggle_button_new_with_label (text);
125//	  g_signal_connect (toggle2, "toggled",
126//	                    G_CALLBACK (output_state),
127//	                    NULL);
128//	  gtk_box_append (GTK_BOX (box), toggle2);
129//
130//	  gtk_window_set_child (GTK_WINDOW (window), box);
131//	  gtk_window_present (GTK_WINDOW (window));
132//	}
133//
134// ```
135type ToggleButton struct {
136	Button
137}
138
139var xToggleButtonGLibType func() types.GType
140
141func ToggleButtonGLibType() types.GType {
142	return xToggleButtonGLibType()
143}
144
145func ToggleButtonNewFromInternalPtr(ptr uintptr) *ToggleButton {
146	cls := &ToggleButton{}
147	cls.Ptr = ptr
148	return cls
149}
150
151var xNewToggleButton func() uintptr
152
153// Creates a new toggle button.
154//
155// A widget should be packed into the button, as in [ctor@Gtk.Button.new].
156func NewToggleButton() *ToggleButton {
157	var cls *ToggleButton
158
159	cret := xNewToggleButton()
160
161	if cret == 0 {
162		return nil
163	}
164	gobject.IncreaseRef(cret)
165	cls = &ToggleButton{}
166	cls.Ptr = cret
167	return cls
168}
169
170var xNewToggleButtonWithLabel func(string) uintptr
171
172// Creates a new toggle button with a text label.
173func NewToggleButtonWithLabel(LabelVar string) *ToggleButton {
174	var cls *ToggleButton
175
176	cret := xNewToggleButtonWithLabel(LabelVar)
177
178	if cret == 0 {
179		return nil
180	}
181	gobject.IncreaseRef(cret)
182	cls = &ToggleButton{}
183	cls.Ptr = cret
184	return cls
185}
186
187var xNewToggleButtonWithMnemonic func(string) uintptr
188
189// Creates a new `GtkToggleButton` containing a label.
190//
191// The label will be created using [ctor@Gtk.Label.new_with_mnemonic],
192// so underscores in @label indicate the mnemonic for the button.
193func NewToggleButtonWithMnemonic(LabelVar string) *ToggleButton {
194	var cls *ToggleButton
195
196	cret := xNewToggleButtonWithMnemonic(LabelVar)
197
198	if cret == 0 {
199		return nil
200	}
201	gobject.IncreaseRef(cret)
202	cls = &ToggleButton{}
203	cls.Ptr = cret
204	return cls
205}
206
207var xToggleButtonGetActive func(uintptr) bool
208
209// Queries a `GtkToggleButton` and returns its current state.
210//
211// Returns %TRUE if the toggle button is pressed in and %FALSE
212// if it is raised.
213func (x *ToggleButton) GetActive() bool {
214
215	cret := xToggleButtonGetActive(x.GoPointer())
216	return cret
217}
218
219var xToggleButtonSetActive func(uintptr, bool)
220
221// Sets the status of the toggle button.
222//
223// Set to %TRUE if you want the `GtkToggleButton` to be “pressed in”,
224// and %FALSE to raise it.
225//
226// If the status of the button changes, this action causes the
227// [signal@Gtk.ToggleButton::toggled] signal to be emitted.
228func (x *ToggleButton) SetActive(IsActiveVar bool) {
229
230	xToggleButtonSetActive(x.GoPointer(), IsActiveVar)
231
232}
233
234var xToggleButtonSetGroup func(uintptr, uintptr)
235
236// Adds @self to the group of @group.
237//
238// In a group of multiple toggle buttons, only one button can be active
239// at a time.
240//
241// Setting up groups in a cycle leads to undefined behavior.
242//
243// Note that the same effect can be achieved via the [iface@Gtk.Actionable]
244// API, by using the same action with parameter type and state type 's'
245// for all buttons in the group, and giving each button its own target
246// value.
247func (x *ToggleButton) SetGroup(GroupVar *ToggleButton) {
248
249	xToggleButtonSetGroup(x.GoPointer(), GroupVar.GoPointer())
250
251}
252
253var xToggleButtonToggled func(uintptr)
254
255// Emits the ::toggled signal on the `GtkToggleButton`.
256func (x *ToggleButton) Toggled() {
257
258	xToggleButtonToggled(x.GoPointer())
259
260}
261
262func (c *ToggleButton) GoPointer() uintptr {
263	if c == nil {
264		return 0
265	}
266	return c.Ptr
267}
268
269func (c *ToggleButton) SetGoPointer(ptr uintptr) {
270	c.Ptr = ptr
271}
272
273// SetPropertyActive sets the "active" property.
274// If the toggle button should be pressed in.
275func (x *ToggleButton) SetPropertyActive(value bool) {
276	var v gobject.Value
277	v.Init(gobject.TypeBooleanVal)
278	v.SetBoolean(value)
279	x.SetProperty("active", &v)
280}
281
282// GetPropertyActive gets the "active" property.
283// If the toggle button should be pressed in.
284func (x *ToggleButton) GetPropertyActive() bool {
285	var v gobject.Value
286	x.GetProperty("active", &v)
287	return v.GetBoolean()
288}
289
290// Emitted whenever the `GtkToggleButton`'s state is changed.
291func (x *ToggleButton) ConnectToggled(cb *func(ToggleButton)) uint {
292	cbPtr := uintptr(unsafe.Pointer(cb))
293	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
294		handlerID := gobject.SignalConnect(x.GoPointer(), "toggled", cbRefPtr)
295		glib.SaveHandlerMapping(handlerID, cbPtr)
296		return handlerID
297	}
298
299	fcb := func(clsPtr uintptr) {
300		fa := ToggleButton{}
301		fa.Ptr = clsPtr
302		cbFn := *cb
303
304		cbFn(fa)
305
306	}
307	cbRefPtr := purego.NewCallback(fcb)
308	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
309	handlerID := gobject.SignalConnect(x.GoPointer(), "toggled", cbRefPtr)
310	glib.SaveHandlerMapping(handlerID, cbPtr)
311	return handlerID
312}
313
314// Requests the user's screen reader to announce the given message.
315//
316// This kind of notification is useful for messages that
317// either have only a visual representation or that are not
318// exposed visually at all, e.g. a notification about a
319// successful operation.
320//
321// Also, by using this API, you can ensure that the message
322// does not interrupts the user's current screen reader output.
323func (x *ToggleButton) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
324
325	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
326
327}
328
329// Retrieves the accessible parent for an accessible object.
330//
331// This function returns `NULL` for top level widgets.
332func (x *ToggleButton) GetAccessibleParent() *AccessibleBase {
333	var cls *AccessibleBase
334
335	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
336
337	if cret == 0 {
338		return nil
339	}
340	cls = &AccessibleBase{}
341	cls.Ptr = cret
342	return cls
343}
344
345// Retrieves the accessible role of an accessible object.
346func (x *ToggleButton) GetAccessibleRole() AccessibleRole {
347
348	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
349	return cret
350}
351
352// Retrieves the implementation for the given accessible object.
353func (x *ToggleButton) GetAtContext() *ATContext {
354	var cls *ATContext
355
356	cret := XGtkAccessibleGetAtContext(x.GoPointer())
357
358	if cret == 0 {
359		return nil
360	}
361	cls = &ATContext{}
362	cls.Ptr = cret
363	return cls
364}
365
366// Queries the coordinates and dimensions of this accessible
367//
368// This functionality can be overridden by `GtkAccessible`
369// implementations, e.g. to get the bounds from an ignored
370// child widget.
371func (x *ToggleButton) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
372
373	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
374	return cret
375}
376
377// Retrieves the first accessible child of an accessible object.
378func (x *ToggleButton) GetFirstAccessibleChild() *AccessibleBase {
379	var cls *AccessibleBase
380
381	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
382
383	if cret == 0 {
384		return nil
385	}
386	cls = &AccessibleBase{}
387	cls.Ptr = cret
388	return cls
389}
390
391// Retrieves the next accessible sibling of an accessible object
392func (x *ToggleButton) GetNextAccessibleSibling() *AccessibleBase {
393	var cls *AccessibleBase
394
395	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
396
397	if cret == 0 {
398		return nil
399	}
400	cls = &AccessibleBase{}
401	cls.Ptr = cret
402	return cls
403}
404
405// Queries a platform state, such as focus.
406//
407// This functionality can be overridden by `GtkAccessible`
408// implementations, e.g. to get platform state from an ignored
409// child widget, as is the case for `GtkText` wrappers.
410func (x *ToggleButton) GetPlatformState(StateVar AccessiblePlatformState) bool {
411
412	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
413	return cret
414}
415
416// Resets the accessible property to its default value.
417func (x *ToggleButton) ResetProperty(PropertyVar AccessibleProperty) {
418
419	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
420
421}
422
423// Resets the accessible relation to its default value.
424func (x *ToggleButton) ResetRelation(RelationVar AccessibleRelation) {
425
426	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
427
428}
429
430// Resets the accessible state to its default value.
431func (x *ToggleButton) ResetState(StateVar AccessibleState) {
432
433	XGtkAccessibleResetState(x.GoPointer(), StateVar)
434
435}
436
437// Sets the parent and sibling of an accessible object.
438//
439// This function is meant to be used by accessible implementations that are
440// not part of the widget hierarchy, and but act as a logical bridge between
441// widgets. For instance, if a widget creates an object that holds metadata
442// for each child, and you want that object to implement the `GtkAccessible`
443// interface, you will use this function to ensure that the parent of each
444// child widget is the metadata object, and the parent of each metadata
445// object is the container widget.
446func (x *ToggleButton) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
447
448	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
449
450}
451
452// Updates the next accessible sibling.
453//
454// That might be useful when a new child of a custom accessible
455// is created, and it needs to be linked to a previous child.
456func (x *ToggleButton) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
457
458	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
459
460}
461
462// Informs ATs that the platform state has changed.
463//
464// This function should be used by `GtkAccessible` implementations that
465// have a platform state but are not widgets. Widgets handle platform
466// states automatically.
467func (x *ToggleButton) UpdatePlatformState(StateVar AccessiblePlatformState) {
468
469	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
470
471}
472
473// Updates a list of accessible properties.
474//
475// See the [enum@Gtk.AccessibleProperty] documentation for the
476// value types of accessible properties.
477//
478// This function should be called by `GtkWidget` types whenever
479// an accessible property change must be communicated to assistive
480// technologies.
481//
482// Example:
483// ```c
484// value = gtk_adjustment_get_value (adjustment);
485// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
486//
487//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
488//	-1);
489//
490// ```
491func (x *ToggleButton) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
492
493	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
494
495}
496
497// Updates an array of accessible properties.
498//
499// This function should be called by `GtkWidget` types whenever an accessible
500// property change must be communicated to assistive technologies.
501//
502// This function is meant to be used by language bindings.
503func (x *ToggleButton) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
504
505	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
506
507}
508
509// Updates a list of accessible relations.
510//
511// This function should be called by `GtkWidget` types whenever an accessible
512// relation change must be communicated to assistive technologies.
513//
514// If the [enum@Gtk.AccessibleRelation] requires a list of references,
515// you should pass each reference individually, followed by `NULL`, e.g.
516//
517// ```c
518// gtk_accessible_update_relation (accessible,
519//
520//	GTK_ACCESSIBLE_RELATION_CONTROLS,
521//	  ref1, NULL,
522//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
523//	  ref1, ref2, ref3, NULL,
524//	-1);
525//
526// ```
527func (x *ToggleButton) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
528
529	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
530
531}
532
533// Updates an array of accessible relations.
534//
535// This function should be called by `GtkWidget` types whenever an accessible
536// relation change must be communicated to assistive technologies.
537//
538// This function is meant to be used by language bindings.
539func (x *ToggleButton) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
540
541	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
542
543}
544
545// Updates a list of accessible states.
546//
547// See the [enum@Gtk.AccessibleState] documentation for the
548// value types of accessible states.
549//
550// This function should be called by `GtkWidget` types whenever
551// an accessible state change must be communicated to assistive
552// technologies.
553//
554// Example:
555//
556// ```c
557// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
558// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
559//
560//	GTK_ACCESSIBLE_STATE_CHECKED, value,
561//	-1);
562//
563// ```
564func (x *ToggleButton) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
565
566	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
567
568}
569
570// Updates an array of accessible states.
571//
572// This function should be called by `GtkWidget` types whenever an accessible
573// state change must be communicated to assistive technologies.
574//
575// This function is meant to be used by language bindings.
576func (x *ToggleButton) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
577
578	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
579
580}
581
582// Gets the action name for @actionable.
583func (x *ToggleButton) GetActionName() string {
584
585	cret := XGtkActionableGetActionName(x.GoPointer())
586	return cret
587}
588
589// Gets the current target value of @actionable.
590func (x *ToggleButton) GetActionTargetValue() *glib.Variant {
591
592	cret := XGtkActionableGetActionTargetValue(x.GoPointer())
593	return cret
594}
595
596// Specifies the name of the action with which this widget should be
597// associated.
598//
599// If @action_name is %NULL then the widget will be unassociated from
600// any previous action.
601//
602// Usually this function is used when the widget is located (or will be
603// located) within the hierarchy of a `GtkApplicationWindow`.
604//
605// Names are of the form “win.save” or “app.quit” for actions on the
606// containing [class@ApplicationWindow] or its associated [class@Application],
607// respectively. This is the same form used for actions in the [class@Gio.Menu]
608// associated with the window.
609func (x *ToggleButton) SetActionName(ActionNameVar *string) {
610
611	ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
612	defer core.GFreeNullable(ActionNameVarPtr)
613
614	XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
615
616}
617
618// Sets the target of an actionable widget.
619//
620// This is a convenience function that calls [ctor@GLib.Variant.new] for
621// @format_string and uses the result to call
622// [method@Gtk.Actionable.set_action_target_value].
623//
624// If you are setting a string-valued target and want to set
625// the action name at the same time, you can use
626// [method@Gtk.Actionable.set_detailed_action_name].
627func (x *ToggleButton) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
628
629	XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
630
631}
632
633// Sets the target value of an actionable widget.
634//
635// If @target_value is %NULL then the target value is unset.
636//
637// The target value has two purposes. First, it is used as the parameter
638// to activation of the action associated with the `GtkActionable` widget.
639// Second, it is used to determine if the widget should be rendered as
640// “active” — the widget is active if the state is equal to the given target.
641//
642// Consider the example of associating a set of buttons with a [iface@Gio.Action]
643// with string state in a typical “radio button” situation. Each button
644// will be associated with the same action, but with a different target
645// value for that action. Clicking on a particular button will activate
646// the action with the target of that button, which will typically cause
647// the action’s state to change to that value. Since the action’s state
648// is now equal to the target value of the button, the button will now
649// be rendered as active (and the other buttons, with different targets,
650// rendered inactive).
651func (x *ToggleButton) SetActionTargetValue(TargetValueVar *glib.Variant) {
652
653	XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
654
655}
656
657// Sets the action-name and associated string target value of an
658// actionable widget.
659//
660// @detailed_action_name is a string in the format accepted by
661// [func@Gio.Action.parse_detailed_name].
662func (x *ToggleButton) SetDetailedActionName(DetailedActionNameVar string) {
663
664	XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
665
666}
667
668// Gets the ID of the @buildable object.
669//
670// `GtkBuilder` sets the name based on the ID attribute
671// of the `<object>` tag used to construct the @buildable.
672func (x *ToggleButton) GetBuildableId() string {
673
674	cret := XGtkBuildableGetBuildableId(x.GoPointer())
675	return cret
676}
677
678func init() {
679	core.SetPackageName("GTK", "gtk4")
680	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
681	var libs []uintptr
682	for _, libPath := range core.GetPaths("GTK") {
683		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
684		if err != nil {
685			panic(err)
686		}
687		libs = append(libs, lib)
688	}
689
690	core.PuregoSafeRegister(&xToggleButtonGLibType, libs, "gtk_toggle_button_get_type")
691
692	core.PuregoSafeRegister(&xNewToggleButton, libs, "gtk_toggle_button_new")
693	core.PuregoSafeRegister(&xNewToggleButtonWithLabel, libs, "gtk_toggle_button_new_with_label")
694	core.PuregoSafeRegister(&xNewToggleButtonWithMnemonic, libs, "gtk_toggle_button_new_with_mnemonic")
695
696	core.PuregoSafeRegister(&xToggleButtonGetActive, libs, "gtk_toggle_button_get_active")
697	core.PuregoSafeRegister(&xToggleButtonSetActive, libs, "gtk_toggle_button_set_active")
698	core.PuregoSafeRegister(&xToggleButtonSetGroup, libs, "gtk_toggle_button_set_group")
699	core.PuregoSafeRegister(&xToggleButtonToggled, libs, "gtk_toggle_button_toggled")
700
701}

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