MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DropdownList

Method DropdownList

Source/DropdownList.cpp:32–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include "Push2Control.h"
31
32DropdownList::DropdownList(IDropdownListener* owner, const char* name, int x, int y, int* var, float width)
33: mVar(var)
34, mLastSetValue(*var)
35, mModalList(this)
36, mOwner(owner)
37{
38 assert(owner);
39 SetName(name);
40 mLabelSize = GetStringWidth(name) + 3;
41 SetPosition(x, y);
42 SetParent(dynamic_cast<IClickable*>(owner));
43 (dynamic_cast<IDrawableModule*>(owner))->AddUIControl(this);
44
45 mModalList.SetTypeName("dropdownlist", kModuleCategory_Other);
46
47 if (width == -1)
48 mAutoCalculateWidth = true;
49 else
50 mWidth = width;
51}
52
53DropdownList::DropdownList(IDropdownListener* owner, const char* name, IUIControl* anchor, AnchorDirection anchorDirection, int* var, float width)
54: DropdownList(owner, name, -1, -1, var, width)

Callers

nothing calls this directly

Calls 3

GetStringWidthFunction · 0.85
AddUIControlMethod · 0.80
SetTypeNameMethod · 0.80

Tested by

no test coverage detected