25 #ifndef NCApplication_h
26 #define NCApplication_h
28 #include <yui/YApplication.h>
62 virtual void setLanguage(
const std::string & language,
63 const std::string & encoding = std::string() );
80 const std::string & headline );
99 const std::string & filter,
100 const std::string & headline );
121 const std::string & filter,
122 const std::string & headline );
152 const std::string & font,
153 const std::string & screen_map,
154 const std::string & unicode_map,
155 const std::string & language );
178 virtual void openUI()
override;
179 virtual void closeUI()
override;
186 virtual int displayWidth();
187 virtual int displayHeight();
188 virtual int displayDepth();
189 virtual long displayColors();
191 virtual int defaultWidth();
192 virtual int defaultHeight();
194 virtual bool isTextMode() {
return true; }
196 virtual bool hasImageSupport() {
return false; }
198 virtual bool hasIconSupport() {
return false; }
200 virtual bool hasAnimationSupport() {
return false; }
202 virtual bool hasFullUtf8Support();
203 virtual bool richTextSupportsTable() {
return false; }
205 virtual bool leftHandedMouse() {
return false; }
216 #endif // NCApplication_h
virtual void redrawScreen()
Redraw the screen.
virtual void openUI() override
To mix TUI (NCurses) with stdio, enclose the UI parts within openUI/closeUI.
virtual std::string askForExistingDirectory(const std::string &startDir, const std::string &headline)
Open a directory selection box and prompt the user for an existing directory.
virtual std::string askForSaveFileName(const std::string &startWith, const std::string &filter, const std::string &headline)
Open a file selection box and prompt the user for a file to save data to.
NCApplication()
Constructor.
virtual std::string askForExistingFile(const std::string &startWith, const std::string &filter, const std::string &headline)
Open a file selection box and prompt the user for an existing file.
virtual int runInTerminal(const std::string &command)
Run a shell command (typically an interactive program using NCurses) in a terminal (window).
virtual void initConsoleKeyboard()
Initialize the (text) console keyboard.
virtual ~NCApplication()
Destructor.
virtual void setConsoleFont(const std::string &console_magic, const std::string &font, const std::string &screen_map, const std::string &unicode_map, const std::string &language)
Set the (text) console font according to the current encoding etc.
virtual void setLanguage(const std::string &language, const std::string &encoding=std::string())
Set language and encoding for the locale environment ($LANG).
virtual void setApplicationTitle(const std::string &title)
Set the application title.