22 #ifndef FIFE_FIFECHAN_ADDON_CONSOLE_H
23 #define FIFE_FIFECHAN_ADDON_CONSOLE_H
29 #include <fifechan.hpp>
64 class Console :
public fcn::Container,
public fcn::ActionListener,
public fcn::FocusListener {
76 void println(
const std::string & s);
123 void action(
const fcn::ActionEvent & event);
virtual void onToolsClick()=0
Called when console tools button is clicked.
void focusLost(const fcn::Event &event)
Hide if we loose focus.
void setConsoleExecuter(ConsoleExecuter *const consoleexec)
Sets executer for the console.
virtual std::string onConsoleCommand(const std::string &command)=0
Called when user has typed command to console and pressed enter.
void execute(std::string cmd)
Execute a command Normally just sends the command to runString() Checks whether the cmd is just one t...
void hide()
Hide the console Removes itself from the toplevel container and pops it's input context.
void updateAnimation()
Update the scroll in/out animation.
void setIOFont(GuiFont *font)
Sets the font used for the input and output areas.
void removeConsoleExecuter()
Removes executer for the console.
virtual ~ConsoleExecuter()
Destructor.
Console executer is listener interface for console activity.
fcn::Button * m_toolsbutton
void println(const std::string &s)
Print one or more lines to the console output.
void show()
Show the console Adds the Console to the fifechan toplevel container and pushes an input Context so t...
void toggleShowHide()
Toggle the console Toggles whether the Console is shown or not.
virtual ~Console()
Destructor.
static const unsigned m_maxOutputRows
void updateCaption()
Update the FPS caption.
void reLayout()
Layouts the console to match e.g.
ConsoleExecuter * m_consoleexec
fcn::ScrollArea * m_outputscrollarea
void action(const fcn::ActionEvent &event)
Callback from fifechan to respond to button press.
void clear()
Clear the console output.