Question for extension development

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Question for extension development

Lukáš Haberzettl
Hello,
I have a question about Inkscape extensions UI options. I need textarea input (not only one line for text input, but something like textarea html element), but as far as I studied the documentation I haven’t find out how to do this. 
Is there any option how to add this type of input to interface of extension? 
Original of my question can be seen here : https://answers.launchpad.net/inkscape/+question/470626

Thank you for your reply,
Lukas Haberzettl

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question for extension development

Eduard Braun
Am 06.03.2017 um 20:38 schrieb Lukáš Haberzettl:
Hello,
I have a question about Inkscape extensions UI options. I need textarea input (not only one line for text input, but something like textarea html element), but as far as I studied the documentation I haven’t find out how to do this. 
Is there any option how to add this type of input to interface of extension? 
Original of my question can be seen here : https://answers.launchpad.net/inkscape/+question/470626

Thank you for your reply,
Lukas Haberzettl

Hi Lukas,

I'm afraid there is currently no option to generate a multiline text parameter.

Some options:
  • Refactoring and improving the extension implementation is something I have on my todo list and I could have a look at multiline text inputs, too, but it won't happen tomorrow.
  • If you have some knowledge of GTK+ you could probably implement it yourself (code is at [1]). It shouldn't be to hard to implement it as an extension for the "string" parameter.
  • Use Python capabilities to generate a custom UI. TkInter is bundled by default, but in principle you can use any of the countless implementations, see [2].

Regards,
Eduard


[1] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/extension/param
[2] https://wiki.python.org/moin/GuiProgramming

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question for extension development

Mark Schafer

Hi Lukas,

Alas as tcl/tkinter is the only included way to do UI - you can't use another one unless you bundle its entire executable in with your plugin.
You will also have to work out how to call it as the env variable and paths are not adjustable from within inkscape extensions. This means you will probably need an installer to do this - which is probably why we don't currently have any extensions that do this currently despite an oft requested need for a couple more UI elements.
- e.g. file picker and multi-line txt are probably most common requests (but any dependency in your UI can't be handled either).

The rest of us just try to do our best. E.g. cutting and pasting a full path into a txt field with location of a file with the extra data you need.
Sorry about this... I'm sure its on the list and will be addressed one day :)


On 3/7/2017 9:30 AM, Eduard Braun wrote:
Am 06.03.2017 um 20:38 schrieb Lukáš Haberzettl:
Hello,
I have a question about Inkscape extensions UI options. I need textarea input (not only one line for text input, but something like textarea html element), but as far as I studied the documentation I haven’t find out how to do this. 
Is there any option how to add this type of input to interface of extension? 
Original of my question can be seen here : https://answers.launchpad.net/inkscape/+question/470626

Thank you for your reply,
Lukas Haberzettl

Hi Lukas,

I'm afraid there is currently no option to generate a multiline text parameter.

Some options:
  • Refactoring and improving the extension implementation is something I have on my todo list and I could have a look at multiline text inputs, too, but it won't happen tomorrow.
  • If you have some knowledge of GTK+ you could probably implement it yourself (code is at [1]). It shouldn't be to hard to implement it as an extension for the "string" parameter.
  • Use Python capabilities to generate a custom UI. TkInter is bundled by default, but in principle you can use any of the countless implementations, see [2].

Regards,
Eduard


[1] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/extension/param
[2] https://wiki.python.org/moin/GuiProgramming


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford


_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7998 / Virus Database: 4756/14070 - Release Date: 03/06/17



------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Question for extension development

Windell H. Oskay

> On Mar 7, 2017, at 3:06 PM, Mark Schafer <[hidden email]> wrote:
>
> The rest of us just try to do our best. E.g. cutting and pasting a full path into a txt field with location of a file with the extra data you need.

One additional workaround is to have the user enter the input text as a text object (text or flowroot), and to use that text object as an input to your extension.

Windell H. Oskay, Ph.D.
Co-Founder and Chief Scientist
Evil Mad Scientist Laboratories
175 San Lazaro Ave, STE 150
Sunnyvale CA 94086
http://www.evilmadscientist.com/


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Loading...