kwave  18.07.70
MouseMark.h
Go to the documentation of this file.
1 /***************************************************************************
2  MouseMark.h - Handling of mouse selection
3  -------------------
4  begin : Sun Nov 12 2000
5  copyright : (C) 2000 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MOUSE_MARK_H
19 #define MOUSE_MARK_H
20 
21 #include "config.h"
22 
23 #include "libkwave/Sample.h"
24 
25 namespace Kwave
26 {
31  class MouseMark
32  {
33 
34  public:
35 
37  MouseMark();
38 
40  virtual ~MouseMark();
41 
47  void set(sample_index_t l, sample_index_t r);
48 
55  void update(sample_index_t x);
56 
62  void grep(sample_index_t x);
63 
67  sample_index_t left() const;
68 
72  sample_index_t right() const;
73 
77  inline sample_index_t length() const {
78  return right() - left() + 1;
79  }
80 
81  private:
84 
87  };
88 }
89 
90 #endif /* MOUSE_MARK_H */
91 
92 //***************************************************************************
93 //***************************************************************************
sample_index_t m_initial
Definition: MouseMark.h:83
Definition: App.h:33
sample_index_t right() const
Definition: MouseMark.cpp:49
void grep(sample_index_t x)
Definition: MouseMark.cpp:55
quint64 sample_index_t
Definition: Sample.h:28
virtual ~MouseMark()
Definition: MouseMark.cpp:31
sample_index_t m_last
Definition: MouseMark.h:86
void update(sample_index_t x)
Definition: MouseMark.cpp:67
sample_index_t length() const
Definition: MouseMark.h:77
sample_index_t left() const
Definition: MouseMark.cpp:43