NaturalDocs:: Constants

Constants that are used throughout the script.  All are exported by default.

Summary
Constants that are used throughout the script.
No constant here will ever be zero.
Constants representing all the types of sections that can appear in the menu file.
The various flags that can apply to a menu entry.
An 8-bit constant that’s used as the first byte of binary data files.

NaturalDocs:: Constants

Exporter
NaturalDocs::Constants
Summary
No constant here will ever be zero.
Constants representing all the types of sections that can appear in the menu file.
The various flags that can apply to a menu entry.
An 8-bit constant that’s used as the first byte of binary data files.

Assumptions

No constant here will ever be zero.

Menu Entry Types

Constants representing all the types of sections that can appear in the menu file.

MENU_TITLEThe title of the menu.
MENU_SUBTITLEThe sub-title of the menu.
MENU_FILEA source file, relative to the source directory.
MENU_GROUPA group.
MENU_TEXTArbitrary text.
MENU_LINKA web link.
MENU_FOOTERFooter text.
MENU_INDEXAn index.
MENU_FORMATThe version of Natural Docs the menu file was generated with.
MENU_ENDOFORIGINALA dummy entry that marks where the original group content ends.  This is used when automatically changing the groups so that the alphabetization or lack thereof can be detected without being affected by new entries tacked on to the end.
MENU_DATAData not meant for user editing.

Dependency

PreviousMenuState.nd depends on these values all being able to fit into a UInt8, i.e.  <= 255.

Menu Entry Flags

The various flags that can apply to a menu entry.  You cannot mix flags of different types, since they may overlap.

File Flags

MENU_FILE_NOAUTOTITLEWhether the file is auto-titled or not.

Group Flags

MENU_GROUP_UPDATETITLESThe group should have its auto-titles regenerated.
MENU_GROUP_UPDATESTRUCTUREThe group should be checked for structural changes, such as being removed or being split into subgroups.
MENU_GROUP_UPDATEORDERThe group should be resorted.
MENU_GROUP_HASENDOFORIGINALWhether the group contains a dummy MENU_ENDOFORIGINAL entry.
MENU_GROUP_ISINDEXGROUPWhether the group is used primarily for MENU_INDEX entries.  MENU_TEXT entries are tolerated.
MENU_GROUP_UNSORTEDThe group’s contents are not sorted.
MENU_GROUP_FILESSORTEDThe group’s files are sorted alphabetically.
MENU_GROUP_FILESANDGROUPSSORTEDThe group’s files and sub-groups are sorted alphabetically.
MENU_GROUP_EVERYTHINGSORTEDAll entries in the group are sorted alphabetically.

File Status Constants

FILE_NEWThe file has been added since the last run.
FILE_CHANGEDThe file has been modified since the last run.
FILE_SAMEThe file hasn’t been modified since the last run.
FILE_DOESNTEXISTThe file doesn’t exist, or was deleted.

BINARY_FORMAT

An 8-bit constant that’s used as the first byte of binary data files.  This is used so that you can easily distinguish between binary and old-style text data files.  It’s not a character that would appear in plain text files.

Constants representing all the types of Natural Docs sections.
The file used to store the previous state of the menu so as to detect changes.
A dummy entry that marks where the original group content ends.
An index.
Arbitrary text.