PUREBASIC 3.94
Aim : Make the documentation of a PureBasic Code. ( idea from de JavaDoc )
The jaPBe Pluggin return :
1° Documentation :
All lines outside procedure with ;- everywhere (Grey line in JapBe)
If you want to exclude this line add *** anywhere
Visual() ;- --> Return : Visual()
Visual() ;- Show the Visual --> Return : Visual() ;- Show the Visual
2° Procedures :
Procedure Test() ; Test Procedure
; Input Nothing
; Output Nothing
Messagerequester ("","")
; Documentation inside Procedure
EndProcedure
Return :
Procedure Test() ; Test Procedure
Input Nothing
Output Nothing
3° Constants :
All constants everywhere
Source Code and jaPBe Pluggin http://www.penguinbyte.com/apps/pbwebst ... /PBDoc.zip
PBDoc (jaPBe Pluggin)
Documentation :
PROCEDURE DE PBDOC
#IdentifiantDocumentation="
Procedure.s NettoyageLigneDocProc(Ligne.s) ; Supprime et renvoie ; ;- ;/ au début de la ligne
Procedures RTF
DEBUT DE MON CODE
Case #PB_EventMenu ;- MENU
Case #WM_CLOSE ;- CLOSE WINDOWS
FIN DE MON CODE
Procedures :
Procedure Callback(WindowID, Message, wParam, lParam)
Procedure jaPBe_GetCompleteText()
Procedure.s jaPBe_GetCompleteTextS()
Procedure.s jaPBe_GetCurrentFileName()
Procedure Constante(Ligne.s) ; Renvoie 1 si la ligne est une constante
Procedure DocProc(Ligne.s) ; Renvoie 1 si la ligne est une documentation de procédure
Procedure DocProg(Ligne.s) ; Renvoie 1 si la ligne est une documentation du programme
Procedure DebutProcedure(Ligne.s) ; Renvoie 1 si Ligne est un début de procédure
Procedure FinProcedure(Ligne.s) ; Renvoie 1 si Ligne est une fin de procédure
Procedure.s NettoyageLigneDocProc(Ligne.s) ; Supprime et renvoie ; ;- ;/ au début de la ligne
Procedure.s NettoyageLigneDocProg(Ligne.s) ; Nettoie une ligne de documentation de programme
Procedure PBDoc(File.s) ; Lecture du fichier et génération de la doc dans des variables globales
ProcedureDLL RTF_Color(Gadget, Color.l)
Set the Text color for the Selection in RGB format
ProcedureDLL RTF_FontSize(Gadget, Fontsize.l)
Set Font Size for the Selection in pt
ProcedureDLL RTF_Font(Gadget, FontName.s)
Set Font for the Selection
You must specify a font name, the font doesn't need
to be loaded
ProcedureDLL RTF_Format(Gadget, Flags.l)
Set Format of the Selection. This can be a combination of
the following values:
#CFM_BOLD
#CFM_ITALIC
#CFM_UNDERLINE
#CFM_STRIKEOUT
Procedure RTF_CallBackSave(dwCookie.l, *pbBuff.l, cb.l, *pcb.l)
( Procédure interne )
Cette procédure sert à sauvegarder le contenu de l'éditeur
au format RTF en mémoire (ici dans une chaine).
ProcedureDLL RTF_Save(Gadget,File.s)
Renvoie 1 si succès
Procedure RTF_Print(Gadget.l,docname.s,LeftMargin,RightMargin,TopMargin,BottomMargin)
Procedure for printing contents of a EditorGadget
RTF_Print(PureBasicID of existing EditorGadget, DocName of displayed doc in spooler)
Margin in millimeters
Procedure TexteGros(Texte.s)
Procedure TextePetit(Texte.s)
Constants :
#timeout=5000
#mywm_Plugin_GetCurrentFileName = #wm_user+12
#mywm_Plugin_GetSelection = #wm_user+13
#mywm_Plugin_GetCurrentWord = #wm_user+14
#mywm_plugin_GetCompleteText = #wm_user+15
#mywm_plugin_GetCurrentLine = #wm_user+16
#mywm_plugin_GetCurrentPosition = #wm_user+17
#mywm_Plugin_Cancel = #wm_user+18
#mywm_plugin_DisablejaPBe = #wm_user+19
#mywm_plugin_EnablejaPBe = #wm_user+20
#WMCD_OpenFile = 1
#WMCD_InsertText = 2
#wmCD_ReplaceCompleteText = 3
#wmcd_ReplaceCurrentLine = 4
#wmcd_NewText = 5
#Editor=0
#MenuSave
#MenuPrint
#MenuQuit
#Separateur=#CR$
#TabulationDocProcedure=" "
#IdentifiantDocumentation=";-"
#IdentifiantExclusionDocumentation="***"
(can you work on it in English? (or English also)
Or, is this so that we can add to this plugin. It works fine (how about a resize with gadeget resize to window?).
Thanks
PROCEDURE DE PBDOC
#IdentifiantDocumentation="
Procedure.s NettoyageLigneDocProc(Ligne.s) ; Supprime et renvoie ; ;- ;/ au début de la ligne
Procedures RTF
DEBUT DE MON CODE
Case #PB_EventMenu ;- MENU
Case #WM_CLOSE ;- CLOSE WINDOWS
FIN DE MON CODE
Procedures :
Procedure Callback(WindowID, Message, wParam, lParam)
Procedure jaPBe_GetCompleteText()
Procedure.s jaPBe_GetCompleteTextS()
Procedure.s jaPBe_GetCurrentFileName()
Procedure Constante(Ligne.s) ; Renvoie 1 si la ligne est une constante
Procedure DocProc(Ligne.s) ; Renvoie 1 si la ligne est une documentation de procédure
Procedure DocProg(Ligne.s) ; Renvoie 1 si la ligne est une documentation du programme
Procedure DebutProcedure(Ligne.s) ; Renvoie 1 si Ligne est un début de procédure
Procedure FinProcedure(Ligne.s) ; Renvoie 1 si Ligne est une fin de procédure
Procedure.s NettoyageLigneDocProc(Ligne.s) ; Supprime et renvoie ; ;- ;/ au début de la ligne
Procedure.s NettoyageLigneDocProg(Ligne.s) ; Nettoie une ligne de documentation de programme
Procedure PBDoc(File.s) ; Lecture du fichier et génération de la doc dans des variables globales
ProcedureDLL RTF_Color(Gadget, Color.l)
Set the Text color for the Selection in RGB format
ProcedureDLL RTF_FontSize(Gadget, Fontsize.l)
Set Font Size for the Selection in pt
ProcedureDLL RTF_Font(Gadget, FontName.s)
Set Font for the Selection
You must specify a font name, the font doesn't need
to be loaded
ProcedureDLL RTF_Format(Gadget, Flags.l)
Set Format of the Selection. This can be a combination of
the following values:
#CFM_BOLD
#CFM_ITALIC
#CFM_UNDERLINE
#CFM_STRIKEOUT
Procedure RTF_CallBackSave(dwCookie.l, *pbBuff.l, cb.l, *pcb.l)
( Procédure interne )
Cette procédure sert à sauvegarder le contenu de l'éditeur
au format RTF en mémoire (ici dans une chaine).
ProcedureDLL RTF_Save(Gadget,File.s)
Renvoie 1 si succès
Procedure RTF_Print(Gadget.l,docname.s,LeftMargin,RightMargin,TopMargin,BottomMargin)
Procedure for printing contents of a EditorGadget
RTF_Print(PureBasicID of existing EditorGadget, DocName of displayed doc in spooler)
Margin in millimeters
Procedure TexteGros(Texte.s)
Procedure TextePetit(Texte.s)
Constants :
#timeout=5000
#mywm_Plugin_GetCurrentFileName = #wm_user+12
#mywm_Plugin_GetSelection = #wm_user+13
#mywm_Plugin_GetCurrentWord = #wm_user+14
#mywm_plugin_GetCompleteText = #wm_user+15
#mywm_plugin_GetCurrentLine = #wm_user+16
#mywm_plugin_GetCurrentPosition = #wm_user+17
#mywm_Plugin_Cancel = #wm_user+18
#mywm_plugin_DisablejaPBe = #wm_user+19
#mywm_plugin_EnablejaPBe = #wm_user+20
#WMCD_OpenFile = 1
#WMCD_InsertText = 2
#wmCD_ReplaceCompleteText = 3
#wmcd_ReplaceCurrentLine = 4
#wmcd_NewText = 5
#Editor=0
#MenuSave
#MenuPrint
#MenuQuit
#Separateur=#CR$
#TabulationDocProcedure=" "
#IdentifiantDocumentation=";-"
#IdentifiantExclusionDocumentation="***"
(can you work on it in English? (or English also)
Or, is this so that we can add to this plugin. It works fine (how about a resize with gadeget resize to window?).
Thanks
Intrigued - Registered PureBasic, lifetime updates user
It would rock to have this. What makes it pretty useless for now, though,
is that it can't handle IncludeFiles. Projects with documentation tend to
consist of more than one file. . .
Another suggestion/wish would be an slightly different identification in the
code, more like JavaDoc. @param as lines inside the procedure and the
PBDoc automatically adds the Variable name for the @param out of the
procedure declaration.
It would also be pretty handy if comments directly before the actual
procedure line could be interpreted.
And to make it perfect you could support variable style forms filled with
the content (Name, Comment, Params, Returnvalue) or at least reformat
the output a little, e.g. ProcedureName as bold, description as italic and in
a new paragraph, parameters in a list. . .
I guess that should keep you busy for a while, but it would make this tool
sooo good
[Edit:]
With this code the PBDoc crashes:
http://athecks.com:88/?source=56
is that it can't handle IncludeFiles. Projects with documentation tend to
consist of more than one file. . .
Another suggestion/wish would be an slightly different identification in the
code, more like JavaDoc. @param as lines inside the procedure and the
PBDoc automatically adds the Variable name for the @param out of the
procedure declaration.
It would also be pretty handy if comments directly before the actual
procedure line could be interpreted.
And to make it perfect you could support variable style forms filled with
the content (Name, Comment, Params, Returnvalue) or at least reformat
the output a little, e.g. ProcedureName as bold, description as italic and in
a new paragraph, parameters in a list. . .
I guess that should keep you busy for a while, but it would make this tool
sooo good

[Edit:]
With this code the PBDoc crashes:
http://athecks.com:88/?source=56
Lars
The only problem with troubleshooting is that sometimes the trouble shoots back.
P4 3Ghz, 512MB RAM, Radeon 9600Pro, WinXP Home SP2, PB V4.0
The only problem with troubleshooting is that sometimes the trouble shoots back.
P4 3Ghz, 512MB RAM, Radeon 9600Pro, WinXP Home SP2, PB V4.0