-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
148 lines (94 loc) · 7.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
XDottir is a usability-focused XDot fork with fuzzy search and an animated GUI. It runs on Python 3 with Gtk 3.
----------------
XDottir features
----------------
- Fuzzy find. Search graph elements by fragments of the text they display. Always case-insensitive. Separate fragments by whitespace. All must match, but will match in any order. For example, "to ini" will match a node displaying the text "init_tools". Inspired by EMACS helm-swoop [https://github.com/ashiklom/helm-swoop].
- By default Find is incremental (as-you-type). For viewing a large graph on a slow computer, use the "-N" command line option to run in non-incremental mode.
- Hover-highlight system to help explore large graphs. See section [Mouse behaviour and keyboard shortcuts] below.
- The GraphViz layout filter for .dot files can be chosen in the GUI. Changing it will reload the current graph, using the newly selected layout. (Except when the input is in the pre-rendered .xdot format, or read from stdin.)
- Files in the pre-rendered .xdot format are always loaded without a GraphViz filter. The check is based on the filename extension. The "-n" command-line option allows unfiltered reading of .xdot from stdin.
- An integrated help is provided, explaining any hard-to-discover features. This is implemented as a built-in .xdot graph, which is loaded when the help button is clicked.
- Animated focus shift, highlighting, zooming. Improves onlooker experience in pair programming and similar multi-user contexts. On slow computers, use the "-b" and "-a" switches to disable animations.
- Keyboard shortcuts for pretty much everything.
Hard-to-discover functionality inherited from XDot 0.4:
- Shift-drag to zoom into a rectangular area.
- Ctrl-drag to zoom smoothly.
- Hover the mouse cursor over a node to highlight it.
- Hover over the end of a link (graph edge, "arrow") to highlight the node at the other end of the link. Useful for exploring graphs.
- Click a highlighted node to center it. Animated. The animation automatically zooms out and back in, if the view is highly zoomed and the destination node is near the edge of the view. If the destination is clearly visible, then the animation just pans the view.
- Click the end of a highlighted link (graph edge, "arrow") to jump to (and center) the node at the other end of the link. Animated.
--------------------------------------
Mouse behaviour and keyboard shortcuts
--------------------------------------
Below is a complete list for both XDot 0.4 and XDottir 1.0. Unless otherwise specified, each item applies to both programs.
Note the main version of XDot has since evolved; as of this writing, the current version is 1.1, and the below no longer necessarily applies to it.
-----
Mouse
-----
Click the end of a link = Center view to the node at the other end of the link
Click a node = Center view to clicked node
Right-click end of link = Center view to the node at the other end of the link
and zoom to 100% [XDottir only]
Right-click a node = Center view to clicked node and zoom to 100% [XDottir only]
Hover on the end of a link = Highlight link and the node at the other end
Hover on a node = Highlight node [XDot]
Highlight node and all its outgoing links [XDottir]
Alt+hover on a node = Highlight node and all its incoming links [XDottir only]
Shift+hover on a node = Highlight node, all its outgoing links
and the nodes connected by the links [XDottir only]
Ctrl+hover on a node = Highlight node, all its incoming links
and the nodes connected by the links [XDottir only]
Mouse wheel up/down = Zoom view in/out
Drag = Pan view
Shift+drag = Zoom to area (choose the area while dragging)
Ctrl+drag = Zoom smoothly
Dragging accepts both left and middle buttons.
--------
Keyboard
--------
Arrow keys = Pan view
+, =, Page up, keypad + = Zoom in
-, Page down, keypad - = Zoom out
F = Zoom to fit [XDottir only]
Ctrl+F = Find [XDottir only]
1, keypad 1 = Zoom to 100% [XDottir only]
Ctrl+O = Open file... [XDottir only]
R = Reload current file
Q = Quit
Escape = Cancel current mouse drag action
XDottir comes with a Find system. Fragments to search for can be in any order. Separate by whitespace. All must match.
If in incremental Find mode (default):
Ctrl+F or click Find field = Focus the Find field (re-highlighting all matches
if the highlight has disappeared)
typing [while in Find] = Incremental search for the text that is being typed.
Highlights all matches.
Escape [while in Find] = Clear the Find field and exit Find
Return [while in Find] = Jump to first match
N = Jump to next match
Shift+N = Jump to previous match
If in non-incremental Find mode (using "-N" command line option):
Ctrl+F or click Find field = Focus the Find field
Escape [while in Find] = Clear the Find field and exit Find
Return [while in Find] = Run the search for the current term
and highlight all matches.
N = First press: jump to first match
Further presses: jump to next match
Shift+N = Jump to previous match
Notes:
- The highlight from Find disappears when the mouse pointer moves over the graph. This is intentional, so that it is possible to explore the graph normally. To re-show the highlight for the same search term, hover the mouse cursor over the Find field, or focus it by pressing Ctrl+F.
- When cycling through the matches, they are (currently) not sorted.
----------------
History & future
----------------
XDottir was forked from XDot 0.4 in 2012 as a small GUI improvement project, inspired by animated OS X GUIs. As the most important addition that was not pure chrome, the Find feature was added to help source code exploration with Pyan3 [https://github.com/Technologicat/pyan] (which at that time was just Pyan, and for Python 2).
The fork was originally called "XDot 1.0" (as it was a major UI overhaul), but since nowadays everyone and their cat has their own XDot fork, and there was actually an official XDot 1.0 in 2018, this fork was rebranded for disambiguation purposes, after being ported to Python 3 and Gtk 3 in 2019. At this point the EMACS helm-swoop inspired fuzzy fragment search was added.
XDottir currently lives at:
https://github.com/Technologicat/xdottir
The final version for Python 2 is tagged as "python2".
The original XDot by José Fonseca lives at:
https://github.com/jrfonseca/xdot.py
The optimal future path is to PR the relevant changes from XDottir into the current main version of XDot (nowadays officially called xdot.py), and then drop the fork. However, the XDot codebase has evolved considerably since 2012, the fork fulfills my current needs, and I don't have much time to devote to the project. We'll see.
---------
Etymology
---------
Next-gen, based on XDot. Get it?