libyui-ncurses
 
Loading...
Searching...
No Matches
YNCursesUI Class Reference
Inheritance diagram for YNCursesUI:
Collaboration diagram for YNCursesUI:

Public Member Functions

 YNCursesUI (bool withThreads, bool topmostConstructor=true)
 
 ~YNCursesUI ()
 
virtual void idleLoop (int fd_ycp)
 
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 &lang)
 
virtual YEvent * runPkgSelection (YWidget *packageSelector)
 
NCPackageSelectorPluginStubpackageSelectorPlugin ()
 
YWidget * askSendWidgetID ()
 
void sendEvent (NCursesEvent event)
 
void idleLoopSetEnabled (bool enabled=true)
 
- Public Member Functions inherited from NCurses
void run ()
 
void RedirectToLog ()
 

Static Public Member Functions

static YNCursesUIui ()
 
- Static Public Member Functions inherited from NCurses
static int cols ()
 
static int lines ()
 
static int tabsize ()
 
static const NCstylestyle ()
 
static void Update ()
 
static void Redraw ()
 
static void Refresh ()
 
static void SetTitle (const std::string &str)
 
static void SetStatusLine (std::map< int, NCstring > fkeys)
 
static void ScreenShot (const std::string &name="screen.shot")
 
static void drawTitle ()
 
static void ForgetDlg (NCDialog *dlg_r)
 
static void RememberDlg (NCDialog *dlg_r)
 
static void ResizeEvent ()
 

Protected Member Functions

virtual YWidgetFactory * createWidgetFactory ()
 
virtual YOptionalWidgetFactory * createOptionalWidgetFactory ()
 
virtual YApplication * createApplication ()
 
virtual bool want_colors ()
 
virtual void init_title ()
 
- Protected Member Functions inherited from NCurses
void init ()
 
bool initialized () const
 
virtual bool title_line ()
 
virtual void setup_screen ()
 
virtual void init_screen ()
 

Protected Attributes

bool idle_loop_enabled
 
- Protected Attributes inherited from NCurses
SCREEN * theTerm
 
std::string myTerm
 
std::string envTerm
 
WINDOW * title_w
 
WINDOW * status_w
 
std::string title_t
 
std::map< int, NCstringstatus_line
 
NCstylestyleset
 
NCursesPanelstdpan
 

Static Protected Attributes

static YNCursesUI_ui = 0
 

Additional Inherited Members

- Public Attributes inherited from NCurses
int stdout_save
 
int stderr_save
 

Constructor & Destructor Documentation

◆ YNCursesUI()

YNCursesUI::YNCursesUI ( bool withThreads,
bool topmostConstructor = true )

Having boolean topmostConstructor to be called only when there is topmost constructor and not a plugin which inherits from YNCursesUI. Used by integration testing framework

◆ ~YNCursesUI()

YNCursesUI::~YNCursesUI ( )

Destructor

Member Function Documentation

◆ askSendWidgetID()

YWidget * YNCursesUI::askSendWidgetID ( )

Open a pop-up dialog to ask the user for a widget ID and then send it with sendWidgetID(). This returns the widget or 0 if not found.

◆ createOptionalWidgetFactory()

YOptionalWidgetFactory * YNCursesUI::createOptionalWidgetFactory ( )
protectedvirtual

Create the widget factory that provides all the createXY() methods for optional ("special") widgets and the corresponding hasXYWidget() methods.

Reimplemented from YUI.

◆ createWidgetFactory()

YWidgetFactory * YNCursesUI::createWidgetFactory ( )
protectedvirtual

Create the widget factory that provides all the createXY() methods for standard (mandatory, i.e. non-optional) widgets.

Reimplemented from YUI.

◆ idleLoop()

void YNCursesUI::idleLoop ( int fd_ycp)
virtual

Idle around until fd_ycp is readable

◆ idleLoopSetEnabled()

void YNCursesUI::idleLoopSetEnabled ( bool enabled = true)

Enable or disable the idle loop processing.

◆ init_title()

void YNCursesUI::init_title ( )
protectedvirtual

Reimplemented from NCurses.

◆ packageSelectorPlugin()

NCPackageSelectorPluginStub * YNCursesUI::packageSelectorPlugin ( )

Returns the package selector plugin singleton of this UI or creates it (including loading the plugin lib) if it does not exist yet.

Create the package selector plugin

◆ runPkgSelection()

YEvent * YNCursesUI::runPkgSelection ( YWidget * packageSelector)
virtual

Fills the PackageSelector widget and runs package selection.

◆ sendEvent()

void YNCursesUI::sendEvent ( NCursesEvent event)

Send an event to the UI. It's used in special cases (REST API) to simulate the user actions.

◆ setConsoleFont()

void YNCursesUI::setConsoleFont ( const std::string & console_magic,
const std::string & font,
const std::string & screen_map,
const std::string & unicode_map,
const std::string & lang )
virtual

Set the (text) console font according to the current encoding etc. See the setfont(8) command and the console HowTo for details.

This should really be in NCApplication, but it uses so many non-exported member variables that it's not easy to move it there.

Set the console font, encoding etc. This is called from Console.ycp. The terminal encoding must be std::set correctly.

This doesn't belong here, but it is so utterly entangled with member variables that are not exported at all (sic!) that it's not really feasible to extract the relevant parts.

◆ ui()

static YNCursesUI * YNCursesUI::ui ( )
inlinestatic

Access the global Y2NCursesUI.

◆ want_colors()

bool YNCursesUI::want_colors ( )
protectedvirtual

Reimplemented from NCurses.

Member Data Documentation

◆ _ui

YNCursesUI * YNCursesUI::_ui = 0
staticprotected

Global reference to the UI

◆ idle_loop_enabled

bool YNCursesUI::idle_loop_enabled
protected

Enable or disable the idle loop (processing the user input)


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