-
Notifications
You must be signed in to change notification settings - Fork 0
Code Map
Randall C. O'Reilly edited this page Jan 25, 2024
·
1 revision
This is an overview of where stuff is within the repository.
-
examples/widgets-- main example widget gallery --go get ...go buildin there to give it a try -- see README there for more info. Many other demos / tests inexamples/*. -
node*.go--NodeBase,Node2DBase,3Dstructs and interfaces -- all Gi nodes are of this type. -
geom2d.go--Vec2Dis main geom type used for 2D, plus transformMatrix2D. -
paint.go--Paintstruct that does all the direct rendering, usesgg-based API but now uses thesrwiley/renderxrendering system which supports SVG 2.0, and is very fast.-
stroke.go,fill.go--StrokeStyleandFillStylestructs for stroke, fill settings -
color.go--ColorSpecfor full gradient support,Coloris basiccolor.Colorcompatibale RGBA type with many additional useful methods, including support forHSLcolorspace -- see Wiki Color for more info.
-
-
style.go--Styleand associated structs for CSS-basedWidgetstyling. -
viewport2d.go--Viewport2Dthat has anImage.RGBAthatPaintrenders onto. -
window.go--Windowis the top-level window that manages an OS-specificoswin.Windowand handles the event loop.-
oswinis a modified version of the back-end OS-specific code from Shiny: https://github.com/golang/exp/tree/master/shiny -- originally used https://github.com/skelterjohn/go.wde but shiny is much faster for updating the window because it is gl-based, and doesn't have any other dependencies (removed dependencies on mobile, changed the event structure to better fit needs here).
-
-
font.go,text.go--FontStyle,TextStyle, andTextRenderthat manages rich-text rendering in a powerful, efficient manner (layered onRuneRenderandSpanRender).FontStylecontains the globalcolor,background-color, andopacityvalues, to make these easily avail to theTextRenderlogic. -
layout.go-- mainLayoutobject with various ways of arranging widget elements, andFramewhich does layout and renders a surrounding frame. -
widget.go--WidgetBasefor all widgets. -
buttons.go--ButtonBase,Buttonand other basic button types. -
action.go--Actionis a Button-type used in menus and toolbars, with a simplifiedActionSigsignal. -
bars.go--MenuBarandToolBar -
sliders.go--SliderBase,Slider,ScrollBar. -
textfield.goforTextField,label.goforLabel, etc -- also defines thegi.Labelerinterface andToLabelconverter method (which falls back on kit.ToString using Stringer), which is used for generating a gui-appropriate label for an object -- e.g., for reflect.Type it just presents the raw type name without prefix. -
icon.goforIconwrapper around svg icons (insvgsub-package) - Sub-packages:
-
svg-- has all the SVG nodes (Path,Rectetc) plusio.goparser -
giv-- has all the*Viewelements -
gimain-- provides a meta-package wrapper to simplify imports formainapps -- also does relevant final platform-specific customization -
units-- CSS unit representation
-