#include <YUIComponent.h>

Public Member Functions | |
| YUIComponent () | |
| virtual | ~YUIComponent () |
| virtual Y2Namespace * | import (const char *name) |
| void | createUI () |
| YCPValue | callBuiltin (void *function, int fn_argc, YCPValue fn_argv[]) |
| void | result (const YCPValue &result) |
| void | setServerOptions (int argc, char **argv) |
| virtual string | name () const |
| void | setCallback (Y2Component *callback) |
| Y2Component * | getCallback () const |
Static Public Member Functions | |
| static YUIComponent * | uiComponent () |
| static YUI * | ui () |
Protected Member Functions | |
| virtual YUI * | createUI (int argc, char **argv, bool with_threads, const char *macro_file) |
Private Attributes | |
| Y2Namespace * | _namespace |
| int | _argc |
| char ** | _argv |
| const char * | _macro_file |
| bool | _with_threads |
| bool | _have_server_options |
Static Private Attributes | |
| static YUI * | _ui = 0 |
| static YUIComponent * | _uiComponent = 0 |
| YUIComponent::YUIComponent | ( | ) |
Constructor.
| YUIComponent::~YUIComponent | ( | ) | [virtual] |
Destructor.
| YUI * YUIComponent::createUI | ( | int | argc, | |
| char ** | argv, | |||
| bool | with_threads, | |||
| const char * | macro_file | |||
| ) | [protected, virtual] |
Create the UI. This is called when all the information for doing that is complete, in setServerOptions(). 'argc' and 'argv' are the command line arguments.
Implement this method in derived classes.
| Y2Namespace * YUIComponent::import | ( | const char * | name_space | ) | [virtual] |
Try to import a given namespace. This method is used for transparent handling of namespaces (YCP modules) through whole YaST. NOTICE: there is no reverse operation to import. Semantics of YCP modules is there is a single instance and it is available from the first import until the end of YaST run.
| name_space | the name of the required namespace |
Reimplemented from Y2Component.
| YUIComponent * YUIComponent::uiComponent | ( | ) | [static] |
Returns the instance of the UI component 0 if none has been created yet.
| static YUI* YUIComponent::ui | ( | ) | [inline, static] |
Returns the instance of the UI or 0 if none has been created yet. Note: This does _not_ create a UI on the first call; this happens in the first call of a UI builtin via the YUIComponent's call handler which creates a UI upon its first call and then calls the UI's call handler.
| void YUIComponent::createUI | ( | ) |
Create a UI instance. The UI component normally handles that all by itself when the first UI builtin is called, but under very rare circumstances (e.g., in kyast) the UI needs to be created upon demand.
YUIComponent level call handler; this creates the actual UI instance upon its first call and then hands over the function to be called to the UI's call handler. Weird, huh? ;-)
| void YUIComponent::result | ( | const YCPValue & | result | ) | [virtual] |
Called from generic frontend upon session close. This deletes the UI.
Reimplemented from Y2Component.
| void YUIComponent::setServerOptions | ( | int | argc, | |
| char ** | argv | |||
| ) | [virtual] |
This is called by the generic frontend after it parsed the commandline. This actually creates an UI instance with createUI().
Reimplemented from Y2Component.
| virtual string YUIComponent::name | ( | ) | const [inline, virtual] |
The name of the component - the prefix used for builtin calls like UI::OpenDialog() etc.
Implements Y2Component.
| void YUIComponent::setCallback | ( | Y2Component * | callback | ) |
Set a callback component - call the UI's setCallback() method.
| Y2Component * YUIComponent::getCallback | ( | ) | const |
Returns the UI's callback component previously set with setCallback(); calls the UI's getCallback() method.
YUI * YUIComponent::_ui = 0 [static, private] |
YUIComponent * YUIComponent::_uiComponent = 0 [static, private] |
Y2Namespace* YUIComponent::_namespace [private] |
int YUIComponent::_argc [private] |
char** YUIComponent::_argv [private] |
const char* YUIComponent::_macro_file [private] |
bool YUIComponent::_with_threads [private] |
bool YUIComponent::_have_server_options [private] |
1.5.3