2.5: ID datablock button back, previously known as std_libbuttons. The
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Feb 2009 16:40:14 +0000 (16:40 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 Feb 2009 16:40:14 +0000 (16:40 +0000)
commit84e2de8ca7a86334c604e4476cf2938c8b444fcb
treeffc5051f2064d28259a81bea763b4e01cfaf9869
parent14f180fa04bd9732d603f15e3acccbc803adb8f9
2.5: ID datablock button back, previously known as std_libbuttons. The
way this worked in 2.4x wasn't really clean, with events going all over
the place and using dubious variables such as G.but->lockpoin or
G.sima->menunr. It works as follows now, for example:

xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID**)&sima->image, ID_IM, &sima->pin, xco, yco,
sima_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE|UI_ID_ALONE|UI_ID_PIN);

The last two parameters are a callback function, and a list of events
or functionalities that are supported. The callback function will then
get the ID pointer + event to handle.
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_utils.c
source/blender/editors/space_image/image_header.c
source/blender/editors/space_image/space_image.c
source/blender/editors/transform/transform_orientations.c