--- src/ftstring.h.orig +++ src/ftstring.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include FT_FREETYPE_H #include FT_GLYPH_H --- src/ftsymbol.h.orig +++ src/ftsymbol.h @@ -8,7 +8,7 @@ #ifndef FTSYMBOL_H #define FTSYMBOL_H -#include +#include class CFTSymbol { public: --- src/quad.h.orig +++ src/quad.h @@ -9,7 +9,7 @@ #define QUAD_H #include "rect.h" -#include +#include class CQuad { public: --- src/window.cpp.orig +++ src/window.cpp @@ -56,7 +56,7 @@ //glutEntryFunc(); glutMotionFunc(callbackMouse); glutPassiveMotionFunc(callbackMouse); - glutMouseWheelFunc(callbackMouseWheel); +// glutMouseWheelFunc(callbackMouseWheel); // glutWMCloseFunc(closeWindow); glEnable(GL_BLEND); @@ -222,6 +222,7 @@ } } +#if 0 void CWindow::fnMouseWheel(int wheel, int direction, int x, int y) { if(direction > 0) { updateScale(true); @@ -230,11 +231,18 @@ updateScale(false); } } +#endif + +#define GLUT_SCROLL_UP 3 +#define GLUT_SCROLL_DOWN 4 void CWindow::fnMouseButtons(int button, int state, int x, int y) { if(button == GLUT_LEFT_BUTTON) { m_mouseLB = (state == GLUT_DOWN); - } + } else if (button == GLUT_SCROLL_UP) + updateScale(true); + else if (button == GLUT_SCROLL_DOWN) + updateScale(false); } void CWindow::fnKeyboard(unsigned char key, int x, int y) { @@ -245,8 +253,10 @@ switch(key) { case 27: // ESC -// exit(0); - glutLeaveMainLoop(); + case 'q': + case 'Q': + exit(0); +// glutLeaveMainLoop(); break; case 127: // Delete if(mod == GLUT_ACTIVE_CTRL) { @@ -639,9 +649,11 @@ g_window->fnMouseButtons(button, state, x, y); } +#if 0 void CWindow::callbackMouseWheel(int wheel, int direction, int x, int y) { g_window->fnMouseWheel(wheel, direction, x, y); } +#endif void CWindow::callbackKeyboardSpecial(int key, int x, int y) { g_window->fnKeyboardSpecial(key, x, y);