Mon 21 Jul 22:43:21 CEST 2025

This commit is contained in:
sbosse 2025-07-21 23:10:31 +02:00
parent 4a93c6b462
commit 02b2ee5577

64
js/term/widget.js Normal file
View File

@ -0,0 +1,64 @@
/**
* widget.js - high-level interface for blessed
* Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
* https://github.com/chjj/blessed
*/
var widget = exports;
widget.classes = [
'Node',
'Screen',
'Element',
'Box',
'Chat',
'Text',
'Line',
'ScrollableBox',
'ScrollableText',
'BigText',
'List',
'Form',
'Input',
'Textarea',
'Textbox',
'Button',
'ProgressBar',
'FileManager',
'Checkbox',
'RadioSet',
'RadioButton',
'Prompt',
'Question',
'Message',
'Keyboard',
'Loading',
'Listbar',
'Log',
'Table',
'ListTable',
'Terminal',
'Image',
'ANSIImage',
'OverlayImage',
'Video',
'Layout',
'Log',
'Tree'
];
widget.classes.forEach(function(name) {
var file = name.toLowerCase();
widget[name] = widget[file] = Require('term/widgets/' + file);
});
widget.aliases = {
'ListBar': 'Listbar',
'PNG': 'ANSIImage'
};
Object.keys(widget.aliases).forEach(function(key) {
var name = widget.aliases[key];
widget[key] = widget[name];
widget[key.toLowerCase()] = widget[name];
});