CodeBlocks Ogre SDK Tips         How to get context sensitive help and syntax highlighting for Ogre in Code::Blocks

%prevogre%

Setting up context sensitive Help

You need a nightly build of Code::Blocks dated 24 July 2006 or later.
Run Code::Blocks.

CBEnvSet.png

Go into Environment Settings.

CBBlankHelpFiles.png

Scroll down the icon list on the left side and select Help files.

CBAddHelp.png

Select Add which opens up a dialogue for entering the name of the Help. Type in Ogre SDK Help.

CBHelpFileDialogue.png

Select Ok and a file dialogue will open where you select the file OgreAPIReference.chm in the OgreSDK subdirectory /docs/api.
Select Open.

CBHelpFileSettings.png

Select the checkbox that says This is the default Help file. Select Ok. Code::Blocks is now configured to use the Ogre SDK API help file when you press F1.

CBHelpContext.png

Left click on a word in your source that you want to lookup in the Ogre SDK Help. No need to highlight the word, just make sure the caret is somewhere in the word and then press F1. In this example we want to find out what AnimationState is.

CBTopicsFound.png

A Topics Found Dialogue window will be displayed if there is more than one match found in the help. In this example the constructor and destructor are listed. Left double click the one you want and viola you can now readup on what the API has to say.

CBOgreAPIHelp.png

Syntax Highlighting of Ogre Scripts

Code::Blocks has built in support for syntax highlighting of Material, Program, and Compositor scripts. You can also load glsl, hlsl, and Cg source and get syntax highlighting.

CBOgreMaterial.png CBOgreCompositor.png
CBGLSL.png