Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

window.h 687B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __GLGUIWINDOW_H
  2. #define __GLGUIWINDOW_H
  3. #include <iostream>
  4. #include <string>
  5. #include <vector>
  6. #include <SDL.h>
  7. #include <SDL_opengl.h>
  8. #include "../color.h"
  9. #include "../gldrawhelper.h"
  10. #include "object.h"
  11. namespace segl {
  12. class GLGuiWindow : public GLGuiObject {
  13. private:
  14. bool renderbackground;
  15. SDL_Rect pos;
  16. Color bgcolor;
  17. std::vector<GLGuiObject*> items;
  18. std::vector<GLGuiObject*> highlightable;
  19. std::vector<GLGuiObject*> clickable;
  20. std::vector<GLGuiObject*> keyboardable;
  21. public:
  22. GLGuiWindow(SDL_Rect _pos, Color _bgcolor);
  23. ~GLGuiWindow();
  24. void addItem(GLGuiObject*);
  25. SDL_Rect getPos();
  26. void render();
  27. };
  28. } // namespace segl
  29. #endif