Maybe 'cos it's easy to set: GA_Left, _myWin->BorderLeft + 2 + (idx * 24), // as we add IDX gadgets GA_Top, _myWin->BorderTop + 1,
rather that doing "complex" calculations.
So how this one should be less complex then ?:) :
IIntuition->SetAttrs(browsegad, GA_RelRight, x - browsegad->Width - 1,TAG_END);
@All Have anyone any idea, how we can try to "expand" our patched window, i.e. not add gadget on top of ready window, but, expand whole window with new gadget (mean resize the whole window on the size of gadgets we add, and put them on new/added position of the window). I.e. to have all those "name", "type" and "date" gadgets at top follow after our bar's gadgets. Not just to have our gadgets over the window's content.
See what i mean:
There the url-bar i added at bottom added just on the window content , and overrites with the content of the window once there anything to add in (see at the end of video). That all because we add it at top of the window, while, it should be part of window's gadgets (by resizing the window and updating actual gadget list of window, not just creating new ones on top of window)
I think it should be something like:
-- reading window's size -- increase the window size on size of the toolbar -- find the first gadgets in the window and add our ones before
Any ideas how to do it ?:)
Edited by kas1e on 2023/11/21 2:54:58 Edited by kas1e on 2023/11/21 2:59:03
The problem is, that workbench does not know of any gadgets other than its own. It still is a plain intuition window (no reaction class or boopsi class). So the rendering uses the whole window area. Any gadgets you place inside the windows area will be painted over by the workbenchs rendering.
Therefor a solution is, to put the custom gadgets inside the window border. Well, this means that the top border is problematic, because of the title. If you increase the top border height, the title will be centered and gets in the way.
Any gadgets you place inside the windows area will be painted over by the workbench rendering.
Yeah, of course, so we need to place them not inside the window, but use other areas of window: borders, titles, etc. Titles is not the way if we want to cookie up something good-looking, but borders are ok.
Quote:
Therefor, a solution is, to put the custom gadgets inside the window border. Well, this means that the top border is problematic, because of the title. If you increase the top border height, the title will be centered and gets in the way.
So, is it possible to increase top border height from my patching function ? Just want to play with it in sake of tests.
And, isn't gadgets such as "name", "title" and "date" are part of window border, or of window content ? What if i can find in the list of gadget structures where they placed, and add before them another gadget, and upload them back to their original position. This will (probably) automatically extend the area below the title bar, and before the "name/title/data" gadgets to give me a new space to put by gadget in ? Or that will not work ?
@Context I just tried simple way, just by settings win->BorderTop to my value, like this:
win->BorderTop = win->BorderTop+50;
return win;
And that what i have then:
See, it increases the area where gadgets are, and content of window seems to do not overwrite it. Probably that mean, that gadgets are placed on the border too, not inside the intuition window itself ?
But with this simple change, while it increase size, it bring some rendering issues in the window (At bottom, at the right) when i resize window, which i assume happens because i also need to initialize/clear the whole memory of this new added size to make rendering issues disappear ?
Anyway, if gadgets are attached to the border, and i want my one to be placed before (as first one), then i need to read gadgets, add my one, at upload them back via SetAttr ?
And as i see title are ok still after i change border size ?
Just a suggestion but wouldn't it be simpler to write a small commodity that simply open Filer or any other similar tools directly to the drive/drawer you want to open by double click?
In the same way, ASL requester could be also patched to use (new type of enhanced) requester (a bit like the MUI one do), no?
in textmode window (as your grab) the titles headers are created as CUSTOMGADGET and seems it is just after window is opened/created.
So it's not part of a window then, but of a border ? And then, increasing size, clone gadgets, add our new one to them, and upload them back may work then.
@Petrol Quote:
Just a suggestion but wouldn't it be simpler to write a small commodity that simply open Filer or any other similar tools directly to the drive/drawer you want to open by double click?
We mostly want to do it for own pleasure and technical interest, and to have something which we fully understand, and which small as possible and still the same old workbench which many of us still love :)
@All Can somebody point me out how correctly block the patched openwindowtaglist, so it only does what i need, and then do nothing (and not open workbench window). So far i tried to return NULL instead of original, but then while window not opens, it "blink" the title bar.
But if you "pass" anything else than NULL, WB/wb_lib will think it has a drawer window (pointer) and act adding gadgets, stuff. And the blink, as other user posted, is a warn defined in Sound prefs.