From 9ba8e6cf38da5196ed7bc878fe452952f3e10638 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 22 May 2007 15:06:55 +0000 Subject: moved docs --- docs/doctool/Help/bugs.html | 30 ++ docs/doctool/Help/customizinglanguages.html | 48 ++ docs/doctool/Help/customizingtopics.html | 59 +++ docs/doctool/Help/documenting.html | 160 +++++++ docs/doctool/Help/example/Default.css | 507 +++++++++++++++++++++ docs/doctool/Help/example/NaturalDocs.js | 204 +++++++++ docs/doctool/Help/example/Roman.css | 507 +++++++++++++++++++++ docs/doctool/Help/example/Small.css | 507 +++++++++++++++++++++ docs/doctool/Help/example/showstyle.html | 43 ++ docs/doctool/Help/examples.css | 74 +++ docs/doctool/Help/favicon.ico | Bin 0 -> 1406 bytes docs/doctool/Help/images/header/background.png | Bin 0 -> 229 bytes docs/doctool/Help/images/header/leftside.png | Bin 0 -> 1215 bytes docs/doctool/Help/images/header/logo.png | Bin 0 -> 12146 bytes docs/doctool/Help/images/header/overbody.png | Bin 0 -> 283 bytes docs/doctool/Help/images/header/overbodybg.png | Bin 0 -> 141 bytes docs/doctool/Help/images/header/overleftmargin.png | Bin 0 -> 188 bytes docs/doctool/Help/images/header/overmenu.png | Bin 0 -> 244 bytes docs/doctool/Help/images/header/overmenubg.png | Bin 0 -> 141 bytes docs/doctool/Help/images/header/rightside.png | Bin 0 -> 1186 bytes docs/doctool/Help/images/menu/about.png | Bin 0 -> 397 bytes docs/doctool/Help/images/menu/background.png | Bin 0 -> 187 bytes docs/doctool/Help/images/menu/bottomleft.png | Bin 0 -> 235 bytes docs/doctool/Help/images/menu/bottomright.png | Bin 0 -> 234 bytes docs/doctool/Help/images/menu/community.png | Bin 0 -> 507 bytes docs/doctool/Help/images/menu/customizing.png | Bin 0 -> 575 bytes docs/doctool/Help/images/menu/using.png | Bin 0 -> 390 bytes docs/doctool/Help/index.html | 161 +++++++ docs/doctool/Help/javascript/BrowserStyles.js | 75 +++ docs/doctool/Help/javascript/PNGHandling.js | 69 +++ docs/doctool/Help/keywords.html | 34 ++ docs/doctool/Help/languages.html | 28 ++ docs/doctool/Help/menu.html | 50 ++ docs/doctool/Help/messageboards.html | 32 ++ docs/doctool/Help/output.html | 71 +++ docs/doctool/Help/running.html | 35 ++ docs/doctool/Help/styles.css | 259 +++++++++++ docs/doctool/Help/styles.html | 43 ++ docs/doctool/Help/troubleshooting.html | 14 + 39 files changed, 3010 insertions(+) create mode 100644 docs/doctool/Help/bugs.html create mode 100644 docs/doctool/Help/customizinglanguages.html create mode 100644 docs/doctool/Help/customizingtopics.html create mode 100644 docs/doctool/Help/documenting.html create mode 100644 docs/doctool/Help/example/Default.css create mode 100644 docs/doctool/Help/example/NaturalDocs.js create mode 100644 docs/doctool/Help/example/Roman.css create mode 100644 docs/doctool/Help/example/Small.css create mode 100644 docs/doctool/Help/example/showstyle.html create mode 100644 docs/doctool/Help/examples.css create mode 100644 docs/doctool/Help/favicon.ico create mode 100644 docs/doctool/Help/images/header/background.png create mode 100644 docs/doctool/Help/images/header/leftside.png create mode 100644 docs/doctool/Help/images/header/logo.png create mode 100644 docs/doctool/Help/images/header/overbody.png create mode 100644 docs/doctool/Help/images/header/overbodybg.png create mode 100644 docs/doctool/Help/images/header/overleftmargin.png create mode 100644 docs/doctool/Help/images/header/overmenu.png create mode 100644 docs/doctool/Help/images/header/overmenubg.png create mode 100644 docs/doctool/Help/images/header/rightside.png create mode 100644 docs/doctool/Help/images/menu/about.png create mode 100644 docs/doctool/Help/images/menu/background.png create mode 100644 docs/doctool/Help/images/menu/bottomleft.png create mode 100644 docs/doctool/Help/images/menu/bottomright.png create mode 100644 docs/doctool/Help/images/menu/community.png create mode 100644 docs/doctool/Help/images/menu/customizing.png create mode 100644 docs/doctool/Help/images/menu/using.png create mode 100644 docs/doctool/Help/index.html create mode 100644 docs/doctool/Help/javascript/BrowserStyles.js create mode 100644 docs/doctool/Help/javascript/PNGHandling.js create mode 100644 docs/doctool/Help/keywords.html create mode 100644 docs/doctool/Help/languages.html create mode 100644 docs/doctool/Help/menu.html create mode 100644 docs/doctool/Help/messageboards.html create mode 100644 docs/doctool/Help/output.html create mode 100644 docs/doctool/Help/running.html create mode 100644 docs/doctool/Help/styles.css create mode 100644 docs/doctool/Help/styles.html create mode 100644 docs/doctool/Help/troubleshooting.html (limited to 'docs/doctool/Help') diff --git a/docs/doctool/Help/bugs.html b/docs/doctool/Help/bugs.html new file mode 100644 index 00000000..e72a7401 --- /dev/null +++ b/docs/doctool/Help/bugs.html @@ -0,0 +1,30 @@ + + +Natural Docs Bugs and Feature Requests
Natural Docs
Community
Web SiteMailing ListsMessage BoardsBugs and
Feature Requests
Bugs and Feature Requests

Although these services come from SourceForge, you do not need to have a SourceForge account to use to them.

Bug ReportsUse this database if Natural Docs isn’t behaving the way it should.
Feature RequestsUse this database if you want to see a feature in the next version of Natural Docs.
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/customizinglanguages.html b/docs/doctool/Help/customizinglanguages.html new file mode 100644 index 00000000..dba13599 --- /dev/null +++ b/docs/doctool/Help/customizinglanguages.html @@ -0,0 +1,48 @@ + + +Customizing Natural Docs Languages
Natural Docs
Customizing
Organizing the MenuCSS StylesTopics and KeywordsLanguages, Indexes,
and Prototypes
Customizing Languages

Natural Docs has two files called Languages.txt: one in its Config directory, and one in your project directory.  These control the language and index prefix features of Natural Docs.

You should edit the one in your project directory whenever possible.  It keeps your changes separate and easier to manage, plus you don’t have to reapply them whenever you upgrade.  Natural Docs will keep an up-to-date list of all the languages defined in the main file in it so you can override their settings easily.

However, if you’re using Natural Docs with a lot of projects and would like the changes to apply everywhere, you can edit the one in Natural Docs’ Config directory instead.  Most of the text here will assume you’re editing the project one, so be sure to read the boxes at the end that explain the differences.

Note that unlike other Natural Docs configuration files, comments can only appear on their own lines.  They cannot appear after content on the same line because settings may need to use the # symbol.  Also, all lists are space-separated instead of comma-separated, again because some settings may need to use the , symbol.

Index Prefixes

Natural Docs has the ability to ignore prefixes in the indexes.  This is necessary because in certain languages, variables are prefixed with $ or other symbols and we don’t want them to get all grouped together under the symbols heading.  Instead, they appear in the sidebar and are sorted as if they’re not there.

A
 AddProperty, SomeClass
$amount
 Average

However, we can take advantage of this simply to get around coding conventions.  Suppose you prefix all your class names with C.  They’d all form one gigantic group under C in the index.  If you want, you can have it ignored so CCat, CDog, and CMouse get filed under C, D, and M instead.  Just add this to your languages file:

Alter Language: [your language]
+   Add Ignored Class Prefix in Index: C

Now C is ignored in your indexes:

A
CAccount
CAccountHolder
 AddProperty, SomeClass
$amount
 Average

You can include any number of prefixes and can do this for any topic type.  So if you have a bunch of functions that start with COM_ and DB_, you can ignore them too:

Alter Language: [your language]
+   Add Ignored Class Prefix in Index: C
+   Add Ignored Function Prefixes in Index: COM_ DB_

Note that only one prefix will ever be removed, so if you have variable names that start with $ and want to remove m, you have to write “Ignore Variable Prefix: $m” instead of just m.

One last tip: Do this for common hierarchy levels.  For example, all of Natural Docs’ internal packages are under a top-level NaturalDocs package, so it’s package index ignores “NaturalDocs::” to stay useful.

To do this in the main languages file instead of the user one, find the existing definition and either edit the “Ignored [type] Prefixes in Index” line or add one if it’s not there.

Adding Languages

You can add basic language support for any programming language just by editing these configuration files.  Here are the most important settings:

Language: Fictional
+
+   Extensions: fsrc fhdr
+   Shebang Strings: fictional
+   Line Comment: //
+   Block Comment: /* */
+   Package Separator: ::

This tells Natural Docs that any files with the .fsrc or .fhdr extensions are part of our fictional programming language.  Also, any .cgi or extensionless files that have “fictional” in the shebang (#!) line are part of it as well.  Line comments start with // and block comments appear between /* and */.  The default package separator is ::.  Not too hard, huh?

You can also add settings to ignore prefixes in the index and detect prototypes, but those are dealt with in their own sections on this page.

File Extensions

So Natural Docs doesn’t recognize some file extension you use for your code?  No problem.

Alter Language: [your language]
+   Add Extensions: cxx hxx

If it’s scanning some files you don’t want it to scan, you can exclude extensions as well.  Just add this to the top of your file:

Ignore Extensions: c cpp

In this example, Natural Docs will ignore C++ source files, thus only scanning the headers.

To do this in the main languages file instead of the user one, find the existing language definition and add or remove from the existing “Extensions:” line.

Prototypes

So you’ve added a new language and want to detect prototypes.  Or perhaps you added a custom topic type and want to detect prototypes for that as well.  Here’s an example of the properties you need:

Function Prototype Enders: ; {
+Variable Prototype Enders: ; =

The algorithm for finding prototypes is very simple, yet it works really well in practice.  All the code following the comment is grabbed until it reaches an ender symbol or another comment.  Ender symbols appearing inside parenthesis, brackets, braces, or angle brackets don’t count.  If it reaches an ender symbol and somewhere in that code is the topic title, the code is accepted as the prototype.

So in the example above, variables end at semicolons (the end of the declaration) or equal signs (the default value expression, which we don’t want to include.)  Since the Natural Docs topic for the variable should have appeared right before the definition, that leaves us with the name and type.  Functions are handled similarly: they end at a semicolon (the end of a predeclaration) or an opening brace (the beginning of the body) leaving us with the name, parameters, and return type.

You can do this with any topic type, including custom ones.  Any prototypes that look like they have parameters will be formatted as such.

Line Breaks

For some languages, line breaks are significant.  To have them end a prototype, use \n.  If it has an extender symbol that allows the code to continue on the next line, you can specify that as well.

Function Prototype Ender: \n
+Variable Prototype Ender: \n =
+Line Extender: _
Colors

If you’re collecting prototypes for a custom topic type, they will not automatically get their own background color like the other types have.  You have to define it via CSS, which is explained in the Common Customizations section of the CSS Styles page.

Special Languages

There are two languages with special properties: Shebang Script and Text File.

In Shebang Scripts, the language is not determined by the file extension but by the shebang (#!) line.  The only relevant setting is Extensions.  Files that have those extensions will have their shebang line read and scanned for the substrings specified by the other languages’ Shebang String settings.  Files with no extension are always treated as Shebang Scripts.

In Text Files, the entire file is treated like a comment.  There are no comment symbols required, you can just put Natural Docs content there in plain text.  The most important setting is Extensions.

However, since it is possible to document classes, functions, etc. in text files, they also have their own Package Separator and Ignored [type] Prefixes in Index settings.  To make things easier on you, by default it copies these settings from whichever language has the most source files in your project.  You can override this by manually setting them, but you shouldn’t need to.

Syntax Reference

Unlike other Natural Docs configuration files, comments can only appear on their own lines.  They cannot appear after content on the same line because settings may need to use the # symbol.

Singular and plural forms are generally both supported, so you can write Extension or Extensions.  It doesn’t matter if they match how many items are set.  Also, you can use either Ignore or Ignored.

Ignore Extensions: [extension] [extension] ...

Causes the listed file extensions to be ignored, even if they were previously defined to be part of a language.  The list is space-separated.  ex. “Ignore Extensions: cvs txt

Language: [name]
+Alter Language: [name]

Creates a new language or alters an existing one.  Names can use any characters.  Note the special behavior for languages named Shebang Script and Text File.

If you’re altering an existing language and a property has an [Add/Replace] form, you have to specify whether you’re adding to or replacing the list if that property has already been defined.

General Language Properties
Extensions: [extension] [extension] ...
+[Add/Replace] Extensions: [extension] [extension] ...

Defines file extensions for the language’s source files.  The list is space-separated.  ex. “Extensions: c cpp”.  You can use extensions that were previously used by another language to redefine them.  You can use * to specify all undefined extensions.

Shebang Strings: [string] [string] ...
+[Add/Replace] Shebang Strings: [string] [string] ...

Defines a list of strings that can appear in the shebang (#!) line to designate that it’s part of this language.  They can appear anywhere in the line, so php will work for “#!/user/bin/php4”.  You can use strings that were previously used by another language to redefine them.

Ignore Prefixes in Index: [prefix] [prefix] ...
+Ignore [type] Prefixes in Index: [prefix] [prefix] ...
+
+[Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
+[Add/Replace] Ignored [type] Prefixes in Index: [prefix] [prefix] ...

Specifies prefixes that should be ignored when sorting symbols for an index.  Can be specified in general or for a specific topic type.  The prefixes will still appear, the symbols will just be sorted as if they’re not there.  For example, specifying ADO_ for functions will mean that ADO_DoSomething will appear under D instead of A.

Basic Language Support Properties

These attributes are only available for languages with basic language support.

Line Comments: [symbol] [symbol] ...

Defines a space-separated list of symbols that are used for line comments, if any.  ex. “Line Comment: //”.

Block Comments: [opening symbol] [closing symbol] [o.s.] [c.s.] ...

Defines a space-separated list of symbol pairs that are used for block comments, if any.  ex. “Block Comment: /* */”.

Enum Values: [global|under type|under parent]

Defines the behavior of enum values.  The default is global.

GlobalEnum values are always global and will be referenced as “Value”.
Under TypeEnum values appear under the type and will be referenced as “Package.Enum.Value”.
Under ParentEnum values appear under the parent and will be referenced as “Package.Value”
[type] Prototype Enders: [symbol] [symbol] ...

When defined, Natural Docs will attempt to collect prototypes from the code following the specified topic type.  It grabs code until the first ender symbol or the next Natural Docs comment, and if it contains the topic name, it serves as its prototype.  Use \n to specify a line break.  ex. “Function Prototype Enders: { ;”, “Variable Prototype Enders: = ;”.

Line Extender: [symbol]

Defines the symbol that allows a prototype to span multiple lines if normally a line break would end it.

Perl Package: [perl package]

Specifies the Perl package used to fine-tune the language behavior in ways too complex to do in this file.

Full Language Support Properties

These attributes are only available for languages with full language support.

Full Language Support: [perl package]

Specifies the Perl package that has the parsing routines necessary for full language support.

Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/customizingtopics.html b/docs/doctool/Help/customizingtopics.html new file mode 100644 index 00000000..bebf0fbd --- /dev/null +++ b/docs/doctool/Help/customizingtopics.html @@ -0,0 +1,59 @@ + + +Customizing Natural Docs Languages
Natural Docs
Customizing Topics and Keywords

Natural Docs has two files called Topics.txt: one in its Config directory, and one in your project directory.  These control the topic behavior and keywords of Natural Docs.

You should edit the one in your project directory whenever possible.  It keeps your changes separate and easier to manage, plus you don’t have to reapply them whenever you upgrade.  Natural Docs will keep an up-to-date list of all the topic types defined in the main file in it so you can override their settings easily.

However, if you’re using Natural Docs with a lot of projects and would like the changes to apply everywhere, you can edit the one in Natural Docs’ Config directory instead.

Topic Types vs. Keywords

It’s important to understand the difference between topic types and keywords.  Topic types have their own indexes and behavior settings.  You’ll reference them by name when dealing with indexes in the menu file or prototype detection in the language file, but not when documenting your code unless you make their names keywords as well.

You use keywords when documenting your code.  There can be many keywords per topic type, and they are completely interchangable.

Suppose you document a class with the Class keyword and a struct with Struct.  They are both keywords for the Class topic type by default, so they will appear in the same index.  If you wanted structs to have their own index, you would add a topic type for structs and change the Struct keyword to point to it.

Adding Topic Types

If you want to be able to document something in Natural Docs doesn’t handle by default, you want to create your own topic type for it.  Let’s say you’re working on a video game and you want to document all the sound effects because you want to keep track of what each one is for and have an index of them.  You’d add this to your topics file

Topic Type: Sound Effect
+
+   Plural: Sound Effects
+   Keywords:
+      sound
+      sound effect

Sound effects can now be documented with the sound or sound effect keywords, and they’ll get their own index.  The Plural line just specifies the plural name of the topic type.  It isn’t required, but Natural Docs will use it in some places where the plural would sound more natural, like when grouping topics or naming indexes on the menu.

Here are a couple of other things you may want to add:

Topic Type: Sound Effect
+
+   Plural: Sound Effects
+   Scope: Always Global
+   Keywords:
+      sound, sounds
+      sound effect, sound effects

You can set the scope behavior of the topic type.  Your options are:

NormalTopics stay within the current scope.
StartTopics start a new scope for all the topics beneath it, like class topics.
EndTopics reset the scope back to global for all the topics beneath it.
Always GlobalTopics are defined as global, but do not change the scope for any other topics.

Here we set it to Always Global so that if we document one as part of a class, it will still be global yet will not break the class’ scope.  In other words, we can always link to it with just its name instead of needing something like <Class.Sound>.

The other thing we did was add plural keywords, which you do by using a comma after an existing keyword.  These keywords are used for list topics so we don’t have to document each one individually with the full syntax.

There are more options, these are just the most important ones.  See the full syntax reference for the rest.

Prototypes

If you’d like to collect prototypes for your new topic type, you have to do that through Languages.txt as explained in the Prototypes section of the Customizing Languages page.

Changing Keywords
Adding and Changing

If you’re defining your own topic type or editing the main topics file, you simply add to the keywords list:

Topic Type: Sound Effect
+
+   Keywords:
+      sound, sounds
+      sound effect, sound effects

It doesn’t matter if the keyword was previously defined for a different topic type.  Just define it again and the definition will change.

If you want to add keywords to one of the main topic types from the user file so that your changes stay separate, just use Alter Topic Type instead:

Alter Topic Type: General
+
+   Keywords:
+      note
+      notes

Natural Docs will keep a list of the topic types defined in the main file in your project file so that you can do this easily.

Ignoring

Sometimes a keyword just gets in the way.  It’s too common in your comments and Natural Docs keeps accidentally picking them up as topics when that isn’t what you wanted.  You can get rid of keywords completely by either deleting them from the main file or putting this in your project file:

Ignore Keywords:
+   note
+   notes
+   title

If you only have a few, you can use this syntax as well:

Ignore Keywords: note, notes, title
Altering Behavior

You can alter the behavior of any topic type defined in the main file via your project file.  You just use Alter Topic Type and redefine any property.

Alter Topic Type: Constant
+
+   Scope: Always Global

Natural Docs will keep a list of all the topic types defined in the main file in your project file so you can do this easily.  See the syntax reference below for a full list of your options.

Syntax Reference
Ignore Keywords: [keyword], [keyword] ...
+   [keyword]
+   [keyword], [keyword]
+   ...

Ignores the keywords so that they’re not recognized as Natural Docs topics anymore.  Can be specified as a list on the same line and/or following like a normal Keywords section.

Topic Type: [name]
+Alter Topic Type: [name]

Creates a new topic type or alters an existing one.  The name can only contain letters, numbers, spaces, and these characters: . - ‘ /.  It isn’t case sensitive, although the original case is remembered for presentation.

The name General is reserved.  There are a number of default types that must be defined in the main file as well, but they will be listed there since it may change between versions.  The default types can have their keywords or behaviors changed, though, either by editing the default file or by overriding them in the user file.

Properties
Plural: [name]

Specifies the plural name of the topic type.  Defaults to the singular name.  Has the same restrictions as the topic type name.

Index: [yes|no]

Whether the topic type gets an index.  Defaults to yes.

Scope: [normal|start|end|always global]

How the topic affects scope.  Defaults to normal.

NormalTopics stay within the current scope.
StartTopics start a new scope for all the topics beneath it, like class topics.
EndTopics reset the scope back to global for all the topics beneath it.
Always GlobalTopics are defined as global, but do not change the scope for any other topics.
Class Hierarchy: [yes|no]

Whether the topic is part of the class hierarchy.  Defaults to no.

Page Title if First: [yes|no]

Whether the title of this topic becomes the page title if it is the first topic in a file.  Defaults to no.

Break Lists: [yes|no]

Whether list topics should be broken into individual topics in the output.  Defaults to no.

Can Group With: [topic type], [topic type], ...

Lists the topic types that can be grouped with this one in the output.  If two or more topic types often appear together, like Functions and Properties, this will allow them to be grouped together under one heading if it would cause too many groups otherwise.

Keywords:
+   [keyword]
+   [keyword], [plural keyword]
+   ...

A list of the topic type’s keywords.  Each line after the heading is the keyword and optionally its plural form.  This continues until the next line in “keyword: value” format.

  • Keywords can only have letters and numbers.  No punctuation or spaces are allowed.
  • Keywords are not case sensitive.
  • Subsequent keyword sections add to the list.  They don’t replace it.
  • Keywords can be redefined by other keyword sections.
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/documenting.html b/docs/doctool/Help/documenting.html new file mode 100644 index 00000000..caa3d801 --- /dev/null +++ b/docs/doctool/Help/documenting.html @@ -0,0 +1,160 @@ + + +Documenting Your Code - Natural Docs
Natural Docs
Using
Documenting
Your Code
KeywordsRunningTroubleshooting
Documenting Your Code

You document your code by putting Natural Docs content in the comments or in text files.  Before we go through all the specifics, here’s an example right off the bat so you have an idea of what it looks like.  Here’s your code:

/*
+   Function: Multiply
+   Multiplies two integers and returns the result.
+*/
+int Multiply (int x, int y)
+   {  return x * y;  };

And here’s what appears in your output:

Multiply

int Multiply (int x,
int y)

Multiplies two integers and returns the result.

Here’s a more elaborate example.  This is overkill for this particular function, but you get the idea.

/*
+   Function: Multiply
+
+   Multiplies two integers.
+
+   Parameters:
+
+      x - The first integer.
+      y - The second integer.
+
+   Returns:
+
+      The two integers multiplied together.
+
+   See Also:
+
+      <Divide>
+*/
+int Multiply (int x, int y)
+   {  return x * y;  };

Multiply

int Multiply (int x,
int y)

Multiplies two integers.

Parameters

xThe first integer.
yThe second integer.

Returns

The two integers multiplied together.

See Also

Divide

int Add (int x,
int y)
Adds two integers.
int Subtract (int x,
int y)
Subtracts two integers.
int Multiply (int x,
int y)
Multiplies two integers.
int Divide (int x,
int y)
Divides two integers.
bool IsEqual (int x,
int y)
Returns whether two integers are equal.

Not too scary, huh?  Notice the comments are just as readable as the output.  No tags littered about, and the structure is very natural.  This was one of the goals of Natural Docs.  Anyway, on to the details.

Comments

There is no special comment style for Natural Docs.  You just embed Natural Docs topics into regular comments, and it’s pretty tolerant as far as style goes.  You can use block comments or line comments strung together.  The only requirement is that the comments are alone on a line.  Comments appearing on the same lines as code are ignored.

/* Function: Multiply
+   Multiplies two integers and returns the result. */
+
+// Function: Multiply
+// Multiplies two integers and returns the result.

Note that when stringing line comments together, blank lines that you want to include in the documentation must start with the comment symbol as well.  If a line is completely blank, it’s considered the end of the comment and thus the end of the Natural Docs topic.

Boxes and Horizontal Lines

Natural Docs can also handle comment boxes and horizontal lines.  It doesn’t matter what symbols they use or how thick the lines are.  The boxes don’t need to be closed on the right side, and they can have different symbols for the edges and corners.

/*
+ * Function: Multiply
+ * Multiplies two integers and returns the result.
+ */
+
+/* +-------------------------------------------------+
+   | Function: Multiply                              |
+   | Multiplies two integers and returns the result. |
+   +-------------------------------------------------+ */
+
+//////////////////////////////////////////////////////////////
+//                                                            
+//  Function: Multiply                                        
+//  ------------------                                        
+//                                                            
+//  Multiplies two integers together and returns the result.  
+//                                                            
+//////////////////////////////////////////////////////////////
POD

Perl users can use POD to do block comments.

=begin nd
+
+Function: Multiply
+Multiplies two integers and returns the result.
+
+=cut
+
+
+=nd
+
+Function: Multiply
+Multiplies two integers and returns the result.
+
+=cut

You can also use NaturalDocs or Natural Docs in place of ND.  None of them are case sensitive.  If for some reason you want to go back to POD documentation instead of using =cut, you can write =end nd.

Important:  The second form of just =nd is offered as a convenience but is not valid POD.  Perl will skip over it and execute fine, but POD parsers will give errors and possibly include the unformatted text in the output.  Use the longer, valid form unless you know for certain that no one will ever try to run POD on your code.

Text Files

Alternately, documentation can be included in text files.  Any file with a .txt extension appearing in the source tree will be scanned for Natural Docs topics.  It will be treated the same as a source file, meaning it will appear in the menu, its topics will be in the indexes, and its topics can be linked to from anywhere in the documentation.  The only difference is you don’t need comment symbols.

Note that you still need to include topic headers, though.  Anything before the first header will be ignored, and if the file doesn’t have any header lines at all, it will be ignored completely.

This method is convenient for documenting file formats, configuration settings, the general program architecture, or anything else that isn’t directly tied to a source file.

Keywords, Topics, and Scope

As you may have guessed, a topic in Natural Docs starts with a “keyword: name” line.  You can have multiple topics per comment as long as you separate them with a blank line.  The keywords aren’t case sensitive.

The list of keywords is pretty predictable: Function, Class, Variable, etc.  Just use what they are.  There are many synonyms as well, so you can use keywords like Func, Procedure, Proc, Method and Constructor.  Look at the full list of keywords to see everything that’s available.

The list of keywords is separated into topic types.  Each type gets its own index, and which specific keyword you use doesn’t matter.  Some also have scoping rules or other behavior as noted.

Scope

Like the code it’s documenting, Natural Docs topics have scope.  This mostly has to do with linking: if you’re in a class you can link to its members by their name alone, but if you’re not, you have to use a notation like class.member or class::member.

If you have full language support and are documenting something that appears in the code, the scope will be handled automatically.  If you’re using text files or only have basic language support, scoping follows these basic rules:

List Topics

If you looked at the list, you saw that most of the keywords have plural forms.  That’s for list topics, which let you document many small things without using the full syntax.  Anything that appears in definition lists within that topic will be treated as if it had its own topic.  It will appear in the indexes and be linkable, just like normal topics.

Function list topics will automatically break apart in the output as well, so it will look the same as if you documented each one individually.

Formatting and Layout

As you saw in the more elaborate example, you can apply additional formatting and layout to your Natural Docs content, all in ways that will appear very natural in the source code.

Paragraphs

First of all, you break paragraphs by leaving blank lines between them.  So we have this in our content:

The first paragraph blah blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah.
+
+The second paragraph blah blah blah blah blah blah blah
+blah blah blah blah blah blah blah blah blah blah blah blah
+blah blah blah blah.

and we get this in our output:

The first paragraph blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

The second paragraph blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Bold and Underline

You can apply bold to a stretch of text by surrounding it with asterisks.  You can apply underlining by surrounding it with underscores instead.  With underlining, it doesn’t matter if you use an underscore for every space between words or not; they’ll be converted to spaces if you do.

Some *bold text* and some _underlined text_
+and yet _more_underlined_text_.

Some bold text and some underlined text and yet more underlined text.

Headings

You can add headings to your output just by ending a line with a colon and having a blank line above it.

Some text before the heading.
+
+Heading:
+Some text under the heading.

Some text before the heading.

Heading

Some text under the heading.

You must have a blank line above the heading or it will not work.  You can skip the blank after it but not before.

Bullet Lists

You can add bullet lists by starting a line with a dash, an asterisk, an o, or a plus.  Bullets can have blank lines between them if you want, and subsequent lines don’t have to be indented.  You end a list by skipping a line and doing something else.

- Bullet one.
+- Bullet two.
+  Bullet two continued.
+- Bullet three.
+
+Some text after the bullet list.
+
+o Spaced bullet one.
+
+o Spaced bullet two.
+Spaced bullet two continued.
+
+o Spaced bullet three.
+
+Some text after the spaced bullet list.
  • Bullet one.
  • Bullet two.  Bullet two continued.
  • Bullet three.

Some text after the bullet list.

  • Spaced bullet one.
  • Spaced bullet two.  Spaced bullet two continued.
  • Spaced bullet three.

Some text after the spaced bullet list.

Definition Lists

You can add a definition list by using the format below, specifically “text space dash space text”.  Like bullet lists, you can have blank lines between them if you want, subsequent lines don’t have to be indented, and you end the list by skipping a line and doing something else.  The first line of the list must be after a blank line or something like a header; it can’t be

First  - This is the first item.
+Second - This is the second item.
+         This is more of the second item.
+Third  - This is the third item.
+This is more of the third item.
+
+Some text after the definition list.
FirstThis is the first item.
SecondThis is the second item.  This is more of the second item.
ThirdThis is the third item.  This is more of the third item.

Some text after the definition list.

Remember that with definition lists, if you’re using the plural form of the keywords each entry is a symbol and can be linked to just as if it had its own topic.

Code and Text Diagrams

Finally, you can add example code or text diagrams by starting each line with >, |, or :.  If you have a vertical line or text box with the comment, you must separate these symbols from it with a space.

: a = b + c;
+
+>   +-----+     +-----+
+>   |  A  | --> |  B  |
+>   +-----+     +-----+
+>                  |
+>               +-----+
+>               |  C  |
+>               +-----+
a = b + c;
+-----+     +-----+
+|  A  | --> |  B  |
++-----+     +-----+
+               |
+            +-----+
+            |  C  |
+            +-----+

For long stretches, this may be too tedious.  You can start a code section by placing (start code) or just (code) alone on a line.  You end it with either (end code) or just (end).  You can’t put any other content on these lines other than any line or text box symbols you may be using with the comment.

(start code)
+
+if (x == 0) {
+   DoSomething();
+}
+
+return x;
+
+(end)
if (x == 0) {
+   DoSomething();
+}
+
+return x;

You can also use example, diagram, or table instead of code.  Just use whatever’s appropriate.  Always flexible, it will accept begin for start and it will accept finish or done for end so you don’t have to remember the exact word.

Linking

Linking is the one place where Natural Docs has some negative effect on the readability of the comments.  Of course, the alternative would be to automatically guess where links should be, but systems that do that typically pepper your sentences with unintentional links to functions called “is” or “on”.  However, the Natural Docs syntax is still as minimal as possible.  Simply surround any topic you want to link to with angle brackets.  Natural Docs will keep track off all the topics and where they are defined, so you don’t need to use HTML-like syntax or remember what file anything is in.  Also, if the link can’t be resolved to anything, Natural Docs leaves the angle brackets in the output so if something wasn’t intended to be a link (such as #include <somefile.h>) it won’t be mangled.

Let's link to function <Multiply>.

Let’s link to function Multiply.

Links and topic names are case sensitive, regardless of whether the language is or not.

When linking to functions, it doesn’t matter if you include empty parenthesis or not.  Both <Function> and <Function()> will work.  However, if you documented the function with parameters as part of the name, you will need to include those parameters whenever linking to it.  It is recommended that you only include parameters in the topic name if you need to distinguish between two functions with the same name.

If the topic has a summary sentence, hovering over the link will give it to you as a tooltip.  If the topic has a prototype, that will be included as well.  You can try it above.

Scope

If a topic is considered part of a class, they are linked to using any of the three most common class/member notations:  class.member, class::member, and class->member.  Natural Docs will not be confused by <class->member>.  Like in the language itself, if the topic you’re writing is in that class’ scope you can link to it simply as <member>.

If you have multi-level classes and packages, links can be relative as well.  So if you’re in Project::UI::Window::Base and you want to link to Project::UI::Button::Base, just using <Button::Base> will work.  Links will try to resolve to globals before relative because not everyone wants to use relative links, and this way they can ignore it without anything getting messed up.

Plurals and Possessives

To make the documentation easier to write and easier to read in the source file, you can include plurals and possessives inside the angle brackets.  In other words, you don’t have to use awkward syntax like <Object>s, although that’s supported as well.  You can simply write <Objects> and it will link to the symbol Object just fine.  It can handle any plural and/or possessive form you can throw at it.  I’m not kidding: Foxes, Fox’s, Foxes’, Children, Mice, Alumni, Indices, Amoebae, Teeth, just try to trip it up.

URLs and E-Mail

You can also link to URLs and e-mail addresses.  It will detect them automatically, but you can also put them in angle brackets if you like.

Visit <http://www.website.com> or send messages to
+email@address.com.

E-mail addresses are protected in a way that should avoid spam crawlers.  Although the link above looks and acts like a regular link (try it) the HTML code actually looks like this:

<a href="#" 
+ onClick="location.href='mai' + 'lto:' + 'em' + 'ail' + '@'
+          + 'addre' + 'ss.com'; return false;">
+    em<span style="display: none">.nosp@m.</span>ail
+    <span>@</span>
+    addre<span style="display: none">.nosp@m.</span>ss.com
+</a>
Page Titles

Natural Docs automatically determines the page title as follows:

  • If there’s only one topic in the file, that topic’s title becomes the page title.
  • Otherwise, if the first topic in the file is a class, section, or file, that topic’s title becomes the page title.
  • Otherwise, the file name becomes the page title.

This should be enough for most people.  However, if you don’t like the page title Natural Docs has chosen for you, add a “Title: [name]” comment to the top of the file to override it.  Title is a synonym of Section, so that will satisfy the second rule and make it the page title.

Summaries

Summaries are automatically generated for every file, class, and section.  You don’t have to do anything special to get them.

There are two things you may want to keep in mind when documenting your code so that the summaries are nicer.  The first is that they use the first sentence in the topic as the description, so long as it’s plain text and not something like a bullet list.  It will also appear in the tooltip whenever that topic is linked to.

The second is that you may want to manually add group topics to divide long lists and make the summaries easier to navigate.  Natural Docs will automatically group them by type if you do not, but sometimes you want to be more specific.  You don’t need to provide a description, just adding a “Group: [name]” comment is sufficient.  Note that once you manually add a group automatic grouping is completely turned off for that class.

Here’s an example summary.  Note that as before, when you hover over a link, you’ll get the prototype and summary line as a tooltip.

Summary
A example class that does arithmetic with functions for people scared of operators.
Adds two integers.
Subtracts two integers.
Multiplies two integers.
Divides two integers.
Returns whether two integers are equal.
That’s It!

Here’s our overkill example again, just to refresh your memory.  You can see examples of what a complete project’s output would look like on our web site.

Make sure you visit the troubleshooting page if things aren’t working the way you expect them to.

/*
+   Function: Multiply
+
+   Multiplies two integers.
+
+   Parameters:
+
+      x - The first integer.
+      y - The second integer.
+
+   Returns:
+
+      The two integers multiplied together.
+
+   See Also:
+
+      <Divide>
+*/
+int Multiply (int x, int y)
+   {  return x * y;  };

Multiply

int Multiply (int x,
int y)

Multiplies two integers.

Parameters

xThe first integer.
yThe second integer.

Returns

The two integers multiplied together.

See Also

Divide

Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/example/Default.css b/docs/doctool/Help/example/Default.css new file mode 100644 index 00000000..c54fdba2 --- /dev/null +++ b/docs/doctool/Help/example/Default.css @@ -0,0 +1,507 @@ +/* + IMPORTANT: If you're editing this file in the output directory of one of + your projects, your changes will be overwritten the next time you run + Natural Docs. Instead, copy this file to your project directory, make your + changes, and you can use it with -s. Even better would be to make a CSS + file in your project directory with only your changes, which you can then + use with -s [original style] [your changes]. + + On the other hand, if you're editing this file in the Natural Docs styles + directory, the changes will automatically be applied to all your projects + that use this style the next time Natural Docs is run on them. + + This file is part of Natural Docs, which is Copyright © 2003-2004 Greg Valure + Natural Docs is licensed under the GPL +*/ + +body { + font-family: Verdana, Arial, sans-serif; + color: #000000; + margin: 0px; padding: 0px } + +body.UnframedPage { + background-color: #E8E8E8 } + + +a:link, +a:visited { color: #900000; text-decoration: none } +a:hover { color: #900000; text-decoration: underline } +a:active { color: #FF0000; text-decoration: underline } + +td { + vertical-align: top } + +/* + Comment out this line to use web-style paragraphs (blank line between + paragraphs, no indent) instead of print-style paragraphs (no blank line, + indented.) +*/ +p { + text-indent: 5ex; margin: 0 } + + +/* Can't use something like display: none or it won't break. */ +.HB { + font-size: 1px } + + + + +body.FramedMenuPage, +.MenuSection { + font-size: 9pt; + background-color: #E8E8E8; + padding: 10px 0 0 0 } + +.MenuSection { + width: 27ex } + + + .MTitle { + font-size: 16pt; font-weight: bold; font-variant: small-caps; + text-align: center; + padding: 5px 10px 15px 10px; + border-bottom: 1px dotted #000000; + margin-bottom: 15px } + + .MSubTitle { + font-size: 9pt; font-weight: normal; font-variant: normal; + margin-top: 1ex; margin-bottom: 5px } + + + .MEntry a:link, + .MEntry a:hover, + .MEntry a:visited { color: #606060; margin-right: 0 } + .MEntry a:active { color: #A00000; margin-right: 0 } + + + .MGroup { + font-variant: small-caps; font-weight: bold; + margin: 1em 0 1em 10px } + + /* Konqueror just can't do margins. */ + .KHTML .MGroup { + margin-bottom: 0; padding-bottom: 1em } + + .MGroupContent { + font-variant: normal; font-weight: normal } + + .MGroup a:link, + .MGroup a:hover, + .MGroup a:visited { color: #545454; margin-right: 10px } + .MGroup a:active { color: #A00000; margin-right: 10px } + + + .MFile, + .MText, + .MLink, + .MIndex { + padding: 1px 17px 2px 10px; + margin: .25em 0 .25em 0 } + + .MText { + font-size: 8pt; font-style: italic } + + .MLink { + font-style: italic } + + #MSelected { + color: #000000; background-color: #FFFFFF; + /* Replace padding with border. */ + padding: 0 10px 0 10px; + border-width: 1px 2px 2px 0; border-style: solid; border-color: #000000; + margin-right: 5px } + + /* Close off the left side when its in a group. */ + .MGroup #MSelected { + padding-left: 9px; border-left-width: 1px } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko #MSelected { + -moz-border-radius-topright: 10px; + -moz-border-radius-bottomright: 10px } + .Gecko .MGroup #MSelected { + -moz-border-radius-topleft: 10px; + -moz-border-radius-bottomleft: 10px } + + + + +body.FramedContentPage, +.ContentSection { + background-color: #FFFFFF; + padding-bottom: 15px } + +.ContentSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + + .CTopic { + font-size: 10pt; + /* This should be a margin but Konq 3.1.1 sucks. */ + padding-bottom: 3em } + + + .CTitle { + font-size: 12pt; font-weight: bold; + border-width: 0 0 1px 0; border-style: solid; border-color: #A0A0A0; + margin: 0 15px .5em 15px } + + .CGroup .CTitle { + font-size: 16pt; font-variant: small-caps; + padding-left: 15px; padding-right: 15px; + border-width: 0 0 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CClass .CTitle, + .CInterface .CTitle, + .CDatabase .CTitle, + .CDatabaseTable .CTitle, + .CSection .CTitle { + font-size: 18pt; + color: #FFFFFF; background-color: #A0A0A0; + padding: 10px 15px 10px 15px; + border-width: 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + #MainTopic .CTitle { + font-size: 20pt; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CBody { + margin-left: 15px; margin-right: 15px } + + + .CToolTip { + position: absolute; visibility: hidden; + left: 0; top: 0; max-width: 50%; + background-color: #FFFFE0; + padding: 5px; + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #000000; + font-size: 8pt } + + /* Opera 6 gives it a huge height otherwise. */ + .Opera6 .CTooltip, .Opera5 .CTooltip { + max-width: 100% } + + .CHeading { + font-weight: bold; font-size: 10pt; + margin-top: 1.5em; margin-bottom: .5em } + + .CCode { + font: 10pt "Courier New", Courier, monospace; + overflow: auto; + } + + .CBulletList { + /* I don't know why CBody's margin doesn't apply, but it's consistent across browsers so whatever. + Reapply it here as padding. */ + padding-left: 15px; padding-right: 15px; + margin: .5em 5ex .5em 5ex; + } + + .CDescriptionList { + margin: .5em 5ex 0 5ex } + + /* IE 4 and Konqueror always makes it too long. */ + .IE4 .CDescriptionList, + .KHTML .CDescriptionList { + width: 85% } + + .CDLEntry { + font: 10pt "Courier New", Courier, monospace; color: #808080; + padding-bottom: .25em; + white-space: nowrap } + + .CDLDescription { + font-size: 10pt; /* For browsers that don't inherit correctly, like Opera 5. */ + padding-bottom: .5em; padding-left: 5ex } + + + + +.Prototype { + font: 10pt "Courier New", Courier, monospace; + padding: 5px 3ex; + border-width: 1px; border-style: solid; + margin: 0 5ex 1.5em 5ex; + } + + .Prototype td { + font-size: 10pt; + } + + .PDefaultValue, + .PTypePrefix { + color: #8F8F8F; + } + .PTypePrefix { + text-align: right; + } + + .IE .Prototype table { + padding: 0; + } + + .CFunction .Prototype { + background-color: #F4F4F4; border-color: #D0D0D0 } + .CProperty .Prototype { + background-color: #F4F4FF; border-color: #C0C0E8 } + .CVariable .Prototype { + background-color: #FFFFF0; border-color: #E0E0A0 } + + .CDatabaseIndex .Prototype, + .CConstant .Prototype { + background-color: #D0D0D0; border-color: #000000 } + .CType .Prototype { + background-color: #FFF8F8; border-color: #E8C8C8 } + .CDatabaseTrigger .Prototype, + .CEvent .Prototype, + .CDelegate .Prototype { + background-color: #F0FCF0; border-color: #B8E4B8 } + + .CToolTip .Prototype { + margin: 0 0 .5em 0; + white-space: nowrap; + } + + + + + +.Summary { + margin: 1.5em 5ex 0 5ex } + + .STitle { + font-size: 12pt; font-weight: bold; + margin-bottom: .5em } + + + .SBorder { + background-color: #FFFFF0; + padding: 15px; + border: 1px solid #C0C060 } + + /* Let's observe the evolution of IE's brokeness, shall we? + IE 4 always makes them too long, there's no way around it. */ + .IE4 .SBorder { + width: 85% } + /* IE 5 will make them too long unless you set the width to 100%. Isn't this implied for a div? */ + .IE5 .SBorder { + width: 100% } + /* IE 6 behaves like 5 when it's in a frame, but without frames it will be correct without a width or slightly too long + (but not enough to scroll) with a width. This arbitrary weirdness simply astounds me. */ + body.FramedContentPage .IE6 .SBorder { + width: 100% } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko .SBorder { + -moz-border-radius: 20px } + + + .STable { + font-size: 9pt; width: 100% } + + .SEntrySize { + width: 30% } + .SDescriptionSize { + width: 70% } + + + .SMarked { + background-color: #F8F8D8 } + + + .SEntry .SIndent1 { + margin-left: 1.5ex } + .SEntry .SIndent2 { + margin-left: 3ex } + .SEntry .SIndent3 { + margin-left: 4.5ex } + .SEntry .SIndent4 { + margin-left: 6ex } + .SEntry .SIndent5 { + margin-left: 7.5ex } + + .SDescription { + padding-left: 3ex } + + .SDescription a { color: #800000} + .SDescription a:active { color: #A00000 } + + + .SGroup { + margin-top: .5em; margin-bottom: .25em } + + .SGroup .SEntry { + font-weight: bold; font-variant: small-caps } + + .SGroup .SEntry a { color: #800000 } + .SGroup .SEntry a:active { color: #F00000 } + + + .SMain .SEntry, + .SClass .SEntry, + .SDatabase .SEntry, + .SDatabaseTable .SEntry, + .SSection .SEntry { + font-weight: bold; font-size: 10pt; + margin-bottom: .25em } + + .SClass, + .SDatabase, + .SDatabaseTable, + .SSection { + margin-top: 1em } + + .SMain .SEntry a, + .SClass .SEntry a, + .SDatabase .SEntry a, + .SDatabaseTable .SEntry a, + .SSection .SEntry a { color: #000000 } + + .SMain .SEntry a:active, + .SClass .SEntry a:active, + .SDatabase .SEntry a:active, + .SDatabaseTable .SEntry a:active, + .SSection .SEntry a:active { color: #A00000 } + + + + + +.ClassHierarchy { + margin: 0 15px 1em 15px } + + .CHEntry { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0; + margin-bottom: 3px; + padding: 2px 2ex; + font-size: 10pt; + background-color: #F4F4F4; color: #606060; + } + + .Gecko .CHEntry { + -moz-border-radius: 4px; + } + + .CHCurrent .CHEntry { + font-weight: bold; + border-color: #000000; + color: #000000; + } + + .CHChildNote .CHEntry { + font-style: italic; + font-size: 8pt; + } + + .CHIndent { + margin-left: 3ex; + } + + .CHEntry a:link, + .CHEntry a:visited, + .CHEntry a:hover { + color: #606060; + } + .CHEntry a:active { + color: #800000; + } + + + + + +body.FramedIndexPage, +.IndexSection { + background-color: #FFFFFF; + font-size: 10pt; + padding: 15px } + +.IndexSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + .IPageTitle { + font-size: 20pt; font-weight: bold; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; border-style: solid; + margin: -15px -15px 0 -15px } + + .INavigationBar { + text-align: center; + background-color: #FFFFF0; + padding: 5px; + border-bottom: solid 1px black; + margin: 0 -15px 15px -15px } + + .INavigationBar a { + font-weight: bold } + + .IHeading { + font-size: 16pt; font-weight: bold; + padding: 2.5em 0 .5em 0; + text-align: center; + width: 3.5ex; + } + #IFirstHeading { + padding-top: 0; + } + + .IEntry { + padding-left: 1ex; } + + .ISubIndex { + padding-left: 3ex; padding-bottom: .5em } + + /* While it may cause some entries to look like links when they aren't, I found it's much easier to read the + index if everything's the same color. */ + .ISymbol { + font-weight: bold; color: #900000 } + + .ISymbolPrefix { + text-align: right; + color: #C47C7C; + background-color: #F8F8F8; + border-right: 3px solid #E0E0E0; + border-left: 1px solid #E0E0E0; + padding: 0 1px 0 2px; + } + #IFirstSymbolPrefix { + border-top: 1px solid #E0E0E0; + } + #ILastSymbolPrefix { + border-bottom: 1px solid #E0E0E0; + } + #IOnlySymbolPrefix { + border-top: 1px solid #E0E0E0; + border-bottom: 1px solid #E0E0E0; + } + + a.IParent, + a.IFile { + display: block; + } + + + + +.Footer { + font-size: 8pt; color: #909090 } + +body.UnframedPage .Footer { + text-align: right; + margin: 2px } + +body.FramedMenuPage .Footer { + text-align: center; + margin: 5em 10px 0 10px} + + .Footer a:link, + .Footer a:hover, + .Footer a:visited { color: #909090 } + .Footer a:active { color: #A00000 } diff --git a/docs/doctool/Help/example/NaturalDocs.js b/docs/doctool/Help/example/NaturalDocs.js new file mode 100644 index 00000000..2af84cf5 --- /dev/null +++ b/docs/doctool/Help/example/NaturalDocs.js @@ -0,0 +1,204 @@ + +// +// Browser Styles +// ____________________________________________________________________________ + +var agt=navigator.userAgent.toLowerCase(); +var browserType; +var browserVer; + +if (agt.indexOf("opera") != -1) + { + browserType = "Opera"; + + if (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) + { browserVer = "Opera5"; } + else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1) + { browserVer = "Opera6"; } + else if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) + { browserVer = "Opera7"; } + } + +else if (agt.indexOf("khtml") != -1 || agt.indexOf("konq") != -1 || agt.indexOf("safari") != -1) + { + browserType = "KHTML"; + } + +else if (agt.indexOf("msie") != -1) + { + browserType = "IE"; + + if (agt.indexOf("msie 4") != -1) + { browserVer = "IE4"; } + else if (agt.indexOf("msie 5") != -1) + { browserVer = "IE5"; } + else if (agt.indexOf("msie 6") != -1) + { browserVer = "IE6"; } + } + +else if (agt.indexOf("gecko") != -1) + { + browserType = "Gecko"; + } + +// Opera already taken care of. +else if (agt.indexOf("mozilla") != -1 && agt.indexOf("compatible") == -1 && agt.indexOf("spoofer") == -1 && + agt.indexOf("webtv") == -1 && agt.indexOf("hotjava") == -1) + { + browserType = "Netscape"; + + if (agt.indexOf("mozilla/4") != -1) + { browserVer = "Netscape4"; } + } + + +// +// Menu +// ____________________________________________________________________________ + + +function ToggleMenu(id) + { + if (!window.document.getElementById) + { return; }; + + var display = window.document.getElementById(id).style.display; + + if (display == "none") + { display = "block"; } + else + { display = "none"; } + + window.document.getElementById(id).style.display = display; + } + + +// +// Tooltips +// ____________________________________________________________________________ + + +var tooltipTimer = 0; + +function ShowTip(event, tooltipID, linkID) + { + if (tooltipTimer) + { clearTimeout(tooltipTimer); }; + + var docX = event.clientX + window.pageXOffset; + var docY = event.clientY + window.pageYOffset; + + var showCommand = "ReallyShowTip('" + tooltipID + "', '" + linkID + "', " + docX + ", " + docY + ")"; + + // KHTML cant handle showing on a timer right now. + + if (browserType != "KHTML") + { tooltipTimer = setTimeout(showCommand, 1000); } + else + { eval(showCommand); }; + } + +function ReallyShowTip(tooltipID, linkID, docX, docY) + { + tooltipTimer = 0; + + var tooltip; + var link; + + if (document.getElementById) + { + tooltip = document.getElementById(tooltipID); + link = document.getElementById(linkID); + } + else if (document.all) + { + tooltip = eval("document.all['" + tooltipID + "']"); + link = eval("document.all['" + linkID + "']"); + } + + if (tooltip) + { + var left = 0; + var top = 0; + + // Not everything supports offsetTop/Left/Width, and some, like Konqueror and Opera 5, think they do but do it badly. + + if (link && link.offsetWidth != null && browserType != "KHTML" && browserVer != "Opera5") + { + var item = link; + while (item != document.body) + { + left += item.offsetLeft; + item = item.offsetParent; + } + + item = link; + while (item != document.body) + { + top += item.offsetTop; + item = item.offsetParent; + } + top += link.offsetHeight; + } + + // The fallback method is to use the mouse X and Y relative to the document. We use a separate if and test if its a number + // in case some browser snuck through the above if statement but didn't support everything. + + if (!isFinite(top) || top == 0) + { + left = docX; + top = docY; + } + + // Some spacing to get it out from under the cursor. + + top += 10; + + // Make sure the tooltip doesnt get smushed by being too close to the edge, or in some browsers, go off the edge of the + // page. We do it here because Konqueror does get offsetWidth right even if it doesnt get the positioning right. + + if (tooltip.offsetWidth != null) + { + var width = tooltip.offsetWidth; + var docWidth = document.body.clientWidth; + + if (left + width > docWidth) + { left = docWidth - width - 1; } + } + + // Opera 5 chokes on the px extension, so it can use the Microsoft one instead. + + if (tooltip.style.left != null && browserVer != "Opera5") + { + tooltip.style.left = left + "px"; + tooltip.style.top = top + "px"; + } + else if (tooltip.style.pixelLeft != null) + { + tooltip.style.pixelLeft = left; + tooltip.style.pixelTop = top; + } + + tooltip.style.visibility = "visible"; + } + } + +function HideTip(tooltipID) + { + if (tooltipTimer) + { + clearTimeout(tooltipTimer); + tooltipTimer = 0; + } + + var tooltip; + + if (document.getElementById) + { tooltip = document.getElementById(tooltipID); } + else if (document.all) + { tooltip = eval("document.all['" + tooltipID + "']"); } + + if (tooltip) + { tooltip.style.visibility = "hidden"; } + } + diff --git a/docs/doctool/Help/example/Roman.css b/docs/doctool/Help/example/Roman.css new file mode 100644 index 00000000..54acc6e3 --- /dev/null +++ b/docs/doctool/Help/example/Roman.css @@ -0,0 +1,507 @@ +/* + IMPORTANT: If you're editing this file in the output directory of one of + your projects, your changes will be overwritten the next time you run + Natural Docs. Instead, copy this file to your project directory, make your + changes, and you can use it with -s. Even better would be to make a CSS + file in your project directory with only your changes, which you can then + use with -s [original style] [your changes]. + + On the other hand, if you're editing this file in the Natural Docs styles + directory, the changes will automatically be applied to all your projects + that use this style the next time Natural Docs is run on them. + + This file is part of Natural Docs, which is Copyright © 2003-2004 Greg Valure + Natural Docs is licensed under the GPL +*/ + +body { + font-family: "Times New Roman", Roman, serif; + color: #000000; + margin: 0px; padding: 0px } + +body.UnframedPage { + background-color: #E8E8E8 } + + +a:link, +a:visited { color: #900000; text-decoration: none } +a:hover { color: #900000; text-decoration: underline } +a:active { color: #FF0000; text-decoration: underline } + +td { + vertical-align: top } + +/* + Comment out this line to use web-style paragraphs (blank line between + paragraphs, no indent) instead of print-style paragraphs (no blank line, + indented.) +*/ +p { + text-indent: 5ex; margin: 0 } + + +/* Can't use something like display: none or it won't break. */ +.HB { + font-size: 1px } + + + + +body.FramedMenuPage, +.MenuSection { + font-size: 10pt; + background-color: #E8E8E8; + padding: 10px 0 0 0 } + +.MenuSection { + width: 27ex } + + + .MTitle { + font-size: 18pt; font-weight: bold; font-variant: small-caps; + text-align: center; + padding: 5px 10px 15px 10px; + border-bottom: 1px dotted #000000; + margin-bottom: 15px } + + .MSubTitle { + font-size: 10pt; font-weight: normal; font-variant: normal; + margin-top: 1ex; margin-bottom: 5px } + + + .MEntry a:link, + .MEntry a:hover, + .MEntry a:visited { color: #606060; margin-right: 0 } + .MEntry a:active { color: #A00000; margin-right: 0 } + + + .MGroup { + font-variant: small-caps; font-weight: bold; + margin: 1em 0 1em 10px } + + /* Konqueror just can't do margins. */ + .KHTML .MGroup { + margin-bottom: 0; padding-bottom: 1em } + + .MGroupContent { + font-variant: normal; font-weight: normal } + + .MGroup a:link, + .MGroup a:hover, + .MGroup a:visited { color: #545454; margin-right: 10px } + .MGroup a:active { color: #A00000; margin-right: 10px } + + + .MFile, + .MText, + .MLink, + .MIndex { + padding: 1px 17px 2px 10px; + margin: .25em 0 .25em 0 } + + .MText { + font-size: 8pt; font-style: italic } + + .MLink { + font-style: italic } + + #MSelected { + color: #000000; background-color: #FFFFFF; + /* Replace padding with border. */ + padding: 0 10px 0 10px; + border-width: 1px 2px 2px 0; border-style: solid; border-color: #000000; + margin-right: 5px } + + /* Close off the left side when its in a group. */ + .MGroup #MSelected { + padding-left: 9px; border-left-width: 1px } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko #MSelected { + -moz-border-radius-topright: 10px; + -moz-border-radius-bottomright: 10px } + .Gecko .MGroup #MSelected { + -moz-border-radius-topleft: 10px; + -moz-border-radius-bottomleft: 10px } + + + + +body.FramedContentPage, +.ContentSection { + background-color: #FFFFFF; + padding-bottom: 15px } + +.ContentSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + + .CTopic { + font-size: 12pt; + /* This should be a margin but Konq 3.1.1 sucks. */ + padding-bottom: 3em } + + + .CTitle { + font-size: 16pt; font-weight: bold; + border-width: 0 0 1px 0; border-style: solid; border-color: #A0A0A0; + margin: 0 15px .5em 15px } + + .CGroup .CTitle { + font-size: 18pt; font-variant: small-caps; + padding-left: 15px; padding-right: 15px; + border-width: 0 0 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CClass .CTitle, + .CInterface .CTitle, + .CDatabase .CTitle, + .CDatabaseTable .CTitle, + .CSection .CTitle { + font-size: 20pt; + color: #FFFFFF; background-color: #A0A0A0; + padding: 10px 15px 10px 15px; + border-width: 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + #MainTopic .CTitle { + font-size: 24pt; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CBody { + margin-left: 15px; margin-right: 15px } + + + .CToolTip { + position: absolute; visibility: hidden; + left: 0; top: 0; max-width: 50%; + background-color: #FFFFE0; + padding: 5px; + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #000000; + font-size: 10pt } + + /* Opera 6 gives it a huge height otherwise. */ + .Opera6 .CTooltip, .Opera5 .CTooltip { + max-width: 100% } + + .CHeading { + font-weight: bold; + margin-top: 1.5em; margin-bottom: .5em } + + .CCode { + font: 10pt "Courier New", Courier, monospace; + overflow: auto; + } + + .CBulletList { + /* I don't know why CBody's margin doesn't apply, but it's consistent across browsers so whatever. + Reapply it here as padding. */ + padding-left: 15px; padding-right: 15px; + margin: .5em 5ex .5em 5ex; + } + + .CDescriptionList { + margin: .5em 5ex 0 5ex } + + /* IE 4 and Konqueror always makes it too long. */ + .IE4 .CDescriptionList, + .KHTML .CDescriptionList { + width: 85% } + + .CDLEntry { + font: 10pt "Courier New", Courier, monospace; color: #808080; + padding-bottom: .25em; + white-space: nowrap } + + .CDLDescription { + font-size: 12pt; /* For browsers that don't inherit correctly, like Opera 5. */ + padding-bottom: .5em; padding-left: 5ex } + + + + + +.Prototype { + font: 10pt "Courier New", Courier, monospace; + padding: 5px 3ex; + border-width: 1px; border-style: solid; + margin: 0 5ex 1.5em 5ex; + } + + .Prototype td { + font-size: 10pt; + } + + .PDefaultValue, + .PTypePrefix { + color: #8F8F8F; + } + .PTypePrefix { + text-align: right; + } + + .IE .Prototype table { + padding: 0; + } + + .CFunction .Prototype { + background-color: #F4F4F4; border-color: #D0D0D0 } + .CProperty .Prototype { + background-color: #F4F4FF; border-color: #C0C0E8 } + .CVariable .Prototype { + background-color: #FFFFF0; border-color: #E0E0A0 } + + .CDatabaseIndex .Prototype, + .CConstant .Prototype { + background-color: #D0D0D0; border-color: #000000 } + .CType .Prototype { + background-color: #FFF8F8; border-color: #E8C8C8 } + .CDatabaseTrigger .Prototype, + .CEvent .Prototype, + .CDelegate .Prototype { + background-color: #F0FCF0; border-color: #B8E4B8 } + + .CToolTip .Prototype { + margin: 0 0 .5em 0; + white-space: nowrap; + } + + + + + +.Summary { + margin: 1.5em 5ex 0 5ex } + + .STitle { + font-size: 14pt; font-weight: bold; + margin-bottom: .5em } + + + .SBorder { + background-color: #FFFFF0; + padding: 15px; + border: 1px solid #C0C060 } + + /* Let's observe the evolution of IE's brokeness, shall we? + IE 4 always makes them too long, there's no way around it. */ + .IE4 .SBorder { + width: 85% } + /* IE 5 will make them too long unless you set the width to 100%. Isn't this implied for a div? */ + .IE5 .SBorder { + width: 100% } + /* IE 6 behaves like 5 when it's in a frame, but without frames it will be correct without a width or slightly too long + (but not enough to scroll) with a width. This arbitrary weirdness simply astounds me. */ + body.FramedContentPage .IE6 .SBorder { + width: 100% } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko .SBorder { + -moz-border-radius: 20px } + + + .STable { + font-size: 10pt; width: 100% } + + .SEntrySize { + width: 30% } + .SDescriptionSize { + width: 70% } + + + .SMarked { + background-color: #F8F8D8 } + + + .SEntry .SIndent1 { + margin-left: 1.5ex } + .SEntry .SIndent2 { + margin-left: 3ex } + .SEntry .SIndent3 { + margin-left: 4.5ex } + .SEntry .SIndent4 { + margin-left: 6ex } + .SEntry .SIndent5 { + margin-left: 7.5ex } + + .SDescription { + padding-left: 3ex } + + .SDescription a { color: #800000} + .SDescription a:active { color: #A00000 } + + + .SGroup { + margin-top: .5em; margin-bottom: .25em } + + .SGroup .SEntry { + font-weight: bold; font-variant: small-caps } + + .SGroup .SEntry a { color: #800000 } + .SGroup .SEntry a:active { color: #F00000 } + + + .SMain .SEntry, + .SClass .SEntry, + .SDatabase .SEntry, + .SDatabaseTable .SEntry, + .SSection .SEntry { + font-weight: bold; font-size: 12pt; + margin-bottom: .25em } + + .SClass, + .SDatabase, + .SDatabaseTable, + .SSection { + margin-top: 1em } + + .SMain .SEntry a, + .SClass .SEntry a, + .SDatabase .SEntry a, + .SDatabaseTable .SEntry a, + .SSection .SEntry a { color: #000000 } + + .SMain .SEntry a:active, + .SClass .SEntry a:active, + .SDatabase .SEntry a:active, + .SDatabaseTable .SEntry a:active, + .SSection .SEntry a:active { color: #A00000 } + + + + + +.ClassHierarchy { + margin: 0 15px 1em 15px } + + .CHEntry { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0; + margin-bottom: 3px; + padding: 2px 2ex; + font-size: 12pt; + background-color: #F4F4F4; color: #606060; + } + + .Gecko .CHEntry { + -moz-border-radius: 4px; + } + + .CHCurrent .CHEntry { + font-weight: bold; + border-color: #000000; + color: #000000; + } + + .CHChildNote .CHEntry { + font-style: italic; + font-size: 8pt; + } + + .CHIndent { + margin-left: 3ex; + } + + .CHEntry a:link, + .CHEntry a:visited, + .CHEntry a:hover { + color: #606060; + } + .CHEntry a:active { + color: #800000; + } + + + + + +body.FramedIndexPage, +.IndexSection { + background-color: #FFFFFF; + font: 12pt "Times New Roman", serif; + padding: 15px } + +.IndexSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + .IPageTitle { + font-size: 24pt; font-weight: bold; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; border-style: solid; + margin: -15px -15px 0 -15px } + + .INavigationBar { + text-align: center; + background-color: #FFFFF0; + padding: 5px; + border-bottom: solid 1px black; + margin: 0 -15px 15px -15px } + + .INavigationBar a { + font-weight: bold } + + .IHeading { + font-size: 20pt; font-weight: bold; + padding: 2.5em 0 .5em 0; + text-align: center; + width: 3.5ex; + } + #IFirstHeading { + padding-top: 0; + } + + .IEntry { + padding-left: 1ex; } + + .ISubIndex { + padding-left: 3ex; padding-bottom: .5em } + + /* While it may cause some entries to look like links when they aren't, I found it's much easier to read the + index if everything's the same color. */ + .ISymbol { + font-weight: bold; color: #900000 } + + .ISymbolPrefix { + text-align: right; + color: #C47C7C; + background-color: #F8F8F8; + border-right: 3px solid #E0E0E0; + border-left: 1px solid #E0E0E0; + padding: 0 1px 0 2px; + } + #IFirstSymbolPrefix { + border-top: 1px solid #E0E0E0; + } + #ILastSymbolPrefix { + border-bottom: 1px solid #E0E0E0; + } + #IOnlySymbolPrefix { + border-top: 1px solid #E0E0E0; + border-bottom: 1px solid #E0E0E0; + } + + a.IParent, + a.IFile { + display: block; + } + + + +.Footer { + font-size: 8pt; color: #909090 } + +body.UnframedPage .Footer { + text-align: right; + margin: 2px } + +body.FramedMenuPage .Footer { + text-align: center; + margin: 5em 10px 0 10px} + + .Footer a:link, + .Footer a:hover, + .Footer a:visited { color: #909090 } + .Footer a:active { color: #A00000 } diff --git a/docs/doctool/Help/example/Small.css b/docs/doctool/Help/example/Small.css new file mode 100644 index 00000000..0cb7be1c --- /dev/null +++ b/docs/doctool/Help/example/Small.css @@ -0,0 +1,507 @@ +/* + IMPORTANT: If you're editing this file in the output directory of one of + your projects, your changes will be overwritten the next time you run + Natural Docs. Instead, copy this file to your project directory, make your + changes, and you can use it with -s. Even better would be to make a CSS + file in your project directory with only your changes, which you can then + use with -s [original style] [your changes]. + + On the other hand, if you're editing this file in the Natural Docs styles + directory, the changes will automatically be applied to all your projects + that use this style the next time Natural Docs is run on them. + + This file is part of Natural Docs, which is Copyright © 2003-2004 Greg Valure + Natural Docs is licensed under the GPL +*/ + +body { + font-family: Verdana, Arial, sans-serif; + color: #000000; + margin: 0px; padding: 0px } + +body.UnframedPage { + background-color: #E8E8E8 } + + +a:link, +a:visited { color: #900000; text-decoration: none } +a:hover { color: #900000; text-decoration: underline } +a:active { color: #FF0000; text-decoration: underline } + +td { + vertical-align: top } + +/* + Comment out this line to use web-style paragraphs (blank line between + paragraphs, no indent) instead of print-style paragraphs (no blank line, + indented.) +*/ +p { + text-indent: 5ex; margin: 0 } + + +/* Can't use something like display: none or it won't break. */ +.HB { + font-size: 1px } + + + + +body.FramedMenuPage, +.MenuSection { + font-size: 8pt; + background-color: #E8E8E8; + padding: 10px 0 0 0 } + +.MenuSection { + width: 27ex } + + + .MTitle { + font-size: 16pt; font-weight: bold; font-variant: small-caps; + text-align: center; + padding: 5px 10px 15px 10px; + border-bottom: 1px dotted #000000; + margin-bottom: 15px } + + .MSubTitle { + font-size: 9pt; font-weight: normal; font-variant: normal; + margin-top: 1ex; margin-bottom: 5px } + + + .MEntry a:link, + .MEntry a:hover, + .MEntry a:visited { color: #606060; margin-right: 0 } + .MEntry a:active { color: #A00000; margin-right: 0 } + + + .MGroup { + font-variant: small-caps; font-weight: bold; + margin: 1em 0 1em 10px } + + /* Konqueror just can't do margins. */ + .KHTML .MGroup { + margin-bottom: 0; padding-bottom: 1em } + + .MGroupContent { + font-variant: normal; font-weight: normal } + + .MGroup a:link, + .MGroup a:hover, + .MGroup a:visited { color: #545454; margin-right: 10px } + .MGroup a:active { color: #A00000; margin-right: 10px } + + + .MFile, + .MText, + .MLink, + .MIndex { + padding: 1px 17px 2px 10px; + margin: .25em 0 .25em 0 } + + .MText { + font-size: 8pt; font-style: italic } + + .MLink { + font-style: italic } + + #MSelected { + color: #000000; background-color: #FFFFFF; + /* Replace padding with border. */ + padding: 0 10px 0 10px; + border-width: 1px 2px 2px 0; border-style: solid; border-color: #000000; + margin-right: 5px } + + /* Close off the left side when its in a group. */ + .MGroup #MSelected { + padding-left: 9px; border-left-width: 1px } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko #MSelected { + -moz-border-radius-topright: 10px; + -moz-border-radius-bottomright: 10px } + .Gecko .MGroup #MSelected { + -moz-border-radius-topleft: 10px; + -moz-border-radius-bottomleft: 10px } + + + + +body.FramedContentPage, +.ContentSection { + background-color: #FFFFFF; + padding-bottom: 15px } + +.ContentSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + + .CTopic { + font-size: 8pt; + /* This should be a margin but Konq 3.1.1 sucks. */ + padding-bottom: 3em } + + + .CTitle { + font-size: 11pt; font-weight: bold; + border-width: 0 0 1px 0; border-style: solid; border-color: #A0A0A0; + margin: 0 15px .5em 15px } + + .CGroup .CTitle { + font-size: 16pt; font-variant: small-caps; + padding-left: 15px; padding-right: 15px; + border-width: 0 0 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CClass .CTitle, + .CInterface .CTitle, + .CDatabase .CTitle, + .CDatabaseTable .CTitle, + .CSection .CTitle { + font-size: 18pt; + color: #FFFFFF; background-color: #A0A0A0; + padding: 10px 15px 10px 15px; + border-width: 2px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + #MainTopic .CTitle { + font-size: 20pt; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; + margin-left: 0; margin-right: 0 } + + .CBody { + margin-left: 15px; margin-right: 15px } + + + .CToolTip { + position: absolute; visibility: hidden; + left: 0; top: 0; max-width: 50%; + background-color: #FFFFE0; + padding: 5px; + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #000000; + font-size: 8pt } + + /* Opera 6 gives it a huge height otherwise. */ + .Opera6 .CTooltip, .Opera5 .CTooltip { + max-width: 100% } + + .CHeading { + font-weight: bold; font-size: 9pt; + margin-top: 1.5em; margin-bottom: .5em } + + .CCode { + font: 8pt "Courier New", Courier, monospace; + overflow: auto; + } + + .CBulletList { + /* I don't know why CBody's margin doesn't apply, but it's consistent across browsers so whatever. + Reapply it here as padding. */ + padding-left: 15px; padding-right: 15px; + margin: .5em 5ex .5em 5ex; + } + + .CDescriptionList { + margin: .5em 5ex 0 5ex } + + /* IE 4 and Konqueror always makes it too long. */ + .IE4 .CDescriptionList, + .KHTML .CDescriptionList { + width: 85% } + + .CDLEntry { + font: 8pt "Courier New", Courier, monospace; color: #808080; + padding-bottom: .25em; + white-space: nowrap } + + .CDLDescription { + font-size: 8pt; /* For browsers that don't inherit correctly, like Opera 5. */ + padding-bottom: .5em; padding-left: 5ex } + + + + + +.Prototype { + font: 8pt "Courier New", Courier, monospace; + padding: 5px 3ex; + border-width: 1px; border-style: solid; + margin: 0 5ex 1.5em 5ex; + } + + .Prototype td { + font-size: 8pt; + } + + .PDefaultValue, + .PTypePrefix { + color: #8F8F8F; + } + .PTypePrefix { + text-align: right; + } + + .IE .Prototype table { + padding: 0; + } + + .CFunction .Prototype { + background-color: #F4F4F4; border-color: #D0D0D0 } + .CProperty .Prototype { + background-color: #F4F4FF; border-color: #C0C0E8 } + .CVariable .Prototype { + background-color: #FFFFF0; border-color: #E0E0A0 } + + .CDatabaseIndex .Prototype, + .CConstant .Prototype { + background-color: #D0D0D0; border-color: #000000 } + .CType .Prototype { + background-color: #FFF8F8; border-color: #E8C8C8 } + .CDatabaseTrigger .Prototype, + .CEvent .Prototype, + .CDelegate .Prototype { + background-color: #F0FCF0; border-color: #B8E4B8 } + + .CToolTip .Prototype { + margin: 0 0 .5em 0; + white-space: nowrap; + } + + + + + +.Summary { + margin: 1.5em 5ex 0 5ex } + + .STitle { + font-size: 11pt; font-weight: bold; + margin-bottom: .5em } + + + .SBorder { + background-color: #FFFFF0; + padding: 15px; + border: 1px solid #C0C060 } + + /* Let's observe the evolution of IE's brokeness, shall we? + IE 4 always makes them too long, there's no way around it. */ + .IE4 .SBorder { + width: 85% } + /* IE 5 will make them too long unless you set the width to 100%. Isn't this implied for a div? */ + .IE5 .SBorder { + width: 100% } + /* IE 6 behaves like 5 when it's in a frame, but without frames it will be correct without a width or slightly too long + (but not enough to scroll) with a width. This arbitrary weirdness simply astounds me. */ + body.FramedContentPage .IE6 .SBorder { + width: 100% } + + /* A treat for Mozilla users. Blatantly non-standard. Will be replaced with CSS 3 attributes when finalized/supported. */ + .Gecko .SBorder { + -moz-border-radius: 20px } + + + .STable { + font-size: 8pt; width: 100% } + + .SEntrySize { + width: 30% } + .SDescriptionSize { + width: 70% } + + + .SMarked { + background-color: #F8F8D8 } + + + .SEntry .SIndent1 { + margin-left: 1.5ex } + .SEntry .SIndent2 { + margin-left: 3ex } + .SEntry .SIndent3 { + margin-left: 4.5ex } + .SEntry .SIndent4 { + margin-left: 6ex } + .SEntry .SIndent5 { + margin-left: 7.5ex } + + .SDescription { + padding-left: 3ex } + + .SDescription a { color: #800000} + .SDescription a:active { color: #A00000 } + + + .SGroup { + margin-top: .5em; margin-bottom: .25em } + + .SGroup .SEntry { + font-weight: bold; font-variant: small-caps } + + .SGroup .SEntry a { color: #800000 } + .SGroup .SEntry a:active { color: #F00000 } + + + .SMain .SEntry, + .SClass .SEntry, + .SDatabase .SEntry, + .SDatabaseTable .SEntry, + .SSection .SEntry { + font-weight: bold; font-size: 9pt; + margin-bottom: .25em } + + .SClass, + .SDatabase, + .SDatabaseTable, + .SSection { + margin-top: 1em } + + .SMain .SEntry a, + .SClass .SEntry a, + .SDatabase .SEntry a, + .SDatabaseTable .SEntry a, + .SSection .SEntry a { color: #000000 } + + .SMain .SEntry a:active, + .SClass .SEntry a:active, + .SDatabase .SEntry a:active, + .SDatabaseTable .SEntry a:active, + .SSection .SEntry a:active { color: #A00000 } + + + + + +.ClassHierarchy { + margin: 0 15px 1em 15px } + + .CHEntry { + border-width: 1px 2px 2px 1px; border-style: solid; border-color: #A0A0A0; + margin-bottom: 3px; + padding: 2px 2ex; + font-size: 8pt; + background-color: #F4F4F4; color: #606060; + } + + .Gecko .CHEntry { + -moz-border-radius: 4px; + } + + .CHCurrent .CHEntry { + font-weight: bold; + border-color: #000000; + color: #000000; + } + + .CHChildNote .CHEntry { + font-style: italic; + font-size: 8pt; + } + + .CHIndent { + margin-left: 3ex; + } + + .CHEntry a:link, + .CHEntry a:visited, + .CHEntry a:hover { + color: #606060; + } + .CHEntry a:active { + color: #800000; + } + + + + + +body.FramedIndexPage, +.IndexSection { + background-color: #FFFFFF; + font-size: 8pt; + padding: 15px } + +.IndexSection { + border-width: 0 0 1px 1px; border-style: solid; border-color: #000000 } + + .IPageTitle { + font-size: 20pt; font-weight: bold; + color: #FFFFFF; background-color: #7070C0; + padding: 10px 15px 10px 15px; + border-width: 0 0 3px 0; border-color: #000000; border-style: solid; + margin: -15px -15px 0 -15px } + + .INavigationBar { + text-align: center; + background-color: #FFFFF0; + padding: 5px; + border-bottom: solid 1px black; + margin: 0 -15px 15px -15px } + + .INavigationBar a { + font-weight: bold } + + .IHeading { + font-size: 14pt; font-weight: bold; + padding: 2.5em 0 .5em 0; + text-align: center; + width: 3.5ex; + } + #IFirstHeading { + padding-top: 0; + } + + .IEntry { + padding-left: 1ex; } + + .ISubIndex { + padding-left: 3ex; padding-bottom: .5em } + + /* While it may cause some entries to look like links when they aren't, I found it's much easier to read the + index if everything's the same color. */ + .ISymbol { + font-weight: bold; color: #900000 } + + .ISymbolPrefix { + text-align: right; + color: #C47C7C; + background-color: #F8F8F8; + border-right: 3px solid #E0E0E0; + border-left: 1px solid #E0E0E0; + padding: 0 1px 0 2px; + } + #IFirstSymbolPrefix { + border-top: 1px solid #E0E0E0; + } + #ILastSymbolPrefix { + border-bottom: 1px solid #E0E0E0; + } + #IOnlySymbolPrefix { + border-top: 1px solid #E0E0E0; + border-bottom: 1px solid #E0E0E0; + } + + a.IParent, + a.IFile { + display: block; + } + + + +.Footer { + font-size: 8pt; color: #909090 } + +body.UnframedPage .Footer { + text-align: right; + margin: 2px } + +body.FramedMenuPage .Footer { + text-align: center; + margin: 5em 10px 0 10px} + + .Footer a:link, + .Footer a:hover, + .Footer a:visited { color: #909090 } + .Footer a:active { color: #A00000 } diff --git a/docs/doctool/Help/example/showstyle.html b/docs/doctool/Help/example/showstyle.html new file mode 100644 index 00000000..e71b8b9c --- /dev/null +++ b/docs/doctool/Help/example/showstyle.html @@ -0,0 +1,43 @@ + + +CSS Sample - Project + + + + + + + + + + + + + + +
This is the style.  Back
+ + + + + + +

CSS Sample

Here’s what the output would look like with the currently selected CSS style.  The CSS structure is well-documented so you can easily alter it or make your own.

Here’s a paragraph break.  Natural Docs defaults to print-style paragraphs, where each one is indented rather than separated with a blank line.  If you open the CSS file it will tell you which line to remove to go back to web-style paragraphs.

Header

There’s a header, just so you know what one looks like in this style.  As you can tell, the quality of the text here is going to go downhill fast as I’m really just blathering on to fill up the page.  If you’re actually reading this, you can safely stop now.  No, really.  I’m not going to say anything important from here on down.  Reading it will be just as boring as writing it was.

  • Here’s a bullet.  Thought you should see that.
  • Here’s another one.  Well look at that.
  • And a third.  Looks just like all the others, but I’m going to give it some more text.  So there you go.

Now lets look at a text diagram, shall we?  Are you still reading this?  What’s wrong with you?

+------+     +------+
+| Moby | --> | Dick |
++------+     +------+
+   |
+   V
++----------+
+| Musician |
++----------+
Summary
Here’s what the output would look like with the currently selected CSS style.
Ah, here’s our first function.
This is another function, much like DoSomething(), but different, in that it does something else.
This is my variable.

DoSomething

int DoSomething(int one,
int two,
float four)

Ah, here’s our first function.  I have nothing to say about it just like I had nothing to say about anything else.  Typing, typing, typing to fill up space.  Just a random stream-of-consciousness about nothing.

Parameters

oneThis is the first parameter, aptly named one.
twoBet you can’t guess what the next one is called?
fourHah!  Did that just to screw you up.

Returns

Sometimes it returns, sometimes it doesn’t.  It’s moody that way.

DoSomethingElse

bool DoSomethingElse()

This is another function, much like DoSomething(), but different, in that it does something else.  Hover over DoSomething(), will ya?  See the nice DHTML tooltip goodness.  Here, here’s a link to myVariable too.  Hover over that.

Variables

myVariable

int myVariable

This is my variable.  See how the prototype is colored differently on the default styles?  I thought that was cool too, since you can tell where you are in the documentation easier.  Or maybe you didn’t think it was cool.  I shouldn’t make assumptions like that.  See, now you went and hurt my feelings.  Shame on you.

Um, why are you still reading this?  Didn’t you learn by now?

int DoSomething(int one,
int two,
float four)
Ah, here’s our first function.
bool DoSomethingElse()
This is another function, much like DoSomething(), but different, in that it does something else.
int myVariable
This is my variable.
diff --git a/docs/doctool/Help/examples.css b/docs/doctool/Help/examples.css new file mode 100644 index 00000000..df6692f4 --- /dev/null +++ b/docs/doctool/Help/examples.css @@ -0,0 +1,74 @@ +@import URL(example/Default.css); + + +body { + margin: 25px; + } + +.NDContent { + color #000000; background-color: #FFFFFF; + padding: 15px 0; + border-style: solid; + border-width: 1px 3px 3px 1px; + border-color: #c0c0c0 #808080 #808080 #c0c0c0; + margin: 1em 5ex; + -moz-border-radius: 12px; + } + + .NDContent p, + .NDContent li, + .NDContent td, + .NDMenu td, + .NDSummary td, + .NDIndex td { + font-size: 10pt; + line-height: normal; + } + .NDContent .CTopic { + padding-bottom: 0; + } + .Prototype td { + font: 10pt Courier New, monospace; + } + .NDIndex .IHeading { + font-size: 16pt; + } + + +.NDMenu { + font: 9pt Verdana, Arial, sans-serif; + color: #000000; background-color: #E8E8E8; + width: 27ex; + padding: 10px 0; + border-style: solid; + border-width: 1px 3px 3px 1px; + border-color: #808080 #606060 #606060 #808080; + margin: 1em 0 1em 5ex; + -moz-border-radius: 12px; + } + + +.NDSummary { + padding: 15px; + border-style: solid; + border-width: 1px 3px 3px 1px; + border-color: #c0c0c0 #808080 #808080 #c0c0c0; + margin: 1em 5ex; + -moz-border-radius: 12px; + } + + .NDSummary .Summary { + margin-top: 0; + } + + +.NDIndex { + color #000000; background-color: #FFFFFF; + padding: 15px; + border-style: solid; + border-width: 1px 3px 3px 1px; + border-color: #c0c0c0 #808080 #808080 #c0c0c0; + margin: 1em 5ex; + -moz-border-radius: 12px; + } + diff --git a/docs/doctool/Help/favicon.ico b/docs/doctool/Help/favicon.ico new file mode 100644 index 00000000..f6e0c496 Binary files /dev/null and b/docs/doctool/Help/favicon.ico differ diff --git a/docs/doctool/Help/images/header/background.png b/docs/doctool/Help/images/header/background.png new file mode 100644 index 00000000..09a2ea46 Binary files /dev/null and b/docs/doctool/Help/images/header/background.png differ diff --git a/docs/doctool/Help/images/header/leftside.png b/docs/doctool/Help/images/header/leftside.png new file mode 100644 index 00000000..7d093865 Binary files /dev/null and b/docs/doctool/Help/images/header/leftside.png differ diff --git a/docs/doctool/Help/images/header/logo.png b/docs/doctool/Help/images/header/logo.png new file mode 100644 index 00000000..9317a1b6 Binary files /dev/null and b/docs/doctool/Help/images/header/logo.png differ diff --git a/docs/doctool/Help/images/header/overbody.png b/docs/doctool/Help/images/header/overbody.png new file mode 100644 index 00000000..6b86af15 Binary files /dev/null and b/docs/doctool/Help/images/header/overbody.png differ diff --git a/docs/doctool/Help/images/header/overbodybg.png b/docs/doctool/Help/images/header/overbodybg.png new file mode 100644 index 00000000..b4284ec1 Binary files /dev/null and b/docs/doctool/Help/images/header/overbodybg.png differ diff --git a/docs/doctool/Help/images/header/overleftmargin.png b/docs/doctool/Help/images/header/overleftmargin.png new file mode 100644 index 00000000..3d02af7f Binary files /dev/null and b/docs/doctool/Help/images/header/overleftmargin.png differ diff --git a/docs/doctool/Help/images/header/overmenu.png b/docs/doctool/Help/images/header/overmenu.png new file mode 100644 index 00000000..d720d986 Binary files /dev/null and b/docs/doctool/Help/images/header/overmenu.png differ diff --git a/docs/doctool/Help/images/header/overmenubg.png b/docs/doctool/Help/images/header/overmenubg.png new file mode 100644 index 00000000..69339d8c Binary files /dev/null and b/docs/doctool/Help/images/header/overmenubg.png differ diff --git a/docs/doctool/Help/images/header/rightside.png b/docs/doctool/Help/images/header/rightside.png new file mode 100644 index 00000000..f8ef976a Binary files /dev/null and b/docs/doctool/Help/images/header/rightside.png differ diff --git a/docs/doctool/Help/images/menu/about.png b/docs/doctool/Help/images/menu/about.png new file mode 100644 index 00000000..ca65ea4e Binary files /dev/null and b/docs/doctool/Help/images/menu/about.png differ diff --git a/docs/doctool/Help/images/menu/background.png b/docs/doctool/Help/images/menu/background.png new file mode 100644 index 00000000..db8b557b Binary files /dev/null and b/docs/doctool/Help/images/menu/background.png differ diff --git a/docs/doctool/Help/images/menu/bottomleft.png b/docs/doctool/Help/images/menu/bottomleft.png new file mode 100644 index 00000000..0f608c8b Binary files /dev/null and b/docs/doctool/Help/images/menu/bottomleft.png differ diff --git a/docs/doctool/Help/images/menu/bottomright.png b/docs/doctool/Help/images/menu/bottomright.png new file mode 100644 index 00000000..10c9e029 Binary files /dev/null and b/docs/doctool/Help/images/menu/bottomright.png differ diff --git a/docs/doctool/Help/images/menu/community.png b/docs/doctool/Help/images/menu/community.png new file mode 100644 index 00000000..0021013a Binary files /dev/null and b/docs/doctool/Help/images/menu/community.png differ diff --git a/docs/doctool/Help/images/menu/customizing.png b/docs/doctool/Help/images/menu/customizing.png new file mode 100644 index 00000000..d56d25b3 Binary files /dev/null and b/docs/doctool/Help/images/menu/customizing.png differ diff --git a/docs/doctool/Help/images/menu/using.png b/docs/doctool/Help/images/menu/using.png new file mode 100644 index 00000000..1de988d2 Binary files /dev/null and b/docs/doctool/Help/images/menu/using.png differ diff --git a/docs/doctool/Help/index.html b/docs/doctool/Help/index.html new file mode 100644 index 00000000..7a80c412 --- /dev/null +++ b/docs/doctool/Help/index.html @@ -0,0 +1,161 @@ + + +Natural Docs
Natural Docs
Version 1.35

This is the Natural Docs help file, a subset of the documentation available at the web site.  Everything you need is on the menu to the left.

Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/javascript/BrowserStyles.js b/docs/doctool/Help/javascript/BrowserStyles.js new file mode 100644 index 00000000..d7eb360c --- /dev/null +++ b/docs/doctool/Help/javascript/BrowserStyles.js @@ -0,0 +1,75 @@ + +// +// Browser Styles +// ____________________________________________________________________________ + +var agt=navigator.userAgent.toLowerCase(); +var browserType; +var browserVer; + +if (agt.indexOf("opera") != -1) + { + browserType = "Opera"; + + if (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) + { browserVer = "Opera5"; } + else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1) + { browserVer = "Opera6"; } + else if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) + { browserVer = "Opera7"; } + } + +else if (agt.indexOf("khtml") != -1 || agt.indexOf("konq") != -1 || agt.indexOf("safari") != -1) + { + browserType = "KHTML"; + } + +else if (agt.indexOf("msie") != -1) + { + browserType = "IE"; + + if (agt.indexOf("msie 4") != -1) + { browserVer = "IE4"; } + else if (agt.indexOf("msie 5") != -1) + { browserVer = "IE5"; } + else if (agt.indexOf("msie 6") != -1) + { browserVer = "IE6"; } + } + +else if (agt.indexOf("gecko") != -1) + { + browserType = "Gecko"; + } + +// Opera already taken care of. +else if (agt.indexOf("mozilla") != -1 && agt.indexOf("compatible") == -1 && agt.indexOf("spoofer") == -1 && + agt.indexOf("webtv") == -1 && agt.indexOf("hotjava") == -1) + { + browserType = "Netscape"; + + if (agt.indexOf("mozilla/4") != -1) + { browserVer = "Netscape4"; } + } + + +function OpeningBrowserTags() + { + if (browserType) + { + document.write('
'); + + if (browserVer) + { document.write('
'); } + } + }; + +function ClosingBrowserTags() + { + if (browserType) + { + document.write('
'); + + if (browserVer) + { document.write('
'); } + } + }; diff --git a/docs/doctool/Help/javascript/PNGHandling.js b/docs/doctool/Help/javascript/PNGHandling.js new file mode 100644 index 00000000..89698058 --- /dev/null +++ b/docs/doctool/Help/javascript/PNGHandling.js @@ -0,0 +1,69 @@ +// Parts derived from: +// Opacity Displayer, Version 1.0 +// Copyright Michael Lovitt, 6/2002. +// Distribute freely, but please leave this notice intact. +// http://www.alistapart.com/articles/pngopacity/ + +// Parts derived from: +// Natural Docs +// Copyright (C) 2003-2004 Greg Valure +// http://www.naturaldocs.org/ + + +var pngTransform; +var pngNormal; + +var agt=navigator.userAgent.toLowerCase(); + +if (agt.indexOf("opera") != -1) + { + if ( (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) && + agt.indexOf("mac") != -1) + { + pngNormal = 1; + } + else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1 || + agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) + { + pngNormal = 1; + } + } + +else if (agt.indexOf("msie") != -1) + { + if (agt.indexOf("msie 5.5") != -1 || agt.indexOf("msie 6") != -1) + { + if (agt.indexOf("mac") != -1) + { pngNormal = 1; } + else if (agt.indexOf("win") != -1) + { pngTransform = 1; }; + } + + else if (agt.indexOf("msie 5") != -1) + { + if (agt.indexOf("mac") != -1) + { pngNormal = 1; }; + } + } + +else if (agt.indexOf("gecko") != -1) + { + pngNormal = 1; + } + + +function PNGGIF(strPath, intWidth, intHeight, strAlt, strID) + { + if (pngTransform) + { + document.write('
'); + } + else if (pngNormal) + { + document.write(''+strAlt+''); + } + else + { + document.write(''+strAlt+''); + } + }; diff --git a/docs/doctool/Help/keywords.html b/docs/doctool/Help/keywords.html new file mode 100644 index 00000000..36d22f82 --- /dev/null +++ b/docs/doctool/Help/keywords.html @@ -0,0 +1,34 @@ + + +Natural Docs Topics and Keywords
Natural Docs
Topics and Keywords

Keywords are not case sensitive and are interchangable within their topic type.  The plural forms denote list topics where every item in its description lists are treated like they have their own topic.

General Topics
Generic
topictopics
aboutlist
note
notes
Section
Ends Scope
section
title
Group
group
File
Always Global
filefiles
programprograms
scriptscripts
documentdocuments
docdocs
headerheaders
Code Topics
Class
Starts Scope
classclasses
structurestructures
structstructs
packagepackages
namespacenamespaces
Interface
Starts Scope
interfaceinterfaces
Type
typetypes
typedeftypedefs
Constant
constantconstants
constconsts
Enumeration
Topic indexed under Types
Members indexed under Constants
enumerationenumerations
enumenums
Function
List topics break apart
functionfunctions
funcfuncs
procedureprocedures
procprocs
routineroutines
subroutinesubroutines
subsubs
methodmethods
callbackcallbacks
constructorconstructors
destructordestructors
Property
propertyproperties
propprops
Event
eventevents
Delegate
delegatedelegates
Macro
macromacros
definedefines
defdefs
Variable
variablevariables
varvars
integerintegers
intints
uintuints
longlongs
ulongulongs
shortshorts
ushortushorts
bytebytes
ubyteubytes
sbytesbytes
floatfloats
doubledoubles
realreals
decimaldecimals
scalarscalars
arrayarrays
arrayrefarrayrefs
hashhashes
hashrefhashrefs
boolbools
booleanbooleans
flagflags
bitbits
bitfieldbitfields
fieldfields
pointerpointers
ptrptrs
referencereferences
refrefs
objectobjects
objobjs
charactercharacters
wcharacterwcharacters
charchars
wcharwchars
stringstrings
wstringwstrings
strstrs
wstrwstrs
handlehandles
Database Topics
Database
databasedatabases
dbdbs
Database Table
Starts Scope
tabletables
database tabledatabase tables
db tabledb tables
Database View
Starts Scope
viewviews
database viewdatabase views
db viewdb views
Database Cursor
cursorcursors
database cursordatabase cursors
db cursordb cursors
Database Index
indexindexes
indices
database indexdatabase indexes
database indices
db indexdb indexes
db indices
keykeys
database keydatabase keys
db keydb keys
primary keyprimary keys
database primary keydatabase primary keys
db primary keydb primary keys
Database Trigger
triggertriggers
database triggerdatabase triggers
db triggerdb triggers
Miscellaneous Topics
Cookie
Always global
cookiecookies
Build Target
targettargets
build targetbuild targets
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/languages.html b/docs/doctool/Help/languages.html new file mode 100644 index 00000000..8d48a23b --- /dev/null +++ b/docs/doctool/Help/languages.html @@ -0,0 +1,28 @@ + + +Natural Docs Language Support
Natural Docs
About
Language SupportOutput Formats
Language Support
Full Language Support

The following languages have full language support, which means you get:

Full code documentation.  All functions, variables, and classes will appear in the output regardless of whether you wrote anything for them.  This can be turned off with the -do command line option.

Inheritance diagrams.  They will appear in the output wherever appropriate.

Auto-scoping.  The class a topic is part of is determined by the source code rather than class and section topics.

  • C#
  • Perl
  • ActionScript 2
Basic Language Support

The following languages have basic language support, which means you have:

Explicit documentation only.  Only things you write Natural Docs topics for will appear in the output.

No inheritance diagrams.  Sorry.

Topic scoping.  The class a topic is part of is determined by the topic scoping rules.

  • C/C++
  • Java
  • PHP
  • Python
  • PL/SQL
  • Visual Basic
  • Pascal/Delphi
  • Ada
  • JavaScript
  • Ruby
  • Tcl
  • Flash ActionScript
  • ColdFusion
  • Assembly
  • Fortran (free-format only)
  • R
  • Makefiles
  • Plain Text
  • Custom Languages
Getting Full Language Support

This is the current order in which languages will be getting full support.  The order is roughly determined by the total donation amount, then the number of votes, and then the language’s general importance.  It’s not an absolute formula — a large number of one thing can override something else.  For example, C++ and Java’s very high prominence overrides the vote counts, but a high total donation amount could override even them.  A particularly high total donation amount would cause me to start working on that language immediately.

You vote by sending me an e-mail telling me which language you want me to give full support to.  You donate towards a language by donating to the project and filling in the “Donate towards a language?” field on the second page.  You can split it any way you want, and it can be refunded at any point before serious work starts on that language.

  • C/C++  (High importance, $45 in donations, 15 votes)
  • Ada  ($120 in donations, 5 votes)
  • Java  (High importance, 3 votes)
  • PHP  ($10 in donations, 11 votes)
  • Pascal  (8 votes)
  • Python  (5 votes)
  • PL/SQL  (4 votes)
  • ColdFusion  (4 votes)
  • Visual Basic  (3 votes)
  • JavaScript (2 votes)
  • Ruby  ($10 in donations, 1 vote)
  • (2 votes)
  • Fortran  (2 votes)
  • C# 2.0  (1 vote)
List last updated on March 20th.
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/menu.html b/docs/doctool/Help/menu.html new file mode 100644 index 00000000..7dbe0a85 --- /dev/null +++ b/docs/doctool/Help/menu.html @@ -0,0 +1,50 @@ + + +Organizing the Menu - Natural Docs
Natural Docs
Organizing the Menu

Natural Docs creates a file called Menu.txt in the project directory that you can edit to organize the menu.  Natural Docs will take care of adding and deleting entries as necessary, and it will even attempt to organize them by directory, but you have the option of improving it manually.

Order and Titles

If you’ve never edited it before, the menu file will be some comments explaining how to edit it and a list like you see below.

File: ClassA  (ClassA.h)
+File: ClassB  (ClassB.h)
+File: Globals  (Globals.h)

The list gets turned into a menu that looks like this:

It should be obvious what everything on each line is.  When Natural Docs made the menu, it decided on its own what each item should be titled and then put them in alphabetical order.  However, suppose we don’t like this.  We want Globals above the classes and we want spaces in the menu titles.  So we edit the file.

File: Globals  (Globals.h)
+File: Class A  (ClassA.h)
+File: Class B  (ClassB.h)

Run Natural Docs again and the menu is updated.

However, open the menu file again and you’ll see something interesting.

File: Globals  (Globals.h)
+File: Class A  (no auto-title, ClassA.h)
+File: Class B  (no auto-title, ClassB.h)

Natural Docs detected that you edited a couple of the titles and added a no auto-title attribute to each one.  This tells it never to change the titles on those entries.  You don’t have to worry about adding this attribute, Natural Docs will do it automatically.  However, to go back to automatic titles you have to manually delete it.

Grouping

This menu is good for our example, but in the real world, they get much much longer.  We can add groups to organize them further.  Natural Docs will create its own groups by directory, but you can add your own manually if that’s not good enough.

You can manually add groups as shown below.

File: Globals  (Globals.h)
+Group: Classes {
+   File: Class A  (no auto-title, ClassA.h)
+   File: Class B  (no auto-title, ClassB.h) }

You can also nest them inside each other.

File: Globals  (Globals.h)
+Group: Classes {
+   File: Class A  (no auto-title, ClassA.h)
+   Group: Nested Group {
+      File: Class B  (no auto-title, ClassB.h)  }
+   }

Open up the menu file again and take a look.

File: Globals  (Globals.h)
+
+Group: Classes  {
+
+   File: Class A  (no auto-title, ClassA.h)
+   File: Class B  (no auto-title, ClassB.h)
+   }  # Group: Classes

Natural Docs reformatted it.  When you’re organizing the menu, you don’t have to worry about the indentation or otherwise keeping it neat.  The file is reformatted every time it changes, so you can make quick and dirty edits and Natural Docs will keep it readable.

Besides making the menu easier to read, groups also serve another purpose.  Clicking on a group’s name will make it expand and collapse on modern browsers.  Go ahead and try it in the examples.  When the menu gets too long, certain groups will start being collapsed by default  This allows Natural Docs to work with large projects, where showing the entire menu at once is impractical.  For compatibility, this only happens on browsers that support it.  If a browser can’t expand or collapse menus, it always defaults to being completely open.

Indexes

Natural Docs will automatically determine what indexes your project needs and add them to the menu.  The entries will look like this:

Group: Index {
+
+   Index: Everything
+   Class Index: Classes
+   Function Index: Functions
+   }  # Group: Index

Like file entries, you can rename them by editing the title and reorder them by cutting and pasting.  However, if you decide you don’t want a particular index to be generated, just delete its entry and it will go away.  Again, like file entries, Natural Docs will detect this and add something new:

Don't Index: Functions

Like no auto-title, you have to delete that to make it automatic again.

Automatic Changes

You already saw that file entries default to being auto-titled.  Natural Docs tries to guess what the title of each of these files should be.  For example, if the first documented topic is a class, it will use the class name.  If you want to override a file’s title in the file itself instead of in the menu, add a “Title: [title]” comment to the top of it.  This way the title is stays with the file.

When Natural Docs needs to add a file to the menu, it will look for the best group to put it in by directory.  If your grouping mirrors the source tree somewhat, this will be a lot more accurate.  Also, if the group it’s putting it in is alphabetized, Natural Docs will maintain that alphabetization.  If an auto-title changes, it will reorganize the group to maintain its previous alphabetization, if any.

The only exceptions in alphabetization are for the indexes.  If a group only contains indexes, it can be the last item on the menu or in its parent group without making it count as unsorted.  Also, within groups that only contain indexes, the general index can be first, also without making the group count as unsorted.

Finally, if Natural Docs adds some files to a group and causes it to become too long, it will attempt to sub-group it based on directory.  However, it will only do this when its adding files on its own, so you don’t have to worry about it constantly messing up your groups.  Since new files aren’t added to a project that often, if you change the menu manually, it should stay that way for quite some time.

Extras
Title and Subtitle

In addition to files and groups, you can add a title and subtitle to your menu.

Title: My Project
+SubTitle: Something That Does Something
+
+File: Globals  (Globals.h)
+Group: Classes
+   File: Class A  (no auto-title, ClassA.h)
+   File: Class B  (no auto-title, ClassB.h)
My Project
Something That Does Something

In addition to adding the title to the menu, the Title tag will also change the HTML page titles from “file title” to “file title - menu title”, making bookmarks clearer.

Text and Web Links

You can also add arbitrary text and web links to your menu.

File: Globals  (Globals.h)
+Group: Classes  {
+   Text: I couldn't think of good names for these classes.
+   File: Class A  (no auto-title, ClassA.h)
+   File: Class B  (no auto-title, ClassB.h)
+   }
+Link: Built with Natural Docs  (http://www.naturaldocs.org)
Classes

Even though comments use the # character, adding an anchor to a link (such as “http://www.website.com/page.html#anchor”) will still work.

Footers

Finally, you can add a footer to all your pages, such as a copyright notice.  Natural Docs will change any (c)’s to real copyright symbols.

Footer: Copyright (C) 2003 Me

You can see an example of a footer on the Natural Docs web site.

Errors

If there’s ever an error in the menu file, Natural Docs will tell you when it’s run.  It follows the GNU standards, so if you’re running it as part of a build process in an IDE, they will be even easier to find.

NaturalDocs:Menu.txt:6: txet is not a valid keyword

Also, it adds a comment for each error in the menu file so that you can search for them in a text editor.

# There is an error in this file.  Search for ERROR to find it.
+
+File: Globals  (Globals.h)
+Group: Classes  {
+# ERROR: Txet is not a valid keyword.
+   Txet: I couldn't think of good names for these classes.
+   File: Class A  (no auto-title, ClassA.h)
+   File: Class B  (no auto-title, ClassB.h)
+   }

Remember that Natural Docs reformats the menu file whenever it’s run, so you only need to correct the error.  Natural Docs will remove the error comments on its own.

Portability and Versioning Systems

If you only use one input directory, all the files in the menu will have relative paths.  However, if you have more, Natural Docs will use the absolute path instead.

This is not a problem.  The menu file can still be shared between machines even if they don’t keep the source tree in the exact same location.  As long as you have the same layout within the source tree and point to the same base directories in the command line, Natural Docs will be able to convert the paths automatically to the new machine.

However, if you’re putting the menu file in a versioning system like CVS or SourceSafe, it might be very desirable to only have relative paths so anybody can check it in and only the real changes show.  In that case, instead of using multiple input directories, see if it’s possible to only have one input directory and use the -xi command line option to exclude the subdirectories you don’t want scanned.

That’s It!

And we’re done.  The syntax to do all of this is included in the menu file itself, so you don’t need to memorize everything.  You shouldn’t need to organize the menu very often, just after a lot of new files have been added and if you don’t like the default.

Note that if you’re using the non-framed HTML output format, changing the menu does require every output file to be updated.  However, Natural Docs has a special process just for this so it won’t take nearly as long as if it were rebuilding them all from scratch.  Still, if you’re working on a large project, it may be worth considering the framed HTML output format.

Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/messageboards.html b/docs/doctool/Help/messageboards.html new file mode 100644 index 00000000..0d1a128f --- /dev/null +++ b/docs/doctool/Help/messageboards.html @@ -0,0 +1,32 @@ + + +Natural Docs Message Boards
Natural Docs
Message Boards

Although the message boards are hosted by SourceForge, you do not need a SourceForge account to use to them.

General DiscussionUse this forum to discuss anything about Natural Docs that does not fit into the categories below.
SupportUse this forum if you are having trouble using Natural Docs.
StylesUse this forum if you’re working on styling Natural Docs’ output via CSS.
DevelopmentThis forum is for development-related issues only.  Use this forum if you’re working on Natural Docs or an extension to it.
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/output.html b/docs/doctool/Help/output.html new file mode 100644 index 00000000..ce78349a --- /dev/null +++ b/docs/doctool/Help/output.html @@ -0,0 +1,71 @@ + + +Output Formats - Natural Docs
Natural Docs
About
Language SupportOutput Formats
Output Formats

These are the output formats that are currently implemented in Natural Docs.

HTMLHTML output.  Each page is self-contained.  Linking to specific pages is easy, but every file has to be updated whenever the menu changes.  It’s done much faster than a full rebuild, though.
FramedHTMLHTML output based on frames.  The menu is updated quickly, but linking to individual pages is difficult and some people just plain hate frames.
HTML Compatibility

These are the browsers Natural Docs’ HTML output has been tested with.  Note that a browser not being able to collapse the menu isn’t a compatibility concern.  The menu defaults to completely open if the browser can’t handle collapsing it, so it’s always usable.  It’s just better on browsers that support it.

Gecko
Mozilla, FireFox, etc.
Works on 1.0+Mozilla 1.4 works flawlessly.
Mozilla 1.0.2 has trivial padding issues with prototypes in tooltips.
Mozilla-only bonus: rounded corners.
Internet ExplorerWorks on 4+IE 6.0 works flawlessly.
IE 5.0 occasionally mispositions the tooltips, but they’re still usable and are usually fine.
IE 4.0 can’t collapse the menu, makes tooltips the full page width, and lets wide prototypes stretch the whole page.
OperaWorks on 5+Opera 7.02 works flawlessly.
Opera 6.05 can’t collapse the menu and lets wide prototypes stretch the whole page.
Opera 5.12 can’t collapse the menu, can’t size/position the tooltips very well (they’re usable most of the time) and lets wide prototypes stretch the whole page.
KHTML
Konqueror, Safari
Works on 3+Konqueror 3.1.1 has some margin issues and shows tooltips immediately because it has problems doing so on a timer.  Konqueror hasn’t been tested for some time so there may be other issues not noted here.
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/running.html b/docs/doctool/Help/running.html new file mode 100644 index 00000000..f344f3ac --- /dev/null +++ b/docs/doctool/Help/running.html @@ -0,0 +1,35 @@ + + +Running Natural Docs
Natural Docs
Running Natural Docs
 
How and When

Probably the best way to run Natural Docs is as part of the build process.  This way every time you compile your code, your documentation is updated as well and you always have a current reference.  Natural Docs has a differential build process so it will not rebuild the entire set of documentation every time it’s run.

If you’d like to run it manually instead, you should determine the command line you need and save it as a shortcut, batch file, or script since you should be running it often and will rarely need to fiddle with the parameters.

Remember that if you’re using Windows, you’ll need to install a copy of Perl if you haven’t already done so.  You can download ActiveState’s ActivePerl for free.

Command Line
NaturalDocs -i [input (source) directory]
+            -o [output format] [output directory]
+            -p [project directory]
+            [options]
Required Parameters:
-i [dir]
--input [dir]
--source [dir]

The input (source) directory.  Natural Docs will seach this and all its subdirectories for files with Natural Docs content.  It can be specified multiple times.  See the list of supported programming languages.

-o [fmt] [dir]
--output [fmt] [dir]

The output format and directory.  This can be specified multiple times, but only once per directory.  Natural Docs will place all generated output for each format in its directory.  See the list of supported output formats.

-p [dir]
--project [dir]

The project directory.  Natural Docs needs to store some project data, such as where each topic is located and when each file was last modified, so it will put that data in this directory.  Each project you document with Natural Docs needs its own separate directory.

Optional Parameters:
-do
--documented-only

Tells Natural Docs to only include what you explicitly document in the output, and not to find undocumented classes, functions, and variables.  This option is only relevant if you have full language support.

-s [style]
--style [style] ([style] ...)

Selects the CSS style for HTML output.  See the default list of styles.

You can use any CSS file in your project directory or Natural Docs’ Styles directory just by using its name without the .css extension.  If you include more than one, they will all be included in the HTML that order.

-xi [dir]
--exclude-input [dir]
--exclude-source [dir]

Excludes a subdirectory from being scanned.  The output and project directories are automatically excluded.

-r
--rebuild

Rebuilds everything from scratch.  All source files will be rescanned and all output files will be rebuilt

-ro
--rebuild-output

Rebuilds all output files from scratch.

-t [len]
--tab-length [len]

Sets the number of spaces tabs should be expanded to.  This only needs to be set if you use tabs in example code or text diagrams.  The default is 4.

-cs [charset]
--charset [charset]
--character-set [charset]

Sets the character set property of the generated HTML, such as UTF-8 or Shift_JIS.  The default leaves it unspecified.

-nag
--no-auto-group

Tells Natural Docs to not automatically create group topics if you don’t add them yourself.

-q
--quiet

Suppresses all non-error output.

-?
-h
--help

Prints the syntax reference.

Depreciated Parameters:
These options are no longer supported.
-ho
--headers-only

This used to check only the headers and not the source files in C and C++.  Edit Languages.txt instead and add the line “Ignore Extensions: c cpp cxx”.

-s Custom
--style Custom

This used to tell Natural Docs not to alter the CSS file in the output directory.  Copy your custom CSS file to your project directory and use it with -s instead.

-ag [level]
--auto-group [level]

This used to set the level of auto-grouping between Full, Basic, and None.  The algorithm was improved so there’s no need for separate levels anymore.  You can use -nag if you want to turn it off completely.

Examples
NaturalDocs -i C:\My Project\Source
+            -o FramedHTML C:\My Project\Docs
+            -p C:\My Project\Natural Docs
+
+NaturalDocs -i /project/src
+            -o HTML /project/doc
+            -p /project/ndinfo
+            -s Small -t 2
Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/styles.css b/docs/doctool/Help/styles.css new file mode 100644 index 00000000..a51e76c2 --- /dev/null +++ b/docs/doctool/Help/styles.css @@ -0,0 +1,259 @@ + +body { + background: #FFFFFF; + margin: 25px; + } + +body, +td, +li { + font: 9pt Verdana, sans-serif; + } +p, +td, +li { + line-height: 150%; + } + +p { + text-indent: 4ex; + margin: 0; + } + +td { + vertical-align: top; + } + +a:link, +a:visited { color: #900000; text-decoration: none } +a:hover { color: #900000; text-decoration: underline } +a:active { color: #FF0000; text-decoration: underline } + + + +.NoIndent p + { text-indent: 0; } + +img { + border: none; + } + +.First { + margin-top: 0 !important; + padding-top: 0 !important; + } +.Last { + margin-bottom: 0 !important; + padding-bottom: 0 !important; + } + +.Header { + background-image: URL("images/header/background.png"); + background-color: #7070C0; + } +.SideMenuTop { + background: URL("images/header/overmenubg.png"); + } +.SideMenuBottom { + vertical-align: bottom; + } +.BodyTop { + background: URL("images/header/overbodybg.png"); + text-align: right; + } +.BodyBottom { + vertical-align: bottom; + text-align: right; + font: italic 8pt Georgia, serif; + color: #D0D0D0; + } + +.Body { + padding: 15px 20px 0 25px; + } + + + +pre, code, .Example { + font: 10pt Courier New, Courier, monospace; + color: #606060; + } +a code { + color: #C06060; + } +.Example { + overflow: auto; + } + +.PageTitle { + font: italic small-caps 24pt Georgia, serif; letter-spacing: .1ex; + margin-bottom: .5em } + + +.Topic { + margin-bottom: 2em } + + +.TopicTitle { + font: 18pt Georgia, serif; + border-width: 0 0 1px 0; border-style: solid; border-color: #C0C0C0; + margin-bottom: .5em + } + +.SubTopic { + font-weight: bold; font-size: 10pt; + padding-top: 1.5em; padding-bottom: .5em; + } + + +.TOC { + text-align: center; + font: 8pt Verdana, sans-serif; + text-transform: uppercase; + background-color: #F8F8F8; + border-width: 1px; border-style: solid; border-color: #C0C0C0; + margin-bottom: 1.5em; + padding: 2px 0; + -moz-border-radius: 14px; + } + + .TOC a { + margin: 0 0.75ex; } + + .TOC a:link, + .TOC a:hover, + .TOC a:visited { + color: #404040 } + + +.Example { + background-color: #FDFDFD; + padding: 15px; + border: 1px solid #C0C0C0; + border-width: 1px 1px 1px 6px; + border-style: dashed dashed dashed solid; + color: #707070; + margin: 15px 5ex; + } + + +.LastUpdated { + font: italic 10pt Georgia, serif; + color: #A0A0A0; + margin: 1em 0; + } + + + +.FAQSummary { + margin-bottom: 3em; + } +.FAQSummaryGroup { + font: bold 12pt Georgia, serif; + margin: 1em 0 .25em 0; + } +.FAQGroup { + font: 18pt Georgia, serif; + border-bottom: 1px solid #C0C0C0; + margin-bottom: .5em; + margin-top: 1.5em; + } +.FAQSummaryEntry:link, +.FAQSummaryEntry:visited, +.FAQSummaryEntry:hover, +.FAQSummaryEntry:active { + } + +.FAQEntry { + margin-bottom: 3em; + } +.FAQEntryTitle { + font: bold 12pt Georgia, serif; + margin-bottom: .5em; + } +.FAQEntry .SubTopic { + font: italic 9pt Verdana, sans-serif; + } + + + +.SideMenu { + width: 175px; /* 195 minus padding */ + text-align: center; + padding-top: 15px; + background-color: #F0F0F0; + } +.SideMenuBottom { + background-color: #F0F0F0; + } +.SideMenuBottomRight { + text-align: right; + } + +.SideMenuSection { + margin-bottom: 3em; + } + +.SideMenuTitle { + padding-bottom: 3px; + border-bottom: 1px solid #D0D0D0; + } + +.SideMenuBody { + padding-top: 1em; + background: URL("images/menu/background.png") repeat-x; + } + +.SideMenuEntry { + font: 8pt Verdana, sans-serif; + margin: 0 10px 1em 10px; + display: block; + } + +a.SideMenuEntry:link, +a.SideMenuEntry:visited { + color: #000000; + padding: 1px 10px 2px 9px; + } +a.SideMenuEntry:hover, +a.SideMenuEntry:active, +#SelectedSideMenuEntry { + border-color: #606060; + border-style: solid; + border-width: 1px 2px 2px 1px; + padding: 0 8px; + text-decoration: none; + -moz-border-radius: 10px; + } +a.SideMenuEntry:hover, +a.SideMenuEntry:active { + border-color: #C8C8C8; + background-color: #F8F8F8; + } +#SelectedSideMenuEntry { + border-color: #606060; + background-color: #FFFFFF; + } + +.SideMenuSourceForge { + padding-top: 5px; + } + + + +/* Needed by the release notes for 1.3 */ + +.ExPrototype { + font: 10pt Courier New, Courier, monospace; + padding: 5px 3ex; + background-color: #F4F4F4; + border: 1px solid #D0D0D0; + margin: 1em 0; + } +.ExPrototype td { + font: 10pt Courier New, Courier, monospace; + } +.ExPrototype .Fade { + color: #8F8F8F; + } + diff --git a/docs/doctool/Help/styles.html b/docs/doctool/Help/styles.html new file mode 100644 index 00000000..da77e2fa --- /dev/null +++ b/docs/doctool/Help/styles.html @@ -0,0 +1,43 @@ + + +CSS Styles - Natural Docs
Natural Docs
CSS Styles
Default Styles

These are the styles that come with Natural Docs.  They all follow the same color scheme and general layout; the choices are more so that you can choose the style of text you want.

You choose which style you want for your project by adding “-s [style name]” to the command line.

DefaultViewThis is the default style that Natural Docs uses.  Most of the text is 10pt Verdana.
SmallViewSmaller fonts than Default with most of the text using 8pt Verdana.  Some people like the small fonts because you can fit more on the screen at once.  However, some people hate them and find them hard to read.
RomanViewSerif fonts with most of the text using 12pt Roman.  Some people prefer Roman fonts, usually those that have decent anti-aliasing displays like Mac OS X or Windows XP with ClearType.
Customizing

There are two ways to customize the CSS files.  One is to build your own file from scratch, and the other is to make a touch-up file that gets applied after one of the default styles.  Either way you want to create your own CSS file in your project directory (the one you use with -p) or if you plan on sharing it between many projects, in Natural Docs’ Styles directory.

To use a custom file, no matter where you put it, you just use it with -s without the CSS extension.  So if you made Red.css, you use “-s Red”.  If you made a touch-up file instead, you use it after one of the default styles, such as with “-s Default Red”.  If you’re so inclined, you can string as many touch-up files together as you want or use one of your own as a base.

The CSS Guide documents the page structure and CSS styles of Natural Docs’ output.  Always remember to check its revisions section every time you upgrade Natural Docs because it may change between releases.  Visit our message board if you need help.  If you create a new style and would like to make it available for everyone to download, e-mail it to me.

Common Customizations
Web-Style Paragraphs

Natural Docs defaults to print-style paragraphs like the one you are reading.  Each one is indented and there are no blank lines between them.  To switch to web-style paragraphs, which have blank lines and no indents, add this to your custom CSS file:

p {
+  text-indent: 0;
+  margin-bottom: 1em;
+  }
Prototype Colors

If you’ve added a custom topic type and have it finding prototypes for you, you may want to have them appear in a different color than the default black and white.  Add this to your custom CSS file:

.C[type] .Prototype {
background-color: [color];
border-color: [color];
}

Replace [type] with the name of your topic type, minus any symbols and spaces.  So if you added a type “Sound Effect”, you would apply the style to “.CSoundEffect .Prototype”.

Copyright © 2003-2005 Greg Valure
\ No newline at end of file diff --git a/docs/doctool/Help/troubleshooting.html b/docs/doctool/Help/troubleshooting.html new file mode 100644 index 00000000..b031feb7 --- /dev/null +++ b/docs/doctool/Help/troubleshooting.html @@ -0,0 +1,14 @@ + + +Troubleshooting - Natural Docs
Natural Docs
Troubleshooting
Natural Docs Issues
I don’t get any documentation
Is it recognizing your source files?

If Natural Docs has never said “Parsing n files...” when you run it, or n was way too low a number, it is not finding your source files.

If it has, try this test.  Run Natural Docs once.  Edit one of your source files and save it.  Run Natural Docs again.  If it doesn’t say “Parsing 1 file...” it is not recognizing your file.

No, it’s not recognizing them

The most likely scenario is that Natural Docs doesn’t associate the file extension you’re using with your programming language.  Open Languages.txt and find your language.  Underneath it you should see a line that says something like “Extensions: c cpp cxx h hpp hxx”.  Add the file extensions you use and try again.

If you use extensionless or .cgi files, do the same thing but instead look for a line that says something like “Shebang Strings: tclsh wish expect”.  If it is not there, you may need to add it yourself.  Edit it to include whatever appears in your shebang (#!) line that would say this file belongs to your language.

Otherwise just make sure you included the directory or one of its parents with -i on the command line.

Yes, it’s recognizing them

First note that unless you have full language support, Natural Docs will only include what you write for it.  It will not be able to scan your code and pick out all the classes and functions on its own.

If the problem is with text files, the most likely scenario is that you’re not including topic lines.  Like in comments, only things that appear under “keyword: name” lines count as Natural Docs content.

If this is happening in code, remember that comments must appear alone on a line.  You cannot put Natural Docs comments on the same line as code.  This includes having anything appear after a closing block comment symbol.

Some of my topics don’t show up
  • Check the list of keywords to see if the one you’re using is there and you spelled it correctly.  Note that the web page only has the default set of keywords.  You may need to check Topics.txt in Natural Docs’ Config directory and your project directory if you’ve edited them
  • If the topics appear in code, make sure that the comments are alone on a line.  You cannot put Natural Docs content on the same line as code.  This includes having anything appear after a closing block comment symbol.
  • Make sure that if you have more than one topic in a comment, there is a blank line above the topic line.
  • If you have text boxes or lines, make sure they are completely unbroken.  You can also try removing them completely.
  • If the topics appear in a text file, make sure you included topic lines.  Like in comments, only things that appear after “keyword: name” lines count as Natural Docs content.  You could just add a Title: line to the top of the file.
Some of my topics aren’t formatting correctly
  • Headers must have a blank line above them.
  • Lines directly after bullet or definition lines are part of the previous bullet or definition, even if it’s not indented.  Skip a line first to do something else
  • If you’re getting symbols scattered throughout your text, make sure any text boxes or lines are completely unbroken.  You can also try removing them altogether.
  • If your example source code is getting mangled, remember to use the example code syntax.
  • If a line’s becoming a header but shouldn’t, either get rid of the colon or break it into two lines so the colon appears on the second line
  • If a line’s becoming a definition but shouldn’t, either get rid of the space-dash-space (use two dashes or remove one of the spaces) or break it into two lines so that the space-dash-space is on the second line.

I realize the last two aren’t great.  If you have any ideas as to how to reliably detect these kinds of false positives, e-mail me.

I’m not getting prototypes
  • The topic must appear directly above the thing it’s documenting.
  • Topics documented in lists will not get prototypes, even if the list break apart in the output.
  • The topic name must be present in the prototype somewhere.  Make sure the topic title has the same case as in the prototype and that it’s not misspelled.  This applies even if your language isn’t case sensitive.
My links aren’t working

If your links appear in the output as “<text>” instead of being converted to links, do the following:

  • Make sure the target appears in the output.  The easiest way is to see if it appears in the Everything index.
  • Make sure the link is spelled correctly and has the same case as what you’re linking to.  This applies even if your language isn’t case sensitive.
  • If the topic your link appears in and the link target are not in the same class (or are not both global) make sure you include the class in the link with class.target, class::target, or class->target.  You can check which classes topics appear in with the Everything index.  If your topics are appearing in the wrong classes, fix the documentation remembering the topic scoping rules.
Platform Issues
I get the message “Bad command or file name” or “perl is not recognized”

What’s happening is that NaturalDocs.bat can’t find Perl.  You need Perl installed to run Natural Docs, so if you haven’t done so already, you can download and install ActiveState’s ActivePerl for free.

If you already have Perl, it’s bin directory is either not in your path or the path isn’t being used by whatever you’re running it from, which happens on some IDEs.  Edit NaturalDocs.bat and on the line that says “perl NaturalDocs %NaturalDocsParams%”, change perl to be the full path to perl.exe, such as C:\perl\bin\perl.exe.  If you have spaces in any of the directories you need to surround it with quotes.

I get the message “Can’t open perl script NaturalDocs”

What’s happening is that Perl can’t find the Natural Docs script file.  This happens when the working directory or “start in” folder isn’t the directory Natural Docs was installed to.  If changing that doesn’t work, or if you don’t have the option to set that, edit NaturalDocs.bat and find the line that says “perl NaturalDocs %NaturalDocsParams%”.  Change NaturalDocs to include the full path Natural Docs was installed to, such as C:\Program Files\Natural Docs\NaturalDocs.  If you have spaces in any of the directories you need to surround it with quotes.

Internet Explorer gives me security warnings

“To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer.”

This is a problem with Internet Explorer and Windows XP Service Pack 2.  In their infinite wisdom, Microsoft decided that instead of monitoring JavaScript to see if it actually does anything questionable, they just prevent it from running at all if the page is on your hard drive.

To fix it, upgrade your copy of Natural Docs.  The HTML generated by Natural Docs 1.3 or higher can get around this issue.

Copyright © 2003-2005 Greg Valure
\ No newline at end of file -- cgit 1.4.1