// ButtonBar
//
// This example macro set adds six buttons to the Image tool bar.
// It requires ImageJ 1.34j or later.
// Information about tool macros is available at
// http://rsb.info.nih.gov/ij/developer/macro/macros.html#tools

    macro "Unused Tool - C059T3e16 " {}
    macro "A Button Tool - C059T3e16A" {}
    macro "B Button Tool - C059T3e16B" {}
    macro "C Button Tool - C059T3e16C" {}
    macro "D Button Tool - C059T3e16D" {}
    macro "E Button Tool - C059T3e16E" {}
    macro "F Button Tool - C059T3e16F" {}

    macro "A Button Tool Selected" {handleClick("A")}
    macro "B Button Tool Selected" {handleClick("B")}
    macro "C Button Tool Selected" {handleClick("C")}
    macro "D Button Tool Selected" {handleClick("D")}
    macro "E Button Tool Selected" {handleClick("E")}
    macro "F Button Tool Selected" {handleClick("F")}

    function handleClick(button) {
        requires("1.34j");
        restorePreviousTool();
        showMessage("Button Bar", "The \""+button+"\" Button was pressed");
    }
