Author Topic: How does codecompletion_toolbar.xrc generate?  (Read 4923 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
How does codecompletion_toolbar.xrc generate?
« on: December 15, 2011, 08:04:02 am »
Here is the file:
codeblocks_trunk\src\plugins\codecompletion\resources\codecompletion_toolbar.xrc
And there are 5 other xrc files in this folder.

but I can't find it in the codeblocks.cbp project tree-> Resources-> plugins -> CodeCompletion ->Resources.
The other 5 xrc files were correctly shown in the project tree.

So, how does this file generate? It looks like it can't be opened by wxSmith.


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9606
Re: How does codecompletion_toolbar.xrc generate?
« Reply #1 on: December 15, 2011, 08:06:34 am »
So, how does this file generate? It looks like it can't be opened by wxSmith.
I used to use xrced that ships with wxPython.

However, wxSmith should be able to handle. It if not, then this is a bug. BTW: Not all XRC files are in the source tree. They should be there though. So it seems the one you are referring to are simply missing in the project file.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How does codecompletion_toolbar.xrc generate?
« Reply #2 on: December 15, 2011, 08:12:39 am »
However, wxSmith should be able to handle. It if not, then this is a bug.
I have add this xrc file to the source tree, but double click on it (by default it will opened by wxsmith), nothing happened.

Quote
BTW: Not all XRC files are in the source tree. They should be there though. So it seems the one you are referring to are simply missing in the project file.
Yeah, there should be 6 xrc file in the codecompletion's source/resource tree, so simply you can add it. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How does codecompletion_toolbar.xrc generate?
« Reply #3 on: December 15, 2011, 08:46:16 am »
It can not be handled by wxSmith, because it contains the proprietary wxToolBarAddon, that can be handled by our xrc-loader (see sdk/xtra_res.cpp), but not by wxSmith.

I don't know, why wxToolBarAddOn was created, maybe some other devs remember (most likely some wxToolBar limitations), but even if we would use wxToolBar directly, it could not be handled by wxSmith, because wxSmith only handles toolbars inside a wxFrame.

Due to this limitations, I created the xrc-file for the toolbar of IncrementalSearch manually (it's not so hard).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Re: How does codecompletion_toolbar.xrc generate?
« Reply #4 on: December 15, 2011, 10:35:34 am »
Due to this limitations, I created the xrc-file for the toolbar of IncrementalSearch manually (it's not so hard).
I've never thought of using a gui tool for this, it is simple copy-paste stuff:)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]