Graphviz. I need an attribute that changes the side of the edge exit - graphviz

I need attributes that change from the exit side of the edge:

Related

Examples of using body_entered and body_exited in Godot 3D (version 3.4.4)

I am trying to make a teleport part, so I need to detect when Body collides with area. I tried to use body_enter/body_entered and body_exit/body_exited, but I do not know how exactly they work and where do I need to insert them. Can I have example codes of using it?
My nodes path:
RigidBody
├ CollisionShape
├ MeshInstance
├ Area
├ ├ CollisionShape
Scene tree structure
First of all, if you want two things to collide you probably want them to be siblings. Not one Node child of the other. This is because Spatials are placed relative to their parent. Said another way: when an Spatial moves, its children move with it.
Enable monitoring
Second, you want to make sure that the Node that will detect the collision is able to do it. In the case of a RigidBody and an Area, the Area will detect the RigidBody, and for that it must have monitoring to be true This is the default. Thus, unless you have been messing with it, you need to do nothing.
Layers and masks
Third, you want the layers and masks to overlap. In particular, you want the collision_mask of the Area to have bits in common with the collision_layer of the RigidBody. By default, they come with the first bit set, so this is also satisfied by default unless you have been messing with it.
SIGNALS
Fourth, you need to connect the "body_entered" signal of the Area. You have two ways to do that:
Using the editor:
Have the Area selected in the Scene panel (on the left by default), and then go to the Node panel (on the right by default) and then to the Signals tab.
There you should find "body_entered(body:Node)". Double click it. Or select it and then click the "Connect…" button at the bottom, or press enter.
Godot will ask you to select the Node you will connect it to. You can connect it to any Node on the same scene that has a script attached beforehand. I suggest to connect it to the Area itself.
Godot will also allow you to specify the name of the method that will handle it (by default the name will be _on_Area_body_entered).
Under "advanced" you can also add extra parameters to be passed to the method, whether or not the signal can/will wait for the next frame ("deferred"), and if it will disconnect itself once triggered ("oneshot").
By pressing the Connect button, Godot will connect the signal accordingly, creating a method with the provided name in the script of the target node if it does not exist.
From code:
To connect a signal from code you use the connect method. See also disconnect and is_connected.
So you can, use the connect method to connect the "body_entered" signal, like this:
func _ready() -> void:
connect("body_entered", self, "_on_Area_body_entered")
func _on_Area_body_entered(body:Node) -> void:
pass
This code is intended to work in a script attached to the Area itself. It is also possible to call connect from a Node to another. Please note that we are passing the name of the method we want to connect as parameter to the connect method, and thus it can be whatever you want.
The connect method has optional parameters to specify extra parameters, or if you want the connection to be deferred or oneshot.
To reiterate: simply adding a method won't work, you need to connect the signal to it. And there is no special name for the method, it can have any name you choose.
With that done, the method should execute when the RigidBody overlaps the Area.

Keeping currently selected node at top of treeview

I have a treeview (TVWDB) which has several node, children and grandchildren. Depending on the user these can be shown as just the parent node, or with the children or even grandchildren displayed.
The user steps through this using a button which advances down the tree at the level they have selected (ie if a child is selected then it will step through each child).
Im looking for a way that when the selected item drops down that node is shown at the top of the tree (if there are parents then it should actually be the parent node which is shown.
I keep looking at .Ensurevisible and Getvisible count but this seems to work on the 1st attempt but then start jumping around on each subsequent advance.

Have GtkVolumeButton popup 'overflow' over window border

I was wondering if there was a way to have the popup from a GtkVolumeButton flow over the edge of the GtkWindow edge. Currently, I'm running into this problem:
EDIT: This is what I'm looking for (if it's possible):
I would like the volume selection popup to not be bounded by the window's edges. I'm not sure how the internals of gtk+ widget/window drawing work, so I'm not even sure this is possible.
Use a GtkHeaderBar to replace the system decorations with client side decorations. You can even put the control buttons and everything else in the GtkHeaderBar, so this application can take up even less space.

Cutting and pasting nodes in a TreeView control?

I'm looking to implement a cut and paste method to replace drag and drop in a TreeView control. Drag and drop no longer works in the TreeView, and I believe cut and paste will be easier for the people using it. In this TreeView, I will be working with cutting only the child nodes. This object has only parent and child nodes (parent being dates and child nodes being purchase orders.) I'm not sure if there is a cut property and/or paste property to use with treeview1.node.selected or whatever I need to use.
... upon clicking cut it copies the selected node to copynode. then remove the selected node.
so the node is stored in the copynode slot
This won't work as copynode is a reference to the thing you just removed (destroyed) so after removal copynode will point to Nothing.
Instead; when a cut event occurs store the key features of the cut node (text, key, icon index etc.) in to a module level user defined type (or delimited string/class/series of variables) and remove the node. You can then use this data as the basis to construct a new node when a paste event is raised.
(The cut/paste events are not bound to the windows clipboard, rather thay are your own inventions based upon a context menu/detection of ctrl+X/V)
im not sure how to check if the node has children when im pasting to it
if tv.SelectedItem.Children > 0 then
... got child nodes

p:tree ajax loading nodes does not display the expand icon

I'm trying to ajax load the p:tree component. The idea is to mimic the tree of a windows file system. When I click the expand icon of a node, I make a call to a service which returns list of directories under that directory node. I then simply add these new directories as child nodes of the node which was expanded. I can successfully add child nodes to a node, however, I need to see the expand icon beside every new node being added. This is not happening for me. Any child nodes I add render without the expand icon and thus I am unable to go deeper into the tree.
Furthermore, it seems that PF tree component will only display the expand icon it the node has one or more children. However, in my case, I don't know whether a node will have children or not until that node is expanded.
The source code is available at the PimeFaces forum, I am opening this question in the hopes of getting a few more eyes looking at it.
http://forum.primefaces.org/viewtopic.php?f=3&t=34819
I have managed to find a workaround for this.
Everytime I add a new node anywhere on the tree, add a 'dummy' node to it. This will ensure that every new node added will get the expand icon beside. Now, when clicking the expand icon on a node, the backing bean will remove all children and add the real nodes.
There is probably a better way of doing this so I am open to other suggestions but for the time being this will do its job.

Resources