debug

package
v0.0.0-...-69d9917 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT, Unlicense Imports: 10 Imported by: 0

Documentation

Overview

Package debug provides tools for debugging Gio layout code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller

func Caller(nFrames int) string

Caller returns the function nFrames above it on the call stack. Passing 3 as nFrames will return the details of the function invoking the function in which caller was invoked. This can help determine which of several code paths were taken to reach a particular place in the code.

func Dump

func Dump(v interface{})

Dump logs the input as formatting JSON on stderr.

func Gtx

func Gtx(gtx C)

Gtx will draw a thin, translucent, red rectangle at the gtx's max constraints and a similar thin, blue rectangle at the minimum constraints. It is best used deferred, to ensure the rectangles appear atop other widget content.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

func Outline

func Outline(gtx C, w func(gtx C) D) D

Outline traces a small black outline around the provided widget.

func Sz

func Sz(gtx C, dims D) D

Sz draws a thing, translucent, green rectangle at the size of the given widget. It is designed to easily wrap invocations of layout and pass through the dimensions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL