#include <YUI.h>
Public Member Functions | |
virtual | ~YUI () |
YDialog * | currentDialog () const |
virtual void | blockEvents (bool block=true) |
void | unblockEvents () |
virtual bool | eventsBlocked () const |
void | topmostConstructorHasFinished () |
virtual void | internalError (const char *msg) |
int | parseMenuItemList (const YCPList &itemList, YMenuButton *menu_button, YMenu *parentMenu=0) |
bool | parseRgb (const YCPValue &val, YColor *color, bool complain) |
YWidget * | createWidgetTree (YWidget *parent, YWidgetOpt &opt, YRadioButtonGroup *rbg, const YCPTerm &term) |
YWidget * | createWidgetTree (YWidget *parent, YRadioButtonGroup *rbg, const YCPTerm &term) |
YWidget * | widgetWithId (const YCPValue &id, bool log_error=false) |
YWidget * | widgetWithId (YContainerWidget *widgetRoot, const YCPValue &id, bool log_error=false) |
int | defaultFunctionKey (YCPString label) |
string | productName () const |
virtual long | deviceUnits (YUIDimension dim, float layout_units) |
virtual float | layoutUnits (YUIDimension dim, long device_units) |
YCPValue | callBuiltin (void *function, int argc, YCPValue argv[]) |
void | setCallback (Y2Component *callback) |
Y2Component * | getCallback () const |
YCPValue | evaluateAskForExistingDirectory (const YCPString &startDir, const YCPString &headline) |
Opens a directory selection box and prompt the user for an existing directory. Opens a directory selection box and prompt the user for an existing directory. | |
YCPValue | evaluateAskForExistingFile (const YCPString &startDir, const YCPString &filter, const YCPString &headline) |
Opens a file selection box and prompt the user for an existing file. Opens a file selection box and prompt the user for an existing file. | |
YCPValue | evaluateAskForSaveFileName (const YCPString &startDir, const YCPString &filter, const YCPString &headline) |
Opens a file selection box and prompt the user for a file to save data to. Opens 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. | |
void | evaluateBusyCursor () |
Sets the mouse cursor to the busy cursor Sets the mouse cursor to the busy cursor, if the UI supports such a feature. | |
YCPValue | evaluateChangeWidget (const YCPValue &value_id, const YCPValue &property, const YCPValue &new_value) |
Changes widget contents Changes a property of a widget of the topmost dialog. id specified the widget to change, property specifies the property that should be changed, newvalue gives the new value. | |
void | evaluateCheckShortcuts () |
Performs an explicit shortcut check after postponing shortcut checks. Performs an explicit shortcut check after postponing shortcut checks. Use this after calling PostponeShortcutCheck() . | |
YCPValue | evaluateCollectUserInput () |
Collects the content of all input widgets in a dialog or in a container This function returns a list of maps describing the content of all input widgets in the current dialog (or in the widget with the specified ID, if any is given), such as TextEntry, ComboBox, SelectionBox, ... widgets (but not Labels, RichText, etc., that don't accept user input). | |
YCPValue | evaluateCollectUserInput (const YCPTerm &widgetId) |
YCPValue | evaluateCloseDialog () |
Closes an open dialog Closes the most recently opened dialog. It is an error to call CloseDialog if no dialog is open. | |
void | evaluateDumpWidgetTree () |
Debugging function Debugging function: Dumps the widget tree of the current dialog to the log file. | |
void | evaluateFakeUserInput (const YCPValue &next_input) |
Fakes User Input Prepares a fake value for the next call to UserInput() - i.e. the next UserInput() will return exactly this value. This is only useful in connection with macros. | |
YCPMap | evaluateGetDisplayInfo () |
Gets Display Info Gets information about the current display and the UI's capabilities. | |
YCPString | evaluateGetLanguage (const YCPBoolean &strip_encoding) |
Gets Language Retrieves the current language setting from of the user interface. Since YaST2 is a client server architecture, we distinguish between the language setting of the user interface and that of the configuration modules. If the module or the translator wants to know which language the user currently uses, it can call GetLanguage . The return value is an ISO language code, such as "de" or "de_DE". | |
YCPValue | evaluateGetModulename (const YCPTerm &term) |
Gets the name of a Module This is tricky. The UI doesn't care about the current module name, only the translator does. However, since the translator acts as a filter between a client and the UI, it cant directly return the module name. The current implementation inserts the modules name in the translator and it arrives here as the term argument. So the example has no arguments, but the internal code checks for a string argument. | |
YCPString | evaluateGetProductName () |
Gets Product Name Returns the current product name ("SuSE Linux", "United Linux", etc.) for display in dialogs. This can be set with SetProductName(). | |
YCPString | evaluateGlyph (const YCPSymbol &symbol) |
Returns a special character ( a 'glyph' ) Returns a special character ( a 'glyph' ) according to the symbol specified. | |
YCPValue | evaluateHasSpecialWidget (const YCPSymbol &widget) |
Checks for support of a special widget type. Checks for support of a special widget type. Use this prior to creating a widget of this kind. Do not use this to check for ordinary widgets like PushButton etc. - just the widgets where the widget documentation explicitly states it is an optional widget not supported by all UIs. | |
void | evaluateMakeScreenShot (const YCPString &filename) |
Makes Screen Shot Makes a screen shot if the specific UI supports that. The Qt UI opens a file selection box if filename is empty. | |
void | evaluateNormalCursor () |
Sets the mouse cursor to the normal cursor Sets the mouse cursor to the normal cursor ( after BusyCursor ), if the UI supports such a feature. | |
YCPBoolean | evaluateOpenDialog (const YCPTerm &term, const YCPTerm &term=YCPNull()) |
Opens a new dialog. Opens a new dialog. widget is a term representation of the widget being displayed.Opens a Dialog with options Same as the OpenDialog with one argument, but you can specify options with a term of the form `opt . | |
void | evaluatePlayMacro (const YCPString &filename) |
Plays a recorded macro Executes everything in macro file "macroFileName". Any errors are sent to the log file only. The macro can be terminated only from within the macro file. | |
void | evaluatePostponeShortcutCheck () |
Postpones Shortcut Check Postpone keyboard shortcut checking during multiple changes to a dialog. | |
YCPValue | evaluateQueryWidget (const YCPValue &value_id, const YCPValue &property) |
Queries Widget contents Queries a property of a widget of the topmost dialog. For example in order to query the current text of a TextEntry with id `name, you write QueryWidget( `id(`name), `Value ) . In some cases the propery can be given as term in order to further specify it. An example is QueryWidget( `id( `table ), `Item( 17 ) ) for a table where you query a certain item. | |
void | evaluateRecalcLayout () |
Recalculates Layout Recompute the layout of the current dialog. | |
YCPValue | evaluateRecode (const YCPString &from, const YCPString &to, const YCPString &text) |
Recodes encoding of string from or to "UTF-8" encoding. Recodes encoding of string from or to "UTF-8" encoding. One of from/to must be "UTF-8", the other should be an iso encoding specifier (i.e. "ISO-8859-1" for western languages, "ISO-8859-2" for eastern languages, etc. ). | |
void | evaluateRecordMacro (const YCPString &filename) |
Records Macro into a file Begins recording a macro. Write the macro contents to file "macroFilename". | |
void | evaluateRedrawScreen () |
Redraws the screen Redraws the screen after it very likely has become garbled by some other output. | |
YCPBoolean | evaluateReplaceWidget (const YCPValue &value_id, const YCPTerm &term) |
YCPValue | evaluateRunPkgSelection (const YCPValue &value_id) |
Initializes and run the PackageSelector widget Not to be used outside the package selection. | |
void | evaluateSetConsoleFont (const YCPString &magic, const YCPString &font, const YCPString &screen_map, const YCPString &unicode_map, const YCPString &encoding) |
Sets Console Font Switches the text console to the specified font. See the setfont(8) command and the console HowTo for details. | |
void | evaluateSetKeyboard () |
Sets Keyboard. | |
YCPBoolean | evaluateSetFocus (const YCPValue &value_id) |
Sets Focus to the specified widget Sets the keyboard focus to the specified widget. Notice that not all widgets can accept the keyboard focus; this is limited to interactive widgets like PushButtton, TextEntry, SelectionBox etc. - manager widgets like VBox, HBox etc. will not accept the keyboard focus. They will not propagate the keyboard focus to some child widget that accepts the focus. Instead, an error message will be emitted into the log file. | |
void | evaluateSetFunctionKeys (const YCPMap &new_keys) |
Sets the (default) function keys for a number of buttons. This function receives a map with button labels and the respective function key number that should be used if on other `opt( `key_F.. ) is specified. | |
void | evaluateSetLanguage (const YCPString &lang, const YCPString &encoding=YCPNull()) |
Sets the language of the UI Tells the UI that the user has selected another language. If the UI has any language dependend output that language setting is honored. lang is an ISO language string, such as de or de_DE . It is required to specify an encoding scheme, since not all user interfaces are capable of UTF-8. | |
void | evaluateSetModulename (const YCPString &name) |
Sets Module Name Does nothing. The SetModulename command is introduced for the translator. But the translator sends all commands to the ui. So the ui shouldn't complain about this command. | |
void | evaluateSetProductName (const YCPString &name) |
Sets Product Name Sets the current product name ("SuSE Linux", "United Linux", etc.) for displaying in dialogs and in RichText widgets (for help text) with the RichText &product; macro. | |
void | evaluateStopRecordMacro () |
Stops recording macro Stops macro recording. This is only necessary if you don't wish to record everything until the program terminates. | |
YCPBoolean | evaluateWidgetExists (const YCPValue &value_id) |
Checks whether or not a widget with the given ID currently exists Checks whether or not a widget with the given ID currently exists in the current dialog. Use this to avoid errors in the log file before changing the properties of widgets that might or might not be there. | |
YCPValue | evaluateUserInput () |
User Input Waits for the user to click some button, close the window or activate some widget that has the `notify option set. The return value is the id of the widget that has been selected or `cancel if the user selected the implicit cancel button (for example he closes the window). | |
YCPValue | evaluateTimeoutUserInput (const YCPInteger &timeout) |
User Input with Timeout Waits for the user to click some button, close the window or activate some widget that has the `notify option set or until the specified timeout is expired. The return value is the id of the widget that has been selected or `cancel if the user selected the implicit cancel button (for example he closes the window). Upon timeout, `timeout is returned. | |
YCPValue | evaluateWaitForEvent (const YCPInteger &timeout=YCPNull()) |
Waits for Event Extended event handling - very much like UserInput(), but returns much more detailed information about the event that occured in a map. | |
YCPValue | evaluateWizardCommand (const YCPTerm &command) |
Runs a wizard command Issues a command to a wizard widget with ID 'wizardId'. < This builtin is not for general use. Use the Wizard.ycp module instead.. | |
YCPValue | evaluatePollInput () |
Poll Input Doesn't wait but just looks if the user has clicked some button, has closed the window or has activated some widget that has the `notify option set. Returns the id of the widget that has been selected or `cancel if the user selected the implicite cancel button ( for example he closes the window). Returns nil if no user input has occured. | |
void | uiThreadMainLoop () |
Static Public Member Functions | |
static YUI * | ui () |
static int | Recode (const string &str, const string &from, const string &to, string &outstr) |
static bool | reverseLayout () |
static void | setReverseLayout (bool rev) |
static YCPValue | callFunction (void *function, int argc, YCPValue argv[]) |
static bool | checkId (const YCPValue &val, bool complain=true) |
static YCPValue | getId (const YCPValue &v) |
Protected Types | |
typedef vector< YDialog * > | dialogstack_type |
Protected Member Functions | |
YUI (bool with_threads) | |
const char * | moduleName () |
virtual void | idleLoop (int fd_ycp) |
virtual YEvent * | userInput (unsigned long timeout_millisec=0)=0 |
virtual YEvent * | pollInput ()=0 |
virtual void | showDialog (YDialog *dialog) |
virtual void | closeDialog (YDialog *dialog) |
virtual YCPString | glyph (const YCPSymbol &glyphSymbol) |
virtual YDialog * | createDialog (YWidgetOpt &opt)=0 |
virtual YContainerWidget * | createSplit (YWidget *parent, YWidgetOpt &opt, YUIDimension dimension)=0 |
virtual YContainerWidget * | createReplacePoint (YWidget *parent, YWidgetOpt &opt)=0 |
virtual YContainerWidget * | createAlignment (YWidget *parent, YWidgetOpt &opt, YAlignmentType halign, YAlignmentType valign)=0 |
virtual YContainerWidget * | createSquash (YWidget *parent, YWidgetOpt &opt, bool hsquash, bool vsquash)=0 |
virtual YContainerWidget * | createRadioButtonGroup (YWidget *parent, YWidgetOpt &opt)=0 |
virtual YContainerWidget * | createFrame (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createEmpty (YWidget *parent, YWidgetOpt &opt)=0 |
virtual YWidget * | createSpacing (YWidget *parent, YWidgetOpt &opt, float size, bool horizontal, bool vertical)=0 |
virtual YWidget * | createLabel (YWidget *parent, YWidgetOpt &opt, const YCPString &text)=0 |
virtual YWidget * | createRichText (YWidget *parent, YWidgetOpt &opt, const YCPString &text)=0 |
virtual YWidget * | createLogView (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int visibleLines, int maxLines)=0 |
virtual YWidget * | createPushButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createMenuButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createRadioButton (YWidget *parent, YWidgetOpt &opt, YRadioButtonGroup *rbg, const YCPString &label, bool checked)=0 |
virtual YWidget * | createCheckBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label, bool checked)=0 |
virtual YWidget * | createTextEntry (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text)=0 |
virtual YWidget * | createMultiLineEdit (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text)=0 |
virtual YWidget * | createSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createMultiSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createComboBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createTree (YWidget *parent, YWidgetOpt &opt, const YCPString &label)=0 |
virtual YWidget * | createTable (YWidget *parent, YWidgetOpt &opt, vector< string > header)=0 |
virtual YWidget * | createProgressBar (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPInteger &maxprogress, const YCPInteger &progress)=0 |
virtual YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, YCPByteblock imagedata, YCPString defaulttext)=0 |
virtual YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, YCPString file_name, YCPString defaulttext)=0 |
virtual YWidget * | createIntField (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int minValue, int maxValue, int initialValue)=0 |
virtual YWidget * | createPackageSelector (YWidget *parent, YWidgetOpt &opt, const YCPString &floppyDevice)=0 |
virtual YWidget * | createPkgSpecial (YWidget *parent, YWidgetOpt &opt, const YCPString &subwidget)=0 |
virtual YWidget * | createDummySpecialWidget (YWidget *parent, YWidgetOpt &opt) |
virtual bool | hasDummySpecialWidget () |
virtual YWidget * | createDownloadProgress (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &filename, int expectedSize) |
virtual bool | hasDownloadProgress () |
virtual YWidget * | createBarGraph (YWidget *parent, YWidgetOpt &opt) |
virtual bool | hasBarGraph () |
virtual YWidget * | createColoredLabel (YWidget *parent, YWidgetOpt &opt, YCPString label, YColor foreground, YColor background, int margin) |
virtual bool | hasColoredLabel () |
virtual YWidget * | createDate (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &date) |
virtual bool | hasDate () |
virtual YWidget * | createTime (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &time) |
virtual bool | hasTime () |
virtual YWidget * | createDumbTab (YWidget *parent, YWidgetOpt &opt) |
virtual bool | hasDumbTab () |
virtual YWidget * | createMultiProgressMeter (YWidget *parent, YWidgetOpt &opt, bool horizontal, const YCPList &maxValues) |
virtual bool | hasMultiProgressMeter () |
virtual YWidget * | createSlider (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int minValue, int maxValue, int initialValue) |
virtual bool | hasSlider () |
virtual YWidget * | createPartitionSplitter (YWidget *parent, YWidgetOpt &opt, int usedSize, int totalFreeSize, int newPartSize, int minNewPartSize, int minFreeSize, const YCPString &usedLabel, const YCPString &freeLabel, const YCPString &newPartLabel, const YCPString &freeFieldLabel, const YCPString &newPartFieldLabel) |
virtual bool | hasPartitionSplitter () |
virtual YWidget * | createPatternSelector (YWidget *parent, YWidgetOpt &opt) |
virtual bool | hasPatternSelector () |
virtual YWidget * | createWizard (YWidget *parent, YWidgetOpt &opt, const YCPValue &backButtonId, const YCPString &backButtonLabel, const YCPValue &abortButtonId, const YCPString &abortButtonLabel, const YCPValue &nextButtonId, const YCPString &nextButtonLabel) |
virtual bool | hasWizard () |
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 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 | hasLocalImageSupport () |
virtual bool | hasAnimationSupport () |
virtual bool | hasIconSupport () |
virtual bool | hasFullUtf8Support () |
virtual bool | richTextSupportsTable () |
virtual bool | leftHandedMouse () |
virtual void | busyCursor () |
virtual void | normalCursor () |
virtual void | redrawScreen () |
virtual void | makeScreenShot (string filename) |
virtual YCPValue | runPkgSelection (YWidget *packageSelector) |
virtual YCPValue | askForExistingDirectory (const YCPString &startDir, const YCPString &headline)=0 |
virtual YCPValue | askForExistingFile (const YCPString &startWith, const YCPString &filter, const YCPString &headline)=0 |
virtual YCPValue | askForSaveFileName (const YCPString &startWith, const YCPString &filter, const YCPString &headline)=0 |
YCPValue | callback (const YCPValue &value) |
YCPValue | evaluateLocale (const YCPLocale &) |
void | recordMacro (string filename) |
void | stopRecordMacro () |
void | playMacro (string filename) |
bool | recordingMacro () |
bool | playingMacro () |
void | terminateUIThread () |
void | createUIThread () |
void | signalUIThread () |
bool | waitForUIThread () |
void | signalYCPThread () |
bool | waitForYCPThread () |
YEvent * | filterInvalidEvents (YEvent *event) |
YCPValue | doUserInput (const char *builtin_name, long timeout_millisec, bool wait, bool detailed) |
YCPValue | evaluateCallback (const YCPTerm &term, bool to_wfm) |
callback This is used for a callback mechanism. The expression will be sent to the WFM interpreter and evaluated there. USE WITH CAUTION. | |
YRadioButtonGroup * | findRadioButtonGroup (YContainerWidget *root, YWidget *w, bool *contains) |
YWidget * | createReplacePoint (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createEmpty (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool hstretchable, bool vstretchable) |
YWidget * | createSpacing (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool horizontal, bool vertical) |
YWidget * | createFrame (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createWeight (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg, YUIDimension dim) |
YWidget * | createAlignment (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg, YAlignmentType halign, YAlignmentType valign) |
YWidget * | createMarginBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createMinSize (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg, bool hor, bool vert) |
YWidget * | createSquash (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg, bool hsquash, bool vsquash) |
YWidget * | createLBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg, YUIDimension dim) |
YWidget * | createLabel (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool heading) |
YWidget * | createDate (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createTime (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createRichText (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createLogView (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createPushButton (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool isIconButton) |
YWidget * | createMenuButton (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createCheckBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createRadioButton (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createRadioButtonGroup (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createTextEntry (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool password) |
YWidget * | createMultiLineEdit (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createMultiSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createComboBox (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createTree (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createTable (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createProgressBar (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createIntField (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createPackageSelector (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createPkgSpecial (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createWizard (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createDummySpecialWidget (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createDownloadProgress (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createBarGraph (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createColoredLabel (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createDumbTab (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, YRadioButtonGroup *rbg) |
YWidget * | createMultiProgressMeter (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr, bool horizontal) |
YWidget * | createSlider (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createPartitionSplitter (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YWidget * | createPatternSelector (YWidget *parent, YWidgetOpt &opt, const YCPTerm &term, const YCPList &optList, int argnr) |
YCPValue | getWidgetId (const YCPTerm &term, int *argnr) |
YCPList | getWidgetOptions (const YCPTerm &term, int *argnr) |
void | logUnknownOption (const YCPTerm &term, const YCPValue &option) |
void | rejectAllOptions (const YCPTerm &term, const YCPList &optList) |
void | registerDialog (YDialog *) |
void | removeDialog () |
bool | isSymbolOrId (const YCPValue &val) const |
void | deleteMacroRecorder () |
void | deleteMacroPlayer () |
void | playNextMacroBlock () |
Protected Attributes | |
dialogstack_type | dialogstack |
long long | id_counter |
bool | with_threads |
pthread_t | ui_thread |
YUIBuiltinCallData | _builtinCallData |
int | pipe_to_ui [2] |
int | pipe_from_ui [2] |
bool | terminate_ui_thread |
string | _moduleName |
string | _productName |
YMacroRecorder * | macroRecorder |
YMacroPlayer * | macroPlayer |
deque< YCPValue > | fakeUserInputQueue |
YCPMap | default_fkeys |
bool | _events_blocked |
Y2Component * | _callback |
Static Protected Attributes | |
static bool | _reverseLayout = false |
static YUI * | _yui = 0 |
Friends | |
void * | start_ui_thread (void *ui_int) |
We have to handle two cases slightly different: The case with and without a seperate UI thread.
You have two alternatives how to implement event handling in your UI. Either override idleLoop, userInput and pollInput or override pollInput and waitForEvent, whichever is easier for you.
This class is an abstract base class that contains pure virtuals. It is not intended for direct instantiation, only for inheritance.
|
Define type for the dialog map |
|
Constructor. |
|
Destructor. |
|
UI-specific implementation of the AskForExistingDirectory() builtin. 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 'nil'( YCPVoid() ) if the user canceled the operation. |
|
UI-specific implementation of the AskForExistingFile() builtin. 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 'nil'( YCPVoid() ) if the user canceled the operation. |
|
UI-specific implementation of the AskForSaveFileName() builtin. 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 'nil'( YCPVoid() ) if the user canceled the operation. |
|
Block (or unblock) events. If events are blocked, any event sent should be ignored until events are unblocked again. This default implementation keeps track of a simple internal flag that can be queried with eventsBlocked(), so if you reimplement blockEvents(), be sure to reimplement eventsBlocked() as well. |
|
UI-specific busyCursor function. This default implementation does nothing. |
|
|
|
Call a UI builtin function in the correct thread (the UI thread). This is called from libycp/YExpression via the UI builtin declarations that call UICallHandler. |
|
Call 'function' with 'argc' YCPValue parameters and return the result of 'function'. |
|
Checks if the given value is a term with the symbol 'id and size one. Logs an error if this is not so and 'complain' is set.
|
|
Decativates and closes a previously created dialog. The default implementation does nothing. Don't delete the dialog. This will be done at some other place.
|
|
Helper function of createWidgetTree. Creates an alignment (`Left, `Right, `Top, `Bottom based on the alignment parameters.
|
|
Creates an alignment widget |
|
Helper function of createWidgetTree. Creates a BarGraph. |
|
Creates a BarGraph widget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates a CheckBox. |
|
Creates a check box
|
|
Helper function of createWidgetTree. Creates a ColoredLabel. |
|
Creates a ColoredLabelwidget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates a ComboBox. |
|
Creates a combo box |
|
|
|
Creates a Date input filed |
|
Creates a dialog.
|
|
Helper function of createWidgetTree. Creates a DownloadProgress. |
|
Creates a DownloadProgress widget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates a DumbTab. |
|
Creates a DumbTab. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates a DummySpecialWidget. |
|
Creates a DummySpecialWidget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates one of Empty, HStretch, VStretch, Stretch |
|
Creates an empty widget |
|
Helper function of createWidgetTree. Creates a frame widget. |
|
Creates a frame widget |
|
Helper function of createWidgetTree. Creates an Image. |
|
Creates an image widget from a file name |
|
Creates an image widget from a YCP byteblock |
|
Helper function of createWidgetTree. Creates an IntField. |
|
Creates an IntField widget. |
|
Helper function of createWidgetTree. Creates a label.
|
|
Creates a label.
|
|
Helper function of createWidgetTree. Creates one of HBox, VBox
|
|
Helper function of createWidgetTree. Creates a LogView. |
|
Creates a log view widget
|
|
Helper function of createWidgetTree. Creates a MarginBox. |
|
Helper function for createWidgetTreeTree. Creates a menu button. |
|
Creates a menu button.
|
|
Helper function of createWidgetTree. Creates a MinWidth, MinHeight, or MinSize.
|
|
Helper function of createWidgetTree. Creates a MultiLineEdit. |
|
Creates a MultiLineEdit widget. |
|
Helper function of createWidgetTree. Creates a MultiProgressMeter. |
|
Creates a (horizontal or vertical) MultiProgressMeter. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function for createWidgetTreeTree. Creates a MultiSelectionBox. |
|
Creates a multi selection box |
|
Helper function of createWidgetTree. Creates a PackageSelector. |
|
Creates a PackageSelector widget. "floppyDevice" may be an empty string if no such device was specified in the YCP code. Usually it is something like "/dev/fd0". |
|
Helper function of createWidgetTree. Creates a PartitionSplitter. |
|
Creates a PartitionSplitter widget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well!
|
|
Helper function of createWidgetTree. Creates a PatternSelector. |
|
Creates a pattern selector. |
|
Helper function of createWidgetTree. Creates a PkgSpecial subwidget. |
|
Creates a PkgSpecial widget, i.e. a specific subwidget. |
|
Helper function of createWidgetTree. Creates a ProgressBar. |
|
Creates a progress bar |
|
Helper function of createWidgetTree. Creates a PushButton or an IconButton. |
|
Creates a push button.
|
|
Helper function of createWidgetTree. Creates a RadioButton. |
|
Creates a radio button and inserts it into a radio button group
|
|
Helper function of createWidgetTree. Creates a RadioButtonGroup. |
|
Creates a radio button group. |
|
Helper function of createWidgetTree. Creates a replace point
|
|
Creates a replace point. |
|
Helper function of createWidgetTree. Creates a RichText. |
|
Creates a rich text widget
|
|
Helper function of createWidgetTree. Creates a SelectionBox. |
|
Creates a selection box |
|
Helper function of createWidgetTree. Creates a Slider. |
|
Creates a Slider widget. This is a special widget that the UI may or may not support. Overwrite this method at your own discretion. If you do, remember to overwrite the has...() method as well! |
|
Helper function of createWidgetTree. Creates one of HSpacing, VSpacing.
|
|
Creates a spacing widget |
|
Creates a split |
|
Helper function of createWidgetTree. Creates one of HSquash, VSquash, HVSquash.
|
|
Creates a squash widget |
|
Helper function of createWidgetTree. Creates a Table. |
|
Creates a table widget |
|
Helper function of createWidgetTree. Creates one of TextEntry, Password
|
|
Creates a text entry or password entry field. |
|
|
|
Creates a Time input filed |
|
Helper function of createWidgetTree. Creates a Tree. |
|
Creates a tree |
|
Creates and launches the ui thread. |
|
Helper function of createWidgetTree. Creates a weight widget.
|
|
Overloaded version for convenience. Supplies empty widget options. |
|
Creates a new widget tree.
|
|
Helper function of createWidgetTree. Creates a Wizard widget. |
|
Creates a Wizard frame. |
|
Looks up the topmost dialog |
|
Returns the default function key number for a widget with the specified label or 0 if there is none. Any keyboard shortcuts that may be contained in 'label' are stripped away before any comparison. |
|
Delete the internal macro player and set the pointer to 0. |
|
Delete the internal macro recorder and set the pointer to 0. |
|
Convert logical layout spacing units into device dependent units. A default size dialog is assumed to be 80x25 layout spacing units. Derived UI may want to reimplement this method. |
|
Mid-level handler for the user input related UI commands: UserInput() TimeoutUserInput() WaitForEvent() PollInput() 'builtin_name' is the name of the specific UI builtin command (to use the correct name in the log file). 'timeout_millisec' is the timeout in milliseconds to use (0 for "wait forever"). 'wait' specifies if this should wait until an event is available if there is none yet. 'detailed' specifies if a full-fledged event map is desired as return value (WaitForEvent()) or one simple YCPValue (an ID). |
|
Opens a directory selection box and prompt the user for an existing directory. Opens a directory selection box and prompt the user for an existing directory. Implementations for most UI builtins. Each method corresponds directly to one UI builtin. |
|
Opens a file selection box and prompt the user for an existing file. Opens a file selection box and prompt the user for an existing file. AskForExistingFile
|
|
Opens a file selection box and prompt the user for a file to save data to. Opens 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. AskForSaveFileName
|
|
Sets the mouse cursor to the busy cursor Sets the mouse cursor to the busy cursor, if the UI supports such a feature. BusyCursor This should normally not be necessary. The UI handles mouse cursors itself: When input is possible (i.e. inside UserInput() ), there is automatically a normal cursor, otherwise, there is the busy cursor. Override this at your own risk.
|
|
callback This is used for a callback mechanism. The expression will be sent to the WFM interpreter and evaluated there. USE WITH CAUTION. |
|
Changes widget contents Changes a property of a widget of the topmost dialog. ChangeWidget
For example in order to change the label of a TextEntry with id `name to "anything", you write
|
|
Performs an explicit shortcut check after postponing shortcut checks. Performs an explicit shortcut check after postponing shortcut checks. Use this after calling CheckShortcuts The normal sequence looks like this:
|
|
Closes an open dialog Closes the most recently opened dialog. It is an error to call CloseDialog()
|
|
|
|
Collects the content of all input widgets in a dialog or in a container This function returns a list of maps describing the content of all input widgets in the current dialog (or in the widget with the specified ID, if any is given), such as TextEntry, ComboBox, SelectionBox, ... widgets (but not Labels, RichText, etc., that don't accept user input). CollectUserInput This function returns a list with a map for each input widget: $[ "ID" : (widget ID) "Value" : (current value of this widget, depending on "Property") "Property" : (what property this is, `Value, `CurrentItem or whatever) "WidgetClass" : (one of "TextEntry", "ComboBox", "SelectionBox", ...) "DebugLabel : ((translated) label of this widget, possibly shortened: "Name", ...) ]
|
|
Debugging function Debugging function: Dumps the widget tree of the current dialog to the log file. DumpWidgetTree
|
|
Fakes User Input Prepares a fake value for the next call to UserInput() - i.e. the next UserInput() will return exactly this value. This is only useful in connection with macros. FakeUserInput If called without a parameter, the next call to UserInput() will return "nil". any nextUserInput
|
|
Gets Display Info Gets information about the current display and the UI's capabilities. GetDisplayInfo
|
|
Gets Language Retrieves the current language setting from of the user interface. Since YaST2 is a client server architecture, we distinguish between the language setting of the user interface and that of the configuration modules. If the module or the translator wants to know which language the user currently uses, it can call GetLanguage If "strip_encoding" is set to "true", all encoding or similar information is cut off, i.e. everything from the first "." or "@" on. Otherwise the current contents of the "LANG" environment variable is returned ( which very likely ends with ".UTF-8" since this is the encoding YaST2 uses internally).
|
|
Gets the name of a Module This is tricky. The UI doesn't care about the current module name, only the translator does. However, since the translator acts as a filter between a client and the UI, it cant directly return the module name. The current implementation inserts the modules name in the translator and it arrives here as the term argument. So the example has no arguments, but the internal code checks for a string argument. GetModulename
|
|
Gets Product Name Returns the current product name ("SuSE Linux", "United Linux", etc.) for display in dialogs. This can be set with SetProductName(). GetProductName Note: In help texts in RichText widgets, a predefined macro &product; can be used for the same purpose.
|
|
Returns a special character ( a 'glyph' ) Returns a special character ( a 'glyph' ) according to the symbol specified. Glyph Not all UIs may be capable of displaying every glyph; if a specific UI doesn't support it, a textual representation ( probably in plain ASCII ) will be returned. This is also why there is only a limited number of predefined glyphs: An ASCII equivalent is required which is sometimes hard to find for some characters defined in Unicode / UTF-8. Please note the value returned may consist of more than one character; for example, Glyph( `ArrowRight ) may return something like "->". If an unknown glyph symbol is specified, 'nil' is returned.
|
|
Checks for support of a special widget type. Checks for support of a special widget type. Use this prior to creating a widget of this kind. Do not use this to check for ordinary widgets like PushButton etc. - just the widgets where the widget documentation explicitly states it is an optional widget not supported by all UIs. HasSpecialWidget Returns true if the UI supports the special widget and false if not. |
|
Evaluates a locale. Evaluate _( "string" ) to "string". |
|
Makes Screen Shot Makes a screen shot if the specific UI supports that. The Qt UI opens a file selection box if filename is empty. MakeScreenShot
|
|
Sets the mouse cursor to the normal cursor Sets the mouse cursor to the normal cursor ( after BusyCursor ), if the UI supports such a feature. NormalCursor This should normally not be necessary. The UI handles mouse cursors itself: When input is possible (i.e. inside UserInput() ), there is automatically a normal cursor, otherwise, there is the busy cursor. Override this at your own risk.
|
|
Opens a new dialog. Opens a new dialog. OpenDialog OpenDialog_with_options
The option
The option
The option
The option
The option
|
|
Plays a recorded macro Executes everything in macro file "macroFileName". Any errors are sent to the log file only. The macro can be terminated only from within the macro file. PlayMacro
|
|
Poll Input Doesn't wait but just looks if the user has clicked some button, has closed the window or has activated some widget that has the PollInput
|
|
Postpones Shortcut Check Postpone keyboard shortcut checking during multiple changes to a dialog. PostponeShortcutCheck
Normally, keyboard shortcuts are checked automatically when a dialog is created or changed. This can lead to confusion, however, when multiple changes to a dialog ( repeated ReplaceWidget() calls ) cause unwanted intermediate states that may result in shortcut conflicts while the dialog is not final yet. Use this function to postpone this checking until all changes to the dialog are done and then explicitly check with
The next call to Use only when really necessary. The automatic should do well in most cases. The normal sequence looks like this:
|
|
Queries Widget contents Queries a property of a widget of the topmost dialog. For example in order to query the current text of a TextEntry with id `name, you write QueryWidget
|
|
Recalculates Layout Recompute the layout of the current dialog. RecalcLayout This is a very expensive operation. Use this after changing widget properties that might affect their size - like the a Label widget's value. Call this once ( ! ) after changing all such widget properties.
|
|
Recodes encoding of string from or to "UTF-8" encoding. Recodes encoding of string from or to "UTF-8" encoding. One of from/to must be "UTF-8", the other should be an iso encoding specifier (i.e. "ISO-8859-1" for western languages, "ISO-8859-2" for eastern languages, etc. ). Recode
|
|
Records Macro into a file Begins recording a macro. Write the macro contents to file "macroFilename". RecordMacro
|
|
Redraws the screen Redraws the screen after it very likely has become garbled by some other output. RedrawScreen This should normally not be necessary: The ( specific ) UI redraws the screen automatically whenever required. Under rare circumstances, however, the screen might have changes due to circumstances beyond the UI's control: For text based UIs, for example, system commands that cause output to every tty might make this necessary. Call this in the YCP code after such a command.
|
|
ReplaceWidget
Replaces a complete widget (or widget subtree) with an other widget (or widget tree). You can only replace the widget contained in a
|
|
Initializes and run the PackageSelector widget Not to be used outside the package selection. RunPkgSelection Initialize and run the PackageSelector widget identified by 'pkgSelId'. Black magic to everybody outside. ;- )
|
|
Sets Console Font Switches the text console to the specified font. See the setfont(8) command and the console HowTo for details. SetConsoleFont
|
|
Sets Focus to the specified widget Sets the keyboard focus to the specified widget. Notice that not all widgets can accept the keyboard focus; this is limited to interactive widgets like PushButtton, TextEntry, SelectionBox etc. - manager widgets like VBox, HBox etc. will not accept the keyboard focus. They will not propagate the keyboard focus to some child widget that accepts the focus. Instead, an error message will be emitted into the log file. SetFocus
|
|
Sets the (default) function keys for a number of buttons. This function receives a map with button labels and the respective function key number that should be used if on other `opt( `key_F.. ) is specified. SetFunctionKeys Any keyboard shortcuts in those labels are silently ignored so this is safe to use even if the UI's internal shortcut manager rearranges shortcuts. Each call to this function overwrites the data of any previous calls.
|
|
Sets Keyboard. SetKeyboard
|
|
Sets the language of the UI Tells the UI that the user has selected another language. If the UI has any language dependend output that language setting is honored. SetLanguage
|
|
Sets Module Name Does nothing. The SetModulename command is introduced for the translator. But the translator sends all commands to the ui. So the ui shouldn't complain about this command. SetModulename
|
|
Sets Product Name Sets the current product name ("SuSE Linux", "United Linux", etc.) for displaying in dialogs and in RichText widgets (for help text) with the RichText &product; macro. SetProductName This product name should be concise and meaningful to the user and not cluttered with detailed version information. Don't use something like "SuSE Linux 12.3-i786 Professional". Use something like "SuSE Linux" instead. This information can be retrieved with the GetProductName() builtin.
|
|
Stops recording macro Stops macro recording. This is only necessary if you don't wish to record everything until the program terminates. StopRecordingMacro
|
|
User Input with Timeout Waits for the user to click some button, close the window or activate some widget that has the TimeoutUserInput
|
|
User Input Waits for the user to click some button, close the window or activate some widget that has the UserInput
|
|
Waits for Event Extended event handling - very much like UserInput(), but returns much more detailed information about the event that occured in a map. WaitForEvent timeout_millisec
|
|
Checks whether or not a widget with the given ID currently exists Checks whether or not a widget with the given ID currently exists in the current dialog. Use this to avoid errors in the log file before changing the properties of widgets that might or might not be there. WidgetExists
|
|
Runs a wizard command Issues a command to a wizard widget with ID 'wizardId'. < This builtin is not for general use. Use the Wizard.ycp module instead.. WizardCommand For available wizard commands see file YQWizard.cc . If the current UI does not provide a wizard widget, 'false' is returned. It is safe to call this even for UIs that don't provide a wizard widget. In this case, all calls to this builtin simply return 'false'.
|
|
Returns 'true' if events are currently blocked. Reimplent this if you reimplement blockEvents(). |
|
Filter out invalid events. |
|
Helper function for replaceWidget. Searches the current dialog for the radio button group that applies to a certain widget w. The searched for widget must be a radio button group that is an ancestor of w but there must be no other more immediate ancestor radio button to w.
|
|
Returns the callback previously set with setCallback(). |
|
|
|
|
|
|
|
|
|
|
|
UI-specific getDisplayInfo() functions. See UI builtin GetDisplayInfo() doc for details. |
|
Assumes that the value v is of the form `id( any i ) and returns the contained i. |
|
Looks for a widget id in a widget term. If it finds one, returns it and sets argnr to 1, otherwise it creates a new unique widget id and sets argnr to 0. For example PushButton( `id( 17 ), .... ) has with id 17.
|
|
Looks for widget options in the term. Returns the list of options if available, otherwise an empty list. Increases argnr by 1 if options are found. For example PushButton( `id( 17 ), `opt( `kilroy, `color( `red ) ) has the option list [ `kilroy, `color( `red ) ]
|
|
Implement the 'Glyph()' builtin in the specific UI: Return a representation for the glyph symbol specified in UTF-8 encoding or an empty string to get a default textual representation. Derived UIs may or may not choose to overwrite this. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This virtual method is called when threads are activated in case the execution control is currently on the side of the module. This means that no UserInput() or PollInput() is pending. The module just does some work. The UI <-> module protocol is in the state UI waits for the next command . The UI can override this method when it wants to react to user input or other external events such as repaint requests from the X server.
|
|
Issue an internal error. Derived UIs should overwrite this to display the error message in a suitable manner, e.g. open a popup (and wait for confirmation!). The default implementation writes the error message to stderr. Notice: This function does _not_ abort the program. |
|
Checks if the given value is either a symbol or a term `id().
|
|
Convert device dependent units into logical layout spacing units. A default size dialog is assumed to be 80x25 layout spacing units. Derived UI may want to reimplement this method. |
|
|
|
Logs a warning for an unknown widget option
|
|
UI-specific makeScreenShot function. This default implementation does nothing. |
|
|
|
UI-specific normalCursor function. This default implementation does nothing. |
|
Parse a menu list (for menu buttons) |
|
Parse an `rgb() value |
|
Return whether macro playing is in progress or not |
|
Play macro in file "filename". Any previous macro execution will be terminated prior to this. |
|
Play the next block of an active macro player. |
|
UI-specific PollInput() method. This is called upon evaluating the UI::PollInput() builtin command. This method should just check if there are any pending events for the topmost dialog (currentDialog() ). This method never waits for any events - if there is no pending event, it returns 0. If there is a pending event, a pointer to that event (newly created with the "new" operator) is returned. The generic UI component assumes ownership of this newly created object and destroys it when appropriate. Derived UIs are required to implement this method. |
|
Returns the current product name ("SuSE Linux", "SuSE Linux Enterprise Server", "United Linux", etc.). This can be set with the UI::SetProductName() builtin. UI::GetProductName is the YCP equivalent to this function. |
|
Might be handy if you have to recode strings from/to utf-8 |
|
Return whether macro recording is in progress or not |
|
Start macro recording to file "filename". Any previous active macro recorder will be terminated( regularly ) prior to this. |
|
UI-specific redrawScreen method. This default implementation does nothing. |
|
Enters a dialog into the dialog map. |
|
Logs warning messages for all widget options other than the standard ones - for widgets that don't handle any options.
|
|
Removes the topmost dialog from the dialog stack and deletes it. |
|
Returns 'true' if widget geometry should be reversed for languages that have right-to-left writing direction (Arabic, Hebrew). |
|
|
|
UI-specific runPkgSelection method. This default implementation does nothing. Use this to post-initialize widget stuff that cannot be done in the createPackageSelector() method. |
|
Set a callback component. |
|
UI-specific setConsoleFont() function. Returns YCPVoid() if OK and YCPNull() on error. This default implementation does nothing. |
|
|
|
UI-specific setLanguage() function. Returns YCPVoid() if OK and YCPNull() on error. This default implementation does nothing. |
|
Set reverse layout for Arabic / Hebrew support |
|
Shows and activates a previously created dialog. The default implementation does nothing.
|
|
Signals the ui thread by sending one byte through the pipe to it. |
|
Signals the ycp thread by sending one byte through the pipe to it. |
|
Stop macro recording if this is in progress. Nothing happens when no macro recording is in progress. |
|
Tells the ui thread that it should terminate and waits until it does so. |
|
|
|
Must be called after the constructor of the Qt/NCurses ui is ready. Starts the ui thread. |
|
Access the global UI. |
|
This method implements the UI thread in case it is existing. The loop consists of calling idleLoop, getting the next command from the YCPUIComponent, evaluating it, which possibly invovles calling userInput() or pollInput() and writes the answer back to the other thread where the request came from. |
|
Unblock events previously blocked. This is just an alias for blockEvents( false) for better readability. Note: This method is intentionally not virtual. |
|
UI-specific UserInput() method. This is called upon evaluating the UI::UserInput() builtin command. This method should remain in its own event loop until an event for the topmost dialog (currentDialog() ) is available or until the specified timeout (in milliseconds, 0 for "wait forever") is expired (in which case it should return the pointer to a YTimeoutEvent). This method is to return a pointer to an event created with the "new" operator. The generic UI component assumes ownership of this newly created object and destroys it when appropriate. The caller will gracefully handle if this method returns 0, albeit this is always an error which may result in an error message in the log file. Derived UIs are required to implement this method. |
|
Waits for the ui thread to send one byte through the pipe to the ycp thread and reads this byte from the pipe. |
|
Waits for the ycp thread to send one byte through the pipe to the ycp thread and reads this byte from the pipe. |
|
Overloaded version of widgetWithId. Does not search for the widget id in the topmost dialog but in given widget tree.
|
|
Looks up a widget with a certain id. Returns 0 if no such exists. Only the topmost dialog ist searched for the id.
|
|
|
|
Inter-thread communication between the YCP thread and the UI thread: The YCP thread supplies data here and signals the UI thread, the UI thread picks up the data, executes the function, puts the result here and signals the YCP thread that waits until the result is available. |
|
The callback component previously set with setCallback(). |
|
Flag that keeps track of blocked events. Never query this directly, use eventsBlocked() instead. |
|
The current module name as set by the SetModuleName UI command. |
|
The current product name ("SuSE Linux", "United Linux", ...). |
|
Returns 'true' if widget geometry should be reversed for languages that have right-to-left writing direction (Arabic, Hebrew). |
|
Global reference to the UI |
|
The current mapping of widget labels to default function keys. |
|
Container for all dialogs. Each dialog has a unique id, which is a YCPValue. |
|
Queue for synthetic (faked) user input events. |
|
Counter for creating unique widget ids |
|
The current macro player. |
|
The current macro recorder. |
|
Used to synchronize data transfer with the ui thread. It stores a pair of file descriptors of a pipe. For each YCP value we get from the ui thread, we read one aribrary byte from here. |
|
Used to synchronize data transfer with the ui thread. It stores a pair of file descriptors of a pipe. For each YCP value we send to the ui thread, we write one aribrary byte here. |
|
This is a flag that signals the ui thread that it should terminate. This is done by setting the flag to true. The ui thread replies by setting the flag back to false directly after terminating itself. |
|
Handle to the ui thread. |
|
true if a seperate UI thread is created |