!BoxUnHook Thread last updated on 2003-10-29 12:03:25

Posted by member 71746 on 2003-10-29 01:09:43

I'd like to see modules start adopting a new !Bang, !ModuleUnHook..

It's cool to be able to hook a module into an LSBox, but it'd be even cooler to be able to unhook a module from one box and hook it to another, maybe employing a syntax like

!UnHook
// unhooks module from the box it's currently hooked to.

!BoxHook (box name)
// hooks module to specified Box, this way the hook command could be called any time, not just at box creation.


As an example, you could have BoxOne be a floating widget and BoxTwo be your bar anchor, and have LSXCommand hooked to the bar by default and have the command hidden, then have a line like

*Hotkey Win Z !Execute [!CommandUnHook] [!CommandBoxHook BoxOne] [!LSBoxHide BoxTwo] [!LSBoxShow BoxOne]
// hides the bar, shows the floating widget, and moves LSXCommand to the floating widget

*Hotkey Win X !Execute [!CommandUnHook] [!CommandBoxHook BoxTwo] [!LSBoxHide BoxOne] [!LSBoxShow BoxTwo]
// hides the widget, shows the bar, hooks LSXCommand to the bar.


Of course scripting could be set up to alter the command X/Y/W/H values and whatnot...

I'm just using LSXCommand as an example, I'd like to see the feature implemented in any module that supports box hooks :)

Posted by member 7 on 2003-10-29 04:38:04 link

Grab the source, launch a compiler and go ahead. :)

Posted by member 99 on 2003-10-29 09:37:11 link

I'm not entirely sure, but I think !BoxHook would require access to internal stuff in lsbox. (It may not be possible to easily identify the modules by name from the outside.)

If you can get the window handle for the box, you can call the existing hook command directly, which is how I trick modules into hooking into skinbox.

And you might try just rehooking the module, it might work for some modules, depending on how they implement it. (of course that requires destroying and recreating boxes :/

Posted by member 12025 on 2003-10-29 11:38:12 link

Or if LsBox had more !bangs available for actions in a box (mouse in, mouse out, double click, middle click, click actions working inside of the drag rectangle, and setting more via !bangs), you could get most of it done with separate boxes and docking (and lots of scripting).
...if I could understand half the source from modules that I can actually get it for (grabbing the source--where does one do that for most modules?), I'd do some work myself. If I get some more free time soon (read: if I don't think finals will be too hard, as I need to raise my GPA badly) I might use LsWhiteBox and LsNothing as bases to figure out WTH is going on inside there.

Posted by member 71746 on 2003-10-29 11:47:16 link

Cerb, I agree wholeheartedly. I've wanted to specify mouse in/mouse out effects for LSboxes and especially for the builtin LSBox shortcut engine! (Sure, you can change the shortcut image on hover, but can't add anything else like showing/hiding other LSBoxes or setting the alpha-blend of a box)

Also, bang-controlled box-blending would be cool..

!LsBoxAlphaTrans (box name) (new blend level)


It's funny, you'd think any .RC setting should naturally be accompanied by its associated !bang command, but there's a TON of modules that only have function-related !bangs and no settings-related !bangs... It's just common sense people! :D

To get source for most LS Modules (at least, most current and commonly-available modules) check http://www.shellfront.org/modules/source/ :)

As for !ModuleUnHook and bang-controlled !BoxHook with as an argument, it could simply be implemented into LsBox instead of individual modules. Simply add a routine to allow on-the-fly hooking, with a syntax like

!LsBoxHook (module name) (hook command)
// example: !LsBoxHook BoxOne !CommandBoxHook
// this would hook LSXCommand to BoxOne when called.
// !LsBoxHook BarAnchor !LSMailHook
// this would hook LSMail to a Bar

!LsBoxUnHook (box name) (module)
// (module) would be taken in the same style as in grdTransparent, where you just specify the name of a loaded module without the path or extension.
// example: !LsBoxUnHook BoxOne lsxcommand-1.8.4


That way other modules wouldn't have to be altered and no new standard would have to be adopted for new modules..

Posted by member 12025 on 2003-10-29 12:03:25 link

!bang controlled alpha is there and works...but with focus and unfocus !bangs you could properly set it up for groups of boxes within your hypothetical setup.

I've thought of several ideas that simply don't appear possible at the moment. For one thing, no left (OK, that I could deal with, being that left-down and left-up control the dragging) or right-click actions within a drag rectangle...well there goes a nice gripper.
No onfocus or onunfocus actions, mousein, mouseout, etc.

(I never saw that link before at shellfront...wow, I'm dense)

...OTOH, I'm hard-pressed to find any shell anywhere near as versatile as LS, and most are little better than when I first tried them in terms of compatability and stability (SharpE and GeoShell, FI, still don't deal with C-Media's mixer app in Win2k well, so no sound on any PC aorund with onboard C-Media sound...that was as of last month), and God forbid I go back to Explorer and give up my virtual workspaces :).