25 #ifndef YApplication_h 31 #include "YMenuItem.h" 32 #include "YIconLoader.h" 137 const std::string & encoding = std::string() );
143 std::string
language(
bool stripEncoding =
false )
const;
166 virtual std::string
glyph(
const std::string & glyphSymbolName );
183 const std::string & headline ) = 0;
202 const std::string & filter,
203 const std::string & headline ) = 0;
224 const std::string & filter,
225 const std::string & headline ) = 0;
258 void setReleaseNotes(
const std::map<std::string,std::string> & relNotes );
289 virtual float layoutUnits( YUIDimension dim,
int deviceUnits );
353 const std::string & font,
354 const std::string & screen_map,
355 const std::string & unicode_map,
356 const std::string & language )
380 virtual void closeUI() {}
393 virtual int displayWidth() = 0;
394 virtual int displayHeight() = 0;
395 virtual int displayDepth() = 0;
396 virtual long displayColors() = 0;
399 virtual int defaultWidth() = 0;
400 virtual int defaultHeight() = 0;
406 virtual bool isTextMode() = 0;
407 virtual bool hasImageSupport() = 0;
408 virtual bool hasIconSupport() = 0;
409 virtual bool hasAnimationSupport() = 0;
410 virtual bool hasFullUtf8Support() = 0;
411 virtual bool richTextSupportsTable() = 0;
412 virtual bool leftHandedMouse() = 0;
413 virtual bool hasWizardDialogSupport() {
return false; }
446 #define YApplication_h 448 #endif // YApplication_h std::string productName() const
Get the current product name ("openSUSE", "SLES", ...).
bool showProductLogo() const
Return true if product logo should be shown.
virtual void setApplicationTitle(const std::string &title)
Set the application title.
virtual bool openContextMenu(const YItemCollection &itemCollection)
Open a context menu for a widget.
std::string language(bool stripEncoding=false) const
Return the current language from the locale environment ($LANG).
virtual std::string iconBasePath() const
Get the base path for icons used by the UI.
Abstract base class of a libYUI user interface.
virtual const std::string & applicationIcon() const
Get the application Icon.
virtual float layoutUnits(YUIDimension dim, int deviceUnits)
Convert device dependent units into logical layout spacing units.
YApplication()
Constructor.
int defaultFunctionKey(const std::string &label) const
Return the default function key number for a widget with the specified label or 0 if there is none...
std::vector< YItem * > YItemCollection
Collection of pointers to YItem.
void clearDefaultFunctionKeys()
Clear all previous label-to-function-key mappings.
virtual std::string askForExistingFile(const std::string &startWith, const std::string &filter, const std::string &headline)=0
Open a file selection box and prompt the user for an existing file.
virtual void openUI()
To mix TUI (NCurses) with stdio, enclose the UI parts within openUI/closeUI.
virtual void setIconBasePath(const std::string &newIconBasePath)
Set the icon base path.
virtual int deviceUnits(YUIDimension dim, float layoutUnits)
Convert logical layout spacing units into device dependent units.
virtual std::string askForSaveFileName(const std::string &startWith, const std::string &filter, const std::string &headline)=0
Open a file selection box and prompt the user for a file to save data to.
virtual ~YApplication()
Destructor.
void setShowProductLogo(bool show)
Set whether the product logo (in top bar) should be shown.
virtual std::string askForExistingDirectory(const std::string &startDir, const std::string &headline)=0
Open a directory selection box and prompt the user for an existing directory.
virtual const std::string & applicationTitle() const
Get the application title.
virtual int runInTerminal(const std::string &command)
Run a shell command (typically an interactive program using NCurses) in a terminal (window)...
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 initConsoleKeyboard()
Initialize the (text) console keyboard.
Class for application-wide values and functions.
virtual void busyCursor()
Change the (mouse) cursor to indicate busy status.
virtual void normalCursor()
Change the (mouse) cursor back from busy status to normal.
YWidget * findWidget(YWidgetID *id, bool doThrow=true) const
Find a widget in the topmost dialog by its ID.
void setDefaultFunctionKey(const std::string &label, int fkey)
Add a mapping from the specified label to the specified F-key number.
bool reverseLayout() const
Returns 'true' if widget geometry should be reversed for languages that have right-to-left writing di...
virtual std::string glyph(const std::string &glyphSymbolName)
Return a string for a named glyph:
std::map< std::string, std::string > releaseNotes() const
Get the current release notes map.
virtual void setApplicationIcon(const std::string &icon)
Set the application Icon.
virtual void makeScreenShot(const std::string &fileName)
Make a screen shot and save it to the specified file.
virtual void setProductName(const std::string &productName)
Set the current product name ("openSUSE", "SLES", ...).
virtual void setReverseLayout(bool reverse)
Set reverse layout for Arabic / Hebrew support.
virtual void setLanguage(const std::string &language, const std::string &encoding=std::string())
Set language and encoding for the locale environment ($LANG).
void setReleaseNotes(const std::map< std::string, std::string > &relNotes)
Set release notes; map product => text.
virtual void redrawScreen()
Redraw the screen.