# This is a description of the wimp interface for indent
# refer to the HTML help files for explanation

tool_details_start
   name		"Indent";
   command_is	"<Indent$Dir>.!RunImage -alloff -nbc";
   version	"2.2.4";
   wimpslot	1024k;
   has_extended_cmdline;
tool_details_end

metaoptions_start
   has_auto_run;
   has_auto_save     leafname from icn 3;
   has_text_window;
   has_summary_window;
metaoptions_end

#fileoutput_start
#   output_dft_is     produces_output;
#fileoutput_end

dbox_start
   # Icons
   icons_start
      icn 3 maps_to string  not_saved;

      # Indenting style
      icn 6 maps_to "-gnu";
      icn 7 maps_to "-kr";
      icn 8 maps_to "-orig";
      icn 9 maps_to "";
      icn 10 extends from icn 10 to icn 84;

      # Blank lines
      icn 13 maps_to "-bap";	# Blank line after every procedure body
      icn 14 maps_to "-bad";	# Blank line after every block of declarations
      icn 15 maps_to "-bbb";	# Blank line before block comments
      icn 16 maps_to "-sob";	# Swallow optional blank lines

      # Comments
      icn 19 maps_to "-fca";	# Format comments
      icn 20 maps_to "-fc1";	# Format comments in column 1

      icn 21 maps_to "-lc" number;	# Right margin
      icn 22 decreases icn 21 min 0;
      icn 23 increases icn 21 max 999;

      icn 25 maps_to "-d" number;	# unindent comments
      icn 26 decreases icn 25 min 0;
      icn 27 increases icn 25 max 999;

      icn 29 maps_to "-c" number;	# comments following code
      icn 30 decreases icn 29 min 0;
      icn 31 increases icn 29 max 999;

      icn 33 maps_to "-cd" number;	# comments following declaration
      icn 34 decreases icn 33 min 0;
      icn 35 increases icn 33 max 999;

      icn 37 maps_to "-cp" number;	# Comments following preprocessor decl
      icn 38 decreases icn 37 min 0;
      icn 39 increases icn 37 max 999;

      icn 41 maps_to "-cdb";	# Comment delimiters on blank lines
      icn 42 maps_to "-sc";	# Stars at the beginning of multiline comments

      # Statements
      icn 45 maps_to "-br";	# K&R braces
      icn 46 maps_to "-bl";	# GNU braces
      icn 47 maps_to "-ce";	# Cuddle else to braces

      icn 48 maps_to "-bli" number;	# Indent for braces
      icn 49 decreases icn 48 min 0;
      icn 50 increases icn 48 max 999;

      icn 52 maps_to "-cli" number;	# Indent for case statements
      icn 53 decreases icn 52 min 0;
      icn 54 increases icn 52 max 999;

      icn 56 maps_to "-cbi" number;	# Indent from case to {
      icn 57 decreases icn 56 min 0;
      icn 58 increases icn 56 max 999;

      icn 60 maps_to "-ss";	# Space before null statement ;
      icn 61 maps_to "-pcs";	# Space before procedure call ()
      icn 62 maps_to "-cs";	# Space after casts
      icn 63 maps_to "-bs";	# Space after sizeof

      icn 64 maps_to "-sbi" number;	# Indent for { after struct decl
      icn 65 decreases icn 64 min 0;
      icn 66 increases icn 64 max 999;

      icn 68 maps_to "-pi" number;	# Indent for split parentheses
      icn 69 decreases icn 68 min 0;
      icn 70 increases icn 68 max 999;

      # Declarations
      icn 74 maps_to "-di" number;	# Column for 1st identifier in declaration
      icn 75 decreases icn 74 min 0;
      icn 76 increases icn 74 max 999;

      icn 78 maps_to "-bc";	# Newline after , in declaration
      icn 79 maps_to "-psl";	# Procedure names at start of line

      icn 80 maps_to string prefix_by "-T";	# Typedef declarations

      icn 82 maps_to "-brs";	# struct Braces K&R style
      icn 83 maps_to "-bls";	# struct Braces GNU style

      # Indentation
      icn 86 maps_to "-i" number;	# Columns to indent
      icn 87 decreases icn 86 min 0;
      icn 88 increases icn 86 max 999;

      icn 90 maps_to "-ci" number;	# Continuation indent
      icn 91 decreases icn 90 min 0;
      icn 92 increases icn 90 max 999;

      icn 94 maps_to "-lp";	# Line up to parentheses

      icn 95 maps_to "-ip" number;	# Indent for parameters
      icn 96 decreases icn 95 min 0;
      icn 97 increases icn 95 max 999;

      icn 99 maps_to "-ts" number;	# Tabs columns
      icn 100 decreases icn 99 min 0;
      icn 101 increases icn 99 max 999;

      icn 103 maps_to "-lps";		# Leave preprocessor spaces

      # Long Lines
      icn 106 maps_to "-l" number;	# Max line length
      icn 107 decreases icn 106 min 0;
      icn 108 increases icn 106 max 999;

      icn 110 maps_to "-bbo";		# Break before boolean operators
      icn 111 maps_to "-hnl";		# honour_newlines

   icons_end

   # Extreme care is needed with the defaults for this. The "disable" function
   # doesn't appear to be performed properly from defaults, so we leave icons
   # 6-10 off and make a note in the help file.
   defaults
      icn 3 "",
      icn 9 on,		# Replace this with 6, 7 or 8 as preferred
      icn 10 on,	# or off
      icn 13 on,
      icn 16 on,
      icn 21 120,
      icn 46 on,
      icn 52 4,
      icn 60 on,
      icn 62 on,
      icn 63 on,
      icn 83 on,
      icn 86 4,
      icn 94 on,
      icn 99 8,
      icn 106 120,
      icn 110 on;

   imports_start
      drag_to icn 3   inserts icn 3 separator_is " ";
      drag_to any     inserts icn 3 separator_is " ";
      drag_to iconbar inserts icn 3 separator_is " ";
   imports_end

dbox_end

menu_start

   "Options" maps_to "" sub_menu "  Options   " 32;
   # Miscellaneous
   # -verbose
# Is this meaningful?
#  {"npro", PRO_IGN, 0, ONOFF_NA, 0, &exp_pro},

# Or this?
#  {"h", PRO_FUNCTION, 0, ONOFF_NA, (int *) usage, &exp_version},
   # These ones aren't documented
   "Extra Expression Indent" maps_to "-eei";
   "Left justify declarations" maps_to "-dj";
   "Blank lines around conditionals" maps_to "-bacc";
   "Blank lines after initial proc. decls" maps_to "-badp";
   # This one is
   "Verbose" maps_to "-v";

   defaults
      menu 1 off;
menu_end

deselections_start
	# Indenting style box
	icn 6 deselects icn 7, icn 8, icn 9;
	icn 7 deselects icn 6, icn 8, icn 9;
	icn 8 deselects icn 6, icn 7, icn 9;
	icn 9 deselects icn 6, icn 7, icn 8;
	# Braces box
	icn 45 deselects icn 46;
	icn 46 deselects icn 45;
	# Declarations box
	icn 82 deselects icn 83;
	icn 83 deselects icn 82;
deselections_end

exclusions_start
	# If GNU, K&R or original formatting are selected, all options are off
	icn 6 excludes
	# Blank lines
			icn 13, icn 14, icn 15, icn 16,
	# Comments
			icn 19, icn 20,
			icn 21, icn 22, icn 23, icn 25, icn 26, icn 27,
			icn 29, icn 30, icn 31, icn 33, icn 34, icn 35,
			icn 37, icn 38, icn 39,
			icn 41, icn 42,
	# Statements
			icn 45, icn 46, icn 47, icn 48, icn 49, icn 50,
			icn 52, icn 53, icn 54, icn 56, icn 57, icn 58,
			icn 60, icn 61, icn 62, icn 63,
			icn 64, icn 65, icn 66, icn 68, icn 69, icn 70,
	# Declarations
			icn 74, icn 75, icn 76, icn 78, icn 79, icn 80,
			icn 82, icn 83,
	# Indentation
			icn 86, icn 87, icn 88, icn 90, icn 91, icn 92,
			icn 94, icn 95, icn 96, icn 97,
			icn 99, icn 100, icn 101, icn 103,
	# Long Lines
			icn 106, icn 107, icn 108, icn 110, icn 111;

	icn 7 excludes
	# Blank lines
			icn 13, icn 14, icn 15, icn 16,
	# Comments
			icn 19, icn 20,
			icn 21, icn 22, icn 23, icn 25, icn 26, icn 27,
			icn 29, icn 30, icn 31, icn 33, icn 34, icn 35,
			icn 37, icn 38, icn 39,
			icn 41, icn 42,
	# Statements
			icn 45, icn 46, icn 47, icn 48, icn 49, icn 50,
			icn 52, icn 53, icn 54, icn 56, icn 57, icn 58,
			icn 60, icn 61, icn 62, icn 63,
			icn 64, icn 65, icn 66, icn 68, icn 69, icn 70,
	# Declarations
			icn 74, icn 75, icn 76, icn 78, icn 79, icn 80,
			icn 82, icn 83,
	# Indentation
			icn 86, icn 87, icn 88, icn 90, icn 91, icn 92,
			icn 94, icn 95, icn 96, icn 97,
			icn 99, icn 100, icn 101, icn 103,
	# Long Lines
			icn 106, icn 107, icn 108, icn 110, icn 111;

	icn 8 excludes
	# Blank lines
			icn 13, icn 14, icn 15, icn 16,
	# Comments
			icn 19, icn 20,
			icn 21, icn 22, icn 23, icn 25, icn 26, icn 27,
			icn 29, icn 30, icn 31, icn 33, icn 34, icn 35,
			icn 37, icn 38, icn 39,
			icn 41, icn 42,
	# Statements
			icn 45, icn 46, icn 47, icn 48, icn 49, icn 50,
			icn 52, icn 53, icn 54, icn 56, icn 57, icn 58,
			icn 60, icn 61, icn 62, icn 63,
			icn 64, icn 65, icn 66, icn 68, icn 69, icn 70,
	# Declarations
			icn 74, icn 75, icn 76, icn 78, icn 79, icn 80,
			icn 82, icn 83,
	# Indentation
			icn 86, icn 87, icn 88, icn 90, icn 91, icn 92,
			icn 94, icn 95, icn 96, icn 97,
			icn 99, icn 100, icn 101, icn 103,
	# Long Lines
			icn 106, icn 107, icn 108, icn 110, icn 111;

	# K & R braces means bracing indent is irrevelant
	icn 45 excludes icn 48, icn 49, icn 50;
exclusions_end





