<element_template et_SmartHistoryHeader>
	<SPRITE class="listitem separator" >
	<TEXT class="font_main color_inf_main" left=0 right=0 top=0 bottom=0 text=TEXT >
</element_template>

<element_template et_FindHistory>
	<implementation>
		<property listRowCount value=(0 <= listpos - %*._vlist.first_visible_index && listpos - %*._vlist.first_visible_index < 4 ? listpos - %*._vlist.first_visible_index + 1 : 0)>
		<property isSmart value=(%*.is_smart_item && !%lua.HistoryListFilterString)>
	</implementation>
	<DIV left=0 top=0 w=100% h=100% visible=(%lua.VRStatus == lua.eVRStatus.inactive)>
		<BUTTON class="listitem" onrelease=sc_SelectHistoryAndGo >
			<TEXT txt_history 			class="font_main listitem icon onbtn" text=(L"\fe"+ %*.text) visible=(%*.type != lua.EHistoryTypes.Junction)>
			<TEXT txt_history_street1 	class="font_main listitem icon onbtn" text=(L"\fe"+ %*.street_base) wordwrap=1 visible=(%*.type == lua.EHistoryTypes.Junction)>
			<TEXT txt_history_street2	class="font_main listitem icon onbtn" text=(L"\fe"+ %*.street_crossing) wordwrap=1 visible=(%*.type == lua.EHistoryTypes.Junction)>
		</BUTTON>
		<SPRITE class="icon_list" z=1001 iconmodel="*.icon" iconindex=(%*.type == lua.EHistoryTypes.Poi ? 2 : 1) hueshift=%lua.iconhue visible=(!isSmart)>
		<SPRITE class="icon_list" z=1001 bmp=("ico_D_smart" + (min(index + 1, 3)) + "_sml.bmp#3") visible=isSmart>
		<BUTTON class="button_remove" onrelease=sc_et_ManageHistoryDel_OnRelease>
		
		<SPRITE class="icon_center poi_provider_overlay" left=11% top=25% z=1111 iconid=(%exists:mydata.history.list[%*.real_index].poi ? %mydata.history.list[%*.real_index].poi.provider_icon : 0) visible=(!isSmart && %*.type == lua.EHistoryTypes.Poi)>
	</DIV>
	<DIV left=0 top=0 w=100% h=100% visible=(%lua.VRStatus != lua.eVRStatus.inactive)>
		<BUTTON class="listitem icon" onrelease='sc_VRModeToClick() sc_SelectHistoryAndGo()'>
			<TEXT class="font_main listitem icon" left=10% text=(L"\fe"+ %*.text)>
		</BUTTON>
		<SPRITE class="icon hue" z=50 left=2% bmp=("ico_VR_list" + listRowCount + ".bmp#3") phase=(%vr.ui.phase_running ? 0 : 2)>
	</DIV>
</element_template>

<layer ui_FindHistory z=30>
	<DIV class="list vr">
		<SPRITE class="list_panel">
		<LIST2 lstFH_History class="list_control" SMOOTHSCROLLING>
			<LISTMODEL listmodel="ui.lm_smartHistoryList"         element_template="et_FindHistory">
				<SEPARATOR insert_at=(sc_GetHistoryHeaderIndexes(%ui.lm_smartHistoryList.size, %lua.HistoryListFilterString)) element_template=et_SmartHistoryHeader TEXT=(%ui.headerSmartHistoryList[index].text) visible=(%lua.VRStatus == lua.eVRStatus.inactive && !%lua.HistoryListFilterString)>
			</LISTMODEL>
			<VSMARTSCROLL>
			<WHEEL>
			<BUTTON class="btn_scrollup list">
			<BUTTON class="btn_scrolldown list">
			<OBSERVER xxx boolmodel="ui.PARENT.is_grabbed" onselect=sc_IncPhaseCounter ondeselect='sc_VRListenReadOutListMode(0, "id_struct_line_number", sc_VRPromptGeneratorHistory)' START="NO_TRIGGER">
			<DIV vrtext="VRTEXT_line 1" onvr_activate='sc_SelectHistoryAndGoVR(MODEL.ui.PARENT.first_visible_index())'>
			<DIV vrtext="VRTEXT_line 2" onvr_activate='sc_SelectHistoryAndGoVR(MODEL.ui.PARENT.first_visible_index() + 1)'>
			<DIV vrtext="VRTEXT_line 3" onvr_activate='sc_SelectHistoryAndGoVR(MODEL.ui.PARENT.first_visible_index() + 2)'>
			<DIV vrtext="VRTEXT_line 4" onvr_activate='sc_SelectHistoryAndGoVR(MODEL.ui.PARENT.first_visible_index() + 3)'>
			<DIV vrtext="VRTEXT_up"     onvr_activate={sc_ScrollVRListUp(PARENT)}/>
			<DIV vrtext="VRTEXT_down"   onvr_activate={sc_ScrollVRListDown(PARENT)}/>
			<DIV vrtext="VRTEXT_top"    onvr_activate={sc_ScrollVRListTop(PARENT)}/>
			<DIV vrtext="VRTEXT_middle" onvr_activate={sc_ScrollVRListMiddle(PARENT)}/>
			<DIV vrtext="VRTEXT_bottom" onvr_activate={sc_ScrollVRListBottom(PARENT)}/>
			<DIV vrtext="VRTEXT_read out" onvr_activate='sc_VRListenReadOutListMode(1, "id_struct_line_number", sc_VRPromptGeneratorHistory)'/>
		</LIST2>
	</DIV>
</layer>

<layer ui_FindHistory_footer z=35>
	<DIV class="footer" visible=(%lua.VRStatus == lua.eVRStatus.inactive)>
		<FOOTERBUTTON class="btn_footer right" x=66% top=0 text="Filter"       icon_hueshift=%lua.iconhue iconspr="ico_footer_filter.bmp#3" visible=(!%lua.HistoryListFilterString)  onrelease=sc_btnFH_Filter>
		<FOOTERBUTTON class="btn_footer right" x=66% top=0 text="Clear Filter" icon_hueshift=%lua.iconhue iconspr="ico_footer_filter.bmp#3" visible=%lua.HistoryListFilterString  onrelease=sc_ChearFilterString>
	</DIV>
</layer>
