MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuFieldBind

Function PiuFieldBind

modules/piu/PC/win/piuField.cpp:114–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void PiuFieldBind(void* it, PiuApplication* application, PiuView* view)
115{
116 PiuField* self = (PiuField*)it;
117 xsMachine* the = (*self)->the;
118 PiuContentBind(it, application, view);
119 PiuFieldComputeStyle(self);
120 PiuSkin* skin = (*self)->skin;
121 PiuStyle* style = (*self)->computedStyle;
122
123 (*self)->solidBrush = CreateSolidBrush(RGB((*skin)->data.color.fill[0].r, (*skin)->data.color.fill[0].g, (*skin)->data.color.fill[0].b));
124 (*self)->window = CreateWindowEx(0, "PiuClipWindow", NULL, WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE, 0, 0, 0, 0, (*view)->window, NULL, gInstance, (LPVOID)self);
125 (*self)->control = CreateWindowEx(0, "Edit", NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, (*self)->window, NULL, gInstance, NULL);
126 SetWindowSubclass((*self)->control, PiuFieldProc, 0, (DWORD_PTR)self);
127 if ((*self)->hint) {
128 wchar_t* buffer = xsToStringCopyW(*((*self)->hint));
129 Edit_SetCueBannerTextFocused((*self)->control, buffer, TRUE);
130 c_free(buffer);
131 }
132 if ((*self)->string) {
133 wchar_t* buffer = xsToStringCopyW(*((*self)->string));
134 SetWindowTextW((*self)->control, buffer);
135 c_free(buffer);
136 }
137}
138
139void PiuFieldCascade(void* it)
140{

Callers

nothing calls this directly

Calls 2

PiuContentBindFunction · 0.85
PiuFieldComputeStyleFunction · 0.70

Tested by

no test coverage detected