bool ControlPanel::timeProgressClicked(GdkEventButton* event) { if (event->type == GDK_BUTTON_PRESS) { if (duration > -1) { double pos = (1.0 / duration) * (int) ((event->x / (double) timeProgress->get_width()) * duration); timeProgress->set_fraction(pos); timelineChanged(); } } return true; }
void ofxTimeline::setupGUI(){ ofxSimpleGuiPage& page = gui.addPage(name); gui.addDebug("timeElapsed", timeElapsed); gui.addButton("start", (ofxBaseObject*)this, &ofxBaseObject::_start); gui.addButton("stop", (ofxBaseObject*)this, &ofxBaseObject::_stop); gui.addButton("reset", this, &ofxTimeline::reset); gui.addButton("timelineChanged", this, &ofxTimeline::timelineChanged); gui.addTitle("Events\nPress on [timelineChanged]\nafter changes to event times",50); for (vector<ofxTimelineEvent*>::iterator it = events.begin(); it != events.end(); ++it) { (*it)->setupGUI(0,maxTime); } page.loadFromXML(); timelineChanged(); }
void PropertyTimelineWidget::clearTimeline() { propertyTimeline_->resetTimeline(); timelineChange_ = true; timelineChanged(); }
void ofxTimeline::timelineChanged(ofEventArgs& e){ timelineChanged(); }
ofxTimelineEvent& ofxTimeline::addEvent(ofxTimelineEvent& event){ events.push_back(&event); timelineChanged(); return event; }