The HelpNDoc API is based on the Pascal programming language. The following list describes the methods available via the HelpNDoc API. As an example for the ClearDictionaries method, it can be used as follows: HndDictionaries.ClearDictionaries;


List of objects

HndBuilds
Is the build enabled ?

function CreateBuild: string;
Create a new build.

procedure DeleteAllBuilds;
Delete all builds for the current project.

procedure DeleteBuild(const aBuildId: string);
Delete a specific build.

function GetBuildEnabled(const aBuildId: string): Boolean;
Returns true if a build is enabled.

function GetBuildFirst: string;
Returns the first build in the build list.

function GetBuildFirstOfKind(const aBuildKind: string): string;
Returns the first build of the specified kind.

function GetBuildKind(const aBuildId: string): string;
Returns the kind of the build (CHM, HTML...).

function GetBuildList: THndBuildInfoArray;
Get a list of all builds in the project.

function GetBuildName(const aBuildId: string): string;
Returns the name of a specific build.

function GetBuildNext(const aBuildId: string): string;
Get the next build.

function GetBuildOrder(const aBuildId: string): Integer;
Returns the order of a specific build.

function GetBuildOutput(const aBuildId: string): string;
Returns the output path/file of a build.

function GetBuildPrevious(const aBuildId: string): string;
Returns the previous build.

function GetBuildTemplate(const aBuildId: string): string;
Returns the template used by this build.

function GetBuildWithName(const aBuildName: string): string;
Returns the first build with the specified name. This method is case-insensitive.

procedure MoveBuildAfter(const aBuildId, aAfterBuildId: string);
Move a build after another one.

procedure MoveBuildBefore(const aBuildId, aBeforeBuildId: string);
Move a build before another one.

procedure MoveBuildFirst(const aBuildId: string);
Move a build first in the list.

procedure MoveBuildLast(const aBuildId: string);
Move a build last in the list.

procedure SetBuildEnabled(const aBuildId: string; const aIsEnabled: Boolean);
Set the enabled state for a build.

procedure SetBuildKind(const aBuildId, aBuildKind: string);
Sets the kind of the build (CHM, HTML...).

procedure SetBuildName(const aBuildId, aName: string);
Set the name of a specific build.

procedure SetBuildOutput(const aBuildId, aOutput: string);
Set the output path/file of a build.

procedure SetBuildTemplate(const aBuildId, aTemplateName: string);
Set the template used by this build.

HndBuildsEx

function GetBuildTemplateOrDefault(const aBuildId: string): string;
Returns the template for a specific build or the default template for this build kind.

function GetValidBuildOutput(const aBuildId, aBuildOutput: string): string;
Returns a build output which is not empty.

HndBuildsMetaEx

function GetChmButtonVisibilityHex: string;
Return the CHM button visibility as an hexadecimal string.

function GetChmNavigationPaneStyleHex: string;
Returns the CHM navigation pane style as an Hexadecimal string.

HndBuildsTags

function AreBuildAndTagAssociated(const aBuildId, aTagName: string): Boolean;
Indicates wether the specified build and tag are associated.

function AssociateBuildWithTag(const aBuildId, aTagName: string): Boolean;
Link a specific build to a specific Tag.

procedure DissociateAllForTag(const aTagName: string);
Remove any association with the specified tag.

procedure DissociateAllForBuild(const aBuildId: string);
Remove any association with the specified builds.

function DissociateBuildFromTag(const aBuildId, aTagName: string): Boolean;
Remove the association between the specified build and tag.

function GetTagsAssociatedWithBuild(const aBuildId: string): TStringDynArray;
Get a list of tag Ids associated with a specific build.

function GetBuildsAssociatedWithTag(const aTagName: string): TStringDynArray;
Get a list of build Ids associated with a specific tag.

HndBuildsTagsEx

procedure ConditionAdd(aCondition: string; var aConditionList: TStringList);
Add condition to the list.

procedure ConditionInvert(var aConditionList: TStringList);
Invert condition in the list.

function ConditionRemove(aCondition: string; var aConditionList: TStringList): Boolean;
Remove condition from the list.

procedure ConditionReset(var aConditionList: TStringList);
Reset condition list.

function IsTopicIncludedInBuild(const aTopicId, aBuildId: string): Boolean;
Returns true if a topic can be included in the specified build (including correct build tags).

HndDictionaries

procedure ClearDictionaries;
Clears the loaded dictionaries list and disable the spell checker component.

procedure DisableAllDictionaries;
Disable all the dictionaries.

function EnableDictionaries(const aLocalIdList: TStringList; const DisabledOthers: Boolean = True): Boolean;
Enable a list of dictionaries. Disable the other ones if needed.

function EnableDictionary(const aLocaleId: Cardinal; const DisabledOthers: Boolean = True): Boolean;
Enable the specific dictionary and disables others if asked.

function GetActiveDictionariesCount: Integer;
Returns the number of currently active dictionaries.

function GetActiveDictionariesList: THndDictionaryInfoArray;
Returns the list of currently active dictionaries.

function GetDictionariesCount: Integer;
Get the number of dictionaries.

function GetDictionariesList: THndDictionaryInfoArray;
Get a list of dictionaries.

function GetDictionaryInfo(const aLocalId: Cardinal): THndDictionaryInfo;
Returns information about the specific locale.

function InstallOOoDictionay(const aFileName: string): Boolean;
Installs a new OpenOffice.org dictionary.

procedure NotifyActiveDictionariesChange(Sender: TObject; const SaveToProject: Boolean = True);
Notifies every listener the dictionary list has been updated.

procedure PauseLiveSpell;
Pause live spell in all possible controls.

function ReloadDictionaries: Boolean;
Reload the dictionary list from the disk.

procedure SaveActiveDictionariesToProject;
Save the currently active dictionaries to the currently open project.

procedure SwitchDictionaryStatus(const aLocalId: Cardinal);
If dictionary is enable, then disable it and vice-versa.

procedure UpdateLiveSpell;
Resume the live spell after it has been paused.

property SpellChecker: TRvDxSpellChecker read FSpellChecker;
The global spell checker

HndEditor

procedure UpdateStylesFromTemplate(const anEditor: TObject);
Update the styles of the editor based on the template

procedure ApplyStyleToSelection(const anEditor: TObject; const aStyleId: Integer);
Apply the specified style to the selection.

procedure Clear(const anEditor: TObject);
Clears the content of the specified editor.

function CreateTemporaryEditor: TObject;
Creates a new temporary editor.

function CreateTemporaryReportHelper: TObject;
Create a new temporary report helper.

function CreateTemporaryViewer: TObject;
Creates a new temporary viewer.

procedure DestroyTemporaryEditor(const anEditor: TObject);
Destroys a previously created temporary editor.

procedure DestroyTemporaryReportHelper(const aReportHelper: TObject);
Destroys a previously created temporary report helper.

procedure DestroyTemporaryViewer(const aViewer: TObject);
Destroys a previously created temporary viewer.

function GetAnchorList(const anEditor: TObject): TStringList;
Retrieves the list of anchors in the specified editor.

function GetContentAsHtml(const anEditor: TObject; out aCssContent: string): string;
Returns the editor content as HTML.

procedure GetContentAsStream(const anEditor: TObject; aStream: TMemoryStream);
Returns the editor content as Stream.

function GetContentAsText(const anEditor: TObject): string;
Returns the editor content as text.

function GetCurrentAnchorName(const anEditor: TObject): string;
Returns the name of the current checkpoint or an empty string if there isn't any.

function GetCurrentItem(const anEditor: TObject): TObject;
Returns the currently selected item.

function GetCurrentPictureAltText(const anEditor: TObject): string;
Return the currently selected picture's alternative text.

function GetCurrentPictureBackColor(const anEditor: TObject): TColor;
Returns the background color of the currently selected picture.

function GetCurrentPictureHeight(const anEditor: TObject): Integer;
Returns the currently selected picture's height.

function GetCurrentPictureMarginLeftRight(const anEditor: TObject): Integer;
Get the current picture left/right margins.

function GetCurrentPictureMarginTopBottom(const anEditor: TObject): Integer;
Get the current picture top/bottom margins.

function GetCurrentPicturePadding(const anEditor: TObject): Integer;
Get the current picture padding.

function GetCurrentPictureVAlign(const anEditor: TObject): THndVAlign;
Return the currently selected picture's vertical alignment.

function GetCurrentPictureWidth(const anEditor: TObject): Integer;
Returns the currently selected picture's width.

procedure InsertAnchorBeforeCurrentItem(const anEditor: TObject; const aName: string);
Inserts a checkpoint at the current cursor position.

procedure InsertCondition(const anEditor: TObject; const anOperation, aCondition: string);
Insert a condition item at the current cursor position.

function InsertFile(anEditor: TObject; aFile: string): Boolean;
Inserts a file in the editor.

function InsertFileFromLibraryItem(const anEditor: TObject; const aLibraryItem: string): Boolean;
Insert the content of the library item.

procedure InsertHyperLinkToTopicId(const anEditor: TObject; const aText, aLinkedTopicId: string);
Inserts an hyperlink to a specific topic ID using the topic's caption.

procedure InsertHyperLinkToUrl(const anEditor: TObject; const aText, anUrl: string);
Inserts an hyperlink to a specific URL.

procedure InsertPageBreakBeforeCurrentItem(const anEditor: TObject);
Inserts a page break at the current cursor position.

function InsertStream(const anEditor: TObject; const aStream: TStream): Boolean;
Insert the content of the specified stream in the specified editor.

procedure InsertTopicContent(const anEditor: TObject; const aTopicId: string);
Insert the content of the specified topic in the specified editor.

procedure MoveCaretTo(anEditor: TObject; X, Y: Integer);
Move the specified editor's caret to another location.

procedure MoveCarretToEnd(const anEditor: TObject);
Move the specified editor's caret to the end.

procedure ProcessConditionalsForCurrentBuild(const anEditor: TObject);
Removes any conditional items based on current build setting.

procedure RemoveCurrentAnchor(const anEditor: TObject);
Remove the current checkpoint in the specified Editor.

function ReplaceLibraryItems(const anEditor: TObject): Boolean;
Replace the library items by their actual content.

procedure SetAsTopicContent(const anEditor: TObject; const aTopicId: string);
Set the specific topic's content as the current editor's content.

function SetContent(const anEditor: TObject; const aContentStream: TStream): Boolean;
Set the content from a stream.

procedure SetCurrentCellsAlignment(const anEditor: TObject; const anHVAlignment: THndHVAlignment);
Sets the currently selected cells horizontal and vertical alignment.

procedure SetCurrentPictureAltText(const anEditor: TObject; const anAltText: string);
Set the currently selected picture's alternative text.

procedure SetCurrentPictureBackColor(const anEditor: TObject; const aColor: TColor);
Set the currently selected picture's background color.

procedure SetCurrentPictureHeight(const anEditor: TObject; const aNewHeight: Integer;
Defines the currently selected picture's height.

procedure SetCurrentPictureMarginLeftRight(const anEditor: TObject; const aNewMargin: Integer);
Set the currently selected picture's left/right margins.

procedure SetCurrentPictureMarginTopBottom(const anEditor: TObject; const aNewMargin: Integer);
Set the currently selected picture's top/bottom margins.

procedure SetCurrentPicturePadding(const anEditor: TObject; const aNewSpacing: Integer);
Set the currently selected picture's padding.

procedure SetCurrentPictureVAlign(const anEditor: TObject; const aNewVAlign: THndVAlign);
Defines the currently selected picture's vertical alignment.

procedure SetCurrentPictureWidth(const anEditor: TObject; const aNewWidth: Integer;
Defines the currently selected picture's width.

procedure TogglePageBreak(const anEditor: TObject);
Create or remove the current page break.

procedure UpdateLibraryItem(const anEditor: TObject; anItemId: string);
Update a library item's visual appearance in the editor.

HndEditorHelper

function GetHyperlinkDetailedTextFromString(const aString: string): string;
Returns a detailed text from an hyperlink string.

function GetHyperlinkInfoFromString(const aString: string): THndHyperlinkInfo;
Extract the hyperlink information from a string.

procedure GetHyperlinkTargetExtraFromString(const aString: string; var Target, Extras: string);
Returns the Target and Extra values from hyperlink data.

procedure ImportImagesToLibrary(const anEditor: TObject);
Import the images to library.

function SetHyperlinkInfoToString(const anHyperLinkInfo: THndHyperlinkInfo): string;
Constructs a string based in hyperlink info.

procedure SetupEditorProperties(const anEditor: TObject);
Defines default editor properties and events.

HndGeneratorInfo

function GetCustomSettingValue(const aCustomSetting: string): Variant;
Returns the user-defined value of a custom setting.

property AssetsList: TStringList read FAssetsList write FAssetsList;
List of assets files from the template.

property CurrentBuildId: string read FCurrentBuildId write FCurrentBuildId;
Current build Id being executed.

property CurrentTopic: string read FCurrentTopic write SetCurrentTopic;
Current topic ID which is being worked on.

property GeneratedFiles: TStringList read FGeneratedFiles write FGeneratedFiles;
List of files that have been generated so far.

property TemplateInfo: THndTemplateInfo read FTemplateInfo write FTemplateInfo;
Information about the currently used template.

HndJsSearchEngine

procedure AddSearchData(const aSearchData, aAssociatedTopicId: string);
Add search data and associate it to a specific topic.

procedure ClearSearchData;
Clear the current search data.

function GetJsData: string;
Get the Javascript search data.

HndKeywords
Array of minimal keyword information

function CreateKeyword: string;
Create a new keyword. The new keyword will be placed at the bottom of the list.

procedure DeleteAllKeywords;
Delete all the keywords in the project, except the root project keyword.

function DeleteKeyword(const aKeywordId: string): Boolean;
Delete a specific keyword and its children.

function GenerateUniqueCaption(const aBaseCaption, aParentId: string; const aFilteredItems: array of string): string;
Generates a unique caption within the specified parent.

function GetKeywordByCaption(aCaption, aParentId: string): string;
Returns the ID of the keyword with the specified case-insensitive caption with the specified parent.

function GetKeywordCaption(const aKeywordId: string): string;
Get the caption of a specific keyword.

function GetKeywordDirectChildrenCount(const aKeywordId: string): Integer;
Returns the number of children for the speicified keyword.

function GetKeywordDirectChildrenList(const aParentId: string): THndKeywordsInfoArray;
Returns a list of all the children keywords.

function GetKeywordLevel(const aKeywordId: string): Integer;
Returns the level of the specified keyword.

function GetKeywordList(const aIncludingProjectKeyword: Boolean = False): THndKeywordsInfoArray;
Returns a list of all the keywords.

function GetKeywordNext(const aKeywordId: string): string;
Get the next keyword in line. Could be a child or the next keyword.

function GetKeywordNextSibbling(const aKeywordId: string): string;
Returns the next sibbling of a specific keyword.

function GetKeywordParent(const aKeywordId: string): string;
Returns the parent keyword of a specific keyword.

function GetKeywordPreviousSibbling(const aKeywordId: string): string;
Get the previous sibbling keyword.

function GetProjectKeyword: string;
Returns the root project keyword.

function MoveKeyword(const aKeywordId, aReferencedKeywordId: string; const oAttachMode: THndKeywordsAttachMode): Boolean;
Move the keyword to a new position in reference to nReferencedKeywordsId.

function MoveKeywordLeft(const aKeywordId: string): Boolean;
Move the specific keyword left in the hierarchy.

function MoveKeywordRight(const aKeywordId: string): Boolean;
Move the specific keyword right in the hierarchy.

procedure SetCurrentKeyword(const aKeywordId: string);
Set the DB pointer to the specified keyword.

function SetKeywordCaption(const aKeywordId, sNewCaption: string): string;
Defines the specific keyword' caption.

HndLibraryItems
Array of minimal library item information

function CreateItem: string;
Creates a new unspecified item to the library.

function DeleteItem(const anItemId: string): Boolean;
Delete a specific library item.

function GetItemByCaption(const aCaption: string): string;
Returns the item with the given caption.

function GetItemCaption(const anItemId: string): string;
Gets the caption of a specific item.

function GetItemContent(const anItemId: string): TMemoryStream;
Get the content of the item as a stream. Caller must free the stream after using it.

function GetItemContentAsText(const anItemId: string): string;
Get the content of an item as a text.

function GetItemContentChecksum(const anItemId: string): string;
Returns the checksum (MD5) of a library item content. Useful for comparison purposes.

function GetItemExtension(const anItemId: string): string;
Get the item's file extension.

function GetItemKind(const anItemId: string): Integer;
Gets the kind of the specific item.

function GetItemList(aIncludingKinds: array of Integer): THndLibraryItemsInfoArray;
Returns a list of items filtered by aIncludingKinds.

function GetItemParent(const anItemId: string): string;
Returns the parent item of a specific item.

function GetItemSource(const anItemId: string): Integer;
Gets the source of a specific library item.

function GetItemsWithSameContent(const anItemId: string; const aFilteredItems: array of string): THndLibraryItemsInfoArray;
Returns the items with the same content as the specified one.

function GetItemUrlFile(const anItemId: string): string;
Sets the URL File of a specified library item.

function GetItemUrlFileAbsolute(const anItemId: string): string;
Gets the URL of a specified library item: use project path if relative.

function GetItemUrlLink(const anItemId: string): string;
Sets the URL Link of a specified library item.

function GetProjectItem: string;
Returns the root project library item.

function MoveItem(const anItemId, aReferencedItemId: string; const oAttachMode: THndLibraryItemAttachMode): Boolean;
Move the library item to a new position in reference to aReferencedItemId.

function SetItemCaption(const anItemId, aCaption: string): string;
Sets the caption of a specific item.

function SetItemContent(const anItemId: string; const aContent: TStream): Boolean;
Sets the content stream of a specified item.

function SetItemContentFromFile(const anItemId, aContentFile: string): Boolean;
Set the content of the item from an existing file.

function SetItemContentFromText(const anItemId, aContentText: string): Boolean;
Sets the content as text of a specific item.

function SetItemExtension(const anItemId, anExtension: string): Boolean;
Set the item's file extension.

function SetItemKind(const anItemId: string; const aKind: Integer): Boolean;
Sets the kind of a specific item.

function SetItemSource(const anItemId: string; const aSource: Integer): Boolean;
Sets the source of a specific library item.

function SetItemUrlFile(const anItemId, anUrlFile: string): Boolean;
Sets the URL File of a specified library item.

function SetItemUrlLink(const anItemId, anUrlLink: string): Boolean;
Sets the URL Link of a specified library item.

HndLibraryItemsCache

procedure AddOrInvalidateItem(anItemId: string);
Add an item to the cache or invalidate it.

procedure DeleteItem(anItemId: string);
Delete an item from the cache.

function GenerateUniqueCaption(const aBaseCaption: string; const aFilteredItems: array of string): string;
Generates a unique caption amongst all cached items.

function GetItemFromCache(anItemId: string): THndLibraryItemsCacheInfo;
Get item cache info.

procedure Invalidate;
Invalidate all the items from the cache.

procedure InvalidateVariables;
Invalidate the variable values based on user changes.

HndProjects

procedure SetProjectName(const aProjectName: string);
Defines the project name.

procedure CloseProject;
Closes the currently openned project.

function CopyProject(const aNewProjectName: string; const OpenNewOne: Boolean): Boolean;
Copy the project to a new location and open the new one if needed.

function DeleteProject: Boolean;
Physically delete the currently openned project.

function GetProjectAuthor: string;
Returns the author of the project.

function GetProjectBusy: Boolean;
Project is currently busy: creating, loading or closing.

function GetProjectCharset: Integer;
Returns the project current charset.

function GetProjectCharsetAsHtml: string;
Returns the project current charset as HTML charset value.

function GetProjectClosing: Boolean;
Project is currently closing.

function GetProjectComment: string;
Return the current project's comment.

function GetProjectCopyright: string;
Returns the project copyright.

function GetProjectCreating: Boolean;
Project is currently being created.

function GetProjectCssContent: string;
Returns the CSS content of the current project. Can only be returned when generating an HTML related format.

function GetProjectDefaultTopic: string;
Returns the Id of the default topic.

function GetProjectId: string;
Returns the currently open project id.

function GetProjectLanguage: Integer;
Returns the project current language.

function GetProjectLanguageCode: string;
Returns the project language code (eg: en-us)

function GetProjectModified: Boolean;
Indicates whether or no the current project has been modified since last save.

function GetProjectName: string;
Returns the current project name (or file name).

function GetProjectNeverSaved: Boolean;
Indicates whether the project as already been saved or not.

function GetProjectOpenning: Boolean;
Returns True if the project is currently openning.

function GetProjectSummary: string;
Returns the project summary.

function GetProjectTitle: string;
Gets the title of the specified project.

function GetProjectVersion: string;
Return the current project's version number.

function MoveProject(const aNewProjectName: string): Boolean;
Move the project to a new location.

function NewProject(const aProjectName: string = ''): string;
Creates a new project and returns its unique id.

function OpenProject(const aProjectName: string; const doApplyMigrations: Boolean): string;
Open an existing project and returns its unique id.

procedure SaveProject;
Saves the project to a file.

procedure SetProjectAuthor(const anAuthor: string);
Defines the project author.

procedure SetProjectCharset(const aCharSet: Integer);
Defines the project charset.

procedure SetProjectComment(const aComment: string);
Set the current project comment.

procedure SetProjectCopyright(const aCopyrightValue: string);
Defines the project copyright.

function SetProjectDefaultTopic(const aDefaultTopic: string): string;
Defines the project's default topic.

procedure SetProjectLanguage(const aLanguage: Integer);
Defines the project language.

procedure SetProjectModified(const IsModified: Boolean = True);
Mark the current project as being modified since last save.

procedure SetProjectNeverSaved(const IsProjectNeverSaved: Boolean = True);
Mark the project as being never saved.

procedure SetProjectSummary(const aSummary: string);
Set the project summary.

procedure SetProjectTitle(const aProjectTitle: string);
Sets the title of the specified project.

procedure SetProjectVersion(const aProjectVersion: string);
Sets the version of the current project.

function VacuumProject: Boolean;
Clean the project and lower its file size by removing unneeded information.

HndStyles

procedure LoadFromProject(aRVStyle: TRVStyle);
Load the style templates from the project.

procedure NotifyStyleTemplatesChange(Sender: TObject);
Notify sbuscribers that the style list has changed.

procedure ResetStyleTemplates(aRVStyle: TRVStyle; doNotify: Boolean = True);
Reset the style templates by loading the default.hns styles file.

procedure SaveToProject(aRVStyle: TRVStyle);
Save the content of the style template to the project.

HndTags

function CreateTag(aTagName: string): string;
Create a new tag. Returns the created tag name.

procedure DeleteAllCustomTags;
Delete all custom tags for the current project.

procedure DeleteCustomTag(aTagName: string);
Delete a specific custom tag.

function GetTagCount(const doIncludeSystemTags: Boolean): Integer;
Returns the number of tags, including or not system tags.

function GetTagListAll: TStringList;
Returns a list of all system and custom tags.

function GetTagListCustom: TStringList;
Get a list of custom tags.

function GetTagListSystem: TStringList;
Get a list of system tags.

function IsSystemTag(aTagName: string): Boolean;
Returns True if the specified tag is a system tag

HndTemplates

function GetTemplateKindList: TStringDynArray;
Returns a list of template kinds available on the system: 'html', 'chm'...

function GetDefaultTemplateFor(const aTemplateKind: string): THndTemplateInfo;
Get the default template info for the specified kind.

function GetTemplateCategoryHierarchy: THndTemplateHierarchyArray;
Returns the full category hierarchy of available templates.

function GetTemplateFromName(const aTemplateName, aTemplateKind: string): THndTemplateInfo;
Returns a specific template based on its name and kind.

function GetTemplateList: THndTemplateInfoArray;
Returns a list of available templates on specified kind, or all kinds if none specified.

procedure UpdateTemplateList;
Retrieves the templates from the hard drive.

HndTemplatesEx

function CopyAndMergeTemplateToFolder(const aTemplateInfo: THndTemplateInfo; const aFolder: string): Boolean;
Copy the template to the specific folder, merging its info file with existing template in that folder.

function GetTemplateInfoFromPath(const aTemplatePath: string): THndTemplateInfo;
Get template info from its path.

function GetTemplateKindFromPath(const aTemplatePath: string): string;
Returns the kind of template available at the speicified path.

function GetTemplateRawNameFromPath(aTemplatePath: string): string;
Returns the template directory name from path.

HndTopics
Create, edit and manage topics within the current project.

procedure CopyTopicToClipboard(const aTopicId: string; const isCut: Boolean);
Copy the specified topic to clipboard.

procedure CreateMultipleTopics(const aTopicList: TStrings; const aParentTopic: string = '';
Creates multiple child topics of the specified parent based on a tabular lists.

function CreateTopic: string;
Create a new topic. The topic will be placed at the bottom of the topic list.

procedure DeleteAllTopics;
Delete all the topics in the project, except the parent topic.

function DeleteTopic(const aTopicId: string): Boolean;
Delete a specific topic and its children. Project topic can't be deleted.

function GenerateUniqueHelpContext(const aBaseHelpContext: Integer; const aFilteredTopics: array of string): Integer;
Generates a unique help context among all the topics except the filtered ones.

function GenerateUniqueHelpId(const aBaseHelpId: string; const aFilteredTopics: array of string): string;
Generates a unique help id among all the topics except the filtered ones.

function GetCurrentTopic: string;
Returns the ID of the currently edited topic.

function GetProjectTopic: string;
Returns the root project topic.

function GetTopicCaption(const aTopicId: string): string;
Get the caption of a specific topic.

function GetTopicContent(const aTopicId: string): TMemoryStream;
Returns the content of the specified topic.

function GetTopicContentAsHtml(const aTopicId: string): string;
Get the topic's content as HTML. Only available when generating an HTML related documentation.

function GetTopicCount: Integer;
Returns the number of topics available in the current project.

function GetTopicCreationDateTime(const aTopicId: string): TDateTime;
Returns the date and time when the topics was created.

function GetTopicDirectChildrenCount(const aParentId: string): Integer;
Returns the number of direct children a topic has.

function GetTopicDirectChildrenList(const aParentId: string): THndTopicsInfoArray;
Returns a list of direct children of the specified topic.

function GetTopicFirst: string;
Returns the first topic in the project.

function GetTopicFooterKind(const aTopicId: string): Integer;
Returns the topic's kind of footer text: normal, custom, hidden.

function GetTopicFooterText(const aTopicId: string): string;
Returns the custom topic footer text.

function GetTopicFooterTextCalculated(const aTopicId: string): string;
Returns the footer text based on the header kind: project caption, custom text or empty text for hidden footer.

function GetTopicHeaderKind(const aTopicId: string): Integer;
Returns the topic's kind of header text: normal, custom, hidden.

function GetTopicHeaderText(const aTopicId: string): string;
Returns the custom topic header text.

function GetTopicHeaderTextCalculated(const aTopicId: string): string;
Returns the header text based on the header kind: topic title, custom text or empty text for hidden header.

function GetTopicHelpContext(const aTopicId: string): Integer;
Get a specific topic's help context.

function GetTopicHelpId(const aTopicId: string): string;
Get a specific topic's help id.

function GetTopicIconIndex(const aTopicId: string): Integer;
Get the icon index for a specific topic.

function GetTopicIndex(const aTopicId: string; const isZeroBased: Boolean = True): Integer;
Returns the index of the topic from its parent.

function GetTopicIndexHierarchy(const aTopicId: string; const isZeroBased: Boolean = True): THndIntegerArray;
Returns an array representing the topic's index hierarchy. Ex: [1,0,3,4] for 1.0.3.4.

function GetTopicKind(const aTopicId: string): Integer;
Returns the kind of the specific topic.

function GetTopicLast: string;
Returns the last topic in the project.

function GetTopicLevel(const aTopicId: string): Integer;
Returns the level of the specified topic.

function GetTopicList(const aIncludingProjectTopic: Boolean = False): THndTopicsInfoArray;
Returns a list of topics and their associated ID as object.

function GetTopicListWithCaption(const aCaption: string; const isPartialCaption: Boolean = True): THndTopicsInfoArray;
Returns a list of topics with a specific caption.

function GetTopicModificationDateTime(const aTopicId: string): TDateTime;
Returns the date and time when the topic was last modified.

function GetTopicNext(const aTopicId: string): string;
Get the next topic in line. Could be a child or a sibling topic.

function GetTopicNextSibbling(const aTopicId: string): string;
Get the next sibling topic.

function GetTopicOrder(const aTopicId: string): Integer;
Returns the order of the topic based on sibling topics.

function GetTopicParent(const aTopicId: string): string;
Returns the parent topic of a topic.

function GetTopicPrevious(const aTopicId: string): string;
Returns a list of topics and their associated ID as object.

function GetTopicPreviousSibbling(const aTopicId: string): string;
Get the previous sibling topic.

function GetTopicUrlFile(const aTopicId: string): string;
Returns the topic's URL file property.

function GetTopicUrlLink(const aTopicId: string): string;
Returns the topic's URL link property.

function GetTopicVisibility(const aTopicId: string): integer;
Returns the topic's visibility.

function MoveTopic(const aTopicId, aReferencedTopicId: string; const oAttachMode: THndTopicsAttachMode): Boolean;
Move the topic to a new position in reference to nReferencedTopicsId.

function MoveTopicDown(const aTopicId: string): Boolean;
Move the specific topic bellow the next sibling.

function MoveTopicLeft(const aTopicId: string): Boolean;
Move the specific topic left in the hierarchy.

function MoveTopicRight(const aTopicId: string): Boolean;
Move the specific topic right in the hierarchy.

function MoveTopicUp(const aTopicId: string): Boolean;
Move the specific topic above the previous sibling.

procedure PasteTopicFromClipboard(aParentId: string);
Paste the topic from clipboard as a child of the parent specified or as a child of the project topic.

function SetCurrentTopic(const aTopicId: string): Boolean;
Defines the currently selected topic.

procedure SetTopicCaption(const aTopicId, sNewCaption: string);
Defines the specific topic's caption.

procedure SetTopicContent(const aTopicId: string; const aContentStream: TStream);
Set the topic's content.

procedure SetTopicFooterKind(const aTopicId: string; const aFooterKind: Integer);
Sets the topic footer kind.

function SetTopicFooterText(const aTopicId, aFooterText: string): string;
Sets the custom text for the topic footer.

procedure SetTopicHeaderKind(const aTopicId: string; const anHeaderKind: Integer);
Sets the topic header kind.

function SetTopicHeaderText(const aTopicId, anHeaderText: string): string;
Sets the custom text for the topic header.

function SetTopicHelpContext(const aTopicId: string; const aHelpContext: Integer): Integer;
Set a specific topic's help context. Returns the corrected context.

function SetTopicHelpId(const aTopicId, aHelpId: string): string;
Set a specific topic's help id. Returns the corrected string.

procedure SetTopicIconIndex(const aTopicId: string; const nIconIndex: Integer);
Set the icon index of a specific topic.

function SetTopicKind(const aTopicId: string; const aNewKind: Integer): Integer;
Set the topic kind (0: normal; 1: empty; 2: Link to URL; 3: Link to file)

procedure SetTopicUrlFile(const aTopicId, anUrlFile: string);
Set the topic's URL file.

procedure SetTopicUrlLink(const aTopicId, anUrlLink: string);
Set the topic's URL link.

procedure SetTopicVisibility(const aTopicId: string; const aVisibility: Integer);
Set the visibility for the topic

HndTopicsEx

function GetTopicDirectChildrenCountGenerated(const aParentId: string; const doExcludeHiddenInToc: Boolean = False): Integer;
Returns the number of direct generated children a topic has.

function GetTopicDirectChildrenListGenerated(const aParentId: string; const doExcludeHiddenInToc: Boolean = False): THndTopicsInfoArray;
Returns a list of direct generated children of the specified topic.

function GetTopicIsGenerated(const aTopicId: string; const doExcludeHiddenInToc: Boolean = False; const doCheckParentVisibilityToo: Boolean = True): Boolean;
Returns True if a topic is generated: visible and exported in current build.

function GetTopicListGenerated(const doExcludeHiddenInToc: Boolean = False; const aIncludingProjectTopic: Boolean = False): THndTopicsInfoArray;
Returns a list of generated topics and their associated ID as object.

function GetTopicNextGenerated(const aTopicId: string; const doExcludeHiddenInToc: Boolean = False): string;
Returns the next generated topic.

function GetTopicNextSibblingGenerated(const aTopicId: string; const doExcludeHiddenInToc: Boolean = False): string;
Returns the next generated sibling topic.

function GetTopicPreviousGenerated(const aTopicId: string; const doExcludeHiddenInToc: Boolean = False): string;
Returns the previous generated topic.

function GetTopicPreviousSibblingGenerated(const aTopicId: string; const doExcludeHiddenInToc: Boolean = False): string;
Returns the previous generated sibling topic.

procedure SynchronizeAllHelpIds;
Overwrite all topic's help Ids based on caption.

HndTopicsKeywords

function AreTopicAndKeywordAssociated(const aTopicId, aKeywordId: string): Boolean;
Indicates wether the specified topic and keyword are associated.

function AssociateTopicWithKeyword(const aTopicId, aKeywordId: string): Boolean;
Link a specific topic to a specific keyword.

function DissociateTopicFromKeyword(const aTopicId, aKeywordId: string): Boolean;
Remove the association between the specified topic and keyword.

function GetKeywordsAssociatedWithTopic(const aTopicId: string): TStringDynArray;
Get a list of keyword Ids associated with a specific topic.

function GetTopicsAssociatedWithKeyword(const aKeywordId: string): TStringDynArray;
Get a list of topic Ids associated with a specific keyword.

HndTopicsTags

function AreTopicAndTagAssociated(const aTopicId, aTagName: string): Boolean;
Indicates wether the specified topic and tag are associated.

function AssociateTopicWithTag(const aTopicId, aTagName: string): Boolean;
Link a specific topic to a specific Tag.

procedure DissociateAllForTag(const aTagName: string);
Remove any association with the specified tag.

procedure DissociateAllForTopic(const aTopicId: string);
Remove any association with the specified topics.

function DissociateTopicFromTag(const aTopicId, aTagName: string): Boolean;
Remove the association between the specified topic and tag.

function GetTagsAssociatedWithTopic(const aTopicId: string): TStringDynArray;
Get a list of tag Ids associated with a specific topic.

function GetTopicsAssociatedWithTag(const aTagName: string): TStringDynArray;
Get a list of topic Ids associated with a specific tag.