From e1cef9bb37e0d904f8e8b7e59e9ff1c8d79601e4 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 25 Aug 2024 01:58:03 -0400 Subject: [PATCH] Improve README.md --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6d6619..1c3a85c 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,25 @@ [![Go Reference](https://pkg.go.dev/badge/git.tebibyte.media/tomo/objects.svg)](https://pkg.go.dev/git.tebibyte.media/tomo/objects) -Objects contains a standard collection of re-usable objects. All objects in this -module visually conform to whatever the theme is set to. +Objects contains a standard collection of re-usable objects. It should be viewed +also as a reference for how to create custom objects in Tomo. + +## Styling +All objects in this module have roles of the form: + +``` +objects.TypeName +``` + +Where `TypeName` is the exact Go type name of the object in question. Objects +may also have different tags to indicate variations, states, etc. If applicable, +they are listed and described in the doc comment for the object's type. More +complex objects may have sub-components that are not accessible from the API. +These are listed alongside the tags. + +## Setting Attributes +It is generally not recommended to set attributes on these objects. However, if +you must, they can be set by obtaining the object's underlying box through the +`GetBox` method. Be aware that the exact type of box that is returned here is +not part of the API, and may change unexpectedly even after v1.0. This caveat +also applies to children created/managed by the objects.