]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Doxygen_Templates/printComponentTabs.js
CMSIS-DSP: Correction to spline function to be able to build examples
[cmsis] / CMSIS / DoxyGen / Doxygen_Templates / printComponentTabs.js
1 var strgURL =   location.pathname;                      // path of current component
2
3 // constuctor for the array of objects
4 function tabElement(id, folderName, tabTxt )  {
5         this.id = id;                                       // elementID as needed in html; 
6         this.folderName = folderName;                       // folder name of the component 
7     this.tabTxt = tabTxt;                               // Text displayed as menu on the web
8         this.currentListItem = '<li id="' + this.id + '" class="current"> <a href="../..' + this.folderName + 'index.html"><span>' + this.tabTxt + '</span></a></li>';
9         this.listItem = '<li id="' + this.id + '"> <a href="../..' + this.folderName + 'index.html"><span>' + this.tabTxt + '</span></a></li>';
10 };
11
12 // array of objects
13 var arr = [];
14
15 // fill array
16  arr.push( new tabElement( "GEN",     "/General/html/",     "General")   );
17  arr.push( new tabElement( "CORE_A",  "/Core_A/html/",      "Core(A)")   );
18  arr.push( new tabElement( "CORE_M",  "/Core/html/",        "Core(M)")   );
19  arr.push( new tabElement( "DRV",     "/Driver/html/",      "Driver")    );
20  arr.push( new tabElement( "DSP&ML",  "/DSP/html/",         "DSP")       );
21  arr.push( new tabElement( "NN",      "/NN/html/",          "NN")        );
22  arr.push( new tabElement( "RTOSv1",  "/RTOS/html/",        "RTOS v1")   );
23  arr.push( new tabElement( "RTOSv2",  "/RTOS2/html/",       "RTOS v2")   );
24  arr.push( new tabElement( "PACK",    "/Pack/html/",        "Pack")      );
25  arr.push( new tabElement( "Build",   "/Build/html/",       "Build")     );
26  arr.push( new tabElement( "SVD",     "/SVD/html/",         "SVD")       );
27  arr.push( new tabElement( "DAP",     "/DAP/html/",         "DAP")       );
28  arr.push( new tabElement( "ZONE",    "/Zone/html/",        "Zone")      );
29  
30 // write tabs
31 // called from the header file.
32 function writeComponentTabs()  {
33   for ( var i=0; i < arr.length; i++ ) {
34     if (strgURL.search(arr[i].folderName) > 0) {                    // if this is the current folder
35       document.write(arr[i].currentListItem);                       // then print and hightlight the tab
36     } else {                                                      
37       document.write(arr[i].listItem);                              // else, print the tab
38     }                                                             
39   }
40 };