Recent

Author Topic: LazHelp, a help system written in and for Lazarus  (Read 22855 times)

Bad Sector

  • New Member
  • *
  • Posts: 47
    • Runtime Terror
LazHelp, a help system written in and for Lazarus
« on: March 18, 2011, 05:42:03 am »
Hi all,

I've just uploaded at GitHub a new project of mine called LazHelp. LazHelp is a hypertext help system written in LCL/Lazarus which can be used to add an in-program help site. Since it is written in LCL it should, in theory, work everywhere Lazarus works (in practice i've just tested in on Mac OS X/Carbon and it crashes due to some TCanvas/clipping rect issue, but i'm using an old nightly build there which might be the reason).

With LazHelp one can write a help site (a bunch of help pages) using the included editor and use it from his program to show the pages in a panel (TLazHelpViewer), popup box (TLazHelpPopupViewer) or window (TLazHelpWindowedViewer). The panel and popup viewers can redirect their links to an optionally defined windowed viewer.

Here is how the windowed viewer looks like (showing the help from the LazHelp Editor which also contains the documentation for making help sites):

(http://dl.dropbox.com/u/5698454/lhwin.png)

The windowed viewer can also be registered as a "Help Manager" to handle context and keyword queries (show pages based on the HelpContext or HelpKeyword attributes of controls).

You can find it here with links to source downloads (and a windows binary of the editor which can be used to see how the help system behaves).

The license for the components and controls is zlib.
Kostas "Bad Sector" Michalopoulos
Runtime Terror

Leledumbo

  • Hero Member
  • *****
  • Posts: 8273
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LazHelp, a help system written in and for Lazarus
« Reply #1 on: March 18, 2011, 06:44:14 am »
Kinda cool, I'll have to take a look at it. You seem to have your own syntax (a mix of RTF and HTML?) so it's another thing to learn.

Sora-Kun

  • Full Member
  • ***
  • Posts: 162
  • I can smell your presence ...
    • Sora-Kun
Re: LazHelp, a help system written in and for Lazarus
« Reply #2 on: March 18, 2011, 12:14:56 pm »
Hi,
  Thanks a lot ! It's very helpful !
Cheers !
if nothing suites you, make it your self!
The Revolution, Genesis. The next generation IDE.
If you want to help, PM me.

Made in Lazarus.
Soon, in The WWW.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: LazHelp, a help system written in and for Lazarus
« Reply #3 on: March 18, 2011, 02:33:00 pm »
i've just tested in on Mac OS X/Carbon and it crashes due to some TCanvas/clipping rect issue, but i'm using an old nightly build there which might be the reason)

Here's information about Mac's native help support. Can you integrate with it?

http://web.me.com/macpgmr/ObjP/MacXPlatform_Part8.html#Help

Thanks.

-Phil

fredycc

  • Sr. Member
  • ****
  • Posts: 265
Re: LazHelp, a help system written in and for Lazarus
« Reply #4 on: March 18, 2011, 03:04:19 pm »
Very nice work, thanks.  ;D

regards.

Peter F

  • New Member
  • *
  • Posts: 13
Re: LazHelp, a help system written in and for Lazarus
« Reply #5 on: March 18, 2011, 04:35:52 pm »
Wonderfull! Thanks!

Cheers,

Peter

Bad Sector

  • New Member
  • *
  • Posts: 47
    • Runtime Terror
Re: LazHelp, a help system written in and for Lazarus
« Reply #6 on: March 18, 2011, 07:30:10 pm »
Here's information about Mac's native help support. Can you integrate with it?

http://web.me.com/macpgmr/ObjP/MacXPlatform_Part8.html#Help

I'm not sure how possible it is to integrate with Mac OS X's help. To do that i'll need the ability to hook into the calls that would otherwise show Mac's help system and write some sort of search that gives back the results to the Help menu (for the realtime search).

While i might do these at some point in the future, in the meanwhile i'm more interested in having it work without crashing. The next part would be to make it look more Mac-like than it does right now, although i'm not sure how possible that is without Cocoa support.
Kostas "Bad Sector" Michalopoulos
Runtime Terror

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: LazHelp, a help system written in and for Lazarus
« Reply #7 on: March 18, 2011, 07:40:42 pm »
Have you checked to see whether the Lazarus help system works yet on Mac? The last time I checked I could not get the example even to work:

http://bugs.freepascal.org/view.php?id=17866


I guess the problem with any non-native help system on Mac is that users generally expect help to look and behave and be accessible in the same way with Mac software. Have you gone through various programs on Mac to see whether any programs use their own help viewer? If not, that should be a signal on what the normal way of doing help is on Mac.

The Mac native system also supports features that might be a lot of work to support in a custom viewer, such as video. If you look at the Xcode 4 help, I believe there are videos embedded in it. Also, the native system obviously supports localization.

Maybe another approach you could take would be simply to write a little converter that takes your editor's HTML and adds the tags and what-not that make it Mac-friendly. Then just use the Mac help viewer.

Thanks.

-Phil



nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
Re: LazHelp, a help system written in and for Lazarus
« Reply #8 on: March 18, 2011, 08:20:20 pm »
Work like a charm in ArchLinux..Thanx a lot :))) :)
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

Bad Sector

  • New Member
  • *
  • Posts: 47
    • Runtime Terror
Re: LazHelp, a help system written in and for Lazarus
« Reply #9 on: March 18, 2011, 08:26:31 pm »
I guess the problem with any non-native help system on Mac is that users generally expect help to look and behave and be accessible in the same way with Mac software. Have you gone through various programs on Mac to see whether any programs use their own help viewer? If not, that should be a signal on what the normal way of doing help is on Mac.

The Mac native system also supports features that might be a lot of work to support in a custom viewer, such as video. If you look at the Xcode 4 help, I believe there are videos embedded in it. Also, the native system obviously supports localization.

I have a bunch of apps that use custom help viewers (or just opening some text file or pdf file), although most of them are cross-platform apps.

I'm not very concerned about following exactly the Mac style since from what i've seen this is a lost cause with Lazarus, unless some features are added, like different "versions" of a form per widgetset (the expected style and layout is different under Windows, GNOME and Mac OS X for example).

LazHelp doesn't provide much features, but this isn't the goal. Instead i want something simple that a) works and b) works across platforms, in that order. Currently the best way with Lazarus (and many other cross platform applications) is to open a help site in the browser. This is good (and i've written a tool to assist in that) but it has it's own problems and limitations.

(as a sidenote, while generally i like Mac OS X, i'm not sure i like its help system interface)

Quote
Maybe another approach you could take would be simply to write a little converter that takes your editor's HTML and adds the tags and what-not that make it Mac-friendly. Then just use the Mac help viewer.


Writing a HTML exporter for the format that LazHelp currently uses should be trivial since the document structure is very HTML-like and is something i'm planning to do. However that would be far from cross-platform since people will need to have special code for Mac. Although if someone uses Lazarus to make Mac apps which behave as Mac as possible, he'll already have such issues (in a Mac app of mine i had a "Macize" procedure which did stuff like changing properties of some controls -removing borders, etc- and converting Ctrl+<blah> shortcuts to Command+<blah> :-P).

But as i said, having "proper" Mac OS X support is rather low in my priorities. Having it work without crashing is much more important :-). And since the Carbon widgetset is far from stable, i'm not sure if the crashing issue is in my code or the widgetset code. I'll need to checkout from the svn and see if i can replicate the crash with a simpler program.
Kostas "Bad Sector" Michalopoulos
Runtime Terror

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: LazHelp, a help system written in and for Lazarus
« Reply #10 on: March 18, 2011, 08:53:06 pm »
Fair enough.

Sounds like you're well aware of the issues and understand how quickly the idea of a cross-platform UI breaks down. In one of my projects, I convert the forms for use on Mac whenever changes are made to them, using this converter and the -m -s switches:

http://web.me.com/macpgmr/XDev/XDevStatus.html

That way it's completely automatic.

Although now I'm working primarily using FPC's Objective Pascal dialect with Xcode and Cocoa. That allows targeting of iOS too.

Thanks.

-Phil

Hydexon

  • Full Member
  • ***
  • Posts: 166
Re: LazHelp, a help system written in and for Lazarus
« Reply #11 on: March 18, 2011, 11:14:19 pm »
Only for curiosity, the project works with FpGUI?
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

Hydexon

  • Full Member
  • ***
  • Posts: 166
Re: LazHelp, a help system written in and for Lazarus
« Reply #12 on: March 18, 2011, 11:17:18 pm »
Hmm, like the yer' old WinHelp what all remember from the Windows 3.1 Operating Systems.

Time ago, i written and help system using the IPro Components (Because im lazy to code using the included Laz Components instead create my owns :D)
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

Bad Sector

  • New Member
  • *
  • Posts: 47
    • Runtime Terror
Re: LazHelp, a help system written in and for Lazarus
« Reply #13 on: March 19, 2011, 05:37:22 am »
I fixed the Mac OS X issues (by working around them... but still thats the best i could do given the state of the Carbon widgetset). So LazHelp is usable in Windows, GTK+ and Mac OS X. Also i tweaked the appearance a bit in these last two platforms.

Here is an image showing the LazHelp Editor's help window under Windows, Mac OS X and GTK+ 2.

@Hydexon:
It probably wont work with fpGUI since the fpGUI LCL backend is in prealpha stage.
Kostas "Bad Sector" Michalopoulos
Runtime Terror

davesimplewear

  • Sr. Member
  • ****
  • Posts: 307
    • Davids Freeware
Re: LazHelp, a help system written in and for Lazarus
« Reply #14 on: March 22, 2011, 03:57:08 am »
 :D :D works good, used to uses jans Freeware Cheetah in windows, been looking for a simple but neat help system, this really hits the spot, many thanks for your hard work :D :D

Regards
dave
All things considered insanity seems the best option

 

TinyPortal © 2005-2018