First, the int parameter passed to our handler by GLUI represents the id of the control element. Although it is required as a parameter, we are not using it in our handler.

Note from our discussion on the creation of the browser element, we create a pointer to the browser class element, which we store in the global variable fileBrowser. In turn, we obtain the filename (string) selected by the user with a call to the class function
get_file()
Since we cannot set a filter for our browser element, any file within the directory appears in the list box and can be selected by the user. Thus, we must do the "filtering" within our handler and accept only filenames that have the extension "bmp".

We proceed with such filenames by passing it on to our instance of CGWorld along with the pathname of the directory holding the bmp file, which is established in our setPaths function. The following call achieves our objective.
cgWorld.setImageMap(imageMapDirectory, fileName);
Last, we set the texture method to that of decal by setting the int value of the methodGroup to 1. With this action, not only is the appropriate radio button selected but also the handler for the group of radio buttons is invoked.