-
Notifications
You must be signed in to change notification settings - Fork 0
/
indicatorwindow.h
46 lines (34 loc) · 1.06 KB
/
indicatorwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef INDICATORWINDOW_H
#define INDICATORWINDOW_H
#pragma warning(disable : 4786)
#include <vector>
#include <FL/Fl_Double_Window.h>
class IndicatorWindow : public Fl_Double_Window
{
public:
IndicatorWindow(int x, int y, int w, int h, const char* lable = NULL);
void draw();
int handle(int iEvent);
void range(float fMin, float fMax);
void addIndicator(float f);
void removeIndicator(float f);
void clearIndicators();
void floatingIndicator(float f);
float floatingIndicator() const;
bool floatingIndicatorSnapped() const;
void rangeMarkerEnabled(bool RangeMarkerEnabled);
bool rangeMarkerEnabled() const;
void rangeMarkerRange(float fRangeMin, float fRangeMax);
float findIndicator(int x, int iPickWindowSize) const;
static const float ks_fIndicatorNotFound;
protected:
float fromWindowX(int x) const;
int toWindowX(float f) const;
std::vector<float> m_fvIndicators;
float m_fFloatingIndicator;
int m_iSelectedIndicator;
float m_fMin, m_fMax;
float m_fRangeMarkerMin, m_fRangeMarkerMax;
bool m_bRangeMarkerEnabled;
};
#endif // INDICATORWINDOW_H