#ifndef SDLWIDGETS_FOCUSMANAGER_H #define SDLWIDGETS_FOCUSMANAGER_H #include #include "focusable.h" #include "widget.h" namespace SDLwidgets { class FocusManager { private: Focusable* _focused_widget; Widget* _widget; public: FocusManager() : _focused_widget( 0 ), _widget( 0 ) { } void requestFocus( Focusable* widget ); void removeFocus( Focusable* widget ); Focusable* getFocusedWidget() { return _focused_widget; } bool handleEvent( SDL_Event* event ); }; } #endif // SDLWIDGETS_FOCUSMANAGER_H