[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Support for callbacks...



On Wed, 16 Jul 2003, Herman Bruyninckx wrote:
> On Wed, 16 Jul 2003, Lars Clausen wrote:
> 
>> On Tue, 15 Jul 2003, Herman Bruyninckx wrote:
>> > What is the status of callbacks in the Dia roadmap?
>> > 
>> > I mean, is it (or will it be) possible to let some dia actions call a
>> > user-defined function?
>> > 
>> > For example, a callback on each (dis)connection event on the canvas
>> > gives a lot of possibilities to add user-specific functionality to
>> > Dia. (E.g., to check whether it has a meaning in the users'
>> > application context to connect two given objects together.)
>> 
>> That's funny, I was just thinking about that in the shower this morning.
>> A callback function would allow both elements and connectors to decide
>> whether they will allow the connection, and if they do, make any changes
>> that are needed.
>> 
>> Unless, by 'user-defined function', you mean that the user can add a bit
>> of scripting to an object to be evaluated upon connection.  Given the
>> above, that could be added using the Python plugin, or any other plugin
>> that anyone cares to add.
> 
> Indeed! That's exactly what I was looking for: a small extension of
> the Dia code could make tremendous changes in what a user can do with
> the program. My hope was to embed Dia as a "graphical editor" inside a
> robot simulation program... Most of the work would happen outside of
> Dia (via a Python plugin).

Dia doesn't currently support being embedded, though some of the work on
that has already been done from an earlier attempt (whose result I don't
know).  If you want to make Dia embeddable again, it'd be a great
improvement, and allow Dia to be used in a number of new places (browser
embedding, anyone?).

Have you looked at DiaCanvas(2)?  It does a number of the basic Dia things
(connections and handles), but is designed to be used as a widget.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HĂ„rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK