Skip to content

Commit

Permalink
Update Docking Tools v0.1 > v0.2 (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTalagan authored Dec 18, 2024
1 parent 0322db9 commit 018279a
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 230 deletions.
100 changes: 88 additions & 12 deletions View/talagan_Docking tools.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,102 @@
--[[
@description Docking tools : actions to resize docks
@version 0.1
@version 0.2
@author Ben 'Talagan' Babut
@donation https://www.paypal.com/donate/?business=3YEZMY9D6U8NC&no_recurring=1&currency_code=EUR
@license MIT
@links
Forum Thread https://forum.cockos.com/showthread.php?t=296531
@metapackage
@changelog
- Added support for all dock positions (left/top/bottom/right)
- New syntax for duplicated action names allow to define conditional heights depending on the dock position
- New syntax for duplicated action names allow to target other widgets than the active MIDI Editor
@provides
[main=main] talagan_Docking tools/actions/talagan_Maximize bottommost dock.lua > talagan_Maximize bottommost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Minimize bottommost dock.lua > talagan_Minimize bottommost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Set bottommost dock height (500).lua > talagan_Set bottommost dock height (500).lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Maximize dock containing active MIDI Editor.lua > talagan_Maximize dock containing active MIDI Editor.lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Minimize dock containing active MIDI Editor.lua > talagan_Minimize dock containing active MIDI Editor.lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Set dock containing active MIDI Editor height (500).lua > talagan_Set dock containing active MIDI Editor height (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set bottommost dock height (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set dock containing active MIDI Editor height (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize dock containing project bay.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize dock containing project bay.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set dock containing project bay size (500,700,500,700).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize bottommost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize bottommost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set bottommost dock size (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize topmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize topmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set topmost dock size (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize rightmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize rightmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set rightmost dock size (500).lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize leftmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize leftmost dock.lua
[main=main] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set leftmost dock size (500).lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Maximize dock containing active MIDI Editor.lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Minimize dock containing active MIDI Editor.lua
[main=main,midi_editor] talagan_Docking tools/actions/talagan_Generic dock resize action.lua > talagan_Set dock containing active MIDI Editor size (500).lua
[nomain] talagan_Docking tools/docking_lib.lua
@changelog
- Initial Release
@about
This package provide actions to quickly resize the MIDI dock and the bottommost dock (maximize, minimize, or set to custom height).
This package provide actions to quickly resize the docks in REAPER.
These actions are meant to be small bricks of bigger custom actions where you perform a reorganisation of the UI (e.g. use FTC's scrolling scripts for the MIDI editor).
You can copy / paste the "... (500).lua" action files and modify their name to put a custom height instead of 500.
All actions in this package are duplicates of the same one, with a different name that will decide of it's behaviour. The syntax of the name should be one of the following :
- Maximize A_DOCK.lua
- Minimize A_DOCK.lua
- Set A_DOCK size (SIZES).lua
A_DOCK can be either :
- DIRMOST dock
- dock containing A_WIDGET
DIRMOST can be one of the following :
- leftmost
- rightmost
- bottommost
- topmost
A_WIDGET can be one of the following :
- active MIDI Editor
- Mixer
- Project Bay
- Media Explorer
- Track Manager
- Track Group Manager
- Take Properties
- Undo History
- Envelope Manager
- Routing Matrix
- Track Grouping Matrix
- Track Wiring Diagram
- Region Render Matrix
- FX Browser
- Navigator
- Big Clock
- Performance Meter
Finally SIZES syntax is one of the following
- T,R,B,L
- DIM
T,R,B,L and DIM are either pixel sizes, or "min" or "max"
If using the first syntax, each value T,R,B or L applies conditionally to the dock depending on its position (top, right, bottom or left). That way you may write, for example, your own "set to big" function that will use custom sizes for you desired "biggest" dock config, wherever the dock is.
Various actions using this syntax are installed with this package and may be used as an example.
If you want to add your own custom behaviours, just duplicate one (copy-paste the corresponding file **in the same directory**) and rename it to your will.
Thanks to @edgemeal for the technical advice / windows support and @X-raym for the code review!
Thanks to @Edgemeal for the technical advice / windows support and @X-raym for the code review!
--]]
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ end

if not docking_lib.CheckDependencies() then return end

docking_lib.maximizeBottommostDock()
docking_lib.resizeDockFromActionName(debug.getinfo(1,"S").source)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 018279a

Please sign in to comment.