Inkscape Forum Inkscape > How to add object properties

Posted by Bram (Guest)
on 26.01.2010 20:29
(Received via mailing list)
Hi list,

I want to add some new properties to the inkscape "object properties"
window.
I would like to use inkscape for the generation of some specific
interface files but need more than "id","onclick","onmouseover",etc.
It would be somewhat of a solution to just use "onclick" as "I/O input"
but it would be so much nicer to be able to rename or add these 
properties.

Is it possible to change these things from within inkscape ?

Kind regards
Bram
Posted by Jon Cruz (Guest)
on 26.01.2010 23:06
(Received via mailing list)
On Jan 27, 2010, at 8:12 AM, Bram wrote:

> Hi list,
> 
> I want to add some new properties to the inkscape "object properties" 
> window.
> I would like to use inkscape for the generation of some specific 
> interface files but need more than "id","onclick","onmouseover",etc.
> It would be somewhat of a solution to just use "onclick" as "I/O input" 
> but it would be so much nicer to be able to rename or add these properties.
> 
> Is it possible to change these things from within inkscape ?

That is something that has come up in the past, and does seem to be 
generally useful.

The Inkscape source code would need some minor tweaking to get that to 
happen. It could be hooked in simply, but more than a minimum is needed 
so as to be implemented in a maintainable way.
Posted by Bram (Guest)
on 26.01.2010 23:09
(Received via mailing list)
Jon Cruz schreef:
>> but it would be so much nicer to be able to rename or add these properties.
>>
>> Is it possible to change these things from within inkscape ?
>>      
>
> That is something that has come up in the past, and does seem to be generally useful.
>
> The Inkscape source code would need some minor tweaking to get that to happen. It could be hooked in simply, but more than a minimum is needed so as to be implemented in a maintainable way
>    
Thanks for your input

So it would be best if I change the source code and recompile (for the
time being) ?
This should be line 371 in src/dialogs/item-properties.cpp
And probably line 14 to 23 of both share/web-set-att.inx and
web-transmit-att.inx
And maybe src/attributes-test.h
Posted by Jon Cruz (Guest)
on 27.01.2010 22:20
(Received via mailing list)
On Jan 27, 2010, at 9:34 AM, Bram wrote:

> So it would be best if I change the source code and recompile (for the 
> time being) ?
> This should be line 371 in src/dialogs/item-properties.cpp
> And probably line 14 to 23 of both share/web-set-att.inx and 
> web-transmit-att.inx
> And maybe src/attributes-test.h

I'll have to get a little time to look into some of the details. (At the 
moment I'm traveling through New Zealand, so my computer use is a bit 
spotty). I'll probably get a better chance come next Monday.

But unless things are configurable, those changes won't be appropriate 
to directly go into the trunk.

Also, the inx files in general just describe what an extension will do, 
and does not do the operations themselves.
Posted by Bram (Guest)
on 28.01.2010 08:15
(Received via mailing list)
Jon Cruz schreef:
>
> I'll have to get a little time to look into some of the details. (At the moment I'm traveling through New Zealand, so my computer use is a bit spotty). I'll probably get a better chance come next Monday.
>
> But unless things are configurable, those changes won't be appropriate to directly go into the trunk.
>    
I understand but I'm not that much of a C programmer, nor am I familiar
with the inkscape sourcecode.
Changing some things I found with the "find text in files" function of
my python ide was not that hard.

If it's a small change maybe you can program it and I can do a donation
to inkscape or you to show my gratitude ?