MCPcopy Create free account
hub / github.com/cogentcore/core / RenderWidget

Method RenderWidget

texteditor/render.go:41–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func (ed *Editor) RenderWidget() {
42 if ed.PushBounds() {
43 if ed.needsLayout {
44 ed.renderLayout()
45 ed.needsLayout = false
46 }
47 if ed.targetSet {
48 ed.scrollCursorToTarget()
49 }
50 ed.PositionScrolls()
51 ed.renderAllLines()
52 if ed.StateIs(states.Focused) {
53 ed.startCursor()
54 } else {
55 ed.stopCursor()
56 }
57 ed.RenderChildren()
58 ed.RenderScrolls()
59 ed.PopBounds()
60 } else {
61 ed.stopCursor()
62 }
63}
64
65// textStyleProperties returns the styling properties for text based on HiStyle Markup
66func (ed *Editor) textStyleProperties() map[string]any {

Callers

nothing calls this directly

Calls 11

renderLayoutMethod · 0.95
scrollCursorToTargetMethod · 0.95
renderAllLinesMethod · 0.95
startCursorMethod · 0.95
stopCursorMethod · 0.95
PositionScrollsMethod · 0.80
StateIsMethod · 0.80
RenderScrollsMethod · 0.80
PushBoundsMethod · 0.45
RenderChildrenMethod · 0.45
PopBoundsMethod · 0.45

Tested by

no test coverage detected