comparison view/View.h @ 313:1517c76cd678

* Make View getStartFrame etc non-virtual for easier inlining * Make getStartFrame use getFrameForX instead of vice versa
author Chris Cannam
date Tue, 16 Oct 2007 15:13:41 +0000
parents 5636eeacc467
children c30a7cd29f4a
comparison
equal deleted inserted replaced
312:6de6f78b13a1 313:1517c76cd678
59 /** 59 /**
60 * Retrieve the first visible sample frame on the widget. 60 * Retrieve the first visible sample frame on the widget.
61 * This is a calculated value based on the centre-frame, widget 61 * This is a calculated value based on the centre-frame, widget
62 * width and zoom level. The result may be negative. 62 * width and zoom level. The result may be negative.
63 */ 63 */
64 virtual long getStartFrame() const; 64 long getStartFrame() const;
65 65
66 /** 66 /**
67 * Set the widget pan based on the given first visible frame. The 67 * Set the widget pan based on the given first visible frame. The
68 * frame value may be negative. 68 * frame value may be negative.
69 */ 69 */
70 virtual void setStartFrame(long); 70 void setStartFrame(long);
71 71
72 /** 72 /**
73 * Return the centre frame of the visible widget. This is an 73 * Return the centre frame of the visible widget. This is an
74 * exact value that does not depend on the zoom block size. Other 74 * exact value that does not depend on the zoom block size. Other
75 * frame values (start, end) are calculated from this based on the 75 * frame values (start, end) are calculated from this based on the
76 * zoom and other factors. 76 * zoom and other factors.
77 */ 77 */
78 virtual size_t getCentreFrame() const { return m_centreFrame; } 78 size_t getCentreFrame() const { return m_centreFrame; }
79 79
80 /** 80 /**
81 * Set the centre frame of the visible widget. 81 * Set the centre frame of the visible widget.
82 */ 82 */
83 virtual void setCentreFrame(size_t f) { setCentreFrame(f, true); } 83 void setCentreFrame(size_t f) { setCentreFrame(f, true); }
84 84
85 /** 85 /**
86 * Retrieve the last visible sample frame on the widget. 86 * Retrieve the last visible sample frame on the widget.
87 * This is a calculated value based on the centre-frame, widget 87 * This is a calculated value based on the centre-frame, widget
88 * width and zoom level. 88 * width and zoom level.
89 */ 89 */
90 virtual size_t getEndFrame() const; 90 size_t getEndFrame() const;
91 91
92 /** 92 /**
93 * Return the pixel x-coordinate corresponding to a given sample 93 * Return the pixel x-coordinate corresponding to a given sample
94 * frame (which may be negative). 94 * frame (which may be negative).
95 */ 95 */