Recent

Author Topic: Is there any easy way to read the documentation of libraries with embedded docs?  (Read 1159 times)

arraybolt3

  • Newbie
  • Posts: 3
Apologies if this is the wrong portion of the forum to post this in.

From what I've seen it appears CryptoLib4Pascal is the de-facto standard for when you need encryption features in a Lazarus project. Browsing through the code, I'm slowly figuring out how to use it... but am I actually supposed to read the source code to learn how to use the library?

There's documentation in comment form all through the library, which Lazarus appears to recognize - if I declare a variable as being of a type within CryptoLib4Pascal, I can hover over the type specifier and see some info about that type. Does Lazarus have some easy way to read this info (other than hovering over popups, like a documentation browser for this sort of thing)?

wp

  • Hero Member
  • *****
  • Posts: 12476
The comments in CryptoLib4Pascal look like the HelpInsight documentation for Delphi. I read in the help of PasDoc (https://pasdoc.github.io/WritingDocumentation) that it can understand this kind of comments. Therefore, it should be possible to create a help document from these comments which could be converted to a pdf or similar by using additional tools.

I tried to, but PasDoc did not include the comments. I am not very experienced with PasDoc, so very probably I did something wrong. But maybe it's worth a try to further investigate...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8777
  • Programming + Glam Metal + Tae Kwon Do = Me
From what I've seen it appears CryptoLib4Pascal is the de-facto standard for when you need encryption features in a Lazarus project.
It's newer and more maintained than DCPCrypt, but I'm not sure whether to call it the de-facto standard.
Browsing through the code, I'm slowly figuring out how to use it... but am I actually supposed to read the source code to learn how to use the library?
Nope, you have samples and testsfor that.
Does Lazarus have some easy way to read this info (other than hovering over popups, like a documentation browser for this sort of thing)?
F1 works and with the CHM help viewer, it can be synced. But the documentation must be compiled in the first place. A little working but ugly way is to doc FPDoc Editor, maybe to the right of the text editor, it will also sync and change according to where the cursor is, but... see for yourself in the attachment.

arraybolt3

  • Newbie
  • Posts: 3
The PasDoc option sounds promising, but I think I figured out what I'm doing. I'll try out PasDoc if I get confused again.

leledumbo: How are you docking things? I'm using Lazarus 2.2.6 and have a bunch of separate windows that I have positioned just right to kind of simulate a very flexible single window. (KDE Plasma 5.27 is making it really easy thankfully :D)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8777
  • Programming + Glam Metal + Tae Kwon Do = Me
leledumbo: How are you docking things? I'm using Lazarus 2.2.6 and have a bunch of separate windows that I have positioned just right to kind of simulate a very flexible single window. (KDE Plasma 5.27 is making it really easy thankfully :D)
I admit it is one of the toughest decision to make (the winner goes to keeping windows separate, as it's more familiar to Delphi 7 users), but at least it should be made quite clear that docking is readily available out of the box. To have a fully customized docked IDE, install AnchorDockingDsgn and dockedformeditor (sparta_dockedformeditor also exists in 2.2.6, but it's not maintained and will disappear in the next minor/major update, so DON'T install that one) packages. That's all, the rest is up to you. Some people make their layout publicly available, so you can have a quick start instead of docking everything by yourself from scratch.

arraybolt3

  • Newbie
  • Posts: 3
Wow, that's really handy to know, thanks! Hilariously I might choose to keep the "bunch of separate windows" design since it lets me "dock" arbitrary windows into my workflow (i.e., I can put Google Chrome in just the right spot and it just blends in as if it were part of the IDE, letting me readily access online docs), but I'll keep that in mind and maybe experiment with it if separate windows become difficult.

Also, I just want to say, Lazarus is awesome. I'm really enjoying using it and am really thankful for all the work the devs have put into it. :)

 

TinyPortal © 2005-2018