pgwidgets-js 0.3.2__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/PKG-INFO +2 -2
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/README.md +1 -1
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/WhatsNew.rst +114 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/package.json +1 -1
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/defs.py +24 -2
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/pyodide/widget.py +28 -4
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/Widgets.js +2 -1
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TextSource.css +18 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Box.js +6 -2
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Button.js +57 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Dialog.js +36 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/MDIWidget.js +10 -7
- pgwidgets_js-0.3.4/pgwidgets_js/static/modules/Separator.js +55 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TextArea.js +24 -1
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TextSource.js +184 -2
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js.egg-info/PKG-INFO +2 -2
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js.egg-info/SOURCES.txt +3 -0
- pgwidgets_js-0.3.4/pgwidgets_js.egg-info/scm_file_list.json +199 -0
- pgwidgets_js-0.3.4/pgwidgets_js.egg-info/scm_version.json +8 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/.flake8 +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/.github/workflows/tests.yml +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/.gitignore +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/.readthedocs.yaml +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/LICENSE.md +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/MANIFEST.in +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/Widgets.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/Widgets.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/Makefile +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/callbacks.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/conf.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/electron.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/external-widgets.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/for-developers.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/frameworks.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/getting-started.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/index.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/pyodide.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/remote.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/styling.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/controls.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/dialogs.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/display.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/index.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/layout.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/menus.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/nonvisual.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/docs/widgets/text.rst +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/all_widgets.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/all_widgets_pyodide.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/all_widgets_pyodide.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/all_widgets_pyscript.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/all_widgets_pyscript.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/box.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/button.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/canvas.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/checkbox.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/colordialog.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/combobox.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/debug_spinbox.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/dial.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/dialog.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/electron/.gitignore +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/electron/.npmrc +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/electron/index.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/electron/main.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/electron/package.json +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/expander.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/external_widgets.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/fixedlayout.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/frame.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/gridbox.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/htmlview.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/image.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/label.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/mdi_widget.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/menu.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/progressbar.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/pyodide_demo.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/pyscript.toml +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/radiobutton.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/remote.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/remote_demo.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/remote_demo_async.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/scroll_area.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/scrollable.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/scrollbar.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/slider.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/spinbox.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/splitter.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/tab_widget.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/tableview.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/text_entry.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/textarea.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/textentryset.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/textsource.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/togglebutton.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/toolbar.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/treeview.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/examples/videowidget.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/__init__.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/pyodide/__init__.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/pyodide/log.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/Widgets.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/AbstractScrollArea.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Box.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Button.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/CheckBox.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ColorDialog.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ComboBox.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Dial.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Dialog.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Expander.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ExternalWidget.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/FixedLayout.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Frame.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/GridBox.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/HtmlView.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Image.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Label.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/MDIWidget.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Menu.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ProgressBar.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/RadioButton.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ScrollArea.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ScrollBar.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Slider.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/SpinBox.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Splitter.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/StatusBar.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TabWidget.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Text.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TextArea.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TextEntrySet.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ToggleButton.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/ToolBar.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TopLevel.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/TreeView.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/VideoWidget.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/Widget.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/css/WindowMenu.css +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/file.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/folder.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/hdots.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/pgicon.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/pgwidgets-logo.png +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/pgwidgets-logo.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/icons/vdots.svg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/AbstractScrollArea.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Callback.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Canvas.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/CheckBox.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ColorDialog.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ColorWidget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ComboBox.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ComboBoxNative.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Dial.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Expander.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ExternalWidget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/FileDialog.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/FixedLayout.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Frame.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/GridBox.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/HtmlView.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Image.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Label.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Menu.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/MenuAction.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/MenuBar.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Page.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ProgressBar.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/RadioButton.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/RemoteInterface.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ScrollArea.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ScrollBar.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Slider.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/SpinBox.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Splitter.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/StatusBar.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TabWidget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TableView.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TextEntry.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TextEntrySet.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TextWidget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Timer.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ToggleButton.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ToolBar.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/ToolBarAction.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TopLevel.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/TreeView.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/VideoWidget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/Widget.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/modules/WindowMenu.js +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js/static/remote.html +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js.egg-info/dependency_links.txt +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js.egg-info/requires.txt +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pgwidgets_js.egg-info/top_level.txt +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/pyproject.toml +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/setup.cfg +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/setup.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/tests/__init__.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/tests/test_consistency.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/tests/test_defs.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/tests/test_recent_additions.py +0 -0
- {pgwidgets_js-0.3.2 → pgwidgets_js-0.3.4}/tests/test_static_assets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pgwidgets-js
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: pgwidgets JavaScript widget library — static assets for use with Python servers
|
|
5
5
|
Author: PGWidgets Developers
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -26,7 +26,7 @@ Requires-Dist: pytest; extra == "test"
|
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
28
28
|
<p align="center">
|
|
29
|
-
<img src="pgwidgets_js/static/icons/pgwidgets-logo.png" alt="pgwidgets logo" width="
|
|
29
|
+
<img src="pgwidgets_js/static/icons/pgwidgets-logo.png" alt="pgwidgets logo" width="500">
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
@@ -1,6 +1,120 @@
|
|
|
1
1
|
What's New
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
+
Recent changes — since ``v0.3.3``
|
|
5
|
+
---------------------------------
|
|
6
|
+
|
|
7
|
+
TextSource: text no longer clipped when scrolling long files
|
|
8
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
9
|
+
|
|
10
|
+
A ``TextSource`` holding more than a screenful of text showed only the
|
|
11
|
+
first screen -- the scrollbar reported the full length, but scrolling
|
|
12
|
+
past the first page revealed blank space. The edit area is now laid out
|
|
13
|
+
so it grows to the full content height, and the widget scrolls through
|
|
14
|
+
all of it.
|
|
15
|
+
|
|
16
|
+
TextSource: fonts, hover tooltips, and scroll helpers
|
|
17
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
18
|
+
|
|
19
|
+
``set_font(family, size)`` sets the editor font. Hover tooltips can be
|
|
20
|
+
enabled with ``set_tooltips_enabled(True)``: while enabled the widget
|
|
21
|
+
fires a ``tooltip`` callback carrying the line, column and text under the
|
|
22
|
+
pointer, leaving the host to decide what (if anything) to display. New
|
|
23
|
+
scroll helpers address the buffer by offset (used by ``scroll_to_ref``
|
|
24
|
+
and the remote-driver scroll methods), and ``set_wrap`` now also accepts
|
|
25
|
+
a boolean.
|
|
26
|
+
|
|
27
|
+
TextSource: selection and tag-region queries
|
|
28
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
29
|
+
|
|
30
|
+
Four query methods now match Ginga's qt/gtk ``TextSource``:
|
|
31
|
+
``has_selection()``; ``get_selection_bounds()`` returning the selected
|
|
32
|
+
``[start, end]`` refs (or ``None``); ``get_tag_region(name)`` returning a
|
|
33
|
+
tag's overall span; and ``get_tag_regions(name)`` returning one
|
|
34
|
+
``[start, end]`` pair per contiguous run of the tag. They are declared in
|
|
35
|
+
the widget spec, so the Python proxy -- and thus Ginga's pgw
|
|
36
|
+
``TextSource`` -- can call them.
|
|
37
|
+
|
|
38
|
+
New widget: Separator
|
|
39
|
+
~~~~~~~~~~~~~~~~~~~~~
|
|
40
|
+
|
|
41
|
+
``Separator`` is a thin horizontal or vertical rule for visually
|
|
42
|
+
dividing a layout.
|
|
43
|
+
|
|
44
|
+
Button: per-button hover highlight (``set_hover``)
|
|
45
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
46
|
+
|
|
47
|
+
``set_hover(bg, fg)`` mirrors the qt/gtk backends' per-button hover:
|
|
48
|
+
while the pointer is over the button its colors switch to the supplied
|
|
49
|
+
values and revert on mouse-out. Passing ``(None, None)`` clears it. It
|
|
50
|
+
is a setter, so it round-trips and replays on browser reconnect (like
|
|
51
|
+
``set_color``).
|
|
52
|
+
|
|
53
|
+
ButtonBox: ``min_button_width`` option
|
|
54
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
55
|
+
|
|
56
|
+
A ``ButtonBox`` already sizes its buttons to the widest member; the new
|
|
57
|
+
``min_button_width`` constructor option sets a floor so buttons never
|
|
58
|
+
render narrower than the given width.
|
|
59
|
+
|
|
60
|
+
Dialog: ``set_title``, and correct content-area handling
|
|
61
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
62
|
+
|
|
63
|
+
``set_title`` is now callable on a ``Dialog`` across all wrappers;
|
|
64
|
+
previously the method was undeclared on the ``Dialog`` spec and raised
|
|
65
|
+
``AttributeError``. Also, ``remove_all`` / ``remove_widget`` /
|
|
66
|
+
``get_children`` / ``num_children`` now target the dialog's content area,
|
|
67
|
+
matching ``add_widget``. Previously ``remove_all`` tore out the whole
|
|
68
|
+
content-plus-buttons layout, so a rebuilt dialog (e.g. a ``MessageDialog``
|
|
69
|
+
re-showing its message) could leave its content orphaned and blank.
|
|
70
|
+
|
|
71
|
+
TableView: ``set_row_spacing`` / ``set_column_spacing``
|
|
72
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
73
|
+
|
|
74
|
+
The Python proxy for ``TableView`` now exposes ``set_row_spacing`` and
|
|
75
|
+
``set_column_spacing`` (already implemented by its ``TreeView`` base), so
|
|
76
|
+
cell spacing can be set on a ``TableView``.
|
|
77
|
+
|
|
78
|
+
Recent changes — since ``v0.3.2``
|
|
79
|
+
---------------------------------
|
|
80
|
+
|
|
81
|
+
MDIWidget: new and raised sub-windows come to the top
|
|
82
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
83
|
+
|
|
84
|
+
Raising a sub-window (including the implicit raise when one is created)
|
|
85
|
+
now sets its ``z-index`` to one above the current maximum, rather than to
|
|
86
|
+
the sub-window count. The count could drift below the live z-indices
|
|
87
|
+
(after closing windows, or repeated raise/lower), which previously left a
|
|
88
|
+
freshly created window stacked *underneath* existing ones and hidden.
|
|
89
|
+
|
|
90
|
+
TextArea: scrollbars, and ``set_limit`` is a history limit
|
|
91
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
92
|
+
|
|
93
|
+
Scrollbars now appear correctly for an over-full ``TextArea``. Also,
|
|
94
|
+
``set_limit(n)`` now bounds the *retained* text to the last ``n`` lines
|
|
95
|
+
(a scrollback/history limit, trimming the oldest lines as new text is
|
|
96
|
+
appended) instead of setting the number of visible rows.
|
|
97
|
+
|
|
98
|
+
Pyodide: keyword args for positional constructor parameters
|
|
99
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
100
|
+
|
|
101
|
+
In the in-situ (Pyodide) backend, constructing a widget with keyword
|
|
102
|
+
arguments that name positional constructor parameters -- e.g.
|
|
103
|
+
``Dialog(title=..., buttons=...)`` -- now fills those constructor slots,
|
|
104
|
+
matching the sync backend. Previously such kwargs fell through to
|
|
105
|
+
``set_<name>`` setter dispatch and raised when no such setter existed, so
|
|
106
|
+
affected widgets (e.g. ``Dialog``) could not be constructed in-situ.
|
|
107
|
+
|
|
108
|
+
Pyodide: widgets expose their definition for ``has_callback``
|
|
109
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
110
|
+
|
|
111
|
+
In-situ widget classes now carry their definition, so ``has_callback(name)``
|
|
112
|
+
reports the callbacks a widget *declares* (e.g. ``page-switch`` /
|
|
113
|
+
``page-close``), matching the sync backend. Host code that wires a callback
|
|
114
|
+
only ``if widget.has_callback(name)`` -- such as a workspace connecting
|
|
115
|
+
``page-close`` -- now works in-situ; previously that gate returned ``False``
|
|
116
|
+
and the callback was never connected.
|
|
117
|
+
|
|
4
118
|
Recent changes — since ``v0.3.0``
|
|
5
119
|
---------------------------------
|
|
6
120
|
|
|
@@ -109,7 +109,7 @@ WIDGETS = {
|
|
|
109
109
|
"ButtonBox": {
|
|
110
110
|
"base": "container",
|
|
111
111
|
"args": [],
|
|
112
|
-
"options": ["orientation", "halign"],
|
|
112
|
+
"options": ["orientation", "halign", "min_button_width"],
|
|
113
113
|
"methods": {
|
|
114
114
|
"add_widget": ["child", "stretch"],
|
|
115
115
|
"insert_widget": ["index", "child", "stretch"],
|
|
@@ -179,6 +179,17 @@ WIDGETS = {
|
|
|
179
179
|
"callbacks": [],
|
|
180
180
|
},
|
|
181
181
|
|
|
182
|
+
"Separator": {
|
|
183
|
+
# A thin horizontal or vertical rule (like an HTML <hr>).
|
|
184
|
+
"base": "widget",
|
|
185
|
+
"args": ["orientation"],
|
|
186
|
+
"options": [],
|
|
187
|
+
"methods": {
|
|
188
|
+
"set_orientation": ["orientation"],
|
|
189
|
+
},
|
|
190
|
+
"callbacks": [],
|
|
191
|
+
},
|
|
192
|
+
|
|
182
193
|
"Expander": {
|
|
183
194
|
# JS Expander extends ContainerWidget (single child via set_widget),
|
|
184
195
|
# so it needs the container method set (get_children, num_children,
|
|
@@ -366,6 +377,8 @@ WIDGETS = {
|
|
|
366
377
|
"set_position": ["x", "y"],
|
|
367
378
|
"popup": ["x", "y"],
|
|
368
379
|
"set_modal": ["tf"],
|
|
380
|
+
# inherited from TopLevel on the JS side (Dialog extends TopLevel)
|
|
381
|
+
"set_title": ["title"],
|
|
369
382
|
},
|
|
370
383
|
"callbacks": [*CONTAINER_CALLBACKS, "activated", "move", "close"],
|
|
371
384
|
},
|
|
@@ -409,6 +422,7 @@ WIDGETS = {
|
|
|
409
422
|
"set_icon": ["url", "size"],
|
|
410
423
|
"get_icon": [],
|
|
411
424
|
"set_color": ["bg", "fg"],
|
|
425
|
+
"set_hover": ["bg", "fg"],
|
|
412
426
|
},
|
|
413
427
|
"callbacks": ["activated"],
|
|
414
428
|
},
|
|
@@ -547,10 +561,14 @@ WIDGETS = {
|
|
|
547
561
|
"set_wrap": ["mode"],
|
|
548
562
|
"set_line_numbers": ["tf"],
|
|
549
563
|
"set_icon_gutter": ["tf"],
|
|
564
|
+
"set_font": ["family", "size"],
|
|
565
|
+
"set_tooltips_enabled": ["tf"],
|
|
550
566
|
"set_icon": ["ref", "icon_url"],
|
|
551
567
|
"get_cursor": [],
|
|
552
568
|
"set_cursor": ["ref"],
|
|
553
569
|
"get_selection_range": [],
|
|
570
|
+
"has_selection": [],
|
|
571
|
+
"get_selection_bounds": [],
|
|
554
572
|
"set_selection_range": ["start_ref", "end_ref"],
|
|
555
573
|
# Tags
|
|
556
574
|
"create_tag": ["name", "attrs"],
|
|
@@ -560,6 +578,8 @@ WIDGETS = {
|
|
|
560
578
|
"remove_tag": ["name", "start_ref", "end_ref"],
|
|
561
579
|
"get_tags_at": ["ref"],
|
|
562
580
|
"get_tags_range": ["start_ref", "end_ref"],
|
|
581
|
+
"get_tag_region": ["name"],
|
|
582
|
+
"get_tag_regions": ["name"],
|
|
563
583
|
# Live refs
|
|
564
584
|
"create_ref": ["offset", "gravity"],
|
|
565
585
|
"remove_ref": ["ref"],
|
|
@@ -594,7 +614,7 @@ WIDGETS = {
|
|
|
594
614
|
"get_scroll_position": [],
|
|
595
615
|
},
|
|
596
616
|
"callbacks": ["changed", "cursor_moved", "line_clicked",
|
|
597
|
-
"icon_clicked", "scrolled"],
|
|
617
|
+
"icon_clicked", "scrolled", "tooltip"],
|
|
598
618
|
},
|
|
599
619
|
|
|
600
620
|
# A live position handle into a TextSource buffer. Extends the
|
|
@@ -830,6 +850,8 @@ WIDGETS = {
|
|
|
830
850
|
"select_all": ["state"],
|
|
831
851
|
"set_column_width": ["col_index", "width"],
|
|
832
852
|
"set_optimal_column_widths": [],
|
|
853
|
+
"set_row_spacing": ["px"],
|
|
854
|
+
"set_column_spacing": ["px"],
|
|
833
855
|
"sort_by_column": ["col_index", "ascending"],
|
|
834
856
|
"scroll_to_path": ["path"],
|
|
835
857
|
"scroll_to_end": [],
|
|
@@ -108,10 +108,23 @@ class Widget:
|
|
|
108
108
|
pos_names = defn.get("args", [])
|
|
109
109
|
opt_names = defn.get("options", [])
|
|
110
110
|
|
|
111
|
-
# Build JS constructor args
|
|
112
|
-
|
|
111
|
+
# Build JS constructor args. Fill the declared positional slots
|
|
112
|
+
# from positional args first, then from any same-named keyword
|
|
113
|
+
# arg (e.g. ``Dialog(title=..., buttons=...)``); unfilled slots
|
|
114
|
+
# are ``None`` placeholders. Without the kwarg mapping such a
|
|
115
|
+
# kwarg would be mistaken for a ``set_<name>`` setter call and
|
|
116
|
+
# fail when no such setter exists.
|
|
117
|
+
js_args = []
|
|
118
|
+
for i, name in enumerate(pos_names):
|
|
119
|
+
if i < len(args):
|
|
120
|
+
js_args.append(args[i])
|
|
121
|
+
elif name in kwargs:
|
|
122
|
+
js_args.append(kwargs.pop(name))
|
|
123
|
+
else:
|
|
124
|
+
js_args.append(None)
|
|
113
125
|
|
|
114
|
-
# Remaining positional args become
|
|
126
|
+
# Remaining positional args (beyond the declared slots) become
|
|
127
|
+
# options, in declared order.
|
|
115
128
|
for i, val in enumerate(args[len(pos_names):]):
|
|
116
129
|
if i < len(opt_names):
|
|
117
130
|
kwargs[opt_names[i]] = val
|
|
@@ -125,10 +138,16 @@ class Widget:
|
|
|
125
138
|
else:
|
|
126
139
|
setter_kwargs[k] = v
|
|
127
140
|
|
|
128
|
-
# Convert args and build options object
|
|
141
|
+
# Convert args and build options object. Keep the positional
|
|
142
|
+
# slots when an options dict follows (so it lands after the last
|
|
143
|
+
# positional arg, not in one); otherwise trim trailing None
|
|
144
|
+
# placeholders.
|
|
129
145
|
converted_args = [_to_js_val(a) for a in js_args]
|
|
130
146
|
if options:
|
|
131
147
|
converted_args.append(_to_js_val(options))
|
|
148
|
+
else:
|
|
149
|
+
while converted_args and converted_args[-1] is None:
|
|
150
|
+
converted_args.pop()
|
|
132
151
|
|
|
133
152
|
# Construct the JS widget
|
|
134
153
|
js_class = getattr(Widgets, js_class_name)
|
|
@@ -342,6 +361,11 @@ def build_widget_class(js_class, defn):
|
|
|
342
361
|
Widget.__init__(self, js_class, *args, **kwargs)
|
|
343
362
|
attrs["__init__"] = __init__
|
|
344
363
|
|
|
364
|
+
# expose the definition so callers can introspect declared callbacks
|
|
365
|
+
# (mirrors the sync backend): ginga's has_callback() consults
|
|
366
|
+
# ``_defn["callbacks"]`` to decide whether to wire e.g. 'page-close'
|
|
367
|
+
attrs["_defn"] = defn
|
|
368
|
+
|
|
345
369
|
cls = type(js_class, (Widget,), attrs)
|
|
346
370
|
# register so widgets returned from JS calls can be wrapped in their
|
|
347
371
|
# proper subclass (see _from_js_val)
|
|
@@ -33,6 +33,7 @@ import {ToggleButton} from "./modules/ToggleButton.js";
|
|
|
33
33
|
import {RadioButton} from "./modules/RadioButton.js";
|
|
34
34
|
import {ProgressBar} from "./modules/ProgressBar.js";
|
|
35
35
|
import {Frame} from "./modules/Frame.js";
|
|
36
|
+
import {Separator} from "./modules/Separator.js";
|
|
36
37
|
import {FixedLayout} from "./modules/FixedLayout.js";
|
|
37
38
|
import {GridBox} from "./modules/GridBox.js";
|
|
38
39
|
import {Image} from "./modules/Image.js";
|
|
@@ -61,7 +62,7 @@ const Widgets = {Callback, Widget, ContainerWidget, Box, VBox, HBox, ButtonBox,
|
|
|
61
62
|
TopLevel, AbstractScrollArea, ScrollArea, MDIWidget, Splitter, TabWidget,
|
|
62
63
|
StackWidget, Expander, Page, Text, Label, StatusBar, TextArea, TextSource,
|
|
63
64
|
TextBufferRef,
|
|
64
|
-
Frame, FixedLayout, GridBox, Button, ToggleButton, CheckBox,
|
|
65
|
+
Frame, Separator, FixedLayout, GridBox, Button, ToggleButton, CheckBox,
|
|
65
66
|
RadioButton, ComboBox, ComboBoxNative, TextEntry,
|
|
66
67
|
Slider, Canvas, SpinBox, ProgressBar, Image, Dial,
|
|
67
68
|
MenuBar, Menu, MenuAction, ToolBar, ToolBarAction,
|
|
@@ -29,6 +29,14 @@
|
|
|
29
29
|
grid-column: 1;
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: row;
|
|
32
|
+
/* Top-align children so the edit wrap grows to its full content
|
|
33
|
+
height instead of being stretched (and clipped) to the visible
|
|
34
|
+
height. With the default `stretch`, `.textsource-edit-wrap`
|
|
35
|
+
(overflow: hidden) gets capped at the viewport height and clips
|
|
36
|
+
the text to one screenful, while the number gutter (overflow
|
|
37
|
+
visible) still reports the full height -- so the scrollbar looks
|
|
38
|
+
right but scrolling reveals blank space. */
|
|
39
|
+
align-items: flex-start;
|
|
32
40
|
overflow-y: auto;
|
|
33
41
|
overflow-x: hidden;
|
|
34
42
|
min-height: 0;
|
|
@@ -47,6 +55,8 @@
|
|
|
47
55
|
background: #f4f4f4;
|
|
48
56
|
border-right: 1px solid #e0e0e0;
|
|
49
57
|
user-select: none;
|
|
58
|
+
/* fill the viewport height for short documents (see .textsource-main) */
|
|
59
|
+
min-height: 100%;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
.textsource-icon-cell {
|
|
@@ -75,6 +85,8 @@
|
|
|
75
85
|
font-size: 12px;
|
|
76
86
|
text-align: right;
|
|
77
87
|
user-select: none;
|
|
88
|
+
/* fill the viewport height for short documents (see .textsource-main) */
|
|
89
|
+
min-height: 100%;
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
.textsource-line-number {
|
|
@@ -88,6 +100,12 @@
|
|
|
88
100
|
flex: 1 1 auto;
|
|
89
101
|
position: relative;
|
|
90
102
|
overflow: hidden;
|
|
103
|
+
/* Fill the viewport height for short documents (children are
|
|
104
|
+
top-aligned in .textsource-main, so without this the box would
|
|
105
|
+
shrink to its content height). For tall documents the box grows
|
|
106
|
+
past this to its full content height, letting .textsource-main
|
|
107
|
+
be the single vertical scroller. */
|
|
108
|
+
min-height: 100%;
|
|
91
109
|
min-width: 0;
|
|
92
110
|
/* hide native horizontal scrollbar; we use ScrollBar widget */
|
|
93
111
|
scrollbar-width: none;
|
|
@@ -214,6 +214,9 @@ class ButtonBox extends Box {
|
|
|
214
214
|
constructor(options = { orientation: 'horizontal' }) {
|
|
215
215
|
super(options);
|
|
216
216
|
this._halign = this.get_option(options, 'halign', 'center');
|
|
217
|
+
// optional lower bound: buttons are never narrower than this, even
|
|
218
|
+
// if the widest button's natural size is smaller
|
|
219
|
+
this._minButtonWidth = this.get_option(options, 'min_button_width', null);
|
|
217
220
|
this._applyAlign();
|
|
218
221
|
|
|
219
222
|
}
|
|
@@ -281,8 +284,9 @@ class ButtonBox extends Box {
|
|
|
281
284
|
let w = elt.getBoundingClientRect().width;
|
|
282
285
|
if (w > maxW) maxW = w;
|
|
283
286
|
}
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
let target = Math.max(Math.ceil(maxW), this._minButtonWidth || 0);
|
|
288
|
+
if (target > 0) {
|
|
289
|
+
let px = target + 'px';
|
|
286
290
|
for (let child of this.children) {
|
|
287
291
|
let elt = child.get_element();
|
|
288
292
|
elt.style.minWidth = px;
|
|
@@ -35,6 +35,11 @@ class Button extends Widget {
|
|
|
35
35
|
|
|
36
36
|
this.element.onclick = () => this._cb_redirect('clicked');
|
|
37
37
|
this.enable_callback('activated');
|
|
38
|
+
|
|
39
|
+
// hover highlight colors (see set_hover); null = no hover override
|
|
40
|
+
this._hoverBg = null;
|
|
41
|
+
this._hoverFg = null;
|
|
42
|
+
this._hoverInstalled = false;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
/**
|
|
@@ -114,6 +119,58 @@ class Button extends Widget {
|
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Give this button a hover highlight: while the pointer is over the
|
|
124
|
+
* button its background/foreground switch to the supplied colors,
|
|
125
|
+
* reverting on mouse-out. Mirrors the qt/gtk backends' per-button
|
|
126
|
+
* hover. Pass ``(null, null)`` or empty strings to clear it.
|
|
127
|
+
*
|
|
128
|
+
* Implemented with mouseenter/mouseleave that swap (and restore) the
|
|
129
|
+
* inline style, because an inline base background set via set_color
|
|
130
|
+
* would otherwise win over a CSS ``:hover`` rule.
|
|
131
|
+
*
|
|
132
|
+
* @param {string|null} [bg=null] - Hover background CSS color.
|
|
133
|
+
* @param {string|null} [fg=null] - Hover foreground (text) CSS color.
|
|
134
|
+
*/
|
|
135
|
+
set_hover(bg=null, fg=null) {
|
|
136
|
+
this._hoverBg = (bg === '') ? null : bg;
|
|
137
|
+
this._hoverFg = (fg === '') ? null : fg;
|
|
138
|
+
if (!this._hoverInstalled) {
|
|
139
|
+
this._hoverInstalled = true;
|
|
140
|
+
this.element.addEventListener('mouseenter',
|
|
141
|
+
() => this._applyHover());
|
|
142
|
+
this.element.addEventListener('mouseleave',
|
|
143
|
+
() => this._restoreHover());
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
_applyHover() {
|
|
148
|
+
if (this._hoverBg === null && this._hoverFg === null) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
// remember whatever inline colors are in effect (e.g. a base color
|
|
152
|
+
// from set_color, or '' for the default look) so we can restore them
|
|
153
|
+
this._savedBg = this.element.style.background;
|
|
154
|
+
this._savedFg = this.element.style.color;
|
|
155
|
+
if (this._hoverBg !== null) {
|
|
156
|
+
this.element.style.background = this._hoverBg;
|
|
157
|
+
}
|
|
158
|
+
if (this._hoverFg !== null) {
|
|
159
|
+
this.element.style.color = this._hoverFg;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
_restoreHover() {
|
|
164
|
+
if (this._savedBg !== undefined) {
|
|
165
|
+
this.element.style.background = this._savedBg;
|
|
166
|
+
this._savedBg = undefined;
|
|
167
|
+
}
|
|
168
|
+
if (this._savedFg !== undefined) {
|
|
169
|
+
this.element.style.color = this._savedFg;
|
|
170
|
+
this._savedFg = undefined;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
117
174
|
_cb_redirect(action) {
|
|
118
175
|
if (action === 'clicked') {
|
|
119
176
|
this.make_callback('activated');
|
|
@@ -149,6 +149,42 @@ class Dialog extends TopLevel {
|
|
|
149
149
|
this._contentArea.set_spacing(gap);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Removes a widget from the dialog's content area.
|
|
154
|
+
* @param {Widget} child - The widget to remove.
|
|
155
|
+
* @param {boolean} [destroy=false] - If true, also destroy the child.
|
|
156
|
+
*/
|
|
157
|
+
remove_widget(child, destroy = false) {
|
|
158
|
+
this._contentArea.remove_widget(child, destroy);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Removes all widgets from the dialog's content area, leaving the
|
|
163
|
+
* button bar intact. (The base implementation would clear the
|
|
164
|
+
* dialog's own children -- the content area + button bar -- which
|
|
165
|
+
* detaches the layout; delegate here to match add_widget().)
|
|
166
|
+
* @param {boolean} [destroy=false] - If true, also destroy each child.
|
|
167
|
+
*/
|
|
168
|
+
remove_all(destroy = false) {
|
|
169
|
+
this._contentArea.remove_all(destroy);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Returns the content area's child widgets.
|
|
174
|
+
* @returns {Widget[]} The children array.
|
|
175
|
+
*/
|
|
176
|
+
get_children() {
|
|
177
|
+
return this._contentArea.get_children();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Returns the number of widgets in the dialog's content area.
|
|
182
|
+
* @returns {number} The child count.
|
|
183
|
+
*/
|
|
184
|
+
num_children() {
|
|
185
|
+
return this._contentArea.num_children();
|
|
186
|
+
}
|
|
187
|
+
|
|
152
188
|
/**
|
|
153
189
|
* Adds a button widget to the dialog's button bar.
|
|
154
190
|
* Clicking the button fires the dialog's 'activated' callback
|
|
@@ -437,16 +437,19 @@ class MDISubWindow extends ContainerWidget {
|
|
|
437
437
|
|
|
438
438
|
/** Raises the sub-window to the top of the z-order. */
|
|
439
439
|
raise_() {
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
// Place this window above all others. Use (max existing z)+1
|
|
441
|
+
// rather than children.length: the z-indices can drift above the
|
|
442
|
+
// child count (e.g. after closing windows or repeated raise/lower),
|
|
443
|
+
// which previously left a freshly added/raised window stacked
|
|
444
|
+
// *under* existing ones, hiding it.
|
|
445
|
+
let maxZ = 0;
|
|
442
446
|
for (let subwin of this.mdi_widget.children) {
|
|
443
|
-
if (subwin
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
-
win_elt.style.zIndex--;
|
|
447
|
-
}
|
|
447
|
+
if (subwin !== this) {
|
|
448
|
+
let z = parseInt(subwin.get_element().style.zIndex, 10) || 0;
|
|
449
|
+
if (z > maxZ) maxZ = z;
|
|
448
450
|
}
|
|
449
451
|
}
|
|
452
|
+
this.element.style.zIndex = maxZ + 1;
|
|
450
453
|
|
|
451
454
|
this.mdi_widget._refreshActiveSubWindow();
|
|
452
455
|
this.mdi_widget.make_callback('page-switch', this.get_child());
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use_strict";
|
|
2
|
+
|
|
3
|
+
import {Widget} from "./Widget.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A thin separator rule (like an HTML <hr>). Rendered as a 1px border on
|
|
7
|
+
* one edge of a zero-thickness div so it takes essentially no space along
|
|
8
|
+
* its thin axis while stretching along the other.
|
|
9
|
+
* @extends Widget
|
|
10
|
+
*/
|
|
11
|
+
class Separator extends Widget {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} [orientation='horizontal'] - 'horizontal' or 'vertical'.
|
|
15
|
+
* @param {Object} [options]
|
|
16
|
+
*/
|
|
17
|
+
constructor(orientation='horizontal', options={}) {
|
|
18
|
+
super();
|
|
19
|
+
// orientation may arrive positionally or in the options dict
|
|
20
|
+
if (orientation != null && typeof orientation === 'object') {
|
|
21
|
+
options = orientation;
|
|
22
|
+
orientation = null;
|
|
23
|
+
}
|
|
24
|
+
this._orientation = orientation
|
|
25
|
+
|| this.get_option(options, 'orientation', 'horizontal');
|
|
26
|
+
|
|
27
|
+
this.element = document.createElement('div');
|
|
28
|
+
this.element.className = 'separator-widget';
|
|
29
|
+
this._applyOrientation();
|
|
30
|
+
|
|
31
|
+
super.init_style();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_applyOrientation() {
|
|
35
|
+
let s = this.element.style;
|
|
36
|
+
s.borderTop = s.borderLeft = '';
|
|
37
|
+
s.width = s.height = '';
|
|
38
|
+
if (this._orientation === 'vertical') {
|
|
39
|
+
s.width = '0px';
|
|
40
|
+
s.height = '100%';
|
|
41
|
+
s.borderLeft = '1px solid #888';
|
|
42
|
+
} else {
|
|
43
|
+
s.height = '0px';
|
|
44
|
+
s.width = '100%';
|
|
45
|
+
s.borderTop = '1px solid #888';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
set_orientation(orientation) {
|
|
50
|
+
this._orientation = orientation || 'horizontal';
|
|
51
|
+
this._applyOrientation();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Separator };
|
|
@@ -35,6 +35,10 @@ class TextArea extends Widget {
|
|
|
35
35
|
|
|
36
36
|
this._scrollTimer = null;
|
|
37
37
|
this._scrollReady = false;
|
|
38
|
+
// history limit: max number of lines retained (null = unlimited).
|
|
39
|
+
// NOTE: this caps the *content*, not the display height -- the
|
|
40
|
+
// textarea is sized by its container (grid cell) and scrolls.
|
|
41
|
+
this._limit = null;
|
|
38
42
|
|
|
39
43
|
super.init_style();
|
|
40
44
|
|
|
@@ -88,6 +92,7 @@ class TextArea extends Widget {
|
|
|
88
92
|
|
|
89
93
|
set_text(text) {
|
|
90
94
|
this._textarea.value = text;
|
|
95
|
+
this._enforce_limit();
|
|
91
96
|
this._syncScrollbars();
|
|
92
97
|
}
|
|
93
98
|
|
|
@@ -97,9 +102,20 @@ class TextArea extends Widget {
|
|
|
97
102
|
|
|
98
103
|
append_text(text) {
|
|
99
104
|
this._textarea.value += text;
|
|
105
|
+
this._enforce_limit();
|
|
100
106
|
this._syncScrollbars();
|
|
101
107
|
}
|
|
102
108
|
|
|
109
|
+
/** Trim the buffer to the configured line limit (oldest dropped). */
|
|
110
|
+
_enforce_limit() {
|
|
111
|
+
if (!this._limit) return;
|
|
112
|
+
let lines = this._textarea.value.split('\n');
|
|
113
|
+
if (lines.length > this._limit) {
|
|
114
|
+
this._textarea.value = lines.slice(lines.length - this._limit)
|
|
115
|
+
.join('\n');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
103
119
|
clear() {
|
|
104
120
|
this._textarea.value = '';
|
|
105
121
|
this._syncScrollbars();
|
|
@@ -115,7 +131,14 @@ class TextArea extends Widget {
|
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
set_limit(numlines) {
|
|
118
|
-
|
|
134
|
+
// History limit: the maximum number of lines retained in the
|
|
135
|
+
// buffer (oldest dropped when exceeded). This is NOT the display
|
|
136
|
+
// height -- the textarea is sized by its container and scrolls --
|
|
137
|
+
// so we must not touch ``rows`` (doing so would inflate the
|
|
138
|
+
// textarea to ``numlines`` tall and defeat scrolling).
|
|
139
|
+
this._limit = (numlines && numlines > 0) ? numlines : null;
|
|
140
|
+
this._enforce_limit();
|
|
141
|
+
this._syncScrollbars();
|
|
119
142
|
}
|
|
120
143
|
|
|
121
144
|
// -----------------------------------------------------------------
|