OpenCores
URL https://opencores.org/ocsvn/core1990_interlaken/core1990_interlaken/trunk

Subversion Repositories core1990_interlaken

[/] [core1990_interlaken/] [trunk/] [documentation/] [protocol_survey_report/] [Packages/] [Forest.tex] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 N.Boukadid
\usepackage[edges]{forest}
2
\definecolor{folderbg}{RGB}{124,166,198}
3
\definecolor{folderborder}{RGB}{110,144,169}
4
\newlength\Size
5
\setlength\Size{4pt}
6
\tikzset{%
7
        folder/.pic={%
8
                \filldraw [draw=folderborder, top color=folderbg!50, bottom color=folderbg] (-1.05*\Size,0.2\Size+5pt) rectangle ++(.75*\Size,-0.2\Size-5pt);
9
                \filldraw [draw=folderborder, top color=folderbg!50, bottom color=folderbg] (-1.15*\Size,-\Size) rectangle (1.15*\Size,\Size);
10
        },
11
        file/.pic={%
12
                \filldraw [draw=folderborder, top color=folderbg!5, bottom color=folderbg!10] (-\Size,.4*\Size+5pt) coordinate (a) |- (\Size,-1.2*\Size) coordinate (b) -- ++(0,1.6*\Size) coordinate (c) -- ++(-5pt,5pt) coordinate (d) -- cycle (d) |- (c) ;
13
        },
14
}
15
\forestset{%
16
        declare autowrapped toks={pic me}{},
17
        pic dir tree/.style={%
18
                for tree={%
19
                        folder,
20
                        font=\ttfamily\small,
21
                        grow'=0,
22
                        inner ysep=1pt,
23
                },
24
                before typesetting nodes={%
25
                        for tree={%
26
                                edge label+/.option={pic me},
27
                        },
28
                },
29
        },
30
        pic me set/.code n args=2{%
31
                \forestset{%
32
                        #1/.style={%
33
                                inner xsep=2\Size,
34
                                pic me={pic {#2}},
35
                        }
36
                }
37
        },
38
        pic me set={directory}{folder},
39
        pic me set={file}{file},
40
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.