tzachs Posted January 28, 2010 Share Posted January 28, 2010 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... Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 28, 2010 Share Posted January 28, 2010 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. Quote Link to comment Share on other sites More sharing options...
tzachs Posted January 28, 2010 Author Share Posted January 28, 2010 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... Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 28, 2010 Share Posted January 28, 2010 IIRC IndirectUI was designed to be a closed system. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 28, 2010 Share Posted January 28, 2010 Simon is correct. The two methods you listed above are intended for "internal" use only. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
tzachs Posted January 28, 2010 Author Share Posted January 28, 2010 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"... Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 28, 2010 Share Posted January 28, 2010 You can still develop complicated UIs, you just can't do it by extending IndirectUI (IE you have to create those controls yourself). Quote Link to comment Share on other sites More sharing options...
tzachs Posted January 29, 2010 Author Share Posted January 29, 2010 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... Quote Link to comment Share on other sites More sharing options...
pyrochild Posted January 29, 2010 Share Posted January 29, 2010 Get Reflector. Copy the controls you want. Problem solved. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2010 Share Posted January 29, 2010 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. Quote Link to comment Share on other sites More sharing options...
pyrochild Posted January 29, 2010 Share Posted January 29, 2010 Rick has endorsed this approach since Paint.NET's source closed. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
BoltBait Posted January 29, 2010 Share Posted January 29, 2010 Read Rick's post here: viewtopic.php?f=27&t=23064 for confirmation. (Specifically the second paragraph.) Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.