<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
             xmlns:g='urn:import:com.google.gwt.user.client.ui'
             xmlns:widget="urn:import:org.rstudio.core.client.widget">

   <ui:style>
      .panel input[type=checkbox] {
         margin-left: 0;
      }

      .panel input:focus {
         outline: none;
      }

      .pattern, .filePattern {
         width: 375px;
      }

      .example {
         color: #999;
      }

      .presetFilePatterns {
         width: 100%;
      }
   </ui:style>

   <g:HTMLPanel styleName="{style.panel}">
      <p>
         <g:Label text="Find:"/>
         <g:TextBox ui:field="txtSearchPattern_" styleName="{style.pattern}"/>
         <br/>
         <g:CheckBox ui:field="checkboxCaseSensitive_" text="Case sensitive"/>
         &#x00a0;&#x00a0;&#x00a0;&#x00a0;
         <g:CheckBox ui:field="checkboxRegex_" text="Regular expression"/>
      </p>

      <p>
         <widget:DirectoryChooserTextBox ui:field="dirChooser_"/>
      </p>

      <p><g:Label text="Search these files:"/>
         <g:ListBox ui:field="listPresetFilePatterns_"
                    styleName="{style.presetFilePatterns}">
            <g:item value="">All Files</g:item>
            <g:item value="*.r, *.R, *.rnw, *.Rnw, *.rmd, *.Rmd, *.rmarkdown, *.Rmarkdown, *.rhtml, *.Rhtml, *.rd, *.Rd, *.h, *.hpp, *.c, *.cpp">Common R source files (R, C/C++, Rnw, Rmd, Rhtml, Rd)</g:item>
            <g:item value="*.r, *.R">R Scripts</g:item>
            <g:item value="custom">Custom Filter</g:item>
         </g:ListBox>
         <div ui:field="divCustomFilter_">
            <g:TextBox ui:field="txtFilePattern_" styleName="{style.filePattern}"/>
            <br/>
            <span class="{style.example}">Example: *.R, *.r, *.csv. Separate multiple types with commas.</span>
         </div>
      </p>
   </g:HTMLPanel>

</ui:UiBinder>