Skip to content

Commit 8eddadb

Browse files
committed
Mention ? for visibility members
1 parent 46a018b commit 8eddadb

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

src/IncludeByVisibility.asciidoc

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,37 @@ The link:CommandLine[CommandLine] option `--visible-members` (short
44
form is `-M`) controls what class members are visible in final
55
documentation. The following visibility types are known:
66

7-
* private
8-
* strictprivate
9-
* protected
10-
* strictprotected
11-
* public
12-
* published
13-
* automated
14-
* implicit (public or published; see link:ImplicitVisibilityOption[--implicit-visibility option])
7+
* `private`
8+
* `strictprivate`
9+
* `protected`
10+
* `strictprotected`
11+
* `public`
12+
* `published`
13+
* `automated`
14+
* `implicit` (which can mean either `public` or `published`; see link:ImplicitVisibilityOption[--implicit-visibility option])
1515
1616
Example:
1717

1818
----
1919
pasdoc --visible-members protected,public,published,automated
2020
----
2121

22-
By default private and implicit members are hidden, the rest is shown.
22+
By default `private` and `implicit` members are hidden, the rest is shown.
23+
24+
== Make some members "included but hidden by default"
25+
26+
Moreover, you can specify some visibility levels as "included but hidden by default" by adding `?` at the end of the visibility level name.
27+
28+
The main use-case is for `protected` and `strictprotected` visibility levels, which:
29+
30+
- on one hand, deserve to be mentioned and documented (developers using the class need to know about them, to be able to develop descendants),
31+
32+
- on the other hand, sometimes we don't want the `protected` stuff to clutter the default view too much, because _most_ developers are fine just exploring the `public` identifiers.
33+
34+
Now you can have a cake, and eat it too :), by specifying the "included but hidden by default" visibility levels with `?` at the end for the `--visible-members` option. Like this:
35+
36+
```
37+
pasdoc --visible-members=protected?,public,published *.pas
38+
```
39+
40+
This results in `protected` members included but hidden by default in the HTML output. We will show a checkbox to allow user to show/hide them (using JavaScript, so no page reload).

0 commit comments

Comments
 (0)