Short: BOOPSI pop-up, cycle and button gadget Author: tanti@intercom.it (Massimo Tantignone) Uploader: tanti intercom it (Massimo Tantignone) Type: dev/gui Version: 40.18 Requires: AmigaOS 3.0+ Architecture: m68k-amigaos select.gadget 40.18 (7.1.2001) by Massimo Tantignone The select.gadget is a shared library which, when opened, adds to the system a public BOOPSI gadget class called "selectgclass". This class implements a button-like selection gadget, with features similar to those of a traditional GadTools cycle gadget, but with the additional ability to open, when pressed, a pop-up menu which allows the user to pick his choice more easily. The look and behavior of the gadget and its pop-up menu can be configured using the attribute tags of the class. The library is freeware; if you use it, you are allowed to distribute it with your software. Some highlights: - A delay can be set for the appearance of the pop-up menu, allowing for a gadget which reacts like a normal cycle gadget upon "quick" clicks, and like a pop-up gadget if the mouse button is kept pressed a little longer. - The pop-up menu can appear and disappear with a vertical "zoom" effect whose duration is configurable. - The gadget can be programmatically activated, for instance to make it react to a keypress. - Once opened, the pop-up menu can be controlled by keyboard. - It is optionally possible to have a "sticky" pop-up menu which remains open when the mouse button is released. - The gadget can be made "quiet", that is, the currently selected item can be not displayed. Useful to attach a small pop-up button to string gadgets. - The gadget can be configured to always behave like a cycle gadget, and even like a plain button gadget. - The gadget can broadcast changes in its value to target objects via the BOOPSI notification system. - All changes done with SetGadgetAttrsA() to the gadget's position, size and look are visually executed in real-time. - The gadget's dispatcher is able to swap the stack when needed. - The gadget can be added to requesters and window borders. - The pop-up menu can have a drop shadow. - The gadget's "pop-up" symbol can be placed at the left side, at the right side, or it can also not appear at all; its width is also configurable. The gadget's default imagery for the symbol is fully scalable, and it can be replaced by the application with a custom image. - The default values for unspecified attributes can be globally set by the user with an ASCII preferences file; the changes are applied in real-time (to gadgets created afterwards) via file notification. Furthermore, the library offers some functions which allow to "transform" a normal gadget into a custom gadget having (almost) the same features of the "selectgclass" gadgets. This way it's possible, for example, to create GadTools GENERIC_KIND gadgets and turn them into pop-up gadgets, obtaining all the benefits of this type of gadgets while also keeping the benefits of the GadTools automatic gadget creation (and deletion) system. Lastly, this gadget class supports VisualPrefs and takes full advantage of the graphic enhancements it brings to the system. Changes since version 40.17: · Added support for some new V44 tags: GA_ReadOnly, GA_ActivateKey, GA_TextAttr and GA_Underscore. · Now the gadget can be programmatically activated via ActivateGadget(). · Now the pop-up menu can be controlled by keyboard. · Since many people asked for this, now the gadget no longer adjusts the pop-up menu's vertical position when the user clicks on its top or bottom edge (used to do this in order to always place the active item under the mouse pointer). · Now the disabled ghosting pattern also covers the gadget's edges. · Fixed an horrible bug that caused the gadget's image to be drawn at a completely wrong position when the gadget had a negative vertical coordinate. · Fixed a bug which caused pop-up panels using direct bitmap rendering to appear incomplete and/or corrupted when opening near to the upper left corner of the screen. · Fixed a bug which caused the disabled dithering to sometimes erase the underlying gadget label. · Improved the example programs with support for keyboard selection and for the new read-only feature. · Oops, it seems I never bothered to state who I am in the guide... ;-) Now finally added some author information. Changes since version 40.16: · Now the pop-up menu panel shows a real drop shadow (not dithered) on hicolor and truecolor screens. · Now the pop-up menu panel can have a transparency effect on hicolor and truecolor screens. · The background is visible again through corners of the menu panel when the "round edges" option of VisualPrefs is active. Author: Massimo Tantignone Via Campagnoli, 4 28100 Novara (NO) ITALY E-mail: tanti@intercom.it