Toolbar Wizard

Just starting out? Need help? Post your questions and find answers here.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Toolbar Wizard

Post by collectordave »

Toolbar Wizard Ver 0.1

This is a start on programming a toolbar wizard.

You visually design your toolbar either vertical, horizontal or even square shaped then add your icons. The wizard uses .png files none of which are resized at any time.

This means you can use rectangular buttons not just square. You can also combine 16x16, 32x32 etc.

The toolbar can be saved for working on later after creation and the programme will also save a test programme for your toolbar. Included five simple examples.

Any toolbar created can be shared with others simply zip up the toolbar folder.

I am looking to add text and lines in the near future with tooltips, adding controls to the toolbar is my goal such things as combogadgets.

I am using the 2D Drawing library so if anyone can see any enhancements that can be made especially with code snippets these would be appreciated.


The code is available here.https://www.dropbox.com/s/2oxhgg86d67xf ... d.zip?dl=0
Last edited by collectordave on Wed Mar 13, 2019 5:04 am, edited 1 time in total.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Toolbar Wizard

Post by collectordave »

Toolbar Wizard Ver 0.2

Dividers can now be added. these are lines which you place anywhere on the toolbar vertical, horizontal or inbetween.

Text can now be added. This is fixed font Arial 8 text can be added anywhere on the toolbar.

Combobox gadgets can now be added. These are handled as normal gadgets except they are bound to the tool bar.

Module CDTB now only needs to be included once to handle all toolbars.

Added a small Help system to get started will be adding more later.

Anyone have any ideas as to what else to include on a toolbar leave a reply here.

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
morosh
Enthusiast
Enthusiast
Posts: 329
Joined: Wed Aug 03, 2011 4:52 am
Location: Beirut, Lebanon

Re: Toolbar Wizard

Post by morosh »

hi: link is dead
PureBasic: Surprisingly simple, diabolically powerful
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Toolbar Wizard

Post by collectordave »

hi link checked and alive
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1310
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Toolbar Wizard

Post by collectordave »

Update

I am attempting to make the toolbar wizard DPI aware so needed some scaleable graphic format.

First question. Has anyone done anything with parseing SVG files in PB?

A quick search has rendered nothing.

After looking at the SVG specification felt it was a great idea but rather complicated so looking at creating DVG (Dumb Vector Graphic) files.

These will contain as xml details of what to draw and where, for scale, it will be assumed that the viewport is allways 128x128, no transform etc and all absolute co-ordinates.

I allready have a rendering routine which follows this pattern.

This will of course mean that any toolbar will only need the DVG files to be distributed with it not PNG or other image files so no resize problems. Of course an added Draw routine for the CDTB includefile. So just one routine to draw all icons of DVG type.

Also looking at adding the vectoricon designer to the toolbar project to allow users to draw their own icons if needed, the designer will store the icons and output DVG files when needed the CDTB include will provide the scaling. I am thinking of using millimeters as the drawing unit.

So second question is it worth it?

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply