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

Method CheckboxUpdated

Source/TimelineControl.cpp:102–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void TimelineControl::CheckboxUpdated(Checkbox* checkbox, double time)
103{
104 if (checkbox == mLoopCheckbox)
105 {
106 mLoopStartSlider->SetShowing(mLoop);
107 mLoopEndSlider->SetShowing(mLoop);
108 if (mLoop)
109 TheTransport->SetLoop(mLoopStart, mLoopEnd);
110 else
111 TheTransport->ClearLoop();
112 }
113
114 if (checkbox == mDockCheckbox)
115 {
116 if (mDock && GetOwningContainer() == TheSynth->GetRootContainer())
117 {
118 TheSynth->GetUIContainer()->TakeModule(this);
119 float w, h;
120 GetModuleDimensions(w, h);
121 Resize(ofGetWidth() / GetOwningContainer()->GetDrawScale(), h);
122 gHoveredUIControl = nullptr;
123 }
124
125 if (!mDock && GetOwningContainer() == TheSynth->GetUIContainer())
126 {
127 TheSynth->GetRootContainer()->TakeModule(this);
128 float w, h;
129 GetModuleDimensions(w, h);
130 Resize(ofGetWidth() / GetOwningContainer()->GetDrawScale(), h);
131 SetPosition(-TheSynth->GetDrawOffset().x, -TheSynth->GetDrawOffset().y + ofGetHeight() / GetOwningContainer()->GetDrawScale() - h);
132 gHoveredUIControl = nullptr;
133 }
134 }
135}
136
137void TimelineControl::FloatSliderUpdated(FloatSlider* slider, float oldVal, double time)
138{

Callers

nothing calls this directly

Calls 10

ofGetWidthFunction · 0.85
ofGetHeightFunction · 0.85
SetLoopMethod · 0.80
ClearLoopMethod · 0.80
GetRootContainerMethod · 0.80
TakeModuleMethod · 0.80
GetUIContainerMethod · 0.80
GetDrawScaleMethod · 0.80
GetDrawOffsetMethod · 0.80
SetShowingMethod · 0.45

Tested by

no test coverage detected