> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/scripting-cyberpunk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/scripting-cyberpunk/scripting/game-systems/ui-scripting/ink-widgets.md).

# Ink Widgets

A list of common ink widgets you'll come across when scripting UI

## Types

### Base Widgets

* [inkWidget](https://nativedb.red4ext.com/c/531337863249463): The base class for all ink widgets.

### Primitives

* [inkText](https://nativedb.red4ext.com/c/2864209969622273): The widget responsible for drawing text.
* [inkImage](https://nativedb.red4ext.com/c/5048226528955915): The widget responsible for drawing an image.

### Containers

* [inkCompoundWidget](https://nativedb.red4ext.com/c/6908765955958788): The base class for widgets that contain other types of widgets.
* [inkCanvas](https://nativedb.red4ext.com/c/4566368432016927): A generic widget that contains other widgets.
* [inkHorizontalPanel](https://nativedb.red4ext.com/c/5688111719093901): The container widget that draws child widgets horizontally.
* [inkVerticalPanel](https://nativedb.red4ext.com/c/6529048171874994): The container widget that draws child widgets vertically.

## Ink References

Ink refs are structures that stores a reference to an ink widget. The widget for the reference can always be accessed by `inkWidgetRef.widget`.

These structures have some static methods that act as a middle-man to get the same type of information from the respective widget (instead of getting the data directly from the widget), for example [`inkTextWidgetReference#GetFontSize`](https://nativedb.red4ext.com/inkTextWidgetReference#GetFontSize) and [`inkTextWidget#GetFontSize`](https://nativedb.red4ext.com/inkTextWidget#GetFontSize). However, there isn't a short-cut method for all methods, so you still may need to directly access the widget.

The various types of references contains helper methods respective to the type of widget it represents.

* [inkWidgetRef](https://nativedb.red4ext.com/s/8617712912798959)
* [inkTextRef](https://nativedb.red4ext.com/s/7852530694133962)
* [inkImageRef](https://nativedb.red4ext.com/s/4906041669172740)
* [inkCompoundRef](https://nativedb.red4ext.com/s/183961154165866)
* [inkHorizontalPanelRef](https://nativedb.red4ext.com/s/1822056724961513)
* [inkVerticalPanelRef](https://nativedb.red4ext.com/s/2633688520856065)
