Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (37 sloc) 1.145 kB
// Copyright © 2008-2012 Pioneer Developers. See AUTHORS.txt for details
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
#ifndef _LUACONSOLE_H
#define _LUACONSOLE_H
#include "LuaManager.h"
#include "gui/GuiBox.h"
#include <deque>
namespace Gui {
class Label;
class TextEntry;
}
class TextureFont;
class LuaConsole : public Gui::VBox {
public:
explicit LuaConsole(int displayedOutputLines);
virtual ~LuaConsole();
bool IsActive() const;
Gui::TextEntry *GetTextEntryField() const { return m_entryField; }
void AddOutput(const std::string &line);
static void Register();
private:
bool OnFilterKeys(const SDL_keysym*);
void OnKeyPressed(const SDL_keysym*);
void UpdateCompletion(const std::string & statement);
void ExecOrContinue();
std::deque<std::string> m_statementHistory;
std::string m_stashedStatement;
int m_historyPosition;
Gui::TextEntry *m_entryField;
std::vector<Gui::Label*> m_outputLines;
int m_nextOutputLine;
const int m_maxOutputLines;
std::string m_precompletionStatement;
std::vector<std::string> m_completionList;
unsigned int m_currentCompletion;
};
#endif /* _LUACONSOLE_H */
Jump to Line
Something went wrong with that request. Please try again.