MCPcopy
hub / github.com/lxn/walk / NewToolButton

Function NewToolButton

toolbutton.go:17–35  ·  view source on GitHub ↗
(parent Container)

Source from the content-addressed store, hash-verified

15}
16
17func NewToolButton(parent Container) (*ToolButton, error) {
18 tb := new(ToolButton)
19
20 if err := InitWidget(
21 tb,
22 parent,
23 "BUTTON",
24 win.WS_TABSTOP|win.WS_VISIBLE|win.BS_BITMAP|win.BS_PUSHBUTTON,
25 0); err != nil {
26 return nil, err
27 }
28
29 tb.Button.init()
30
31 tb.GraphicsEffects().Add(InteractionEffect)
32 tb.GraphicsEffects().Add(FocusEffect)
33
34 return tb, nil
35}
36
37func (tb *ToolButton) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr {
38 switch msg {

Callers

nothing calls this directly

Calls 4

InitWidgetFunction · 0.85
GraphicsEffectsMethod · 0.65
initMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…