| 239 | } |
| 240 | |
| 241 | void EventCanvas::DrawModule() |
| 242 | { |
| 243 | if (Minimized() || IsVisible() == false) |
| 244 | return; |
| 245 | |
| 246 | ofPushStyle(); |
| 247 | ofFill(); |
| 248 | for (int i = 0; i < mCanvas->GetNumVisibleRows(); ++i) |
| 249 | { |
| 250 | ofColor color = GetRowColor(i + mCanvas->GetRowOffset()); |
| 251 | color.a = 50; |
| 252 | ofSetColor(color); |
| 253 | |
| 254 | float boxHeight = (float(mCanvas->GetHeight()) / mCanvas->GetNumVisibleRows()); |
| 255 | float y = mCanvas->GetPosition(true).y + i * boxHeight; |
| 256 | ofRect(mCanvas->GetPosition(true).x, y, mCanvas->GetWidth(), boxHeight); |
| 257 | } |
| 258 | ofPopStyle(); |
| 259 | |
| 260 | ofPushStyle(); |
| 261 | ofSetColor(128, 128, 128); |
| 262 | mCanvas->Draw(); |
| 263 | ofPopStyle(); |
| 264 | |
| 265 | mCanvasScrollbarHorizontal->Draw(); |
| 266 | |
| 267 | mCanvasControls->Draw(); |
| 268 | mQuantizeButton->Draw(); |
| 269 | mNumMeasuresEntry->Draw(); |
| 270 | mIntervalSelector->Draw(); |
| 271 | mRecordCheckbox->Draw(); |
| 272 | |
| 273 | ofRectangle canvasRect = mCanvas->GetRect(true); |
| 274 | for (int i = 0; i < mControlCables.size(); ++i) |
| 275 | { |
| 276 | if (mCanvas->IsRowVisible(i)) |
| 277 | { |
| 278 | mControlCables[i]->SetManualPosition(GetRect().width, canvasRect.y + (canvasRect.height / mCanvas->GetNumVisibleRows()) * (i - mCanvas->GetRowOffset() + .5f)); |
| 279 | mControlCables[i]->SetEnabled(true); |
| 280 | } |
| 281 | else |
| 282 | { |
| 283 | mControlCables[i]->SetEnabled(false); |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | void EventCanvas::SyncControlCablesToCanvas() |
| 289 | { |
nothing calls this directly
no test coverage detected