-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHeightEditorGroup.h
58 lines (46 loc) · 1.75 KB
/
HeightEditorGroup.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
47
48
49
50
51
52
53
54
55
56
57
58
/*
* HeightEditorGroup.h
* Created by Zachary Ferguson
* Header for the HeightEditorGroup class, a child class of the Fl_Group class
* for selecting vertices and setting the height of a height field.
*/
#ifndef HEIGHTEDITORGROUP_H
#define HEIGHTEDITORGROUP_H
#define _CRT_SECURE_NO_WARNINGS
#include <cfloat>
#include <FL/Fl_Group.H>
#include <FL/Fl_Spinner.h>
#include <FL/Fl_Value_Slider.h>
class HeightEditorGroup : public Fl_Group
{
private:
/* Fl_Buttons for the different preset camera positions. */
Fl_Value_Slider* heightSlider;
Fl_Spinner* rowSpinner;
Fl_Spinner* colSpinner;
public:
/* Constructor for creating a new HeightEditorGroup. */
/* Requires the x,y coordinates of the new HeightEditorGroup, as */
/* well as the number of rows and cols for the spinners' max values. */
HeightEditorGroup(int x, int y, unsigned int rows, unsigned int cols);
/* Destructor for this CameraControlGroup. */
virtual ~HeightEditorGroup();
/* Sets the callback function for the spinners to cb with an */
/* argument of p. */
void indexCallback(Fl_Callback* cb, void *p);
/* Sets the callback function for the height slider to cb with an */
/* argument of p. */
void heightCallback(Fl_Callback* cb, void *p);
/* Accessor Methods */
const unsigned int getRow() const;
const unsigned int getCol() const;
const float getHeight() const;
/* Set the values for the spinners */
void setRow(const unsigned int row);
void setCol(const unsigned int col);
void setHeight(const float height);
/* Set the max values for the spinners */
void setRows(const unsigned int rows);
void setCols(const unsigned int cols);
};
#endif