annotate view/layout/default/library.tt @ 16:e69c970c3ddd default tip

sync
author sergey
date Tue, 20 May 2014 01:28:48 +0400
parents d9551c7e7101
children
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 );
11
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
5 document.dojo.enable = 1;
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
6 document.class.push('library');
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
7 document.css.push(css.library);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
8
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
9 CollectionClass = 'Benzin::Doxygen::Model::Collection';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
10 CompoundClass = 'Benzin::Doxygen::Model::Compound';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
11 MemberClass = 'Benzin::Doxygen::Model::Member';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
12
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
13 Icons = {
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
14 namespace = 'NS',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
15 class = 'C',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
16 variable = 'Var',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
17 function = 'F',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
18 property = 'P',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
19 interface = 'I',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
20 struct = 'S',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
21 enum = 'E',
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
22 event = 'Ev'
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
23 };
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
24
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
25 NullIcon = '  ';
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
26
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
27 coll = resource.Seek('doxygenCollection');
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
28
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
29 compounds = coll.location.compounds;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
30 members = resource.Seek('compound').location || coll.location.members;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
31
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
32 document.title = model.canonicalName;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
33
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
34 MACRO GetLocationFor(model) BLOCK;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
35 members.Child(model.doxId) IF model.isa(MemberClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
36 compounds.Child(model.doxId) IF model.isa(CompoundClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
37 END;
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
38 %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
39 [% MACRO IconKind(model) BLOCK %]<span class="icon">[% Icons.item(model.kind) || NullIcon %]</span>[% END %]
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
40 [% MACRO Link(model,label,title) BLOCK %]<a class="$model.kind $model.protection" [% IF title %]title="$title" [% END %]href="[% GetLocationFor(model) %]">[% IconKind(model) %] [% label | html %]</a>[% END %]
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
41 [% MACRO CompoundSiblings(model) BLOCK %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
42 [% compound = model.isa(MemberClass) ? model.compound : model %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
43 <ul class="members">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
44 [% FOREACH item IN compound.GetSiblings({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
45 <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
46 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
47 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
48 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
49 [% MACRO Members(model) BLOCK %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
50 [% compound = model.isa(MemberClass) ? model.compound : model %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
51 <ul class="members">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
52 [% FOREACH item IN compound.GetMembers({ kind = { '-not_in' = [ 'file', 'dir' ] } }) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
53 <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
54 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
55 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
56 [% END %]
11
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
57 [% BLOCK LAYOUT;
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
58 render('base', content = content);
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
59 END %]
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
60 [% WRAPPER LAYOUT %]
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
61 <div id="content-expando" style="float: right; height: 10px; width: 0px;overflow: hidden;">&nbsp;</div>
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
62 <div class="library-pane">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
63
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
64 <div id="toc-nav" class="nav-pane left">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
65 [% IF model.isa(CollectionClass) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
66
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
67 <ul class="dox-nav-menu">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
68 <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
69 [% Members(model) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
70 </ul>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
71 [% ELSE %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
72 [%
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
73 parents = model.GetParents({ kind = { '-not_in' = [ 'file', 'dir' ] } });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
74 parents.push(model) IF model.isa(CompoundClass);
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
75 %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
76 <ul class="dox-nav-menu">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
77 <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
78 [% FOREACH parent IN parents %]
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
79 <li [% IF loop.last %]class="last"[% END %]>
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
80 [% Link(parent, parent.shortName, parent.canonicalName) %]
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
81 </li>
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
82 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
83 </ul>
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
84 [%- Members(model) %]
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
85 [% END %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
86 </div>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
87 <div id="siblings-nav" class="nav-pane right">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
88 [% CompoundSiblings(model) %]
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
89 </div>
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
90 <div id="content-pane" class="content-pane">
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
91 $content
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
92 <div style="clear:both;"></div>
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
93 </div>
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
94
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
95 <script type="text/javascript">
12
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
96 require(['implab/sticky','dojo/on', 'dojo/dom-geometry', 'dojo/dom-style'],function(sticky,on,g,css) {
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
97 sticky('toc-nav',{ along: 'content-pane', alongContent: true });
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
98 sticky('siblings-nav', { along: 'content-pane', stick: 'right', alongContent: true });
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
99
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
100 var sfn = function() {
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
101 var h = window.innerHeight;
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
102
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
103 var header = g.position('header');
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
104
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
105 var expand = h - header.h - 10; // windowHeight - headerHeight - contentBottomPadding
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
106
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
107 if (expand < 0)
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
108 expand = 0;
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
109
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
110 css.set('content-expando', 'height', expand + 'px');
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
111 };
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
112 sfn();
d9551c7e7101 improved dox library
sergey
parents: 11
diff changeset
113 on(window,'resize',sfn);
7
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
114 });
fa7a99c2d079 dox library templates and schemas
sergey
parents:
diff changeset
115 </script>
8
7d92a42f8e18 improved doxygen library
sergey
parents: 7
diff changeset
116 </div>
11
573272ec604b almost comlete doxygen library
sergey
parents: 8
diff changeset
117 [% END %]