Xport Interface: stylesheet_formatter::option

Sets or retrieves specific formatting options.

bool formatter::option(1st Retrieval Variety
  formatter_boolean_option bool_opt
);
int formatter::option(2st Retrieval Variety
  formatter_integer_option int_opt
);
std::string formatter::option(3rd Retrieval Variety
  formatter_string_option string_opt
);
bool formatter::option(1st Setting Variety
  formatter_boolean_option opt,
  bool bool_value
);
bool formatter::option(2st Setting Variety
  formatter_integer_option int_opt,
  int int_value
);
bool formatter::option(3rd Setting Variety
  formatter_string_option string_opt,
  const std::string& string_value
);

Parameters

bool_opt

A formatter_boolean_option enumerator which specifies the boolean option to set or retrieve.

int_opt

An formatter_integer_option enumerator which specifies the integer option to set or retrieve.

string_opt

A formatter_string_option enumerator which specifies the string option to set or retrieve.

bool_value

A boolean value which will set the specified boolean option.

int_opt

An integer value which will set the specified boolean option.

string_value

A string value which will set the specified boolean option.

Returns

In the first setting variety, returns a boolean value disclosing the state of the specified option.
In the second setting variety, returns an integer disclosing the integer value of the specified option.
In the third setting variety, returns a string disclosing the string value of the specified option.

Remarks

This operation is used to set and retrieve various formatting options of the called formatter object. The various options are described below. Many more options will be added to the list below, allowing more control of the formatted xhtml output.

All options in formatter are distinguished, set, and retrieved, by enumerations. The table below lists the various options now available in formatter, and their default values. As more options are added, they will be added to the list.

Option enumerator Option type Default Description
newline_after_selector boolean false Determines if a newline is written after the selector, but before the first brace.
selector_indent integer 0 Determines the number of spaces the selector and braces are indented.
declaration_indent integer 3 Determines the number of spaces the declarations are indented.
rule_heading string "" Determines the rule heading format for all rules.

Complexity

Constant

Examples

Work Time Studio

Datasoft Solutions is proud to present their landmark product, Work Time Studio. Utilizing the tree container library, Work Time Studio provides unparalleled features in personal time, project and task management software. If you're looking for a way to increase your productivity, visit Work Time Studio's product website, and start being more productive today.