annotate view/layout/default/library.tt @ 7:fa7a99c2d079

dox library templates and schemas
author sergey
date Wed, 14 May 2014 01:22:21 +0400
parents
children 7d92a42f8e18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
1 [%
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
2 labels(
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
3 CollectionTitle = "Home (%name%)"
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
4 );
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
5 document.css.push(css.global);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
6 document.css.push(css.library);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
8 CollectionClass = 'Benzin::Doxygen::Model::Collection';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
9 CompoundClass = 'Benzin::Doxygen::Model::Compound';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
10 MemberClass = 'Benzin::Doxygen::Model::Member';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
11
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
12 Icons = {
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
13 namespace = 'NS',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
14 class = 'C',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
15 variable = 'Var',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
16 function = 'F',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
17 property = 'P',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
18 interface = 'I',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
19 struct = 'S',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
20 enum = 'E',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
21 event = 'Ev'
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
22 };
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
23
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
24 NullIcon = '  ';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
25
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
26 coll = resource.Seek('doxygenCollection');
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
27
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
28 compounds = coll.location.compounds;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
29 members = resource.Seek('compound').location || coll.location.members;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
30
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
31 document.title = model.canonicalName;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
32
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
33 MACRO GetLocationFor(model) BLOCK;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
34 members.Child(model.doxId) IF model.isa(MemberClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
35 compounds.Child(model.doxId) IF model.isa(CompoundClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
36 END;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
37 %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
38 [% MACRO IconKind(model) BLOCK %]<span class="icon">[% Icons.item(model.kind) || NullIcon %]</span>[% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
39 [% MACRO Link(model,label,title) BLOCK %]<a class="$model.kind $model.protection" [% IF title %]title="$title" [% END %]href="[% GetLocationFor(model) %]">[% IconKind(model) %] $label</a>[% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
40 [% MACRO CompoundSiblings(model) BLOCK %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
41 [% compound = model.isa(MemberClass) ? model.compound : model %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
42 <ul class="members">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
43 [% FOREACH item IN compound.GetSiblings({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
44 <li [% IF item.doxId == compound.doxId %]class="active"[% END %]>[% Link(item,item.shortName, item.canonicalName) %]</li>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
45 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
46 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
47 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
48 [% MACRO Members(model) BLOCK %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
49 [% compound = model.isa(MemberClass) ? model.compound : model %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
50 <ul class="members">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
51 [% FOREACH item IN compound.GetMembers({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
52 <li [% IF item.doxId == model.doxId %]class="active"[% END %]>[% Link(item,item.shortName, item.canonicalName) %]</li>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
53 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
54 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
55 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
56 <div class="library-pane">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
57
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
58 <div id="toc-nav" class="nav-pane left">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
59 [% IF model.isa(CollectionClass) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
60
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
61 <ul class="dox-nav-menu">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
62 <li class="last"><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
63 [% Members(model) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
64 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
65 [% ELSE %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
66 [%
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
67 parents = model.GetParents({ kind = { '-not_in' = [ 'file', 'dir' ] } });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
68 parents.push(model) IF model.isa(CompoundClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
69 %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
70 <ul class="dox-nav-menu">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
71 <li [% IF !parents.size %]class="last"[% END %]><a href="$coll.location" title="$coll.model.description">[% CollectionTitle( name = coll.model.name) %]</a></li>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
72 [% FOREACH parent IN parents %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
73 <li [% IF loop.last %]class="last"[% END %]>[% Link(parent, parent.shortName, parent.canonicalName) %]</li>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
74 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
75 [% Members(model) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
76 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
77 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
78 </div>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
79 <div id="siblings-nav" class="nav-pane right">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
80 [% CompoundSiblings(model) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
81 </div>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
82 <div id="content-pane" class="content-pane">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
83 $content
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
84 </div>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
85 <script type="text/javascript">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
86 require(['implab/sticky'],function(sticky) {
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
87 sticky('toc-nav',{ along: 'content-pane' });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
88 sticky('siblings-nav', { along: 'content-pane' });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
89 });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
90 </script>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
91 </div>