Documentation
¶
Overview ¶
Package example contains the core logic of the demo. The Run() function demonstrates how a typical application would create a UI. The function herein is not concerned about technology-specific things, such as which abstraction library or which drawing interface is used.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Platform ¶
type Platform interface { // ShouldStop is regularly called as the abort condition for the program loop. ShouldStop() bool // ProcessEvents is called once per render loop to dispatch any pending events. ProcessEvents() // DisplaySize returns the dimension of the display. DisplaySize() [2]float32 // FramebufferSize returns the dimension of the framebuffer. FramebufferSize() [2]float32 // NewFrame marks the begin of a render pass. It must update the cimgui IO state according to user input (mouse, keyboard, ...) NewFrame() // PostRender marks the completion of one render pass. Typically this causes the display buffer to be swapped. PostRender() // ClipboardText returns the current text of the clipboard, if available. ClipboardText() (string, error) // SetClipboardText sets the text as the current text of the clipboard. SetClipboardText(text string) }
Platform covers mouse/keyboard/gamepad inputs, cursor shape, timing, windowing.
type Renderer ¶
type Renderer interface { // PreRender causes the display buffer to be prepared for new output. PreRender(clearColor [3]float32) // Render draws the provided cimgui draw data. Render(displaySize [2]float32, framebufferSize [2]float32, drawData imgui.DrawData) }
Renderer covers rendering cimgui draw data.
Click to show internal directories.
Click to hide internal directories.