-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.h
37 lines (32 loc) · 873 Bytes
/
global.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
#ifndef GLOBAL_H
#define GLOBAL_H
#include "gui.h"
#include "display.h"
#include <cstdlib>
#include <ctime>
enum {SHUFFLE=0,BUBBLESORT,SELECTIONSORT,INSERTIONSORT,SHELLSORT,BISELECTIONSORT,COCKTAILSORT,MERGESORT,HEAPSORT,QUICKSORT,NUMSORTS};
class Global {
public:
int xres, yres;
int mousex, mousey;
int BARWIDTH=30;
int amount=100;
Slider* listAmountSlider;
Button<int> options[NUMSORTS];
Button<int>* curOption;
int* list;
float width;
bool sorting;
bool dropMenu;
bool lButtonDown, rButtonDown;
Global();
~Global();
void init();
void setMouseCoords(int,int);
void processSettings();
void renderMenu(X11&);
};
void checkResize(XEvent*, Global&);
void checkMouse(XEvent*, Global&);
int checkKeys(XEvent*, Global&);
#endif