annotate base/Selection.h @ 8:214054a0d8b8

* Hook up tool selection buttons to switch the cursor mode * Implement simple and multi-selection, snapping to the resolution of the current layer. You can't actually do anything with a selection yet
author Chris Cannam
date Mon, 23 Jan 2006 17:02:57 +0000
parents
children 73d85d19919f
rev   line source
Chris@8 1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */
Chris@8 2
Chris@8 3 /*
Chris@8 4 A waveform viewer and audio annotation editor.
Chris@8 5 Chris Cannam, Queen Mary University of London, 2005-2006
Chris@8 6
Chris@8 7 This is experimental software. Not for distribution.
Chris@8 8 */
Chris@8 9
Chris@8 10 #ifndef _SELECTION_H_
Chris@8 11 #define _SELECTION_H_
Chris@8 12
Chris@8 13 #include <cstddef>
Chris@8 14
Chris@8 15 class Selection
Chris@8 16 {
Chris@8 17 public:
Chris@8 18 Selection();
Chris@8 19 Selection(size_t startFrame, size_t endFrame);
Chris@8 20 Selection(const Selection &);
Chris@8 21 Selection &operator=(const Selection &);
Chris@8 22 virtual ~Selection();
Chris@8 23
Chris@8 24 bool isEmpty() const;
Chris@8 25 size_t getStartFrame() const;
Chris@8 26 size_t getEndFrame() const;
Chris@8 27
Chris@8 28 bool operator<(const Selection &) const;
Chris@8 29 bool operator==(const Selection &) const;
Chris@8 30
Chris@8 31 protected:
Chris@8 32 size_t m_startFrame;
Chris@8 33 size_t m_endFrame;
Chris@8 34 };
Chris@8 35
Chris@8 36 #endif