Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

YNCursesUI Class Reference

YaST2 Component: NCursesUI user interface The YaST2 Component realizes a NCursesUI based user interface with an embedded YCP interpreter. More...

#include <YNCursesUI.h>

Inheritance diagram for YNCursesUI:

NCurses YUI List of all members.

Public Member Functions

 YNCursesUI (int argc, char **argv, bool with_threads, const char *macro_file)
 ~YNCursesUI ()
virtual void idleLoop (int fd_ycp)
virtual YEvent * userInput (unsigned long timeout_millisec)
virtual YEvent * pollInput ()
virtual YDialog * createDialog (YWidgetOpt &opt)
virtual void showDialog (YDialog *dialog)
virtual void closeDialog (YDialog *dialog)
virtual YContainerWidget * createSplit (YWidget *parent, YWidgetOpt &opt, YUIDimension dimension)
virtual YContainerWidget * createReplacePoint (YWidget *parent, YWidgetOpt &opt)
virtual YContainerWidget * createAlignment (YWidget *parent, YWidgetOpt &opt, YAlignmentType halign, YAlignmentType valign)
virtual YContainerWidget * createSquash (YWidget *parent, YWidgetOpt &opt, bool hsquash, bool vsquash)
virtual YContainerWidget * createRadioButtonGroup (YWidget *parent, YWidgetOpt &opt)
virtual YContainerWidget * createFrame (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createEmpty (YWidget *parent, YWidgetOpt &opt)
virtual YWidget * createSpacing (YWidget *parent, YWidgetOpt &opt, float size, bool horizontal, bool vertical)
virtual YWidget * createLabel (YWidget *parent, YWidgetOpt &opt, const YCPString &text)
virtual YWidget * createRichText (YWidget *parent, YWidgetOpt &opt, const YCPString &text)
virtual YWidget * createLogView (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int visibleLines, int maxLines)
virtual YWidget * createMultiLineEdit (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text)
virtual YWidget * createPushButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createMenuButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createRadioButton (YWidget *parent, YWidgetOpt &opt, YRadioButtonGroup *rbg, const YCPString &label, bool checked)
virtual YWidget * createCheckBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label, bool checked)
virtual YWidget * createTextEntry (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text)
virtual YWidget * createSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createMultiSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createComboBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createTree (YWidget *parent, YWidgetOpt &opt, const YCPString &label)
virtual YWidget * createTable (YWidget *parent, YWidgetOpt &opt, vector< string > header)
virtual YWidget * createProgressBar (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPInteger &maxprogress, const YCPInteger &progress)
virtual YWidget * createImage (YWidget *parent, YWidgetOpt &opt, YCPByteblock imagedata, YCPString defaulttext)
virtual YWidget * createImage (YWidget *parent, YWidgetOpt &opt, YCPString filename, YCPString defaulttext)
virtual YWidget * createIntField (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int minValue, int maxValue, int initialValue)
virtual YWidget * createPackageSelector (YWidget *parent, YWidgetOpt &opt, const YCPString &floppyDevice)
virtual YCPValue runPkgSelection (YWidget *packageSelector)
virtual YWidget * createPkgSpecial (YWidget *parent, YWidgetOpt &opt, const YCPString &subwidget)
virtual YCPValue setLanguage (const YCPTerm &term)
virtual YCPValue setConsoleFont (const YCPString &console_magic, const YCPString &font, const YCPString &screen_map, const YCPString &unicode_map, const YCPString &encoding)
virtual YCPValue setKeyboard ()
virtual YCPValue askForExistingDirectory (const YCPString &startDir, const YCPString &headline)
virtual YCPValue askForExistingFile (const YCPString &startWith, const YCPString &filter, const YCPString &headline)
virtual YCPValue askForSaveFileName (const YCPString &startWith, const YCPString &filter, const YCPString &headline)
virtual void redrawScreen ()
virtual int getDisplayWidth ()
virtual int getDisplayHeight ()
virtual int getDisplayDepth ()
virtual long getDisplayColors ()
virtual int getDefaultWidth ()
virtual int getDefaultHeight ()
virtual bool textMode ()
virtual bool hasImageSupport ()
virtual bool hasIconSupport ()
virtual bool hasFullUtf8Support ()

Static Public Member Functions

static YNCursesUI * ui ()

Protected Member Functions

virtual bool want_colors ()
virtual void init_title ()

Static Protected Attributes

static YNCursesUI * _ui = 0

Private Member Functions

bool setLanguage (string lang)

Detailed Description

YaST2 Component: NCursesUI user interface The YaST2 Component realizes a NCursesUI based user interface with an embedded YCP interpreter.


Constructor & Destructor Documentation

YNCursesUI::YNCursesUI (  int  argc,
char **  argv,
bool  with_threads,
const char *  macro_file
) 
 

Initialize data.

YNCursesUI::~YNCursesUI (   ) 
 

Cleans up.


Member Function Documentation

YCPValue YNCursesUI::askForExistingDirectory (  const YCPString &  startDir,
const YCPString &  headline
)  [virtual]
 

Open a directory selection box and prompt the user for an existing directory. [Inherited from YUIInterpreter]

'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 'nil' (YCPVoid()) if the user canceled the operation.

Implements YUI.

YCPValue YNCursesUI::askForExistingFile (  const YCPString &  startWith,
const YCPString &  filter,
const YCPString &  headline
)  [virtual]
 

Open a file selection box and prompt the user for an existing file. [Inherited from YUIInterpreter]

'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 'nil' (YCPVoid()) if the user canceled the operation.

Implements YUI.

YCPValue YNCursesUI::askForSaveFileName (  const YCPString &  startWith,
const YCPString &  filter,
const YCPString &  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. [Inherited from YUIInterpreter]

'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 'nil' (YCPVoid()) if the user canceled the operation.

Implements YUI.

void YNCursesUI::closeDialog (  YDialog *  dialog  )  [virtual]
 

Inherited from YUIInterpreter. Decativates and closes a dialog

Reimplemented from YUI.

YContainerWidget * YNCursesUI::createAlignment (  YWidget *  parent,
YWidgetOpt &  opt,
YAlignmentType  halign,
YAlignmentType  valign
)  [virtual]
 

Creates an alignment widget

Implements YUI.

YWidget * YNCursesUI::createCheckBox (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
bool  checked
)  [virtual]
 

Creates a check box

Parameters:
label Label of the checkbox
true if it is checked

Implements YUI.

YWidget * YNCursesUI::createComboBox (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a combo box

Implements YUI.

YDialog * YNCursesUI::createDialog (  YWidgetOpt &  opt  )  [virtual]
 

Inherited from YUIInterpreter. Creates a dialog.

Implements YUI.

YWidget * YNCursesUI::createEmpty (  YWidget *  parent,
YWidgetOpt &  opt
)  [virtual]
 

Creates an empty widget

Implements YUI.

YContainerWidget * YNCursesUI::createFrame (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a frame widget

Implements YUI.

YWidget * YNCursesUI::createImage (  YWidget *  parent,
YWidgetOpt &  opt,
YCPString  filename,
YCPString  defaulttext
)  [virtual]
 

Creates an image widget from a YCP byteblock

Implements YUI.

YWidget * YNCursesUI::createImage (  YWidget *  parent,
YWidgetOpt &  opt,
YCPByteblock  imagedata,
YCPString  defaulttext
)  [virtual]
 

Creates an image widget from a YCP byteblock

Implements YUI.

YWidget * YNCursesUI::createIntField (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
int  minValue,
int  maxValue,
int  initialValue
)  [virtual]
 

Creates an IntField widget.

Implements YUI.

YWidget * YNCursesUI::createLabel (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  text
)  [virtual]
 

Creates a label.

Parameters:
text Initial text of the label
heading true if the label is a Heading()
output_field true if the label should look like an output field (3D look)

Implements YUI.

YWidget * YNCursesUI::createLogView (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
int  visibleLines,
int  maxLines
)  [virtual]
 

Creates a log view widget

Parameters:
label label above the log view
visibleLines default number of vislible lines
maxLines number of lines to store (use 0 for "all")

Implements YUI.

YWidget * YNCursesUI::createMenuButton (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a menu button.

Parameters:
label Label of the button

Implements YUI.

YWidget * YNCursesUI::createMultiLineEdit (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
const YCPString &  text
)  [virtual]
 

Creates a MultiLineEdit widget

Parameters:
label label above the edit field
text initial contents of the edit field

Implements YUI.

YWidget * YNCursesUI::createMultiSelectionBox (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a multi selection box

Implements YUI.

YWidget * YNCursesUI::createPackageSelector (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  floppyDevice
)  [virtual]
 

Creates the PackageSelector widget (i.e. a widget tree).

Implements YUI.

YWidget * YNCursesUI::createPkgSpecial (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  subwidget
)  [virtual]
 

Creates a special subwidget used for Package Selection (which doesn't exist in QT-UI).

Implements YUI.

YWidget * YNCursesUI::createProgressBar (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
const YCPInteger &  maxprogress,
const YCPInteger &  progress
)  [virtual]
 

Creates a progress bar

Implements YUI.

YWidget * YNCursesUI::createPushButton (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a push button.

Parameters:
label Label of the button
default_button true if the button should be the dialogs default button

Implements YUI.

YWidget * YNCursesUI::createRadioButton (  YWidget *  parent,
YWidgetOpt &  opt,
YRadioButtonGroup *  rbg,
const YCPString &  label,
bool  checked
)  [virtual]
 

Creates a radio button and inserts it into a radio button group

Parameters:
label Label of the radio button
rbg the radio button group the new button will belong to

Implements YUI.

YContainerWidget * YNCursesUI::createRadioButtonGroup (  YWidget *  parent,
YWidgetOpt &  opt
)  [virtual]
 

Creates a radio button group.

Implements YUI.

YContainerWidget * YNCursesUI::createReplacePoint (  YWidget *  parent,
YWidgetOpt &  opt
)  [virtual]
 

Creates a replace point.

Implements YUI.

YWidget * YNCursesUI::createRichText (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  text
)  [virtual]
 

Creates a rich text widget

Parameters:
text Initial text of the label

Implements YUI.

YWidget * YNCursesUI::createSelectionBox (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a selection box

Implements YUI.

YWidget * YNCursesUI::createSpacing (  YWidget *  parent,
YWidgetOpt &  opt,
float  size,
bool  horizontal,
bool  vertical
)  [virtual]
 

Creates a spacing widget

Implements YUI.

YContainerWidget * YNCursesUI::createSplit (  YWidget *  parent,
YWidgetOpt &  opt,
YUIDimension  dimension
)  [virtual]
 

Creates a split

Implements YUI.

YContainerWidget * YNCursesUI::createSquash (  YWidget *  parent,
YWidgetOpt &  opt,
bool  hsquash,
bool  vsquash
)  [virtual]
 

Creates a squash widget

Implements YUI.

YWidget * YNCursesUI::createTable (  YWidget *  parent,
YWidgetOpt &  opt,
vector< string >  header
)  [virtual]
 

Creates a table widget

Implements YUI.

YWidget * YNCursesUI::createTextEntry (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label,
const YCPString &  text
)  [virtual]
 

Creates a text entry or password entry field.

Implements YUI.

YWidget * YNCursesUI::createTree (  YWidget *  parent,
YWidgetOpt &  opt,
const YCPString &  label
)  [virtual]
 

Creates a tree

Implements YUI.

virtual int YNCursesUI::getDefaultHeight (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual int YNCursesUI::getDefaultWidth (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual long YNCursesUI::getDisplayColors (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual int YNCursesUI::getDisplayDepth (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual int YNCursesUI::getDisplayHeight (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual int YNCursesUI::getDisplayWidth (   )  [inline, virtual]
 

UI-specific getDisplayInfo() functions. See UI builtin GetDisplayInfo() doc for details.

Reimplemented from YUI.

bool YNCursesUI::hasFullUtf8Support (   )  [virtual]
 

Reimplemented from YUI.

virtual bool YNCursesUI::hasIconSupport (   )  [inline, virtual]
 

Reimplemented from YUI.

virtual bool YNCursesUI::hasImageSupport (   )  [inline, virtual]
 

Reimplemented from YUI.

void YNCursesUI::idleLoop (  int  fd_ycp  )  [virtual]
 

Idle around until fd_ycp is readable

Reimplemented from YUI.

void YNCursesUI::init_title (   )  [protected, virtual]
 

Reimplemented from NCurses.

YEvent * YNCursesUI::pollInput (   )  [virtual]
 

Check the event queue for user input. Don't wait.

Reimplemented from YUIInterpreter.

Implements YUI.

virtual void YNCursesUI::redrawScreen (   )  [inline, virtual]
 

UI-specific redrawScreen method. This default implementation does nothing.

Reimplemented from YUI.

YCPValue YNCursesUI::runPkgSelection (  YWidget *  packageSelector  )  [virtual]
 

Fills the PackageSelector widget.

Reimplemented from YUI.

YCPValue YNCursesUI::setConsoleFont (  const YCPString &  console_magic,
const YCPString &  font,
const YCPString &  screen_map,
const YCPString &  unicode_map,
const YCPString &  encoding
)  [virtual]
 

UI-specific setConsoleFont() function. Returns YCPVoid() if OK and YCPNull() on error.

Reimplemented from YUI.

YCPValue YNCursesUI::setKeyboard (   )  [virtual]
 

Reimplemented from YUI.

bool YNCursesUI::setLanguage (  string  lang  )  [private]
 

YCPValue YNCursesUI::setLanguage (  const YCPTerm &  term  )  [virtual]
 

UI-specific setLanguage() function. Returns YCPVoid() if OK and YCPNull() on error. This default implementation does nothing.

Reimplemented from YUI.

void YNCursesUI::showDialog (  YDialog *  dialog  )  [virtual]
 

Inherited from YUIInterpreter. Shows and activates a dialog

Reimplemented from YUI.

virtual bool YNCursesUI::textMode (   )  [inline, virtual]
 

Reimplemented from YUI.

static YNCursesUI* YNCursesUI::ui (   )  [inline, static]
 

Access the global Y2NCursesUI.

Reimplemented from YUI.

YEvent * YNCursesUI::userInput (  unsigned long  timeout_millisec  )  [virtual]
 

Go into event loop until user input is available or until the specified timeout (in milliseconds) has elapsed.

Reimplemented from YUIInterpreter.

Implements YUI.

bool YNCursesUI::want_colors (   )  [protected, virtual]
 

Reimplemented from NCurses.


Member Data Documentation

YNCursesUI * YNCursesUI::_ui = 0 [static, protected]
 

Global reference to the UI


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 10:52:56 2005 for yast2-ncurses by  doxygen 1.4.4