nuclear@6: /* nuclear@6: GoatKit - a themable/animated widget toolkit for games nuclear@6: Copyright (C) 2014 John Tsiombikas nuclear@6: nuclear@6: This program is free software: you can redistribute it and/or modify nuclear@6: it under the terms of the GNU Lesser General Public License as published by nuclear@6: the Free Software Foundation, either version 3 of the License, or nuclear@6: (at your option) any later version. nuclear@6: nuclear@6: This program is distributed in the hope that it will be useful, nuclear@6: but WITHOUT ANY WARRANTY; without even the implied warranty of nuclear@6: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nuclear@6: GNU Lesser General Public License for more details. nuclear@6: nuclear@6: You should have received a copy of the GNU Lesser General Public License nuclear@6: along with this program. If not, see . nuclear@6: */ nuclear@6: #ifndef SCREEN_H_ nuclear@6: #define SCREEN_H_ nuclear@6: nuclear@6: #include "vec.h" nuclear@6: #include "widget.h" nuclear@6: nuclear@6: namespace goatkit { nuclear@6: nuclear@6: class ScreenImpl; nuclear@6: nuclear@6: class Screen { nuclear@6: private: nuclear@6: ScreenImpl *scr; nuclear@6: nuclear@6: public: nuclear@6: Screen(); nuclear@6: ~Screen(); nuclear@6: nuclear@6: void set_position(float x, float y); nuclear@6: void set_position(const Vec2 &pos); nuclear@6: const Vec2 &get_position() const; nuclear@6: void set_size(float x, float y); nuclear@6: void set_size(const Vec2 &sz); nuclear@6: const Vec2 get_size() const; nuclear@6: const BBox &get_box() const; nuclear@6: nuclear@6: void add_widget(Widget *w); nuclear@6: int get_widget_count() const; nuclear@6: Widget *get_widget(int idx) const; nuclear@6: Widget *get_widget(const char *name) const; nuclear@6: nuclear@6: void show(); nuclear@6: void hide(); nuclear@6: bool is_visible() const; nuclear@6: nuclear@6: bool grab_mouse(Widget *w); nuclear@6: nuclear@6: void draw() const; nuclear@6: nuclear@6: // window system events used to generate widget events (see event.h) nuclear@6: void sysev_keyboard(int key, bool press); nuclear@6: // mouse position as reported by the window system. might fall outside nuclear@6: void sysev_mouse_button(int bn, bool press, float x, float y); nuclear@6: void sysev_mouse_motion(float x, float y); nuclear@6: }; nuclear@6: nuclear@6: } // namespace goatkit nuclear@6: nuclear@6: #endif /* SCREEN_H_ */