1 /**
2 	Contains definitions for customizing DDOX behavior.
3 
4 	Copyright: © 2012 RejectedSoftware e.K.
5 	License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
6 	Authors: Sönke Ludwig
7 */
8 module ddox.settings;
9 
10 import vibe.inet.url;
11 import diet.html : HTMLOutputStyle;
12 public import vibe.web.common : MethodStyle;
13 
14 enum SortMode {
15 	none,
16 	name,
17 	protectionName,
18 	protectionInheritanceName,
19 
20 	None = none,
21 	Name = name
22 }
23 
24 enum NavigationType {
25 	moduleList,
26 	moduleTree,
27 	declarationTree,
28 
29 	ModuleList = moduleList,
30 	ModuleTree = moduleTree,
31 	DeclarationTree = declarationTree,
32 }
33 
34 class DdoxSettings {
35 	NavigationType navigationType = NavigationType.moduleTree;
36 	SortMode moduleSort = SortMode.protectionName;
37 	SortMode declSort = SortMode.protectionInheritanceName;
38 	string[] packageOrder;
39 	bool inheritDocumentation = true;
40 	bool mergeEponymousTemplates = true;
41 }
42 
43 
44 class GeneratorSettings {
45 	NavigationType navigationType = NavigationType.moduleTree;
46 	/// used for sitemap generation and for determining the URL prefix in registerApiDocs()
47 	URL siteUrl = URL("http://localhost:8080/");
48 	/// focus search field on load
49 	bool focusSearchField = false;
50 	/// Defines how symbol names are mapped to file names when generating file based documentation (useful for case insensitive file systems)
51 	MethodStyle fileNameStyle = MethodStyle.unaltered;
52 	/// Enables syntax highlighting for inline code
53 	bool highlightInlineCode = true;
54 	/// Select HTML style (e.g. compact, pretty)
55 	HTMLOutputStyle htmlOutputStyle = HTMLOutputStyle.pretty;
56 
57 	/// Creates a page per enum member instead of putting everything into a single table.
58 	bool enumMemberPages;
59 
60 	deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.")
61 	@property bool lowerCase() const { return fileNameStyle == MethodStyle.lowerCase; }
62 	deprecated("Use fileNameStyle = MethodStyle.lowerCase instead.")
63 	@property void lowerCase(bool v) { fileNameStyle = MethodStyle.lowerCase; }
64 }