Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Help Plugin

(1/4) > >>

Ceniza:
I would like to inform you I just committed today's work in the help plugin to CVS.

It's still Windows only (HLP and CHM help files) but the idea is to make it crossplatform any time soon.

I'm also getting used to the old code and making some changes here and there.

There have been some bugfixes and now you can sort your helpfiles in the order you want.

When a help file is called without a keyword it'll be launched with the associated application.

The hashmap used in the previous revision was changed to a vector. This can slightly decrease performance for some tasks and increase it for others, but now the help files can be sorted as you like. You shouldn't notice any performance impact because of it.

Any comments are welcomed.

Oh, yeah, why not? A screenshot :)



[edit]
Ok, even better, I just uploaded another CVS binary snapshot with the new help_plugin so you can test it.

This release is 30% bigger but was compiled with optimizations and no debugging (previous releases were compiled with debugging and stripped later). I hope the compiler had really made a good job on it.
[/edit]

darklordsatan:
Looking good son.

Crossplatform? I think that is implicit. I'd try it myself on Linux, but my slackware box isnt available ATM, and Im not able to connect to the cvs to check out how you're doing it (or is it in the "Every now and then Code::Blocks CVS binary snapshots"?)


--- Quote from: Writing online help for wxWidgets applications Tutorial ---
Deciding on a help format
With so many different help formats available, you may be wondering which is best for you. The following clarifies some of the pros and cons, and you can also look at the 'help' sample in the wxWidgets distribution which demonstrates a variety of formats and help controllers.

Unix

If you want all the power of HTML for your help files, then you may consider using plain HTML files on Unix (invoked by wxExtHelpController). However, the formatting of most help files doesn't need to be very complex and so a better approach would be to use the internal wxHTML help system and wxHtmlHelpController. You may have problems using this system under Motif in 256 colour mode, related to the XPM icons used in the viewer, so you could try the simpler wxHelpControllerHtml instead which is still powered by wxHTML.

Accessing help from an application
Sometimes one can rely on wxHelpController being aliased to the standard help system for that platform (wxHTML help for Unix, WinHelp for Windows). To use a different help controller than the standard one, you have to include the file for that controller and create an object using the relevant class name (e.g. 'wxCHMHelpController') rather than simply using 'wxHelpController'. Please see the wxHelpController documentation in the wxWidgets manual for details.

To create and initialize a help controller:

--- Code: ---
  helpController = new wxCHMHelpController;
  helpController->Initialize("myfile");

--- End code ---

To access the contents, use code like the following:

--- Code: ---
  helpController->LoadFile("myapp");
  helpController->DisplayContents();

--- End code ---

To access a particular section, use code like the following:

--- Code: ---
  helpController->LoadFile("myapp");
  helpController->DisplaySection("Diagram cards");

--- End code ---

DisplaySection has different meanings for different help controllers, but for most controllers it does a keyword search. It can also be used to display a particular HTML file within the help file, for example in MS HTML Help.

To clean up as the application is ending:

--- Code: ---
  helpController->Quit();
  delete helpController;

--- End code ---


--- End quote ---

Bourricot:
Nice work  :D.

Ceniza:
Ok, I'm trying to commit the newest help_plugin but CVS is having problems or something. I'll keep trying anyway.

I'll also make another CVS binary snapshot including the latest help_plugin and the changes to get Find working when you open a single file (those are in the "Suggestions before next release" thread).

Now you can use anything you want as help file: HTML, PDF, TXT, ... Anything!, as far as it be associated with some program. There's where the crossplatform help plugin begins.

As usual, more bugfixes, and as usual, again, they're all related to m_LastSel when ListChange is called.

Well, I'll have to try to commit it later, CVS is refusing to work.

Now, time to release the snapshot!

tiwag:
the help-plugin looks nice, but it doesn't work here by me.

the .hlp and .chm file which i've set up are existing on my harddrive and the path is correct,
but somehow does the start command not work.

my system:
WinXP SP2
wxWidgets 2.6.1
CodeBlocks 1.0 cvs - HEAD

screenshots:

configure plugin


launching the help-file


error message(s) after closing CodeBlocks



any hints, what's wrong ?

Navigation

[0] Message Index

[#] Next page

Go to full version