diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-09 18:59:43 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-09 18:59:43 +0300 |
commit | b205ec4f18b704edc63f914cefc2d16b2784803a (patch) | |
tree | 11eff09eb1eeebf2e18e8fde759b1b673f00948c /source/blender/editors/space_time/space_time.c | |
parent | b9e04c67dce1e808c06f67ec3ae43e763f67d46b (diff) |
2.5
Area Manager: revised how an area subdivision gets managed. Originally
the 'spacedata' would store regiondata too, but this already became
impractical (like having view2d data in region is useful). So I left
that part how it is. See new diagram:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager
This means that regions in an Area define location/size or constraints
for how they get arranged. The "RegionType" which is linked to this
defines its functionality.
For fun, test, and code validation: two temporary hotkeys added.
SKEY: splits current region horizontally
SHIFT+S: splits vertically
Note - in outliner - that "context" sticks to the Area as whole, the region
here only defines view. That's the purpose. :) For two outliners with different
context you open 2 areas.
Also note that dragging screen-edges shows the region-alignment type (split
with percentage).
Diffstat (limited to 'source/blender/editors/space_time/space_time.c')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index fd802d44fb4..71446531cbb 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -230,22 +230,16 @@ static void time_free(SpaceLink *sl) } -/* spacetype; init callback */ +/* spacetype; init callback in ED_area_initialize() */ /* init is called to (re)initialize an existing editor (file read, screen changes) */ static void time_init(wmWindowManager *wm, ScrArea *sa) { ARegion *ar; - /* link area to SpaceXXX struct */ - sa->type= BKE_spacetype_from_id(SPACE_TIME); - - /* add handlers to area */ - /* define how many regions, the order and types */ - /* add types to regions, check handlers */ for(ar= sa->regionbase.first; ar; ar= ar->next) { - ar->type= ED_regiontype_from_id(sa->type, ar->regiontype); /* XXX fix type and id */ + ar->type= ED_regiontype_from_id(sa->type, ar->regiontype); if(ar->handlers.first==NULL) { ListBase *keymap; @@ -255,10 +249,10 @@ static void time_init(wmWindowManager *wm, ScrArea *sa) keymap= WM_keymap_listbase(wm, "Interface", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* own keymap */ keymap= WM_keymap_listbase(wm, "View2D", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); + /* own keymap */ keymap= WM_keymap_listbase(wm, "TimeLine", sa->spacetype, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } |