Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Can the toolbar be modified to use xrc?


I was browsing the sourcecode and I realized that the whole toolbar is built using the "conventional" way. Is there any way to modify it using XRC files? Like each plugin having its toolbar.xrc or something?

Yes, it can!! :D

I modified the main.cpp to load the toolbar from an .xrc.

There's a caveat: The image files have to be in the SAME ZIP FILE than the .xrc. It's a filesystem limitation. (However, the images can go in a subdirectory *INSIDE* the zip.

I still have to check how to use this to merge the xrc toolbar with the plugins toolbars. I hope a toolbar can have OTHER toolbars inside, it'd make my job much easier (I'd use a master toolbar, then insert the main and plugins toolbars inside it).

I'd add a screenshot, but don't know how ^^;;

how to build two or multi toolbars?

Are you sure this isn't a "general" question? If you do want to modify codeblocks, please give more details.


[0] Message Index

Go to full version