Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-30 15:18:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-30 15:18:08 +0300
commit8036342ea8c20ede363d5d3fe5459cc2af58a0f6 (patch)
tree1579a7a80e7d63fa655ebb4c0058b413d30b9c7e /source/blender/editors/space_sequencer
parent445bbdf75d94dbe4db25e9a81f6fed47c59acb5a (diff)
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.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_header.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_header.c b/source/blender/editors/space_sequencer/sequencer_header.c
index eef59a7dc6b..8ae10bfb0bf 100644
--- a/source/blender/editors/space_sequencer/sequencer_header.c
+++ b/source/blender/editors/space_sequencer/sequencer_header.c
@@ -72,13 +72,13 @@
#define B_IPOBORDER 4
#define B_SEQCLEAR 5
-static uiBlock *seq_viewmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
SpaceSeq *sseq= sa->spacedata.first;
View2D *v2d= UI_view2d_fromcontext(C);
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_viewmenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP, UI_HELV);
short yco= 0, menuwidth=120;
if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
@@ -146,11 +146,11 @@ static uiBlock *seq_viewmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_u
return block;
}
-static uiBlock *seq_selectmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_selectmenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_selectmenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_selectmenu", UI_EMBOSSP, UI_HELV);
uiBut *but;
but= uiDefMenuButO(block, "SEQUENCER_OT_select_active_side", "Strips to the Left");
@@ -188,13 +188,13 @@ static uiBlock *seq_selectmenu(bContext *C, uiMenuBlockHandle *handle, void *arg
return block;
}
-static uiBlock *seq_markermenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_markermenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
SpaceSeq *sseq= sa->spacedata.first;
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_markermenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_markermenu", UI_EMBOSSP, UI_HELV);
short yco= 0, menuwidth=120;
@@ -235,9 +235,9 @@ static uiBlock *seq_markermenu(bContext *C, uiMenuBlockHandle *handle, void *arg
return block;
}
-static uiBlock *seq_addmenu_effectmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_addmenu_effectmenu(bContext *C, ARegion *ar, void *arg_unused)
{
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_addmenu_effectmenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_addmenu_effectmenu", UI_EMBOSSP, UI_HELV);
RNA_enum_set(uiButGetOperatorPtrRNA(uiDefMenuButO(block, "SEQUENCER_OT_add_effect_strip", "Add")), "type", SEQ_ADD);
@@ -266,10 +266,10 @@ static uiBlock *seq_addmenu_effectmenu(bContext *C, uiMenuBlockHandle *handle, v
}
-static uiBlock *seq_addmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_addmenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_addmenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_addmenu", UI_EMBOSSP, UI_HELV);
uiBut *but;
uiDefMenuSub(block, seq_addmenu_effectmenu, "Effect");
@@ -308,13 +308,13 @@ static uiBlock *seq_addmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_un
return block;
}
-static uiBlock *seq_editmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
+static uiBlock *seq_editmenu(bContext *C, ARegion *ar, void *arg_unused)
{
ScrArea *sa= CTX_wm_area(C);
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
- uiBlock *block= uiBeginBlock(C, handle->region, "seq_editmenu", UI_EMBOSSP, UI_HELV);
+ uiBlock *block= uiBeginBlock(C, ar, "seq_editmenu", UI_EMBOSSP, UI_HELV);
uiBut *but;