-
Notifications
You must be signed in to change notification settings - Fork 2
/
ViewModeGroup.h
41 lines (30 loc) · 966 Bytes
/
ViewModeGroup.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
/*
* ViewModeGroup.h
* Created by Zachary Ferguson
* Header for the ViewModeGroup class, a child class of the Fl_Group class
* for getting the viewing mode.
*/
#ifndef VIEWMODEGROUP_H
#define VIEWMODEGROUP_H
#include <FL/Fl_Group.H>
#include <FL/Fl_Round_Button.h>
enum ViewingMode { WIREFRAME, SOLID, BOTH };
class ViewModeGroup : public Fl_Group
{
private:
/* Fl_Round_Buttons for the different view options. */
Fl_Round_Button* wireframeB;
Fl_Round_Button* solidB;
Fl_Round_Button* bothB;
public:
/* Constructor for creating a new ViewModeGroup. */
/* Requires the x,y coordinates of the new ViewModeGroup. */
ViewModeGroup(int x, int y);
/* Destructor for this ViewModeGroup. */
virtual ~ViewModeGroup();
/* Sets the callback function to cb with an argument of p. */
void callback(Fl_Callback* cb, void *p);
/* Get the viewing mode. Returns a ViewingMode enum value. */
ViewingMode getViewMode();
};
#endif