MCPcopy Create free account
hub / github.com/DISTRHO/DPF / DemoWindow

Method DemoWindow

tests/Demo.cpp:271–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269 #endif
270
271 DemoWindow(Application& app)
272 : StandaloneWindow(app),
273 curWidget(nullptr)
274 {
275 const ScopedGraphicsContext sgc(*this);
276 const double scaleFactor = getScaleFactor();
277
278 wColor = new ExampleColorSubWidget(this);
279 wColor->hide();
280 wColor->setAbsoluteX(kSidebarWidth * scaleFactor);
281
282 wImages = new ExampleImagesSubWidget(this);
283 wImages->hide();
284 wImages->setAbsoluteX(kSidebarWidth * scaleFactor);
285
286 wRects = new ExampleRectanglesSubWidget(this);
287 wRects->hide();
288 wRects->setAbsoluteX(kSidebarWidth * scaleFactor);
289
290 wShapes = new ExampleShapesSubWidget(this);
291 wShapes->hide();
292 wShapes->setAbsoluteX(kSidebarWidth * scaleFactor);
293
294 #ifdef DGL_OPENGL
295 wText = new ExampleTextSubWidget(this),
296 wText->hide();
297 wText->setAbsoluteX(kSidebarWidth * scaleFactor);
298 #endif
299 wLeft = new LeftSideWidget(this, this),
300 wLeft->setAbsolutePos(2 * scaleFactor, 2 * scaleFactor);
301
302 resizer = new ResizeHandle(this);
303
304 curPageChanged(0);
305 done();
306 }
307
308protected:
309 void curPageChanged(int curPage) override

Callers

nothing calls this directly

Calls 5

doneFunction · 0.85
setAbsoluteXMethod · 0.80
getScaleFactorFunction · 0.50
hideMethod · 0.45
setAbsolutePosMethod · 0.45

Tested by

no test coverage detected