%include;css %include;hed %message_to_wizard;
%include;perso_utils %if;not cancel_links; %include;menubar %end; %define;implex1(xx) onmouseover="over1('xx')" onmouseout="out1('xx')" %nn; %end;

%nn; %apply;a_of_b_gr_eq_lev%with; [*descendants]%nn; %and; %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname; %if;(alias != "") (%alias;)%end; %end;

%if;not cancel_links; %include;buttons %end; %let;birth_symbol;%if;(bvar.birth_symbol != "")%bvar.birth_symbol;%else;°%end;%in; %let;death_symbol;%if;(bvar.death_symbol != "")%bvar.death_symbol;%else;†%end;%in; %let;l_v0;%if;(evar.v > max_desc_level+1)%expr(max_desc_level + 1)%else;%evar.v;%end;%in; %let;l_v;%if;(bvar.max_desc_level = "" or bvar.max_desc_level > l_v0)%l_v0;%else;%bvar.max_desc_level;%end;%in; %let;l_max_dates;%if;(bvar.max_dates != "")%bvar.max_dates;%else;200%end;%in; %let;l_url;%prefix;m=D&t=D&v=%l_v;&maxv=%evar.maxv;&marriage=%evar.marriage;&sosa=%evar.sosa;&xy=%evar.xy;&sib=%evar.sib;&%in; %let;l_url1;%prefix;m=A&t=T&t1=HT&v=5;marriage=%evar.marriage;&sosa=%evar.sosa;&xy=%evar.xy;&sib=%evar.sib;&%in; %define;togen()

%if;(evar.only != "on") %apply;togend(l_v) %else; [*generation/generations]0 %l_v; %end; %if;(evar.v>l_v)%sp;(max)%end;

%end; %define;desc1(z1,z2,z3,z4,curlev,maxlev,sp_index) %let;l1;%if;(z3z4 = "00" or z3z4 = "01")  ┊%else;   %end;%in; %let;l2; %if;(curlev != 0) %if;(z2 = 0) %if;(z4 = 1)%l1;┗%elseif;(z4 = 0)%l1;┣%end;%if;(child_cnt < 10)━%end;%nn; %else; %if;(z4 = 1)%l1;└%elseif;(z4 = 0)%l1;├%end;%if;(child_cnt < 10)─%end;%nn; %end; %end; %in; %let;zl1; %if;(curlev != 0) %if;(z2 = 0) %if;(z4 = 1)z1%l1; %else;z1%l1;┃%end; %else; %if;(z4 = 1)z1%l1; %else;z1%l1;│%end; %end; %end; %in; %let;zl2;%sex;%in; %if;(has_families) %let;l21; %if;(curlev != 0) %if;(not cancel_links) %child_cnt;%nn; %else; %child_cnt;%nn; %end; %end; %in; %let;l22; %if;(browsing_with_sosa_ref and has_sosa) %if;(has_siblings)▶%else;▷%end; %end; %in; %foreach;family; %let;l211;%if;(is_male)━%else;─%end;%in; %let;l212;%if;(is_male)%if;(curlev < maxlev and has_children)┳%else;━%end;%else;%if;(curlev < maxlev and has_children)┬%else;─%end;%end;%in; %let;ifam;%family.index;%in; %let;zl3;%if;(family_cnt = nb_families)1%else;0%end;%in; %if;(nb_families > 1) %let;l3; %if;(curlev != 0 and family_cnt > 1) %if;(z2 = 0) %if;(z4 = 1)%l1; %elseif;(z4 = 0)%l1;┃%end;%if;(child_cnt <10) %end;%child_cnt;%nn; %else; %if;(z4 = 1)%l1; %elseif;(z4 = 0)%l1;│%end;%if;(child_cnt <10) %end;%child_cnt;%nn; %end; %else; %l2;%l21;%nn; %end; %in; z1%l3;%nn; %if;(family_cnt>0) %foreach;sorted_listc_item; %if;(item.1=index)%incr_count;%end; %end; %if;(count>0 and not cancel_links) %let;sss;i_%index;%in; %apply;letter(family_cnt)%nn; %else; %apply;letter(family_cnt) %end; %if;(spouse.is_descendant and not cancel_links) %let;sss;is_%index;_%family.index;%in; %l212;%nn; %else; %l212;%nn; %end; %l22;%nn; %end; %else; z1%l2;%l21;%l211;%nn; %if;(spouse.is_descendant and not cancel_links) %let;sss;is_%index;_%family.index;%in; %l212;%nn; %else; %l212;%nn; %end; %l22; %end; %apply;add_in_sorted_list(index) %apply;add_in_sorted_listc(index) %if;(family_cnt > 1) %self;%nn; %elseif;(not cancel_links) %self; %dates;%if;(self.title!=""), %self.title;%end;%nn; %else; %self; %dates;%if;(self.title!=""), %self.title;%end;%nn; %end; %sp;&%if;(on_marriage_date != "")%marriage_date.prec;%marriage_date.year;%end;%sp; %if;(not cancel_links) %spouse; %spouse.dates;%if;(spouse.title!=""), %spouse.title;%end;%nn; %else; %spouse; %spouse.dates;%if;(spouse.title!=""), %spouse.title;%end;%nn; %end; %if;(spouse.first_name!="?" and spouse.surname!="?" and not spouse.is_descendant) %apply;add_in_sorted_list(spouse.index) %end; %if;(spouse.is_descendant and evar.implx="") %if;(not cancel_links) %let;sss;is_%index;_%family.index;%in; %sp;(==)%sp; %else; %sp;(==)%sp; %end; %end;
%if;(curlev < maxlev) %reset_count; %foreach;sorted_listb_item; %if;(item.1=ifam)%incr_count;%end; %end; %reset_count1; %foreach;sorted_listc_item; %if;(item.1=index)%incr_count1;%end; %end; %if;has_children; %foreach;child; %reset_count2; %foreach;sorted_listc_item; %if;(item.1=child.index)%incr_count2;%end; %end; %if;(count=0 or count1=0 or count2=0 or evar.implx="") %let;zl4;%if;(child_cnt = nb_children)1%else;0%end;%in; %apply;desc1(zl1,zl2,zl3,zl4,curlev+1,maxlev,spouse.index) %else; %apply;desc2(zl1,zl2,zl3,zl4,curlev+1,maxlev,spouse.index) %end; %end; %end; %end; %apply;add_in_sorted_listb(ifam) %end; %else; %let;l23; %if;(curlev != 0) %if;(not cancel_links) %child_cnt;%nn; %else; %child_cnt;%nn; %end; %end; %in; %let;l231;%if;(is_male)━%elseif(is_female)─%else;┈%end;%in; %let;l24; %if;(browsing_with_sosa_ref and has_sosa) %if;(has_siblings)◀%else;◁%end; %end; %in; z1%l2;%l23;%l231;%l24;%nn; %reset_count; %foreach;sorted_listc_item; %if;(item.1=index)%incr_count;%end; %end; %if;(count>0 and not cancel_links) %let;sss;i_%index;%in; %l231;%nn; %else; %l231;%nn; %end; %apply;add_in_sorted_list(index) %apply;add_in_sorted_listc(index) %if;(not cancel_links) %self; %dates;%nn; %else; %self; %dates;%nn; %end;
%end; %end; %define;desc2(z1,z2,z3,z4,curlev,maxlev,sp_index) %let;l1;%if;(z3z4 = "00" or z3z4 = "01")  ┊%else;   %end;%in; %let;l2; %if;(curlev != 0) %if;(z2 = 0) %if;(z4 = 1)%l1;┗%elseif;(z4 = 0)%l1;┣%end;%if;(child_cnt < 10)━%end;%nn; %else; %if;(z4 = 1)%l1;└%elseif;(z4 = 0)%l1;├%end;%if;(child_cnt < 10)─%end;%nn; %end; %end; %in; %let;zl1; %if;(curlev != 0) %if;(z2 = 0) %if;(z4 = 1)z1%l1; %else;z1%l1;┃%end; %else; %if;(z4 = 1)z1%l1; %else;z1%l1;│%end; %end; %end; %in; %let;zl2;%sex;%in; %let;l231;%if;(is_male)━%elseif(is_female)─%else;┈%end;%in; z1%l2; %( when there is an offset between implex generations, some descendants may be missing %) %( case: first occurence at generation n is married to generation n-1 spouse and has children %) %( these children will not appear even though asking for desc up to generation n %) %if;(not cancel_links) %let;sss;i_sp_index%in; %sp;(==)%sp; %else; %sp;(==)%sp; %end;
%end; %mark_descendants; %empty_sorted_list; %(persons %) %empty_sorted_listb; %( families %) %empty_sorted_listc; %( descendnats %) %apply;togen()

%apply;desc1(" 0",sex,"0","0","0",l_v,0)

%reset_count; %foreach;sorted_list_item; %incr_count; %end;

[*total][:] %apply;desc_count(max_desc_level) [descendants] (%count; [person/persons]1 [with] [spouse/spouses]1) %include;trl %include;copyr

%include;js