Whilst the library is intended for use as a source code include, it is now compatible with Tailbite. There were problems with those functions taking optional parameters etc.
An important change is that any program using the nxToolbar library in the form of a source code include file must now declare the constant:
Code: Select all
#nxToolbar_USESOURCE
Update: 10 October 2007.
Large toolbar icons would exhibit a nasty dithering effect. This has been fixed thanks to fangbeast who pointed me in the right direction here!
Bug fix: 27 September 2007.
Fixed a damn cursed bug which took me an age to figure out!
The library was inadvertently setting the #CCS_ADJUSTABLE style causing the Windows customising dialogue to show briefly whenever a toolbar was double clicked!
Update: 12 September 2007.
Have added a new command which has no corresponding command in Danilo's original library :
Code: Select all
nxAddTBImage(hTb, hImage)
Hence the addition of the new command.
This command will accept either a SINGLE bitmap image or an icon (both of which can be loaded with Purebasic's LoadImage() etc.) and will add it to the internal lists of images used by the toolbar. In each case the image dimensions must match the toolbar button sizes etc. Use ResizeImage() if you need to.
My advice is to use icons since they usually come armed with a mask for transparency whereas, if you add a bitmap, the library simply uses a 'dummy' mask.
Each new image added with this command is appended to the current list of images and so it's image index will reflect this.
IMPORTANT.
Always add images in the following order :
i) The image strips using the command nxSetTBImage().
ii) Individual custom images (bitmaps or icons) using the command nxAddTBImage().
iii) System icons using the command nxAddTBSysIcons().
Of course, you do not have to add image strips or system icons etc. That is, you can safely leave out any of the above steps i) through iii).
See the example program included with this package which shows how to mix all of the different image types.
Update: 1 feb 2007.
I got fed up with the boring 'standard' tooltips and so have changed the default style and added a function to allow you to change the colours and add a title (with icon) to the tooltips etc. See the 'update 1.2.txt' file for details.
Update: 31 Jan 2007.
Have brought together my original translation and Flype's work into a single package. The download includes full PB source code (ready to use as an 'XincludeFile' etc.) and pre-compiled libraries. Our previous versions were incompatible in that the source code version couldn't readily be Tailbitten and the source attached to the pre-compiled version could not readily be used as an include etc.
Hi,
as a massive fan of Danilo's excellent Toolbar Pro library (written in C, part of the PBOSL package) I use it in just about every application I develop.
However, my latest app, being multithreaded and Unicode compliant, pushed Toolbar Pro to it's limits, and broke it!
The problem is that whilst the lack of Unicode support is easy to get around, Toolbar Pro really isn't threadsafe as it relies upon global arrays and of course Danilo is no longer around to update the library.
I've thus taken the source code, ripped out the bits which caused it not to be threadsafe, and converted it to Purebasic source code.
I've tested it a little and it seems to work in my multithreaded app okay.
Apart from the 'threadsafe' alterations, this really is little more than a direct translation from Danilo's original code and so I take no credit for this. The original code was so well written that translation was easy. (Okay, I fixed a couple of memory leaks, so I'll happily take credit for them! )
The download (below) includes full source and an example. I've also thrown in a little tool which will happily generate mask images suitable for use with the library.
There's no help manual since you can simply use Danilo's original one which is in the PBOSL package. But, I advise a quick scan through the readme.txt file so that you are aware of the differences between the 2 libraries.
I hope it's useful. Download nxToolbar