22 #ifndef FIFE_VIDEO_GUI_GUICHANMANAGER_H
23 #define FIFE_VIDEO_GUI_GUICHANMANAGER_H
29 #include <fifechan.hpp>
95 void init(
const std::string& backend, int32_t screenWidth, int32_t screenHeight);
110 void add(fcn::Widget* widget);
115 void remove(fcn::Widget* widget);
KeyEvent translateKeyEvent(const fcn::KeyEvent &evt)
void add(fcn::Widget *widget)
Adds a new widget.
virtual void turn()
Performs the GUI logic and draws the GUI accordingly.
fcn::FocusHandler * m_focushandler
GuiFont * getDefaultFont()
Gets the default font.
FifechanManager()
Constructor.
void resizeTopContainer(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
Resizes the top container.
GuiFont * setDefaultFont(const std::string &path, uint32_t size, const std::string &glyphs)
Set the global font properties.
virtual ~FifechanManager()
Destructor.
virtual bool onSdlEvent(SDL_Event &evt)
Called when an SDL event is received from SDL.
GuiFont * createFont(const std::string &path="", uint32_t size=0, const std::string &glyphs="")
Gets font with given properties.
Console * getConsole() const
Gets the console.
fcn::Container * m_fcn_topcontainer
GuiImageLoader * m_imgloader
std::vector< GuiFont * > m_fonts
std::set< fcn::Widget * > m_widgets
void releaseFont(GuiFont *font)
Releases given font.
fcn::Graphics * m_gui_graphics
void init(const std::string &backend, int32_t screenWidth, int32_t screenHeight)
Inits the Fifechan GUI Manager.
MouseEvent translateMouseEvent(const fcn::MouseEvent &evt)
fcn::Container * getTopContainer() const
Gets the top container.
static int32_t convertFifechanKeyToFifeKey(int32_t value)
fcn::Gui * getFifechanGUI() const
Gets the member pointer to the Fifechan GUI.