diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-25 23:22:05 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-25 23:22:05 +0300 |
commit | 3c088f3434f7900d430b01d2e210a0aa529c93bc (patch) | |
tree | c5739218b7fafa62736389813f199edffb9996f0 /source/blender/blenkernel/intern/screen.c | |
parent | cfd93426002d20a29827503e195d8773d45bef23 (diff) |
2.5
Simple toolbox-style menu system. Brecht will review it
though, and/or check on way to use it for menus.
I tried to avoid uiBlock and rna stuff all over. :)
Quick image test:
http://www.blender.org/bf/rt.jpg
Examples you can read in:
- editors/screen/screen_ops.c:testing123() (press F5)
- editors/object/object_edit.c:object_add_primitive_invoke()
(press SHIFT+A)
Concept is simple:
uiMenuBegin(): returns a handle.
uiMenuEnd(): puts it all to work.
In between you can add items like:
uiMenuItemVal(): a name, icon, retval (use uiMenuFunc())
uiMenuItemO(): an operator + icon
uiMenuItemEnumO(): an operator, property name, value
Sublevels go easy too:
uiMenuLevel(): creates item for sublevel, with function pointer.
Inside that function you can use all menu calls again.
Levels can go as deep you want.
uiMenuLevelEnumO(): creates operator sublevel for an enum
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index ce5225d50b9..063c617e6bb 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -222,13 +222,14 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar) if(art && art->free) art->free(ar); + + if(ar->regiondata) + printf("regiondata free error\n"); } else if(ar->type && ar->type->free) ar->type->free(ar); if(ar) { - if(ar->regiondata) - printf("regiondata free error\n"); BLI_freelistN(&ar->panels); } } |