As illustrated in the code example, the Walk API is split in to two notable packages: github.com/lxn/walk
and github.com/lxn/walk/declarative
. The declarative API is the preferred approach for developing application GUIs using Walk, as it offers a better abstraction to work with and is more idiomatic. The implementation of the declarative API also provides various standard metrics and default values that help to create a standard user interface with minimal code. The package is typically imported using the .
prefix, so that GUI code can avoid repeatedly using the declarative.
prefix.
Using the native API, (Go bindings of the native winAPI) is possible, but in most cases this is more verbose, as you are working directly with a low-level API. Coding in this way can't make use of standard metrics or configurations that are handled by the higher-level declarative API, designed to better suit a modern programming language. To illustrate...