libyui-ncurses  2.47.6
 All Classes Functions Variables
NCApplication Class Reference
Inheritance diagram for NCApplication:
Collaboration diagram for NCApplication:

Public Member Functions

virtual void setLanguage (const std::string &language, const std::string &encoding=std::string())
 Set language and encoding for the locale environment ($LANG). More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void beep ()
 Beep. More...
 
virtual void redrawScreen ()
 Redraw the screen. More...
 
virtual void initConsoleKeyboard ()
 Initialize the (text) console keyboard. More...
 
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. More...
 
virtual int runInTerminal (const std::string &command)
 Run a shell command (typically an interactive program using NCurses) in a terminal (window). More...
 
virtual int displayWidth ()
 
virtual int displayHeight ()
 
virtual int displayDepth ()
 
virtual long displayColors ()
 
virtual int defaultWidth ()
 
virtual int defaultHeight ()
 
virtual bool isTextMode ()
 
virtual bool hasImageSupport ()
 
virtual bool hasIconSupport ()
 
virtual bool hasAnimationSupport ()
 
virtual bool hasFullUtf8Support ()
 
virtual bool richTextSupportsTable ()
 
virtual bool leftHandedMouse ()
 
virtual void setApplicationTitle (const std::string &title)
 Set the application title. More...
 
virtual void openUI () override
 To mix TUI (NCurses) with stdio, enclose the UI parts within openUI/closeUI. More...
 
virtual void closeUI () override
 

Protected Member Functions

 NCApplication ()
 Constructor. More...
 
virtual ~NCApplication ()
 Destructor.
 

Friends

class YNCursesUI
 

Detailed Description

Definition at line 31 of file NCApplication.h.

Constructor & Destructor Documentation

NCApplication::NCApplication ( )
protected

Constructor.

Use YUI::app() to get the singleton for this class.

Definition at line 37 of file NCApplication.cc.

Member Function Documentation

std::string NCApplication::askForExistingDirectory ( const std::string &  startDir,
const std::string &  headline 
)
virtual

Open a directory selection box and prompt the user for an existing directory.

'startDir' is the initial directory that is displayed.

'headline' is an explanatory text for the directory selection box. Graphical UIs may omit that if no window manager is running.

Returns the selected directory name or an empty std::string if the user canceled the operation.

Implemented from YApplication.

Definition at line 97 of file NCApplication.cc.

Here is the call graph for this function:

std::string NCApplication::askForExistingFile ( const std::string &  startWith,
const std::string &  filter,
const std::string &  headline 
)
virtual

Open a file selection box and prompt the user for an existing file.

'startWith' is the initial directory or file.

'filter' is one or more blank-separated file patterns, e.g. "*.png *.jpg"

'headline' is an explanatory text for the file selection box. Graphical UIs may omit that if no window manager is running.

Returns the selected file name or an empty std::string if the user canceled the operation.

Implemented from YApplication.

Definition at line 81 of file NCApplication.cc.

Here is the call graph for this function:

std::string NCApplication::askForSaveFileName ( const std::string &  startWith,
const std::string &  filter,
const std::string &  headline 
)
virtual

Open a file selection box and prompt the user for a file to save data to.

Automatically asks for confirmation if the user selects an existing file.

'startWith' is the initial directory or file.

'filter' is one or more blank-separated file patterns, e.g. "*.png *.jpg"

'headline' is an explanatory text for the file selection box. Graphical UIs may omit that if no window manager is running.

Returns the selected file name or an empty std::string if the user canceled the operation.

Implemented from YApplication.

Definition at line 65 of file NCApplication.cc.

Here is the call graph for this function:

void NCApplication::beep ( )
virtual

Beep.

Reimplemented from YApplication.

Definition at line 112 of file NCApplication.cc.

void NCApplication::initConsoleKeyboard ( )
virtual

Initialize the (text) console keyboard.

Reimplemented from YApplication.

Definition at line 125 of file NCApplication.cc.

void NCApplication::openUI ( )
overridevirtual

To mix TUI (NCurses) with stdio, enclose the UI parts within openUI/closeUI.

Reimplemented from YApplication.

Definition at line 185 of file NCApplication.cc.

Here is the call graph for this function:

void NCApplication::redrawScreen ( )
virtual

Redraw the screen.

Reimplemented from YApplication.

Definition at line 118 of file NCApplication.cc.

Here is the call graph for this function:

int NCApplication::runInTerminal ( const std::string &  command)
virtual

Run a shell command (typically an interactive program using NCurses) in a terminal (window).

Here in the NCurses UI, this shuts down the NCurses lib, runs the command and then restores the status of the NCurses lib so that the next instance of the NCurses lib from the started command doesn't interfere with the NCurses UI's instance.

Reimplemented from YApplication.

Definition at line 196 of file NCApplication.cc.

Here is the call graph for this function:

void NCApplication::setApplicationTitle ( const std::string &  title)
virtual

Set the application title.

Reimplemented from YApplication.

Definition at line 264 of file NCApplication.cc.

void NCApplication::setConsoleFont ( const std::string &  console_magic,
const std::string &  font,
const std::string &  screen_map,
const std::string &  unicode_map,
const std::string &  language 
)
virtual

Set the (text) console font according to the current encoding etc.

See the setfont(8) command and the console HowTo for details.

Reimplemented from YApplication.

Moving that code from YNCursesUI to this class turned out to be impossible (or at least a lot more work than it's worth) that I finally gave it up.

Definition at line 152 of file NCApplication.cc.

Here is the call graph for this function:

void NCApplication::setLanguage ( const std::string &  language,
const std::string &  encoding = std::string() 
)
virtual

Set language and encoding for the locale environment ($LANG).

'language' is the ISO short code ("de_DE", "en_US", ...).

'encoding' an (optional) encoding ("utf8", ...) that will be appended if present.

Reimplemented from YApplication.

Definition at line 49 of file NCApplication.cc.


The documentation for this class was generated from the following files: