Should the main AGS Editor window be exposed to the plugin API?

Started by monkey0506, Sat 02/04/2011 07:44:35

Previous topic - Next topic

monkey0506

I'm writing a plugin for the editor that needs to use some forms, but I don't want them to show up in the taskbar as separate windows, and would prefer them to remain within the main AGS window.

Since the editor plugin API doesn't presently expose the main editor form, I'm resorting to doing this in the component's constructor:

Code: ags
            using (ContentDocument pane = new ContentDocument(new EditorContentPanel(), null, this))
            {
                _editor.GUIController.AddOrShowPane(pane);
                _mainForm = pane.TopLevelControl;
                _editor.GUIController.RemovePaneIfExists(pane);
            }


This is working for me, but it's not exactly optimal really.

So this has got me wondering..would exposing the main editor form to the plugin API be worthwhile? I took a brief look, and from what I can tell, the editor code itself only publicly exposes it as the IntPtr handle.

Really, even just a method for adding a form as a child control would work for my needs, but that's why I'm creating this thread (to ask what people think the best route might be for something like this (or indeed whether it would even be considered worth adding to the plugin API)).

Edit: If anyone saw the code before..suffice it to say I'm not well versed in C#. :P

Pumaman


monkey0506

Oh, well, yes, now that you've pointed that out. ::)

As denoted in my edit, I'm not well versed in C#, so..nevermind then.

SMF spam blocked by CleanTalk