aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/contextmenu.lua
AgeCommit message (Collapse)Author
2023-01-30Context menu fixes and keyboard navigation (#1338)vqn
* fix Doc contextmenu not registering commands if scale plugin is not found * fix TreeView contextmenu commands not working if the mouse hovers DocView * add keyboard navigation to TreeView contextmenu * fix incorrect contextmenu predicate
2022-08-16Allow command predicates to manage parameters passed to the commandsGuldoman
When a command is performed with parameters, those are now passed to the predicate. The predicate can then return, after the validity boolean, any other value that will then be passed to the actual command. If the predicate only returns the validity boolean, the original parameters are passed through to the actual command. This allows predicates to manipulate the received parameters, and allows them to pass the result of an expensive computation to the actual command, which won't have to recalculate it. String and table predicates will now also return `core.active_view`.
2022-05-31plugins: dropped --lite-xl version tagjgmdev
2022-05-22Merge branch 'master' into master-2.1jgmdev
2022-05-15plugin contextmenu: simplify predicatejgmdev
2022-04-03Bumping version numbers.Adam Harrison
2022-01-29Travel by contextMenu using keyboardAlexSol
2021-12-18multiple improvements to loggingtakase1121
- added style.log table - removed contextmenu - use ctrl+click to copy individual log entries - use icon instead of + or - for log items in logview
2021-11-23Added in cut, copy and paste to the context menu. Also removed find pattern, ↵Adam Harrison
as that's no longer a valid command. Also made it so commands only show up if their predicates are valid.
2021-08-24add context menu options for logviewtakase1121
2021-08-172.0 changelog and modversion updates.Adam Harrison
2021-06-28Added context menu to treeview.jgmdev
2021-06-17Do not duplicate RootView method in contextmenuFrancesco Abbate
The method RootView:on_mouse_pressed was copied in the contextmenu plugin with a small modification to intercept the mouse clicks of the active view. This approach is problematic because a relatively large portion of code is duplicated. We introduced a function named RootView.on_view_mouse_pressed to let plugins like contextmenu intercepts mouse clicks in the active area without duplicating the function RootView:on_mouse_pressed.
2021-06-14Fixed contextmenu to play nice with dragging nodes.Adam Harrison
2021-06-07[plugin/contextmenu] Append itemsets that where registered. (#258)Jefferson González
2021-06-05prevent mouse movement from propagating when context menu is opentakase1121
2021-06-05export context menutakase1121
2021-06-03Scale fonts context menu (#246)Francesco
* Retrieve scale plugin from lite-plugins * New implementation of scale plugin and font C API Introduce two new C API functions, renderer.font.get_size and set_size respectively to get the font size and to set the size to a new value. Using these functions we don't need to know the name of the font but we can just change their size. Adapt the scale plugin to use the new C API function with minor adaptations in the logic. Use smaller step to scale fonts. Rename font_desc_free function, previous name was misleading as only the cached resources are freed. * Add contextmenu plugin from takase From https://github.com/takase1121/lite-contextmenu Adapted to show font scaling commands and find/replace commands. i# testing.lua * Fix the cursor flickering with contextmenu To avoid flickering of the cursor when using the context menu we add a new function `core.request_cursor` that just take note of the cursor requested. The cursor will be actually changed only in root_view:draw() method only when all the drawing operations are done. This means the cursor will be changed only once per frame and only the most recent cursor change request will take effect. * Remove unneeded scale plugin return functions