As a CLIM learning exercise, and as a way of finally contributing back something even remotely useful to the CLIM community, I have written the attached text style selection dialog. I have tested it with McCLIM and CMUCL under Linux, but it should work with little or no modification with other CLIM implementations.
The dialog provides the same features of the CLIM text style model. See for example make-text-style in the specification.
To invoke the dialog, just compile the file and evaluate:
(clim-user::select-text-style)
from a listener, or call it from your own code. When you click on "OK", the function returns a CLIM text style object, nil otherwise.
The usage of the dialog should be straightforward, except for a couple of issues. When you enter a numeric text size in the appropriate field (try 2 or 60 for fun), hit ENTER to update the sample text. The family/face/size gadgets are not updated.
See the code for additional information or issues. The main problem is that I shouldn't have written it in the first place: CLIM provides the powerful accepting-values macro for creating dialogs. McCLIM, however, supports only part of its functionality and can be used in simple cases. The bottom line is that my code is an example of how to fake a value-returning modal dialog, provides an interim solution, and gives an appreciation of the power and complexity of accepting-values.
Paolo