MCPcopy Create free account
hub / github.com/christophhart/HISE / ButtonWrapper

Method ButtonWrapper

hi_scripting/scripting/api/ScriptComponentWrappers.cpp:1201–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201ScriptCreatedComponentWrappers::ButtonWrapper::ButtonWrapper(ScriptContentComponent *content, ScriptingApi::Content::ScriptButton *sb, int index) :
1202ScriptCreatedComponentWrapper(content, index)
1203{
1204 HiToggleButton *b = new HiToggleButton(sb->name.toString());
1205
1206 b->addListener(this);
1207
1208 b->setup(getProcessor(), getIndex(), sb->name.toString());
1209
1210 if (sb->getPopupData().isObject())
1211 {
1212 auto r = sb->getPopupPosition();
1213 b->setPopupData(sb->getPopupData(), r);
1214 }
1215
1216 b->updateValue(dontSendNotification);
1217
1218
1219 component = b;
1220
1221 initAllProperties();
1222
1223 MouseCursor cursor;
1224 if (setMouseCursorFromParentPanel(sb, cursor))
1225 b->setMouseCursor(cursor);
1226}
1227
1228
1229ScriptCreatedComponentWrappers::ButtonWrapper::~ButtonWrapper()

Callers

nothing calls this directly

Calls 10

getProcessorFunction · 0.85
getPopupPositionMethod · 0.80
setMouseCursorMethod · 0.80
getIndexFunction · 0.50
toStringMethod · 0.45
addListenerMethod · 0.45
setupMethod · 0.45
isObjectMethod · 0.45
setPopupDataMethod · 0.45
updateValueMethod · 0.45

Tested by

no test coverage detected