# Configuration Options

## Functions
TidyOptionId | tidyOptGetIdForName (ctmbstr optnam)
TidyIterator | tidyGetOptionList (TidyDoc tdoc)
TidyOption | tidyGetNextOption (TidyDoc tdoc, TidyIterator *pos)
TidyOption | tidyGetOption (TidyDoc tdoc, TidyOptionId optId)
TidyOption | tidyGetOptionByName (TidyDoc tdoc, ctmbstr optnam)
TidyOptionId | tidyOptGetId (TidyOption opt)
ctmbstr | tidyOptGetName (TidyOption opt)
TidyOptionType | tidyOptGetType (TidyOption opt)
Bool | tidyOptIsReadOnly (TidyOption opt)
TidyConfigCategory | tidyOptGetCategory (TidyOption opt)
ctmbstr | tidyOptGetDefault (TidyOption opt)
uint | tidyOptGetDefaultInt (TidyOption opt)
Bool | tidyOptGetDefaultBool (TidyOption opt)
TidyIterator | tidyOptGetPickList (TidyOption opt)
ctmbstr | tidyOptGetNextPick (TidyOption opt, TidyIterator *pos)
ctmbstr | tidyOptGetValue (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetValue (TidyDoc tdoc, TidyOptionId optId, ctmbstr val)
Bool | tidyOptParseValue (TidyDoc tdoc, ctmbstr optnam, ctmbstr val)
uint | tidyOptGetInt (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetInt (TidyDoc tdoc, TidyOptionId optId, uint val)
Bool | tidyOptGetBool (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetBool (TidyDoc tdoc, TidyOptionId optId, Bool val)
Bool | tidyOptResetToDefault (TidyDoc tdoc, TidyOptionId opt)
Bool | tidyOptResetAllToDefault (TidyDoc tdoc)
Bool | tidyOptSnapshot (TidyDoc tdoc)
Bool | tidyOptResetToSnapshot (TidyDoc tdoc)
Bool | tidyOptDiffThanDefault (TidyDoc tdoc)
Bool | tidyOptDiffThanSnapshot (TidyDoc tdoc)
Bool | tidyOptCopyConfig (TidyDoc tdocTo, TidyDoc tdocFrom)
ctmbstr | tidyOptGetEncName (TidyDoc tdoc, TidyOptionId optId)
ctmbstr | tidyOptGetCurrPick (TidyDoc tdoc, TidyOptionId optId)
TidyIterator | tidyOptGetDeclTagList (TidyDoc tdoc)
ctmbstr | tidyOptGetNextDeclTag (TidyDoc tdoc, TidyOptionId optId, TidyIterator *iter)

## Detailed Description

Functions for getting and setting Tidy configuration options.

## Function Documentation

TidyOptionId tidyOptGetIdForName | ( | ctmbstr | optnam | ) |

| Get option ID by name

TidyIterator tidyGetOptionList | ( | TidyDoc | tdoc | ) |

| Example:
    TidyIterator itOpt = tidyGetOptionList( tdoc );
    while ( itOpt )
    {
      TidyOption opt = tidyGetNextOption( tdoc, &itOpt );
      .. get/set option values ..
    }

TidyOption tidyGetNextOption | ( | TidyDoc | tdoc,
|  | TidyIterator * | pos
| ) |

| Get next Option

TidyOption tidyGetOption | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Lookup option by ID

TidyOption tidyGetOptionByName | ( | TidyDoc | tdoc,
|  | ctmbstr | optnam
| ) |

| Lookup option by name

TidyOptionId tidyOptGetId | ( | TidyOption | opt | ) |

| Get ID of given Option

ctmbstr tidyOptGetName | ( | TidyOption | opt | ) |

| Get name of given Option

TidyOptionType tidyOptGetType | ( | TidyOption | opt | ) |

| Get datatype of given Option

Bool tidyOptIsReadOnly | ( | TidyOption | opt | ) |

| Is Option read-only?

TidyConfigCategory tidyOptGetCategory | ( | TidyOption | opt | ) |

| Get category of given Option

ctmbstr tidyOptGetDefault | ( | TidyOption | opt | ) |

| Get default value of given Option as a string

uint tidyOptGetDefaultInt | ( | TidyOption | opt | ) |

| Get default value of given Option as an unsigned integer

Bool tidyOptGetDefaultBool | ( | TidyOption | opt | ) |

| Get default value of given Option as a Boolean value

TidyIterator tidyOptGetPickList | ( | TidyOption | opt | ) |

| Iterate over Option "pick list"

ctmbstr tidyOptGetNextPick | ( | TidyOption | opt,
|  | TidyIterator * | pos
| ) |

| Get next string value of Option "pick list"

ctmbstr tidyOptGetValue | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Get current Option value as a string

Bool tidyOptSetValue | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId,
|  | ctmbstr | val
| ) |

| Set Option value as a string

Bool tidyOptParseValue | ( | TidyDoc | tdoc,
|  | ctmbstr | optnam,
|  | ctmbstr | val
| ) |

| Set named Option value as a string. Good if not sure of type.

uint tidyOptGetInt | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Get current Option value as an integer

Bool tidyOptSetInt | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId,
|  | uint | val
| ) |

| Set Option value as an integer

Bool tidyOptGetBool | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Get current Option value as a Boolean flag

Bool tidyOptSetBool | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId,
|  | Bool | val
| ) |

| Set Option value as a Boolean flag

Bool tidyOptResetToDefault | ( | TidyDoc | tdoc,
|  | TidyOptionId | opt
| ) |

| Reset option to default value by ID

Bool tidyOptResetAllToDefault | ( | TidyDoc | tdoc | ) |

| Reset all options to their default values

Bool tidyOptSnapshot | ( | TidyDoc | tdoc | ) |

| Take a snapshot of current config settings

Bool tidyOptResetToSnapshot | ( | TidyDoc | tdoc | ) |

| Reset config settings to snapshot (after document processing)

Bool tidyOptDiffThanDefault | ( | TidyDoc | tdoc | ) |

| Any settings different than default?

Bool tidyOptDiffThanSnapshot | ( | TidyDoc | tdoc | ) |

| Any settings different than snapshot?

Bool tidyOptCopyConfig | ( | TidyDoc | tdocTo,
|  | TidyDoc | tdocFrom
| ) |

| Copy current configuration settings from one document to another

ctmbstr tidyOptGetEncName | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Get character encoding name. Used with TidyCharEncoding, TidyOutCharEncoding, TidyInCharEncoding

ctmbstr tidyOptGetCurrPick | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId
| ) |

| Get current pick list value for option by ID. Useful for enum types.

TidyIterator tidyOptGetDeclTagList | ( | TidyDoc | tdoc | ) |

| Iterate over user declared tags

ctmbstr tidyOptGetNextDeclTag | ( | TidyDoc | tdoc,
|  | TidyOptionId | optId,
|  | TidyIterator * | iter
| ) |

| Get next declared tag of specified type: TidyInlineTags, TidyBlockTags, TidyEmptyTags, TidyPreTags