Par contre, je ne sais pas si il va fonctionner chez tout le monde, car il se base sur un fichier texte qui s'appelle PBFunctionListing.txt, contenu dans le dossier "Compilers", et je ne sais pas si il est généré par PureBasic ou par jaPBe.
Donc, vérifiez si vous l'avez, avant de me dire que ça ne fonctionne pas

Alors c'est simple, ce fichier regroupe toutes les commandes, y compris celles incluses dans les librairies utilisateur, avec une description, (en anglais, malheureusement), si le programmeur en a mis une.
Pour l'utiliser, vous ouvrez le fichier, et toutes les fonctions s'affichient dans la liste. Si vous cliquez sur un des petits boutons à gauche, seules les fonctions dont le nom commence par le lettre choisie s'affichent.
Voilà le code:
Code : Tout sélectionner
Structure PB_FONCTIONS
Fonction.s
Description.s
EndStructure
NewList Type.PB_FONCTIONS()
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Editor_0
#Button_Open
#Button_Quit
#BtnA
#BtnB
#BtnC
#BtnD
#BtnE
#BtnF
#BtnG
#BtnH
#BtnI
#BtnJ
#BtnK
#BtnL
#BtnM
#BtnN
#BtnO
#BtnP
#BtnQ
#BtnR
#BtnS
#BtnT
#BtnU
#BtnV
#BtnW
#BtnX
#BtnY
#BtnZ
#BtnAll
EndEnumeration
Declare FillList(Lettre.s)
Declare LoadFile(Index, Path$)
Declare CallBack(Hnd,Mess,wParam,lParam)
Declare Open_Window_0()
Procedure LoadFile(Index, Path$)
ClearList(Type())
If ReadFile(Index,Path$)
Tmp$ = ReadString()
Repeat
Tmp$ = ReadString()
Pos = FindString(Tmp$," - ",0)
If Pos = 0
StrLeft$ = Tmp$
StrRight$ = ""
Else
StrLeft$ = Left(Tmp$,Pos)
StrRight$ = Right(Tmp$,Len(Tmp$)-(Pos+1))
EndIf
AddElement(Type())
Type()\Fonction = StrLeft$
Type()\Description = StrRight$
Until Eof(Index)
CloseFile(Index)
FillList("")
EndIf
EndProcedure
Procedure FillList(Lettre.s)
ClearGadgetItemList(#Editor_0)
If Lettre = ""
ForEach Type()
AddGadgetItem(#Editor_0,-1,Type()\Fonction+Chr(10)+Type()\Description)
Next
Else
ForEach Type()
If Left(Type()\Fonction,1) = Lettre
AddGadgetItem(#Editor_0,-1,Type()\Fonction+Chr(10)+Type()\Description)
EndIf
Next
EndIf
EndProcedure
Procedure CallBack(Hnd,Mess,wParam,lParam)
WH = WindowHeight() : WW = WindowWidth()
Select Mess
Case #WM_SIZE
ResizeGadget(#Button_Quit, WW-80, WH-35, 75, 30)
ResizeGadget(#Button_Open, WW-160, WH-35, 75, 30)
ResizeGadget(#Editor_0, 0, 0, WW, WH-40)
ResizeGadget(#BtnA,5,WH-35,15,15)
ResizeGadget(#BtnN,5,WH-20,15,15)
ResizeGadget(#BtnB,20,WH-35,15,15)
ResizeGadget(#BtnO,20,WH-20,15,15)
ResizeGadget(#BtnC,35,WH-35,15,15)
ResizeGadget(#BtnP,35,WH-20,15,15)
ResizeGadget(#BtnD,50,WH-35,15,15)
ResizeGadget(#BtnQ,50,WH-20,15,15)
ResizeGadget(#BtnE,65,WH-35,15,15)
ResizeGadget(#BtnR,65,WH-20,15,15)
ResizeGadget(#BtnF,80,WH-35,15,15)
ResizeGadget(#BtnS,80,WH-20,15,15)
ResizeGadget(#BtnG,95,WH-35,15,15)
ResizeGadget(#BtnT,95,WH-20,15,15)
ResizeGadget(#BtnH,110,WH-35,15,15)
ResizeGadget(#BtnU,110,WH-20,15,15)
ResizeGadget(#BtnI,125,WH-35,15,15)
ResizeGadget(#BtnV,125,WH-20,15,15)
ResizeGadget(#BtnJ,140,WH-35,15,15)
ResizeGadget(#BtnW,140,WH-20,15,15)
ResizeGadget(#BtnK,155,WH-35,15,15)
ResizeGadget(#BtnX,155,WH-20,15,15)
ResizeGadget(#BtnL,170,WH-35,15,15)
ResizeGadget(#BtnY,170,WH-20,15,15)
ResizeGadget(#BtnM,185,WH-35,15,15)
ResizeGadget(#BtnZ,185,WH-20,15,15)
ResizeGadget(#BtnAll,200,WH-35,30,30)
SendMessage_(GadgetID(#Editor_0),#LVM_SETCOLUMNWIDTH,0,WW/3)
SendMessage_(GadgetID(#Editor_0),#LVM_SETCOLUMNWIDTH,1,(WW/3)*2)
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 530, 420, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered , "PB-Functions")
WH = WindowHeight() : WW = WindowWidth()
If CreateGadgetList(WindowID())
ListIconGadget(#Editor_0,0,0,WW,WH-40,"Fonction",WW/3,#PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
AddGadgetColumn(#Editor_0,2,"Description",(WW/3)*2)
ButtonGadget(#Button_Quit, WW-80, WH-35, 75, 30, "Quitter")
ButtonGadget(#Button_Open, WW-160, WH-35, 75, 30, "Ouvrir")
ButtonGadget(#BtnA,5,WH-35,15,15,"A")
ButtonGadget(#BtnN,5,WH-20,15,15,"N")
ButtonGadget(#BtnB,20,WH-35,15,15,"B")
ButtonGadget(#BtnO,20,WH-20,15,15,"O")
ButtonGadget(#BtnC,35,WH-35,15,15,"C")
ButtonGadget(#BtnP,35,WH-20,15,15,"P")
ButtonGadget(#BtnD,50,WH-35,15,15,"D")
ButtonGadget(#BtnQ,50,WH-20,15,15,"Q")
ButtonGadget(#BtnE,65,WH-35,15,15,"E")
ButtonGadget(#BtnR,65,WH-20,15,15,"R")
ButtonGadget(#BtnF,80,WH-35,15,15,"F")
ButtonGadget(#BtnS,80,WH-20,15,15,"S")
ButtonGadget(#BtnG,95,WH-35,15,15,"G")
ButtonGadget(#BtnT,95,WH-20,15,15,"T")
ButtonGadget(#BtnH,110,WH-35,15,15,"H")
ButtonGadget(#BtnU,110,WH-20,15,15,"U")
ButtonGadget(#BtnI,125,WH-35,15,15,"I")
ButtonGadget(#BtnV,125,WH-20,15,15,"V")
ButtonGadget(#BtnJ,140,WH-35,15,15,"J")
ButtonGadget(#BtnW,140,WH-20,15,15,"W")
ButtonGadget(#BtnK,155,WH-35,15,15,"K")
ButtonGadget(#BtnX,155,WH-20,15,15,"X")
ButtonGadget(#BtnL,170,WH-35,15,15,"L")
ButtonGadget(#BtnY,170,WH-20,15,15,"Y")
ButtonGadget(#BtnM,185,WH-35,15,15,"M")
ButtonGadget(#BtnZ,185,WH-20,15,15,"Z")
ButtonGadget(#BtnAll,200,WH-35,30,30,"Tout")
EndIf
EndIf
EndProcedure
Open_Window_0()
SetWindowCallback(@CallBack())
Chemin$ = Space(256)
GetCurrentDirectory_(#MAX_PATH,@Chemin$)
If Right(Chemin$,1)<>"\"
Chemin$+"\"
EndIf
Repeat
Select WaitWindowEvent()
Case #PB_EventGadget
If EventGadgetID() >=#BtnA And EventGadgetID()<=#BtnZ
FillList(GetGadgetText(EventGadgetID()))
EndIf
Select EventGadgetID()
Case #Editor_0
Case #Button_Open
File$ = OpenFileRequester("Ouvrir un fichier",Chemin$+"PBFunctionListing.txt","Text file|*.txt|All Files|*.*",0)
LoadFile(0,File$)
Case #Button_Quit : quit = 1
End
Case #BtnAll
FillList("")
EndSelect
Case #PB_EventCloseWindow : quit = 1
EndSelect
Until quit = 1
End

Chris
