22 #ifndef FIFE_GUICHAN_ADDON_CONSOLE_H
23 #define FIFE_GUICHAN_ADDON_CONSOLE_H
29 #include <guichan.hpp>
64 class Console :
public gcn::Container,
public gcn::ActionListener,
public gcn::FocusListener {
76 void println(
const std::string & s);
123 void action(
const gcn::ActionEvent & event);
virtual void onToolsClick()=0
Called when console tools button is clicked.
void setConsoleExecuter(ConsoleExecuter *const consoleexec)
Sets executer for the console.
gcn::ScrollArea * m_outputscrollarea
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.
void focusLost(const gcn::Event &event)
Hide if we loose focus.
virtual ~ConsoleExecuter()
Destructor.
Console executer is listener interface for console activity.
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 guichan toplevel container and pushes an input Context so th...
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
gcn::Button * m_toolsbutton
void action(const gcn::ActionEvent &event)
Callback from guichan to respond to button press.
void clear()
Clear the console output.