Commit graph

11 commits

Author SHA1 Message Date
kleines Filmröllchen 201c9d7c77 Help+LibManual: Open sibling page for subsections
Clicking on a subsection now displays the sibling page, which is
intended to be the main page for that section.
2023-01-02 06:15:13 -07:00
kleines Filmröllchen 3e67f14e58 LibManual: Create subsections for subdirectories automatically 2023-01-02 06:15:13 -07:00
kleines Filmröllchen a9fe80550d LibManual: Add SubsectionNode 2023-01-02 06:15:13 -07:00
kleines Filmröllchen 2aa374eba1 Help+LibManual: Move URL handling to LibManual 2023-01-02 06:15:13 -07:00
kleines Filmröllchen 44e4a38535 LibManual: Allow overriding a Node's path calculation
This is necessary for subclassing SectionNode, but generally allows more
code to rely on path() virtual dispatch always finding the correct path
regardless of the static type.
2023-01-02 06:15:13 -07:00
kleines Filmröllchen aa5e574872 Help+LibManual: Make the children accessor fallible
This is convenient for the section node which might compute children
on the fly.
2023-01-02 06:15:13 -07:00
kleines Filmröllchen 5a346c4297 Help+LibManual: Without arguments, open index page instead of crashing
This is the old behavior before the recent LibManual refactor. It also
moves the definition of the index page into LibManual for better reuse.
2022-12-12 00:37:29 -07:00
kleines Filmröllchen b65258c093 Help+man+LibManual: Move argument handling to LibManual
This deduplicates argument handling logic from Help and man and makes it
more modular for future use cases. The argument handling works as
before: two arguments specify section and page (in this order), one
argument specifies either a page (the first section that it's found in
is used) or a path to a manpage markdown file.
2022-12-11 16:05:23 +00:00
kleines Filmröllchen a438c4d568 Help+LibManual: Move all manpage path handling to LibManual
This way, we'll have an easier time changing these paths.
2022-12-11 16:05:23 +00:00
kleines Filmröllchen 4625f7aab5 LibManual: Refactor SectionNode in preparation for subsections
- Calculate the full name on demand
- Make section and name protected
- Reorder some members logically
- Change the name getter to be fallible, as some implementors need to
  allocate
2022-12-11 16:05:23 +00:00
kleines Filmröllchen ad6a55e1f0 Help+LibManual: Move non-UI-specific manual handling to LibManual
This is a first step in deduplicating code within and across Help and
man.

Because LibManual also doesn't contain any DeprecatedString, some
adjustments to Help's string handling is included, just to interoperate
with LibManual better. Further work in this area mostly requires String
APIs in LibGUI.
2022-12-11 16:05:23 +00:00