Jump to content

Questions about Indirect UI


tzachs

Recommended Posts

Hi, I'm trying to write a plugin, and I want to use the paint .net existing controls but I want them to be nested in my own ui container with some additional controls.

Is there any way to achieve that with indirect ui?

I noticed in ControlInfo.cs the methods:

public object CreateConcreteControl(object uiContainer);

public object CreateConcreteControl(Type uiContainerType);

These look promising, but since I don't see any documentation for them and since all of the plugin sources I looked at did not use these methods, I don't know if they fit my purpose, and I don't know how they are meant to be used. :(

Please help me,

thanks...

Link to comment
Share on other sites

Hi, I'm trying to write a plugin, and I want to use the paint .net existing controls but I want them to be nested in my own ui container with some additional controls

Not without using tricks that'd probably get your plugin deleted from the forums.

However, if you just want to use IndirectUI controls, since you obviously have the source, you should be able to copy the controls you want from it, although resolving dependencies might be hard.

KaHuc.png
Link to comment
Share on other sites

Nope, I don't have the source (not for the controls I want)...

I have the api for the indirect ui, in it I see that the effect has to override the OnCreateConfigUI method which returns a ControlInfo instance. In that ControlInfo I see the aforementioned methods that I hope were included in order to develop a more custom ui...

Link to comment
Share on other sites

Ok, thanks anyways...

If I could just suggest adding an ability to do this in the future, so that we will be able to develop more complicated UIs for our plugins without having to do "tricks"...

Link to comment
Share on other sites

You can still develop complicated UIs, you just can't do it by extending IndirectUI (IE you have to create those controls yourself).

Well, yes, that's exactly my problem. The controls are there, they are allowed to be used, but only if you use the 'simple' api.

It's like you have two options: either use our controls and nothing else, or write all of the controls yourself without using ours... it doesn't make too much sense to me...

Link to comment
Share on other sites

Maybe i'm paranoid, but since Paint.NET isn't open source any more i'd check with Rick before distributing a plugin with the controls copied from Reflector.

KaHuc.png
Link to comment
Share on other sites

Rick has endorsed this approach since Paint.NET's source closed.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...