2017-04-12 29 views

回答

1

這可能嗎?是。

它是否自動化且簡單?編號

最棘手和最困難的方法是從自定義頁眉,頁腳和樣式表文件的Doxygen機制開始,並構建一個完全自定義的菜單系統。如果你對HTML/CSS瞭解不多,這可能是一個很高的命令。你需要爲你想包含的每一個菜單設計提供自定義的部分。如果您想要沿着這條路前行,請閱讀Doxygen's Customizing the output頁面的基礎知識。

另一種選擇是調整Doxygen菜單生成後。這是手動步驟,每次構建文檔時都需要重做。但它只需要修改Doxygen生成的navtreedata.js文件以進行所需的更改。該文件的結構如下(這是一個例子,可能不等同於你的):

var NAVTREE = 
[ 
    [ "Utility Library", "index.html", [ 
    [ "Main Page", "index.html", null ], 
    [ "Classes", "annotated.html", [ 
     [ "Class List", "annotated.html", "annotated_dup" ], 
     [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], 
     [ "Class Members", "functions.html", [ 
     [ "All", "functions.html", null ], 
     [ "Functions", "functions_func.html", null ] 
     ] ], 
     [ "Class Index", "classes.html", null ] 
    ] ], 
    [ "Files", null, [ 
     [ "File List", "files.html", "files" ] 
    ] ], 
    [ "Examples", "examples.html", "examples" ] 
    ] ] 
]; 

var NAVTREEINDEX = 
[ 
".html" 
]; 

var SYNCONMSG = 'click to disable panel synchronisation'; 
var SYNCOFFMSG = 'click to enable panel synchronisation'; 

在這裏,您可以更改導航,因爲我已經加入了「第二級菜單項」項目下面。如果您認爲合適,您可以明顯提供子頁面等。

var NAVTREE = 
[ 
    [ "Utility Library", "index.html", [ 
    [ "Main Page", "index.html", null ], 
    [ "Classes", "annotated.html", [ 
     [ "Class List", "annotated.html", "annotated_dup" ], 
     [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], 
     [ "Class Members", "functions.html", [ 
     [ "All", "functions.html", null ], 
     [ "Functions", "functions_func.html", null ] 
     ] ], 
     [ "Class Index", "classes.html", null ] 
    ] ], 
    [ "Files", null, [ 
     [ "File List", "files.html", "files" ] 
    ] ], 
    [ "Examples", "examples.html", "examples" ] 
    ] ], 

    [ "SECOND LEVEL MENU ENTRY", "sample-file-secondary.html", [ 
    ] ] 

]; 

var NAVTREEINDEX = 
[ 
".html" 
]; 

var SYNCONMSG = 'click to disable panel synchronisation'; 
var SYNCOFFMSG = 'click to enable panel synchronisation'; 

如果你想修改頂部菜單欄視圖,您可以通過編輯文件menudata.js做,以類似的方式。希望這可以幫助!

+0

太棒了。感謝修改navtreedata.js正是我所需要的。只要我對頁面進行更改,我就可以製作一份粘貼的副本,以避免弄亂導航。另外我已經看過doxygens自定義輸出頁面。我修改了佈局文件,並能夠獲得更多的摺疊作爲主頁的子頁面,但不在主頁面外。更改導航樹數據javascript正是我所需要的。 – arisonu123

+0

@ arisonu123 - 太棒了。很高興我能幫上忙! –

+0

嗯,我只是注意到,我移動的鏈接,使他們在主頁相同的水平,不再像藍色的其他鏈接突出顯示。任何想法如何解決這個問題? – arisonu123

相關問題