Artistic Style for Windows

A Windows indenter and formatter

of C, C++, C# and Java source code

 

 

 

Options Reference

 

 

 

Link to download page

Link to home page

  

Editor Reference

 

Options Dialog

Tabs Tab

Indent Tab

Format Tab

Style Tab

 

Options Dialog

[ options dialog ]

 

The Options Dialog contains options for the Artistic Style indenter and formatter. Each option in the tab control corresponds to an option in Artistic Style. Clicking on the option will display its effect in the edit control window.

Tab Control
There are four tabs on the tab control. Their purpose is explained in the following sections.

Preview Window
The preview window on the right is a Scintilla edit control that will show the effect of each option as the option is clicked. Checking and unchecking the options will demonstrate the effect the option has on formatting.

Use Defaults
Restore all settings to their default values. No options will be sent to Artistic Style. Therefore the Artistic Style default options will be used.

OK
Accept the currently selected settings.

Cancel
Cancel the currently selected settings and use the settings in effect before the dialog was displayed.

Settings
Display the Artistic Style Options that are currently selected. The long option is displayed followed by the short option. You can also call this display from the Tools menu or by using an accelerator key.

Style Tab

[ style tab ]The Style tab controls the predefined style options used by Artistic Style.

The style options always override any individual option settings. You will always get the requested style regardless of other defined options.

None
If this option is used a predefined style option is NOT requested.

Allman
Allman or BSD style formatting/indenting uses broken brackets. It is sometimes referred to as BSD or ANSI style. Sets the Artistic Style option style=allman.

Java
Java style formatting/indenting uses attached brackets. Sets the Artistic Style option style=java.

K&R
Kernighan & Ritchie style formatting/indenting uses linux brackets. Brackets are broken from namespaces, classes, and function definitions. Brackets are attached to statements within a function. Sets the Artistic Style option style=k&r.

Stroustrup
Stroustrup style formatting/indenting uses stroustrup brackets. Brackets are broken from function definitions only. Brackets are attached to namespaces, classes, and statements within a function. Sets the Artistic Style option style=stroustrup.

Whitesmith
Whitesmith style formatting/indenting uses broken, indented brackets. Class blocks and switch blocks are indented to prevent a 'hanging indent' with switch statements and C++ class modifiers (public, private, protected). Sets the Artistic Style option style=whitesmith.

Banner
Banner style formatting/indenting uses attached, indented brackets. Class blocks and switch blocks are indented to prevent a 'hanging indent' with switch statements and C++ class modifiers (public, private, protected). Sets the Artistic Style option style=banner.

Gnu
GNU style formatting/indenting uses broken brackets and indented blocks. Indentation is 2 spaces. Extra indentation is added to blocks within a function. The opening bracket for namespaces, classes, and functions is not indented. Sets the Artistic Style option style=gnu.

Linux
Linux style formatting/indenting uses linux style brackets. Brackets are broken from namespace, class, and function definitions. Brackets are attached to statements within a function. Indentation is 8 spaces. Also known as Kernel Normal Form style, this is the style used in the Linux kernel. Sets the Artistic Style option style=linux.

Show Options
This will change the display of the edit control to show the options set by the style. If individual options are set that conflict with the displayed style settings, the style settings will be used.

Tabs Tab

[ tabs tab ]This tab contains two groups, The Tabs/Spaces options and the Brackets options. The radio buttons in each group are for options that are mutually exclusive, only one of the selections is allowed.

Tabs/Spaces

The Tabs/Spaces options control the indentation character and the number of spaces per tab.

Indent with spaces
Indent using spaces. Sets the Artistic Style option indent=spaces=#, where # will be the value in "Spaces per tab". If "Spaces per tab" is 4, it is the default setting and no Artistic Style option will be generated.

Indent with tabs
Indent using tabs. Sets the Artistic Style option indent=tab=#, where # will be the value in "Spaces per tab". If "Spaces per tab" is 4, it is the default setting and indent=tab will be used instead.

Force indent with tabs
Indent using tabs. It will use tabs as indents in areas where indent=tab prefers to use spaces, such as inside multi-line statements. Sets the Artistic Style option indent=force‑tab=#, where # will be the value in "Spaces per tab".

Spaces per Tab
This is a text box for entering the number of spaces per tab. This value will be used with the above options. The entry will be edited for a valid range. The default setting for this option is 4 spaces per tab. The button to the right of the text controls the option display. Click this button to change the display on the right side of the dialog.

Brackets

The Brackets options control the type of brackets to use in formatting.

Do not change
The brackets will be left as they are in the program. This will allow you to use mixed bracket types if you want. For example you may use attached brackets for structs and classes and broken brackets for functions. If this option is used a brackets option is NOT sent to Artistic Style.

Break brackets
Break brackets from their pre-block statements. Sets the Artistic Style option brackets=break.

Attach brackets
Attach brackets to their pre-block statements. Sets the Artistic Style option brackets=attach.

Linux brackets
Break brackets from namespace, class, and function definitions, but attach brackets to statements within a function. Sets the Artistic Style option brackets=linux.

Stroustrup brackets
Break brackets from function definitions only. Attach brackets to namespaces, classes, and statements within a function. Sets the Artistic Style option brackets=stroustrup.

If a predefined style has been selected a warning message will be displayed stating that the predefined style will override the brackets option.

Indent Tab

[ indent tab ] The Indent tab controls the indentation options used by Artistic Style.

Class blocks
Indent class blocks so that the headers public, protected, and private are indented in the block. Sets the Artistic Style option indent‑classes.

Switch blocks
Indent switch blocks so that the case headers are indented within the switch block. Sets the Artistic Style option indent‑switches.

Case blocks
Indent case blocks from the case headers. Case statements not enclosed in blocks are NOT indented. Sets the Artistic Style option indent‑cases.

Brackets
Add extra indentation to brackets. This option is used for Whitesmith and Banner predefined styles. Sets the Artistic Style option indent‑brackets.

Blocks
Add extra indentation to entire blocks. This option has no effect when the above "Brackets" option is checked. This option is used for the predefined Gnu style. Sets the Artistic Style option indent‑blocks.

Namespaces
Add extra indentation to namespaces. Sets the Artistic Style option indent‑namespaces.

Labels
Add extra indentation to labels so they appear one indent more than the current indentation, rather than being flushed to the left (the default). Sets the Artistic Style option indent‑labels.

Preprocessor
Indent multi-line preprocessor definitions. Should be used with convert‑tabs for proper results. Sets the Artistic Style option indent‑preprocessor.

Max in Statement
Indent a maximum number spaces in a continuous statement, relative to the previous line. This is a text box for entering the maximum number of spaces. The entry will be edited for a valid range. The default is 40 spaces. The button to the right of the text controls the option display. Click this button to change the display on the right side of the dialog. Sets the Artistic Style option max‑instatement‑indent=#, where # will be the value in "Max in statement".

Min conditional
Set the minimum indent that is added when a header is built of multiple lines. This indent helps to easily separate the header from the command statements that follow. This is a text box for entering the minimum number of spaces. The entry will be edited for a valid range. The default setting for this option is twice the current indent. The button to the right of the text controls the option display. Click this button to change the display on the right side of the dialog. Sets the Artistic Style option min‑conditional‑indent=#, where # will be the value in "Min conditional".

Format Tab

[ format tab ]The Format tab controls the formatting options used By Artistic Style.

Break header blocks
Pad empty lines around header blocks (e.g. if, while ...). Sets the Artistic Style option break‑blocks.

Break all blocks
Pad empty lines around header blocks (e.g. if, while ...). Treat closing header blocks (e.g. else, catch ...) as stand-alone blocks. Sets the Artistic Style option break‑blocks=all.

Break closing brackets
When used with either brackets=attach or brackets=linux, breaks closing headers (e.g. else, catch ...) from their immediately preceding closing brackets. It has no effect for other bracket settings. Sets the Artistic Style option break‑closing‑brackets.

Break else/if statements
Break "else if ()" header combinations into separate lines. Sets the Artistic Style option break‑elseifs.

Delete empty lines
Delete empty lines within a function. Sets the Artistic Style option delete-empty-lines.

Pad operators
Insert space padding around operators. Sets the Artistic Style option pad‑oper.

Pad parens outside
Insert space padding on the outside of parenthesis. Sets the Artistic Style option pad‑paren‑out.

Pad parens inside
Insert space padding on the inside of parenthesis. Sets the Artistic Style option pad‑paren‑in.

Unpad parens
Remove space padding around parenthesis on the inside and outside. It can be used in combination with the above paren padding options. Only padding that has not been requested by the padding options will be removed. Sets the Artistic Style option unpad‑paren.

Keep one line statements
Don't break multiple statements residing on a single line. Sets the Artistic Style option keep‑one‑line‑statements.

Keep one line blocks
Don't break one-line blocks. Sets the Artistic Style option keep‑one‑line‑blocks.

Convert tabs
Converts tabs into spaces in the non-indentation part of the line. The number of spaces inserted will maintain the spacing of the tab. The current setting for spaces per tab is used. It may not produce the expected results if convert-tabs is used when changing spaces per tab. Tabs are not replaced in quotes. Sets the Artistic Style option convert‑tabs.

Fill empty lines
Fill empty lines with the white space of the previous line. Sets the Artistic Style option fill‑empty‑lines.

 

Hosted by www.Geocities.ws

1