wlk

module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: BSD-3-Clause, MIT

README

wlk

GoDoc Go Report Card

Based on lxn/walk which hasn't been updated for 3+ years, as well contributions to the fork tailscale/walk, simplified and modernized

Majority of this code can be sourced to:

Check out the LICENSE file for more information, or AUTHORS for a list of contributors.

I don't take credit for the majority of this code, as the above refs show there has been an incredible amount of work prior to my copy.

Why Wlk?

Wlk is a direct approach to rendering components via win32 API calls using WinForms. It starts fast and has minimum dependencies.

It does not have cross-platform support. It is exclusively for windows.

Examples

Check out # examples to see how the library looks.

There are many, many warnings for how old walk is. We are slowly going through and cleaning them up.

Dark Mode Support

This is work in progress.

  • Dark Mode is opted into by using walk.SetDarkModeAllowed(true). This is disabled by default, and should be called before any other walk functions to ensure proper painting
  • If your program needs to detect if Dark Mode is enabled, use walk.IsDarkModeEnabled()
  • Dark Mode is detected via registry
  • Theme changing (Light Mode / Dark Mode) subscription/notification is not yet implemented
  • Overhaul all components to default to dark mode if enabled on initialization
  • Allow custom theming.

Breakdown of Components

Widgets

A widget is a component that can be added to a container. It is a basic building block of a UI.

  • Checkbox
  • ComboBox
  • CustomWidget
  • DateEdit
  • DateLabel
  • Dialog
  • GradientComposite
  • ImageView
  • Label
  • LineEdit
  • LinkLabel
  • ListBox
  • MainWindow
  • NumberEdit
  • NumberLabel
  • ProgressBar
  • PushButton
  • RadioButton
  • RadioButtonGroupbox
  • ScrollView
  • Separator
  • Slider
  • SplitButton
  • TableView
  • TabPage
  • TextEdit
  • TextLabel
  • ToolBar
  • ToolButton
  • TreeView
  • WebView
Widget Containers

A widget container typically has children and let's you group or contain widgets together.

  • Splitter
  • HSpacer
  • WSpacer
  • Composite
  • GroupBox

Directories

Path Synopsis
cpl
dpicache
Package dpicache provides a type-agnostic cache for structures whose data must be adjusted for various DPI settings.
Package dpicache provides a type-agnostic cache for structures whose data must be adjusted for various DPI settings.
idalloc
Package idalloc provides a simple bitmap allocator for ID values.
Package idalloc provides a simple bitmap allocator for ID values.
examples
statusbar
This example demonstrates the status bar, including a size gripper attached to the bottom of the main window.
This example demonstrates the status bar, including a size gripper attached to the bottom of the main window.
wcolor represents walk RGB color, in uint32 space
wcolor represents walk RGB color, in uint32 space

Jump to

Keyboard shortcuts

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