Revision: 17874 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17874 Author: ton Date: 2008-12-15 14:23:55 +0100 (Mon, 15 Dec 2008)
Log Message: ----------- 2.5 - depricated area "headbutofs" and "headbutlen", which is now fully replaced with view2d handling. - needed to add header default V2D_ALIGN_NO_NEG_Y, V2D_LOCKOFS_Y seems to not do anything atm :) - new: running blender in debug (blender -d) will print the current handler and operator in use (not mousemove) Modified Paths: -------------- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c branches/blender2.5/blender/source/blender/editors/interface/view2d.c branches/blender2.5/blender/source/blender/editors/space_action/action_header.c branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c branches/blender2.5/blender/source/blender/editors/space_file/file_header.c branches/blender2.5/blender/source/blender/editors/space_image/image_header.c branches/blender2.5/blender/source/blender/editors/space_info/info_header.c branches/blender2.5/blender/source/blender/editors/space_ipo/ipo_header.c branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c branches/blender2.5/blender/source/blender/editors/space_node/node_header.c branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c branches/blender2.5/blender/source/blender/editors/space_script/script_header.c branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_header.c branches/blender2.5/blender/source/blender/editors/space_sound/sound_header.c branches/blender2.5/blender/source/blender/editors/space_text/text_header.c branches/blender2.5/blender/source/blender/editors/space_time/time_header.c branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_header.c branches/blender2.5/blender/source/blender/makesdna/DNA_screen_types.h branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c =================================================================== --- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -5062,7 +5062,7 @@ ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT); ar->v2d.keepofs = V2D_LOCKOFS_Y; ar->v2d.keeptot = 2; // this keeps the view in place when region size changes... - ar->v2d.align = V2D_ALIGN_NO_NEG_X; + ar->v2d.align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; } Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -72,7 +72,7 @@ v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT); v2d->keepofs = V2D_LOCKOFS_Y; v2d->keeptot = 2; // this keeps the view in place when region size changes... - v2d->align = V2D_ALIGN_NO_NEG_X; + v2d->align = V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; } Modified: branches/blender2.5/blender/source/blender/editors/space_action/action_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_action/action_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -123,7 +123,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -191,7 +191,7 @@ /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_file/file_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_file/file_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_file/file_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -124,7 +124,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_image/image_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_image/image_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_image/image_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -123,7 +123,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_info/info_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_info/info_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_info/info_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -146,7 +146,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_ipo/ipo_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_ipo/ipo_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_ipo/ipo_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -122,7 +122,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -123,7 +123,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_node/node_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_node/node_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_node/node_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -122,7 +122,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -133,7 +133,7 @@ } /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -442,6 +442,11 @@ /* ************************ header outliner area region *********************** */ +/* add handlers, stuff you only do once or on area/region changes */ +static void outliner_header_area_init(wmWindowManager *wm, ARegion *ar) +{ + UI_view2d_size_update(&ar->v2d, ar->winx, ar->winy); +} static void outliner_header_area_draw(const bContext *C, ARegion *ar) { @@ -455,6 +460,9 @@ glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); + /* set view2d view matrix for scrolling (without scrollers) */ + UI_view2d_view_ortho(C, &ar->v2d); + outliner_header_buttons(C, ar); } @@ -586,8 +594,9 @@ art= MEM_callocN(sizeof(ARegionType), "spacetype time region"); art->regionid = RGN_TYPE_HEADER; art->minsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI; + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; + art->init= outliner_header_area_init; art->draw= outliner_header_area_draw; art->free= outliner_header_area_free; BLI_addhead(&st->regiontypes, art); Modified: branches/blender2.5/blender/source/blender/editors/space_script/script_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_script/script_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_script/script_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -123,7 +123,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_header.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_header.c 2008-12-15 13:10:29 UTC (rev 17873) +++ branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_header.c 2008-12-15 13:23:55 UTC (rev 17874) @@ -123,7 +123,7 @@ uiBlockSetEmboss(block, UI_EMBOSS); /* always as last */ - sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon + UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); uiEndBlock(C, block); uiDrawBlock(block); Modified: branches/blender2.5/blender/source/blender/editors/space_sound/sound_header.c =================================================================== @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs