On 27.10.2015 22:40, Evangelos Petsalis wrote:
> Hi Tiago,
> I was wondering if there is a way to customize what happens when a mouse
> button is clicked.
>
> In particular I am interested in the following:
> 1) Disabling the feature that allows user to move vertices around by using
> the mouse
> 2) Any callbacks that might be available when a mouse button is
> pressed/released
> 3) If you could point out the part of your code (name of file/function) that
> is being called upon a mouse click (that would be the code that gets the
> screen coordinates and from there extracts which vertex has been selected).

You need to take a look at the GraphWidget class:

    
https://graph-tool.skewed.de/static/doc/draw.html#graph_tool.draw.GraphWidget

clicking at the [source] link will show you the source. You will need
either to subclass or modify it to achieve what you want. Sorry, but the
documentation is still a bit scarce in this part, so you will need to
wad through the source code.

Best,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to