<?xml version="1.0" encoding="utf-8"?>
<layouts>
  <!-- Main layout -->
  <layout id="main" title="">
    <widget id="button12" title="." action="self.onbuttoncode(7)" next="main"/>
    <widget id="button13" title="abc" action="self.onbuttoncode(8)" next="main"/>
    <widget id="button14" title="def" action="self.onbuttoncode(9)" next="main"/>
    <widget id="button22" title="ghi" action="self.onbuttoncode(4)" next="main"/>
    <widget id="button23" title="jkl" action="self.onbuttoncode(5)" next="main"/>
    <widget id="button24" title="mno" action="self.onbuttoncode(6)" next="main"/>
    <widget id="button32" title="pqrs"  action="self.onbuttoncode(1)" next="main"/>
    <widget id="button33" title="tuv" action="self.onbuttoncode(2)" next="main"/>
    <widget id="button34" title="wxyz" action="self.onbuttoncode(3)" next="main"/>

    <widget id="button42" title="Next" next="main"
	    action="self.on_NextButton_pressed(None)" />
    <widget id="button43" title="Space" action="self.onbuttoncode(0)" next="main"/>
    <widget id="button44" next="main"
	    titleaction="self.iterhistory and 'Previous' or 'Delete'" 
	    action="self.on_BackspaceButton_pressed(None)" />

<!--    <widget id="button11" title="Actions" next="actions" />
    <widget id="button21" title="Settings" next="settings" />
    <widget id="button31" title="Words" next="words" />
    <widget id="button41" next="main"
	    titleaction="self.individualmode and 'Word mode' or 'Spell mode'" 
	    action="self.internalaction(self.switchmode)" />
-->  </layout>

  <!-- Quit confirmation -->
  <layout id="confirmquit" title="Confirm Quit">
    <widget id="button44" title="Don't quit" next="actions" />
    <widget id="button11" title="Really Quit" action="self.onquit()" />
  </layout>
    
  <!-- Settings -->
  <layout id="settings" title="Settings">
    <widget id="button12" title="Return"   next="main"/>
    <widget id="button13" title="Font..." 
	    action="self.on_FontButton_pressed(locals()['widget'])"/>
    <widget id="button14" title="Text Colour..." 
	    action="self.on_ColourButton_pressed(locals()['widget'], 'text')"/>

    <widget id="button22" title="Bg Colour..." 
	    action="self.on_ColourButton_pressed(locals()['widget'], 'bg')" />
    <widget id="button23" title="Sel Text Colour..."
	    action="self.on_ColourButton_pressed(locals()['widget'], 'sel_text')" />
    <widget id="button24" title="Sel Bg Colour..."
	    action="self.on_ColourButton_pressed(locals()['widget'], 'sel_bg')" />

    <widget id="button32" title="Spell" 
	    action="self.config.pronounce = 'spell'" group="pronounce" />
    <widget id="button33" title="Say word" 
	    action="self.config.pronounce = 'word'"  group="pronounce" />
    <widget id="button34" title="Spell and word" 
	    action="self.config.pronounce = 'spell_and_word'"  group="pronounce" />

    <widget id="button42" title="Show Labels" 
	    action="self.config.hide_labels = False"  group="hide_labels" />
    <widget id="button43" title="Hide Labels" 
	    action="self.config.hide_labels = True" group="hide_labels" />
    <widget id="button44" title="More settings..."  next="settings2"  />
  </layout>

  <!-- Settings -->
  <layout id="settings2" title="Settings 2">
    <widget id="button12" title="Return" next="main"/>
    <widget id="button13" title="Display Text" 
	    action="self.config.placetext = 'window'" group="placetext" />
    <widget id="button14" title="Inject Text" 
	    action="self.config.placetext = 'focus'" group="placetext" />

    <widget id="button22" title="Print Font..." 
	    action="self.on_PrintFontButton_pressed(locals()['widget'])"/>
    <widget id="button23" title=""
	    action="" />
    <widget id="button24" title=""
	    action="" />

    <widget id="button32" title="" 
	    action="" />
    <widget id="button33" title="" 
	    action="" />
    <widget id="button34" title="" 
	    action="" />

    <widget id="button42" title="" 
	    action="" />
    <widget id="button43" title="" 
	    action="" />
    <widget id="button44" title="Prev settings.."  next="settings"  />
  </layout>

  <!-- Words on buttons -->
  <layout id="words" title="Words" action="self.populatebuttons()">
    <widget id="button11" next="main" action="self.accepttitle(widget)"/>
    <widget id="button12" next="main" action="self.accepttitle(widget)"/>
    <widget id="button13" next="main" action="self.accepttitle(widget)"/>
    <widget id="button14" next="main" action="self.accepttitle(widget)"/>
    <widget id="button21" next="main" action="self.accepttitle(widget)"/>
    <widget id="button22" next="main" action="self.accepttitle(widget)"/>
    <widget id="button23" next="main" action="self.accepttitle(widget)"/>
    <widget id="button24" next="main" action="self.accepttitle(widget)"/>
    <widget id="button31" next="main" action="self.accepttitle(widget)"/>
    <widget id="button32" next="main" action="self.accepttitle(widget)"/>
    <widget id="button33" next="main" action="self.accepttitle(widget)"/>
    <widget id="button34" next="main" action="self.accepttitle(widget)"/>
    <widget id="button41" next="main" action="self.accepttitle(widget)"/>
    <widget id="button42" next="main" action="self.accepttitle(widget)"/>
    <widget id="button43" next="main" action="self.accepttitle(widget)"/>
    <widget id="button44" title="Back" next="main" />
  </layout>
</layouts>

