-
- analyse_menu = wx.Menu()
- analyse_menu.Append(ID_Freq, u"Fréquences")
- analyse_menu.Append(ID_Chi2, u"Chi2")
- #analyse_menu.Append(ID_Student, u"t de Student")
- menu_classif = wx.Menu()
- menu_classif.Append(ID_CHDAlceste, u"Méthode Alceste")
- menu_classif.Append(ID_CHDSIM, u"Par matrice des distances")
- analyse_menu.AppendMenu(-1, u"Classification", menu_classif)
- analyse_menu.Append(ID_AFCM, u"AFCM")
- analyse_menu.Append(ID_SIMI, u"Analyse de similitudes")
+ matrix_menu = wx.Menu()
+ matanalyses = [[ID_Freq, _(u"Frequencies").decode('utf8'), 'freq'],
+ [ID_Freq, _(u"Multiple Frequencies").decode('utf8'), 'freqmulti'],
+ [ID_Chi2, _(u"Chi2").decode('utf8'), 'chi2'],
+ {'name' : _(u"Clustering").decode('utf8'),
+ 'content' : [[ID_CHDReinert, _(u"Reinert's Method").decode('utf8'), 'reinertmatrix']]},
+ [ID_SIMI, _(u"Similarities Analysis").decode('utf8'), 'simimatrix'],
+ [ID_proto, _(u"Prototypical Analysis").decode('utf8'), 'proto'],
+ [ID_Splitfromvar, _(u"Split from variable").decode('utf8'), 'subcorpusmeta'],
+ ]
+
+ for analyse in matanalyses :
+ if not isinstance(analyse, dict) :
+ item = wx.MenuItem(matrix_menu, analyse[0], analyse[1])
+ item.SetBitmap(self.images_analyses.get(analyse[2], wx.EmptyBitmap(16,16)))
+ matrix_menu.AppendItem(item)
+ else :
+ nmenu = wx.Menu()
+ for subana in analyse['content'] :
+ item = wx.MenuItem(nmenu, subana[0], subana[1])
+ item.SetBitmap(self.images_analyses.get(subana[2], wx.EmptyBitmap(16,16)))
+ nmenu.AppendItem(item)
+ matrix_menu.AppendMenu(-1, analyse['name'], nmenu)
+ #item = wx.MenuItem(matrix_menu, ID_Freq, _(u"Frequencies").decode('utf8'))
+ #item.SetBitmap(self.images_analyses['freq'])
+ #matrix_menu.AppendItem(item)
+ #matrix_menu.Append(ID_Freq, _(u"Frequencies").decode('utf8'))
+ #item = wx.MenuItem(matrix_menu, ID_Freq, _(u"Multiple Frequencies").decode('utf8'))
+ #item.SetBitmap(self.images_analyses['freqmulti'])
+ #matrix_menu.Append(ID_FreqMulti, _(u'Multiple frequencies').decode('utf8'))
+ #matrix_menu.AppendItem(item)
+ #matrix_menu.Append(ID_Chi2, _(u"Chi2").decode('utf8'))
+ #matrix_menu.Append(ID_Student, u"t de Student")
+ #menu_classif = wx.Menu()
+ #menu_classif.Append(ID_CHDReinert, _(u"Reinert's Method").decode('utf8'))
+ #menu_classif.Append(ID_CHDSIM, u"Par matrice des distances")
+ #matrix_menu.AppendMenu(-1, _(u"Clustering").decode('utf8'), menu_classif)
+ #matrix_menu.Append(ID_AFCM, u"AFCM")
+ #matrix_menu.Append(ID_SIMI, _(u"Similarities Analysis").decode('utf8'))
+ #matrix_menu.Append(ID_proto, _(u"Prototypical Analysis").decode('utf8'))