forked from bartvdbraak/blender
* Added butspace and sound menus. That's all of them now, phew.
* Very small tweaks to Sequence and Ipo menus
This commit is contained in:
parent
6a9d29d1db
commit
9d78e1164b
@ -380,12 +380,78 @@ static uiBlock *sbuts_context_menu(void *arg_unused)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void do_buts_viewmenu(void *arg, int event)
|
||||
{
|
||||
SpaceButs *sbuts= curarea->spacedata.first;
|
||||
|
||||
switch(event) {
|
||||
case 0: /* panel alignment */
|
||||
case 1:
|
||||
case 2:
|
||||
sbuts->align= event;
|
||||
if(event) {
|
||||
uiAlignPanelStep(curarea, 1.0);
|
||||
do_buts_buttons(B_BUTSHOME);
|
||||
}
|
||||
break;
|
||||
case 3: /* View All */
|
||||
do_buts_buttons(B_BUTSHOME);
|
||||
break;
|
||||
case 4: /* Maximize Window */
|
||||
/* using event B_FULL */
|
||||
break;
|
||||
}
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
}
|
||||
|
||||
static uiBlock *buts_viewmenu(void *arg_unused)
|
||||
{
|
||||
SpaceButs *sbuts= curarea->spacedata.first;
|
||||
uiBlock *block;
|
||||
short yco= 0, menuwidth=120;
|
||||
|
||||
block= uiNewBlock(&curarea->uiblocks, "buts_viewmenu",
|
||||
UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||
uiBlockSetButmFunc(block, do_buts_viewmenu, NULL);
|
||||
|
||||
if (sbuts->align == 1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Horizontal Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Horizontal Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||
|
||||
if (sbuts->align == 2) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Vertical Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Vertical Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||
|
||||
if (sbuts->align == 0) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Free Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Free Align", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||
|
||||
if (!curarea->full)
|
||||
uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
|
||||
else
|
||||
uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
|
||||
|
||||
if(curarea->headertype==HEADERTOP) {
|
||||
uiBlockSetDirection(block, UI_DOWN);
|
||||
}
|
||||
else {
|
||||
uiBlockSetDirection(block, UI_TOP);
|
||||
uiBlockFlipOrder(block);
|
||||
}
|
||||
|
||||
uiTextBoundsBlock(block, 50);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
void buts_buttons(void)
|
||||
{
|
||||
uiBlock *block;
|
||||
ID *id, *idfrom;
|
||||
short xco, t_base= 0;
|
||||
short xco, xmax, t_base= 0;
|
||||
char naam[20];
|
||||
int colorid;
|
||||
|
||||
sprintf(naam, "header %d", curarea->headwin);
|
||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||
@ -395,19 +461,56 @@ void buts_buttons(void)
|
||||
|
||||
curarea->butspacetype= SPACE_BUTS;
|
||||
|
||||
|
||||
xco = 8;
|
||||
|
||||
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
|
||||
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D,
|
||||
windowtype_pup(), xco, 0, XIC+10, YIC,
|
||||
&(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0,
|
||||
"Displays Current Window Type. "
|
||||
"Click for menu of available types.");
|
||||
|
||||
xco += XIC + 14;
|
||||
|
||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||
if (curarea->flag & HEADER_NO_PULLDOWN) {
|
||||
uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
|
||||
ICON_DISCLOSURE_TRI_RIGHT,
|
||||
xco,2,XIC,YIC-2,
|
||||
&(curarea->flag), 0, 0, 0, 0,
|
||||
"Show pulldown menus");
|
||||
}
|
||||
else {
|
||||
uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
|
||||
ICON_DISCLOSURE_TRI_DOWN,
|
||||
xco,2,XIC,YIC-2,
|
||||
&(curarea->flag), 0, 0, 0, 0,
|
||||
"Hide pulldown menus");
|
||||
}
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
xco+=XIC;
|
||||
|
||||
if((curarea->flag & HEADER_NO_PULLDOWN)==0) {
|
||||
/* pull down menus */
|
||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||
|
||||
xmax= GetButStringLength("View");
|
||||
uiDefBlockBut(block, buts_viewmenu, NULL,
|
||||
"View", xco, -2, xmax-3, 24, "");
|
||||
xco+= xmax;
|
||||
|
||||
}
|
||||
|
||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
||||
|
||||
xco+= XIC+22;
|
||||
|
||||
/* FULL WINDOW */
|
||||
if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
|
||||
else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
|
||||
// if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
|
||||
// else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
|
||||
|
||||
/* HOME */
|
||||
uiDefIconBut(block, BUT, B_BUTSHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
|
||||
xco+=XIC;
|
||||
// uiDefIconBut(block, BUT, B_BUTSHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
|
||||
// xco+=XIC;
|
||||
|
||||
/* mainb menu */
|
||||
/* (this could be done later with a dynamic tree and branches, also for python) */
|
||||
@ -419,13 +522,14 @@ void buts_buttons(void)
|
||||
// xco+= 90-XIC+10;
|
||||
//}
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_GAME, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_GAME, xco, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_SCRIPT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SCRIPT, 0, 0, "Script ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_MATERIAL_DEHLT,xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_OBJECT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_OBJECT, 0, 0, "Object (F7) ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_EDIT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_EDITING, 0, 0, "Editing (F9) ");
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_SCENE_DEHLT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SCENE, 0, 0, "Scene (F10) ");
|
||||
xco+=XIC;
|
||||
|
||||
xco+= XIC;
|
||||
|
||||
// if(curarea->headertype==HEADERTOP) t_base= -3; else t_base= 4;
|
||||
|
||||
|
@ -387,7 +387,7 @@ static uiBlock *ipo_viewmenu(void *arg_unused)
|
||||
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Frame All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
|
||||
if (ei != NULL && (ei->flag & IPO_EDIT)) {
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Move Current Frame to Selected|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
|
||||
@ -673,24 +673,24 @@ void ipo_buttons(void)
|
||||
ei = get_editipo();
|
||||
|
||||
xmax= GetButStringLength("View");
|
||||
uiDefBlockBut(block,ipo_viewmenu, NULL, "View", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,ipo_viewmenu, NULL, "View", xco, -2, xmax-3, 24, "");
|
||||
xco+=xmax;
|
||||
|
||||
xmax= GetButStringLength("Select");
|
||||
uiDefBlockBut(block,ipo_selectmenu, NULL, "Select", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,ipo_selectmenu, NULL, "Select", xco, -2, xmax-3, 24, "");
|
||||
xco+=xmax;
|
||||
|
||||
if (G.sipo->showkey) {
|
||||
xmax= GetButStringLength("Key");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Key", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Key", xco, -2, xmax-3, 24, "");
|
||||
}
|
||||
else if(ei != NULL && (ei->flag & IPO_EDIT)) {
|
||||
xmax= GetButStringLength("Point");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Point", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Point", xco, -2, xmax-3, 24, "");
|
||||
}
|
||||
else {
|
||||
xmax= GetButStringLength("Curve");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Curve", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,ipo_editmenu, NULL, "Curve", xco, -2, xmax-3, 24, "");
|
||||
}
|
||||
|
||||
xco+=xmax;
|
||||
|
@ -101,8 +101,8 @@ static uiBlock *seq_viewmenu(void *arg_unused)
|
||||
block= uiNewBlock(&curarea->uiblocks, "seq_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||
uiBlockSetButmFunc(block, do_seq_viewmenu, NULL);
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Frame All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Frame Selected|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View Selected|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
if(!curarea->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, "");
|
||||
@ -202,13 +202,13 @@ static uiBlock *seq_addmenu_effectmenu(void *arg_unused)
|
||||
uiBlockSetButmFunc(block, do_seq_addmenu_effectmenu, NULL);
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Sub", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mul", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subtract", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Multiply", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cross", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "GammaCross", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "AlphaOver", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "AlphaUnder", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "AlphaOverDrop", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Gamma Cross", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Under", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Alpha Over Drop", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plugin...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
|
||||
|
||||
@ -247,12 +247,15 @@ static uiBlock *seq_addmenu(void *arg_unused)
|
||||
block= uiNewBlock(&curarea->uiblocks, "seq_addmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||
uiBlockSetButmFunc(block, do_seq_addmenu, NULL);
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Images", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Movie", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Audio", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Scene", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
|
||||
uiDefIconTextBlockBut(block, seq_addmenu_effectmenu, NULL, ICON_RIGHTARROW_THIN, "Effect", 0, yco-=20, 120, 19, "");
|
||||
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Audio", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Scene", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Images", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Movie", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
|
||||
if(curarea->headertype==HEADERTOP) {
|
||||
uiBlockSetDirection(block, UI_DOWN);
|
||||
}
|
||||
@ -444,21 +447,21 @@ void seq_buttons()
|
||||
/* pull down menus */
|
||||
if((curarea->flag & HEADER_NO_PULLDOWN)==0) {
|
||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||
|
||||
|
||||
xmax= GetButStringLength("View");
|
||||
uiDefBlockBut(block,seq_viewmenu, NULL, "View", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,seq_viewmenu, NULL, "View", xco, -2, xmax-3, 24, "");
|
||||
xco+=xmax;
|
||||
|
||||
xmax= GetButStringLength("Select");
|
||||
uiDefBlockBut(block,seq_selectmenu, NULL, "Select", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block,seq_selectmenu, NULL, "Select", xco, -2, xmax-3, 24, "");
|
||||
xco+=xmax;
|
||||
|
||||
xmax= GetButStringLength("Add");
|
||||
uiDefBlockBut(block, seq_addmenu, NULL, "Add", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block, seq_addmenu, NULL, "Add", xco, -2, xmax-3, 24, "");
|
||||
xco+= xmax;
|
||||
|
||||
xmax= GetButStringLength("Strip");
|
||||
uiDefBlockBut(block, seq_editmenu, NULL, "Strip", xco, 0, xmax, 20, "");
|
||||
uiDefBlockBut(block, seq_editmenu, NULL, "Strip", xco, -2, xmax-3, 24, "");
|
||||
xco+= xmax;
|
||||
|
||||
/* end of pull down menus */
|
||||
@ -466,16 +469,16 @@ void seq_buttons()
|
||||
}
|
||||
|
||||
/* IMAGE */
|
||||
uiDefIconButS(block, TOG, B_REDR, ICON_IMAGE_COL, xco,0,XIC,YIC, &sseq->mainb, 0, 0, 0, 0, "Toggles image display");
|
||||
uiDefIconButS(block, TOG, B_REDR, ICON_IMAGE_COL, xco,0,XIC,YIC, &sseq->mainb, 0, 0, 0, 0, "Shows the sequence output image preview");
|
||||
|
||||
/* ZOOM and BORDER */
|
||||
xco+= XIC;
|
||||
uiDefIconButI(block, TOG, B_VIEW2DZOOM, ICON_VIEWZOOM, xco+=XIC,0,XIC,YIC, &viewmovetemp, 0, 0, 0, 0, "Zooms view in and out (CTRL+MiddleMouse)");
|
||||
xco+= 8;
|
||||
uiDefIconButI(block, TOG, B_VIEW2DZOOM, ICON_VIEWZOOM, xco+=XIC,0,XIC,YIC, &viewmovetemp, 0, 0, 0, 0, "Zooms view in and out (Ctrl MiddleMouse)");
|
||||
uiDefIconBut(block, BUT, B_IPOBORDER, ICON_BORDERMOVE, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms view to fit area");
|
||||
|
||||
/* CLEAR MEM */
|
||||
xco+= XIC;
|
||||
uiDefBut(block, BUT, B_SEQCLEAR, "Clear", xco+=XIC,0,2*XIC,YIC, 0, 0, 0, 0, 0, "Forces a clear of all buffered images in memory");
|
||||
xco+= 8;
|
||||
uiDefBut(block, BUT, B_SEQCLEAR, "Refresh", xco+=XIC,0,3*XIC,YIC, 0, 0, 0, 0, 0, "Clears all buffered images in memory");
|
||||
|
||||
uiDrawBlock(block);
|
||||
}
|
||||
|
@ -171,10 +171,53 @@ void do_sound_buttons(unsigned short event)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void do_sound_viewmenu(void *arg, int event)
|
||||
{
|
||||
switch(event) {
|
||||
case 0: /* View All */
|
||||
do_sound_buttons(B_SOUNDHOME);
|
||||
break;
|
||||
case 1: /* Maximize Window */
|
||||
/* using event B_FULL */
|
||||
break;
|
||||
}
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
}
|
||||
|
||||
static uiBlock *sound_viewmenu(void *arg_unused)
|
||||
{
|
||||
uiBlock *block;
|
||||
short yco= 0, menuwidth=120;
|
||||
|
||||
block= uiNewBlock(&curarea->uiblocks, "sound_viewmenu",
|
||||
UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||
uiBlockSetButmFunc(block, do_sound_viewmenu, NULL);
|
||||
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||
|
||||
if (!curarea->full)
|
||||
uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
else
|
||||
uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||
|
||||
if(curarea->headertype==HEADERTOP) {
|
||||
uiBlockSetDirection(block, UI_DOWN);
|
||||
}
|
||||
else {
|
||||
uiBlockSetDirection(block, UI_TOP);
|
||||
uiBlockFlipOrder(block);
|
||||
}
|
||||
|
||||
uiTextBoundsBlock(block, 50);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
void sound_buttons(void)
|
||||
{
|
||||
uiBlock *block;
|
||||
short xco;
|
||||
short xco, xmax;
|
||||
char naam[256];
|
||||
char ch[20];
|
||||
|
||||
@ -183,21 +226,50 @@ void sound_buttons(void)
|
||||
|
||||
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||
|
||||
curarea->butspacetype= SPACE_SOUND;
|
||||
|
||||
curarea->butspacetype= SPACE_SOUND;
|
||||
|
||||
xco = 8;
|
||||
|
||||
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D,
|
||||
windowtype_pup(), xco, 0, XIC+10, YIC,
|
||||
&(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0,
|
||||
"Displays Current Window Type. "
|
||||
"Click for menu of available types.");
|
||||
|
||||
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(),xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
|
||||
xco += XIC + 14;
|
||||
|
||||
xco+= XIC+22;
|
||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||
if (curarea->flag & HEADER_NO_PULLDOWN) {
|
||||
uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
|
||||
ICON_DISCLOSURE_TRI_RIGHT,
|
||||
xco,2,XIC,YIC-2,
|
||||
&(curarea->flag), 0, 0, 0, 0,
|
||||
"Show pulldown menus");
|
||||
}
|
||||
else {
|
||||
uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
|
||||
ICON_DISCLOSURE_TRI_DOWN,
|
||||
xco,2,XIC,YIC-2,
|
||||
&(curarea->flag), 0, 0, 0, 0,
|
||||
"Hide pulldown menus");
|
||||
}
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
xco+=XIC;
|
||||
|
||||
/* FULL WINDOW */
|
||||
if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN,xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
|
||||
else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
|
||||
uiDefIconBut(block, BUT, B_SOUNDHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
|
||||
if((curarea->flag & HEADER_NO_PULLDOWN)==0) {
|
||||
/* pull down menus */
|
||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||
|
||||
xmax= GetButStringLength("View");
|
||||
uiDefBlockBut(block, sound_viewmenu, NULL,
|
||||
"View", xco, -2, xmax-3, 24, "");
|
||||
xco+= xmax;
|
||||
|
||||
xco= std_libbuttons(block, xco+40, 0, 0, NULL, B_SOUNDBROWSE, (ID *)G.ssound->sound, 0, &(G.ssound->sndnr), 1, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
||||
xco= std_libbuttons(block, xco+8, 0, 0, NULL, B_SOUNDBROWSE, (ID *)G.ssound->sound, 0, &(G.ssound->sndnr), 1, 0, 0, 0, 0);
|
||||
|
||||
if(G.ssound->sound) {
|
||||
bSound *sound= G.ssound->sound;
|
||||
|
@ -2629,7 +2629,7 @@ void winqreadbutspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
break;
|
||||
|
||||
case RIGHTMOUSE:
|
||||
nr= pupmenu("Align buttons%t|Free %x0|Horizontal%x1|Vertical%x2");
|
||||
nr= pupmenu("Panel Alignment%t|Horizontal%x1|Vertical%x2|Free %x0");
|
||||
if (nr>=0) {
|
||||
sbuts->align= nr;
|
||||
if(nr) {
|
||||
|
Loading…
Reference in New Issue
Block a user