comparison base/View.cpp @ 12:f67ddc287bc3

* Add ability to create empty layers for editing * Add first basic editing capability (adding points to a time instant layer) * Add various keyboard and mouse shortcuts for navigation &c * Add ability to resize a selection by dragging its edges * Add maximum zoom level
author Chris Cannam
date Thu, 26 Jan 2006 16:15:40 +0000
parents ec6886f0e673
children 47500c27ac26
comparison
equal deleted inserted replaced
11:cb05ba39664a 12:f67ddc287bc3
749 ZoomConstraint::RoundUp); 749 ZoomConstraint::RoundUp);
750 } 750 }
751 751
752 if (newZoomLevel != m_zoomLevel) { 752 if (newZoomLevel != m_zoomLevel) {
753 setZoomLevel(newZoomLevel); 753 setZoomLevel(newZoomLevel);
754 }
755 }
756
757 void
758 View::scroll(bool right, bool lots)
759 {
760 long delta;
761 if (lots) {
762 delta = ((width() / 2) * m_zoomLevel);
763 } else {
764 delta = ((width() / 20) * m_zoomLevel);
765 }
766 if (right) delta = -delta;
767
768 if (int(m_centreFrame) < delta) {
769 setCentreFrame(0);
770 } else if (int(m_centreFrame) - delta >= int(getModelsEndFrame())) {
771 setCentreFrame(getModelsEndFrame());
772 } else {
773 setCentreFrame(m_centreFrame - delta);
754 } 774 }
755 } 775 }
756 776
757 void 777 void
758 View::checkProgress(void *object) 778 View::checkProgress(void *object)