-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
54 lines (43 loc) · 1.16 KB
/
MainWindow.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
/*
* MainWindow.h
*
* Created on: Oct 16, 2015
* Author: hugocm93
*/
#ifndef MAINWINDOW_H_
#define MAINWINDOW_H_
#include <iup/iup.h>
#include <iup/iupgl.h>
#include <cstdlib>
#include <GL/gl.h> /* OpenGL functions*/
#include <GL/glu.h>
#include <iostream>
#include "Mesh.h"
#include "FileReader.h"
class MainWindow {
private:
Ihandle* dialog;
Ihandle* canvas;
Ihandle* toolBar;
Ihandle* messageBar;
Mesh* mesh;
public:
MainWindow();
virtual ~MainWindow();
/*Shows the dialog*/
void show();
/*Hides the dialog*/
void hide();
private:
/* Callbacks*/
static int load_cb(Ihandle* ih);
static int exit_cb(Ihandle* ih);
static int repaint_cb(Ihandle* ih);
static int resize_cb(Ihandle *self, int new_width, int new_height);
static int move(Ihandle* ih, int button, int pressed, int x, int y, char* status);
static int move2(Ihandle *ih, int x, int y, char *status);
/*Intern method that makes it easier to create a button*/
static Ihandle* IupSButton(char const * image_file, char const * tip, Icallback callback);
static void IupCanvasResize( Ihandle* canvas, Ihandle* parent_dialog, int new_width, int new_height );
};
#endif /* MAINWINDOW_H_ */