ID:134610
 
It would be pretty nice to have a /window datum, yeah? Rather than sending something to a browser, and then having to set a list of options, why not simply convert the options to variables, and simply send the window to the player?

Now, obviously the options/variables switch wasn't what compelled me to type this up. I think that with a window datum, you could have MUCH more control over things dealing with the browser. For example, a Close() proc(or, to follow suit, a Del() proc) would be called whenever the window closed. This would give the programmer more control of what to do after the window was gone. Sure, you could set can_close to 0 and make a link that does the stuff in client/Topic(), but that stuff would only ever execute if the link were the cause of it closing. All it would take was for someone to press Alt+F4, and your whole link idea goes to the scrap heap.

Sure, you could throw in certain checks to see if a value hasn't been passed after a certain amount of time, in which case you could send a default. But wouldn't it be more efficient to have it called neatly inside of a closing proc?

Aside from the aforementioned, there are still plenty of other proposed benefits from the /window datum! You could group windows to have certain default values, like background color for example. As an example:
window
var/bgcolor="#FFFFFF"
blackbg/bgcolor="#000000"
Display()
// In keeping with a certain popular library, I'd assume that the Display() proc would be what displays it.
src<<browse("..body{background-color:[bgcolor];}....")
// I'm not creative enough to think of an alternative to browse() to use here

...where you could then make new windows based on what type of background color you wanted.

Another possible benefit would be the ability to switch easily from focus of one window to another(can you say Focus() proc?). Also, ideally, you would be able to set vars to determine a popup windows screen location, as opposed to it popping up smack in the middle of the screen. If not complete control over the location(offsets), I would assume that this could at least allow one to set certain values for top-left, top, top-right, right, bottom-right, bottom, bottom-left, left, and center.

Rather than go on, I'll leave it at that. 4:35 AM is a bit too early(late, as a matter of fact) to do too much thinking, you know. Especially on an empty stomach.

Think about it!
Hiead
Sounds great. Much of that can be done yourself, but much also means not all. However, I do think that the closing trigger is something they already want to do.
*supports*

Sounds interesting.
I've wanted all these things for a long time and tried it once before, but I've learned a few things since then. ;) I tried it again today and am happy to report that full control over the popup is within our grasp using a simple DM library: Size and position controls, an onClose event reported to the game world, and many other features that browse() doesn't support. I'll probably release it on BYONDscape once I polish it up a bit. :)
In response to Shadowdarke
Bleh. Always remember to test thuroughly before making grandiose claims. While the library is capable of displaying dialogs with great control, it has several fundamental problems that make it impractical for anything other than simple data display. I might still release it for people to play with, but it's not the solution I had hoped for.

Yep, BYOND still needs better browse() controls.