UI: Panels
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Dec 2008 13:11:04 +0000 (13:11 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Dec 2008 13:11:04 +0000 (13:11 +0000)
commit233509245615d06f0274d04940ad67d8e636d7f0
tree4c29f431c3ee2680bb76ff1cc5420f75ad089dbb
parent7715e45a7adf2cc07856956aef27fc6359af94e1
UI: Panels

* API and usage is basically the same still.
* Panels were moved to region level. I first thought of keeping them at area
  level, but having them at region level it's simpler to handle events and do
  drawing, and also to integrate with view2d. They can still become area level
  overlapping regions, if we make a floating (or docked) region that can
  contain panels.
* Added back a few panels from the scene buttons for testing.

Issues still:
* The view2d handling and alignment refresh of panels is not correct yet in the
  buttons window.
* I did not yet bring back the block handlers system. It was basically a system
  that stored which panel was open and where the events for that panel would go.
  Just a few functions, but not sure how it fits in 2.5.
* There was a case where dragging panels would not properly remove the window
  level handler, but could not redo anymore even though I don't think I fixed
  it.
* Some text in the panels goes past the end of the button, that is due to the
  checkmark button drawing, not related to this commit.

Other UI code changes:
* Renamed interface.h to interface_intern.h for consistency.
* Fixed some issues with freeing of blocks when they changed due to context.
* uiDrawBlock now takes a context pointer (mostly for block drawextra).
41 files changed:
source/blender/blenkernel/intern/screen.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_intern.h [moved from source/blender/editors/interface/interface.h with 96% similarity]
source/blender/editors/interface/interface_panel.c [new file with mode: 0644]
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/view2d.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_buttons/Makefile
source/blender/editors/space_buttons/SConscript
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_scene.c [new file with mode: 0644]
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_file/file_header.c
source/blender/editors/space_image/image_header.c
source/blender/editors/space_info/info_header.c
source/blender/editors/space_ipo/ipo_header.c
source/blender/editors/space_nla/nla_header.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/outliner_header.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/script_header.c
source/blender/editors/space_sequencer/sequencer_header.c
source/blender/editors/space_sound/sound_header.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_time/time_header.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_space_types.h