MCPcopy Create free account
hub / github.com/chieapp/chie / addButton

Method addButton

src/view/input-view.ts:81–95  ·  view source on GitHub ↗
(button: IconButton)

Source from the content-addressed store, hash-verified

79 }
80
81 addButton(button: IconButton) {
82 if (!this.buttonsArea) {
83 this.buttonsArea = gui.Container.create();
84 this.buttonsArea.setStyle({
85 height: '100%', // take full vertical space
86 alignItems: 'flex-end', // buttons aligned to bottom
87 flexDirection: 'row', // horizontal layout
88 margin: 4,
89 marginLeft: 0,
90 });
91 this.view.addChildView(this.buttonsArea);
92 }
93 this.buttons.push(button);
94 this.buttonsArea.addChildView(button.view);
95 }
96
97 #onDraw(view, painter: gui.Painter) {
98 const bounds = Object.assign(view.getBounds(), {x: 0, y: 0});

Callers 6

showErrorFunction · 0.45
#createAPISettingMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
alertFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected