[Gambas-devel] New Component - UCToolbar

Fabien Bodard gambas.fr at ...176...
Sun Apr 6 15:18:35 CEST 2008


it's an idea but it stay a gambas toolbar ... unfortunally the good soluce
will be to implement the true kde toolbar in C++ and provide a common api
between the gb.kde and a gb.gtk component.

I hope Benoit think about that for the 3.0... lol i query that for so long
time that now i don't remember when i've started.

But with the next component qt4/kde4 and dbus i hope to see a better desktop
integration than actually (even if it is alread so good).

another point as difficult as toolbar will be the using of kpart app and why
not make a gambas application as a kpart... (why not dreaming ?)

There is so many idéas in my head and so few hackers to heard me ... and
i've so few time !

Fabien

2008/4/3, Robert Rowe <robert.c.rowe at ...176...>:
>
> My toolbar code is attached. It is not done but it is stable. Testers are
> welcome to try it out. If you run into a bug please try to be very detailed
> when you report it. Feature requests are welcome also.
>
> Follow the instructions below to install it.
>
> 1. Extract the files somewhere.
> 2. Open the project with Gambas3. I stay pretty current so you might have
> too also.
> 3. Select "Make/Executable" from the Project menu.
> 4. Close the project and re-open it. This step may not be necessary but it
> should ensure that the component gets loaded.
> 5. Go to the Components tab of the project properties and make certain
> that UCToolbar is checked.
> 6. Look in on the Form tab of the toolbox for a question mark icon and
> double click it. This is the UCToolbar. I haven't figured out how to give it
> an icon yet.
> 7. Uncomment all the code in FTest.
> 8. Run the program.
> 9. Steps 5 and 6 are all that's required for a new project.
>
> Here's how to use it:
>
> 1. Use the Add* methods to add tools. Right now it supports ToolButtons,
> ToggleButtons, Labels and Dropdowns. I have plans to add a MenuButon and
> probably others. Most of the parameters are optional but the Key and
> Description are required. The Label tool also requires the Text parameter.
> 2. Set the DefaultTools property. This is a comma separated list of keys.
> The tools with these keys will appear in the order that they are specified.
> A uctseparator is a transparent panel that has a width of 8. A
> uctlineseparator is also an 8 pixel wide panel but it has a vertical
> separator in it.
> 3. Call the LoadUserConfig method. This will reload any config previously
> saved by a user.
> 4. The UCToolbar will automatically stretch the full with of its parent.
> 5. When you run, you will notice a small down arrow to the far right.
> Click it to bring up the user config screen. Use the up, down, left and
> right buttons to select the desired tools. Double clicking the tools also
> works. Clicking the Default button will reload the tools from the
> DefaultTools property.
> 6. You can set the ShowButtonText property to show/hide the text for each
> tool. At this point the text will only appear to the right of the icon. This
> will change when the ToolButton control supports other options.
> 7. The Click event will fire whenever a tool is clicked. It has a string
> parameter called Key that will tell you which tool was clicked.
>
> Current limitations:
> 1. You can only use icons that are no more than 16 pixels tall.
> 2. The toolbar will always be 21 pixels high.
> 3. I haven't implemented any routines for manipulating Dropdowns yet. You
> can load them during the AddDropdown call but that all for now.
> 4. It doesn't support right to left yet.
> 5. If you display more tools than can fit, the excess tools will not show.
> I plan to add another button that will show the missing tools in a menu.
> 6. No help written yet but I do plan to write some.
>
> Unlike the existing Gambas toolbar, the UCToolbar is not a container. You
> add tools via the Add* methods. I hope to be able to add a GUI for the setup
> of tools and for generating the DefaultTools property.
>
> This component was inspired by KDE. I've taken pains to make it work as
> closely to KDE apps as I can, mainly because I love KDE.  I don't use Gnome
> but I'd be happy to work with a Gnome user to make it act more Gnomish. :)
>
> In the future I'll have updates available from my work's website if I can
> get permission to do so. I hope to eventually get the UCToolbar added to the
> main Gambas source distribution. Benoit has strict standards though so this
> may take me a while.
>
> I have not localized it as I only speak/read English. I did try to mark
> all text as translatable though so it should be possible if someone wants to
> work on it.
>
> Robert Rowe
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20080406/41735d42/attachment.html>


More information about the Devel mailing list