2.5: UI & Menus
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 30 Jan 2009 12:18:08 +0000 (12:18 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 30 Jan 2009 12:18:08 +0000 (12:18 +0000)
commit8036342ea8c20ede363d5d3fe5459cc2af58a0f6
tree1579a7a80e7d63fa655ebb4c0058b413d30b9c7e
parent445bbdf75d94dbe4db25e9a81f6fed47c59acb5a
2.5: UI & Menus

* Cleaned up UI_interface.h a bit, and added some comments to
  organize things a bit and indicate what should be used when.

* uiMenu* functions can now be used to create menus for headers
  too, this is done with a uiDefMenuBut, which takes a pointer
  to a uiMenuCreateFunc, that will then call uiMenu* functions.

* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
  specific to making popup menus. Will convert the other
  conformation popup menu functions to use this too so we can
  remove some code.

* Extended uiMenu functions, now there is is also:
  BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.

* Converted image window headers to use uiMenu functions, simplifies
  menu code further here. Did not remove the uiDefMenu functions as
  they are used in sequencer/view3d in some places now (will fix).

* Also tried to simplify and fix bounds computation a bit better
  for popup menus. It tried to find out in advance what the size
  of the menu was but this is difficult with keymap strings in
  there, now uiPopupBoundsBlock can figure this out afterwards and
  ensure the popup is within the window bounds. Will convert some
  other functions to use this too.
32 files changed:
source/blender/editors/include/ED_util.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_intern.h
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_buttons/buttons_header.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_header.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/editors/transform/transform_ops.c
source/blender/editors/util/editmode_undo.c
source/blender/render/intern/source/occlusion.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_operators.c