Updated to match recent changes in the DisplayDriver API
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6004 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -335,10 +335,8 @@ printf("BeDecorator: Draw(%.1f,%.1f,%.1f,%.1f)\n",update.left,update.top,update.
|
||||
_DrawTab(update);
|
||||
|
||||
// Draw the top view's client area - just a hack :)
|
||||
_layerdata.highcolor=_colors->document_background;
|
||||
|
||||
if(_borderrect.Intersects(update))
|
||||
_driver->FillRect(_borderrect & update,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect & update,_colors->document_background);
|
||||
|
||||
_DrawFrame(update);
|
||||
|
||||
@@ -384,10 +382,8 @@ void BeDecorator::_DrawTab(BRect r)
|
||||
if(_look==B_NO_BORDER_WINDOW_LOOK)
|
||||
return;
|
||||
|
||||
_layerdata.highcolor=(GetFocus())?_colors->window_tab:_colors->inactive_window_tab;
|
||||
_driver->FillRect(_tabrect,&_layerdata,pat_solidhigh);
|
||||
_layerdata.highcolor=framecolors[3];
|
||||
_driver->StrokeLine(_tabrect.LeftBottom(),_tabrect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_tabrect, ((GetFocus())?_colors->window_tab:_colors->inactive_window_tab) );
|
||||
_driver->StrokeLine(_tabrect.LeftBottom(),_tabrect.RightBottom(),1.0,framecolors[3]);
|
||||
|
||||
_DrawTitle(_tabrect);
|
||||
|
||||
@@ -439,24 +435,22 @@ void BeDecorator::DrawBlendedRect(BRect r, bool down)
|
||||
SetRGBColor(&tmpcol, uint8(startcol.red-(i*rstep)),
|
||||
uint8(startcol.green-(i*gstep)),
|
||||
uint8(startcol.blue-(i*bstep)));
|
||||
_layerdata.highcolor=tmpcol;
|
||||
|
||||
_driver->StrokeLine(BPoint(r.left,r.top+i),
|
||||
BPoint(r.left+i,r.top),&_layerdata,pat_solidhigh);
|
||||
BPoint(r.left+i,r.top),1.0,tmpcol);
|
||||
|
||||
SetRGBColor(&tmpcol, uint8(halfcol.red-(i*rstep)),
|
||||
uint8(halfcol.green-(i*gstep)),
|
||||
uint8(halfcol.blue-(i*bstep)));
|
||||
|
||||
_layerdata.highcolor=tmpcol;
|
||||
_driver->StrokeLine(BPoint(r.left+steps,r.top+i),
|
||||
BPoint(r.left+i,r.top+steps),&_layerdata,pat_solidhigh);
|
||||
BPoint(r.left+i,r.top+steps),1.0,tmpcol);
|
||||
|
||||
}
|
||||
|
||||
// _layerdata.highcolor=startcol;
|
||||
// _driver->FillRect(r,&_layerdata,pat_solidhigh);
|
||||
_layerdata.highcolor=framecolors[3];
|
||||
_driver->StrokeRect(r,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(r,1.0,framecolors[3]);
|
||||
}
|
||||
|
||||
void BeDecorator::_DrawFrame(BRect invalid)
|
||||
@@ -466,7 +460,7 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
||||
// we must clip the lines drawn by this function to the invalid rectangle we are given
|
||||
|
||||
#ifdef USE_VIEW_FILL_HACK
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_layerdata.highcolor);
|
||||
#endif
|
||||
|
||||
if(!borderwidth)
|
||||
@@ -735,7 +729,7 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
||||
}
|
||||
}
|
||||
|
||||
_driver->StrokeLineArray(points,numlines,colors,&_layerdata);
|
||||
_driver->StrokeLineArray(points,numlines,1.0,colors);
|
||||
|
||||
delete rightindices;
|
||||
delete leftindices;
|
||||
@@ -752,19 +746,16 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
||||
{
|
||||
r.right-=4;
|
||||
r.bottom-=4;
|
||||
_layerdata.highcolor=framecolors[2];
|
||||
|
||||
_driver->StrokeLine(r.LeftTop(),r.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),r.RightTop(),1.0,framecolors[2]);
|
||||
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),1.0,framecolors[2]);
|
||||
|
||||
r.OffsetBy(1,1);
|
||||
_layerdata.highcolor=framecolors[0];
|
||||
_driver->StrokeLine(r.LeftTop(),r.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),r.RightTop(),1.0,framecolors[0]);
|
||||
_driver->StrokeLine(r.LeftTop(),r.LeftBottom(),1.0,framecolors[0]);
|
||||
|
||||
r.OffsetBy(1,1);
|
||||
_layerdata.highcolor=framecolors[1];
|
||||
_driver->FillRect(r,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(r,framecolors[1]);
|
||||
|
||||
/* r.left+=2;
|
||||
r.top+=2;
|
||||
@@ -800,13 +791,13 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
||||
uint8(startcol.blue-(i*bstep)));
|
||||
|
||||
_driver->StrokeLine(BPoint(r.left,r.top+i),
|
||||
BPoint(r.left+i,r.top),&_layerdata,pat_solidhigh);
|
||||
BPoint(r.left+i,r.top),1.0,_layerdata.highcolor);
|
||||
|
||||
_layerdata.highcolor.SetColor(uint8(halfcol.red-(i*rstep)),
|
||||
uint8(halfcol.green-(i*gstep)),
|
||||
uint8(halfcol.blue-(i*bstep)));
|
||||
_driver->StrokeLine(BPoint(r.left+steps,r.top+i),
|
||||
BPoint(r.left+i,r.top+steps),&_layerdata,pat_solidhigh);
|
||||
BPoint(r.left+i,r.top+steps),1.0,_layerdata.highcolor);
|
||||
}
|
||||
_driver->Unlock();
|
||||
// _layerdata.highcolor=framecolors[4];
|
||||
@@ -816,9 +807,9 @@ void BeDecorator::_DrawFrame(BRect invalid)
|
||||
{
|
||||
_layerdata.highcolor=framecolors[4];
|
||||
_driver->StrokeLine(BPoint(r.right,r.top),BPoint(r.right-3,r.top),
|
||||
&_layerdata,pat_solidhigh);
|
||||
1.0,_layerdata.highcolor);
|
||||
_driver->StrokeLine(BPoint(r.left,r.bottom),BPoint(r.left,r.bottom-3),
|
||||
&_layerdata,pat_solidhigh);
|
||||
1.0,_layerdata.highcolor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,11 +193,10 @@ void MacDecorator::Draw(BRect update)
|
||||
printf("MacDecorator::Draw(): "); update.PrintToStream();
|
||||
#endif
|
||||
// Draw the top view's client area - just a hack :)
|
||||
_layerdata.highcolor=_colors->document_background;
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
|
||||
if(_borderrect.Intersects(update))
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
|
||||
_DrawFrame(update);
|
||||
_DrawTab(update);
|
||||
@@ -213,10 +212,8 @@ printf("MacDecorator::Draw()\n");
|
||||
// RGBColor blue(100,100,255);
|
||||
// _layerdata.highcolor=blue;
|
||||
|
||||
_layerdata.highcolor=_colors->document_background;
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
DrawFrame();
|
||||
|
||||
DrawTab();
|
||||
@@ -233,25 +230,25 @@ void MacDecorator::_DrawZoom(BRect r)
|
||||
|
||||
pt2.x--;
|
||||
_layerdata.highcolor.SetColor(136,136,136);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.y--;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt=r.RightBottom();
|
||||
pt2=r.RightTop();
|
||||
pt2.y++;
|
||||
_layerdata.highcolor.SetColor(255,255,255);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.x++;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
DrawBlendedRect(rect,down);
|
||||
@@ -263,7 +260,7 @@ void MacDecorator::_DrawZoom(BRect r)
|
||||
rect.right++;
|
||||
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,_layerdata.highcolor);
|
||||
}
|
||||
|
||||
void MacDecorator::_DrawClose(BRect r)
|
||||
@@ -277,25 +274,25 @@ void MacDecorator::_DrawClose(BRect r)
|
||||
|
||||
pt2.x--;
|
||||
_layerdata.highcolor.SetColor(136,136,136);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.y--;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt=r.RightBottom();
|
||||
pt2=r.RightTop();
|
||||
pt2.y++;
|
||||
_layerdata.highcolor.SetColor(255,255,255);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.x++;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
DrawBlendedRect(rect,down);
|
||||
@@ -321,25 +318,25 @@ void MacDecorator::_DrawMinimize(BRect r)
|
||||
|
||||
pt2.x--;
|
||||
_layerdata.highcolor.SetColor(136,136,136);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.y--;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt=r.RightBottom();
|
||||
pt2=r.RightTop();
|
||||
pt2.y++;
|
||||
_layerdata.highcolor.SetColor(255,255,255);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
pt2=r.LeftBottom();
|
||||
pt2.x++;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
DrawBlendedRect(rect,down);
|
||||
@@ -351,7 +348,7 @@ void MacDecorator::_DrawMinimize(BRect r)
|
||||
rect.InsetBy(-2,0);
|
||||
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
}
|
||||
|
||||
void MacDecorator::_DrawTab(BRect r)
|
||||
@@ -362,29 +359,26 @@ void MacDecorator::_DrawTab(BRect r)
|
||||
return;
|
||||
|
||||
// _layerdata.highcolor=frame_lowcol;
|
||||
// _driver->StrokeRect(_tabrect,&_layerdata,pat_solidhigh);
|
||||
// _driver->StrokeRect(_tabrect,1.0,_layerdata.highcolor);
|
||||
|
||||
// UpdateTitle(layer->name->String());
|
||||
BRect rect(_tabrect);
|
||||
_layerdata.highcolor.SetColor(frame_midcol);
|
||||
_driver->FillRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(rect,frame_midcol);
|
||||
|
||||
|
||||
if(GetFocus())
|
||||
{
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,frame_lowercol);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,frame_lowercol);
|
||||
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),1.0,frame_lowercol);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
rect.bottom++;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,frame_highcol);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,frame_highcol);
|
||||
_driver->StrokeLine(rect.RightBottom(),rect.RightTop(),1.0,frame_lowcol);
|
||||
|
||||
// Draw the neat little lines on either side of the title if there's room
|
||||
if((_tabrect.left+textoffset)>(_closerect.right+5))
|
||||
@@ -396,7 +390,7 @@ void MacDecorator::_DrawTab(BRect r)
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
for(int32 i=0;i<6;i++)
|
||||
{
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
pt.y+=2;
|
||||
pt2.y+=2;
|
||||
}
|
||||
@@ -406,7 +400,7 @@ void MacDecorator::_DrawTab(BRect r)
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
for(int32 i=0;i<6;i++)
|
||||
{
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
pt.y+=2;
|
||||
pt2.y+=2;
|
||||
}
|
||||
@@ -420,7 +414,7 @@ void MacDecorator::_DrawTab(BRect r)
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
for(int32 i=0;i<6;i++)
|
||||
{
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
pt.y+=2;
|
||||
pt2.y+=2;
|
||||
}
|
||||
@@ -429,7 +423,7 @@ void MacDecorator::_DrawTab(BRect r)
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
for(int32 i=0;i<6;i++)
|
||||
{
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,_layerdata.highcolor);
|
||||
pt.y+=2;
|
||||
pt2.y+=2;
|
||||
}
|
||||
@@ -483,17 +477,16 @@ void MacDecorator::DrawBlendedRect(BRect r, bool down)
|
||||
SetRGBColor(&tmpcol, uint8(startcol.red-(i*rstep)),
|
||||
uint8(startcol.green-(i*gstep)),
|
||||
uint8(startcol.blue-(i*bstep)));
|
||||
_layerdata.highcolor=tmpcol;
|
||||
|
||||
_driver->StrokeLine(BPoint(rect.left,rect.top+i),
|
||||
BPoint(rect.left+i,rect.top),&_layerdata,pat_solidhigh);
|
||||
BPoint(rect.left+i,rect.top),1.0,tmpcol);
|
||||
|
||||
SetRGBColor(&tmpcol, uint8(halfcol.red-(i*rstep)),
|
||||
uint8(halfcol.green-(i*gstep)),
|
||||
uint8(halfcol.blue-(i*bstep)));
|
||||
uint8(halfcol.blue-(i*bstep)) );
|
||||
|
||||
_layerdata.highcolor=tmpcol;
|
||||
_driver->StrokeLine(BPoint(rect.left+steps,rect.top+i),
|
||||
BPoint(rect.left+i,rect.top+steps),&_layerdata,pat_solidhigh);
|
||||
BPoint(rect.left+i,rect.top+steps),1.0,tmpcol);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -516,80 +509,68 @@ void MacDecorator::_DrawFrame(BRect rect)
|
||||
pt2=r.LeftBottom();
|
||||
|
||||
// Draw the left side of the frame
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
pt.x++;
|
||||
pt2.x++;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_highcol);
|
||||
pt.x++;
|
||||
pt2.x++;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_midcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x++;
|
||||
pt2.x++;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x++;
|
||||
pt2.x++;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol);
|
||||
pt.x++;
|
||||
pt.y+=2;
|
||||
topleftpt=pt;
|
||||
pt2.x++;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
|
||||
|
||||
pt=r.RightTop();
|
||||
pt2=r.RightBottom();
|
||||
|
||||
// Draw the right side of the frame
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
pt.x--;
|
||||
pt2.x--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol);
|
||||
pt.x--;
|
||||
pt2.x--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_midcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x--;
|
||||
pt2.x--;
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x--;
|
||||
pt2.x--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_highcol);
|
||||
pt.x--;
|
||||
pt.y+=2;
|
||||
toprightpt=pt;
|
||||
pt2.x--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
|
||||
// Draw the top side of the frame that is not in the tab
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(topleftpt,toprightpt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(topleftpt,toprightpt,1.0,frame_lowercol);
|
||||
topleftpt.y--;
|
||||
toprightpt.x++;
|
||||
toprightpt.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
_driver->StrokeLine(topleftpt,toprightpt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(topleftpt,toprightpt,1.0,frame_lowcol);
|
||||
|
||||
pt=r.RightTop();
|
||||
pt2=r.RightBottom();
|
||||
@@ -599,42 +580,37 @@ void MacDecorator::_DrawFrame(BRect rect)
|
||||
pt2=r.RightBottom();
|
||||
|
||||
// Draw the bottom side of the frame
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
pt.x++;
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowcol);
|
||||
pt.x++;
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_midcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x++;
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_midcol);
|
||||
pt.x++;
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_highcol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_highcol);
|
||||
pt.x+=2;
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
_layerdata.highcolor.SetColor(frame_lowercol);
|
||||
_driver->StrokeLine(pt,pt2,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,pt2,1.0,frame_lowercol);
|
||||
pt.y--;
|
||||
pt2.x--;
|
||||
pt2.y--;
|
||||
|
||||
@@ -186,11 +186,10 @@ printf("WinDecorator::Draw(): "); update.PrintToStream();
|
||||
// RGBColor blue(100,100,255);
|
||||
// _layerdata.highcolor=blue;
|
||||
|
||||
_layerdata.highcolor=_colors->document_background;
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
|
||||
if(_borderrect.Intersects(update))
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
|
||||
_DrawFrame(update);
|
||||
_DrawTab(update);
|
||||
@@ -206,10 +205,8 @@ printf("WinDecorator::Draw()\n");
|
||||
// RGBColor blue(100,100,255);
|
||||
// _layerdata.highcolor=blue;
|
||||
|
||||
_layerdata.highcolor=_colors->document_background;
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
|
||||
_driver->FillRect(_borderrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
_driver->FillRect(_borderrect,_colors->document_background);
|
||||
DrawFrame();
|
||||
|
||||
DrawTab();
|
||||
@@ -231,9 +228,9 @@ void WinDecorator::_DrawZoom(BRect r)
|
||||
rect.OffsetBy(1,1);
|
||||
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
rect.InsetBy(1,1);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,_layerdata.highcolor);
|
||||
|
||||
}
|
||||
|
||||
@@ -253,11 +250,11 @@ void WinDecorator::_DrawClose(BRect r)
|
||||
rect.OffsetBy(1,1);
|
||||
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),1.0,_layerdata.highcolor);
|
||||
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),1.0,_layerdata.highcolor);
|
||||
rect.OffsetBy(1,0);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightBottom(),1.0,_layerdata.highcolor);
|
||||
_driver->StrokeLine(rect.RightTop(),rect.LeftBottom(),1.0,_layerdata.highcolor);
|
||||
}
|
||||
|
||||
void WinDecorator::_DrawMinimize(BRect r)
|
||||
@@ -271,7 +268,7 @@ void WinDecorator::_DrawMinimize(BRect r)
|
||||
rect.OffsetBy(1,1);
|
||||
|
||||
_layerdata.highcolor.SetColor(0,0,0);
|
||||
_driver->StrokeRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(rect,1.0,_layerdata.highcolor);
|
||||
}
|
||||
|
||||
void WinDecorator::_DrawTab(BRect r)
|
||||
@@ -281,13 +278,11 @@ void WinDecorator::_DrawTab(BRect r)
|
||||
if(_look==B_NO_BORDER_WINDOW_LOOK)
|
||||
return;
|
||||
|
||||
// _layerdata.highcolor=frame_lowcol;
|
||||
// _driver->StrokeRect(_tabrect,&_layerdata,pat_solidhigh);
|
||||
// _driver->StrokeRect(_tabrect,1.0,frame_lowcol);
|
||||
|
||||
// UpdateTitle(layer->name->String());
|
||||
|
||||
_layerdata.highcolor=tab_highcol;
|
||||
_driver->FillRect(_tabrect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(_tabrect,tab_highcol);
|
||||
|
||||
// Draw the buttons if we're supposed to
|
||||
if(!(_flags & B_NOT_CLOSABLE))
|
||||
@@ -322,47 +317,42 @@ void WinDecorator::DrawBeveledRect(BRect r, bool down)
|
||||
|
||||
// Top highlight
|
||||
_layerdata.highcolor=higher;
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,higher);
|
||||
|
||||
// Left highlight
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,higher);
|
||||
|
||||
// Right shading
|
||||
_layerdata.highcolor=lower;
|
||||
|
||||
pt=rect.RightTop();
|
||||
pt.y++;
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower);
|
||||
|
||||
// Bottom shading
|
||||
pt=rect.LeftBottom();
|
||||
pt.x++;
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
|
||||
// Top inside highlight
|
||||
_layerdata.highcolor=higher;
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.RightTop(),1.0,higher);
|
||||
|
||||
// Left inside highlight
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(rect.LeftTop(),rect.LeftBottom(),1.0,higher);
|
||||
|
||||
// Right inside shading
|
||||
_layerdata.highcolor=lower;
|
||||
|
||||
pt=rect.RightTop();
|
||||
pt.y++;
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower);
|
||||
|
||||
// Bottom inside shading
|
||||
pt=rect.LeftBottom();
|
||||
pt.x++;
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(pt,rect.RightBottom(),1.0,lower);
|
||||
|
||||
rect.InsetBy(1,1);
|
||||
|
||||
_layerdata.highcolor=mid;
|
||||
_driver->FillRect(rect,&_layerdata,pat_solidhigh);
|
||||
_driver->FillRect(rect,mid);
|
||||
}
|
||||
|
||||
void WinDecorator::_SetColors(void)
|
||||
@@ -378,40 +368,35 @@ void WinDecorator::_DrawFrame(BRect rect)
|
||||
BRect r=_borderrect;
|
||||
|
||||
_layerdata.highcolor.SetColor(255,0,0);
|
||||
_driver->StrokeRect(r,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(r,1.0,_layerdata.highcolor);
|
||||
|
||||
BPoint pt;
|
||||
|
||||
_layerdata.highcolor=frame_midcol;
|
||||
pt=r.RightTop();
|
||||
pt.x--;
|
||||
_driver->StrokeLine(r.LeftTop(),pt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_midcol);
|
||||
pt=r.LeftBottom();
|
||||
pt.y--;
|
||||
_driver->StrokeLine(r.LeftTop(),pt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_midcol);
|
||||
|
||||
_layerdata.highcolor=frame_lowercol;
|
||||
_driver->StrokeLine(r.RightTop(),r.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.RightTop(),r.RightBottom(),1.0,frame_lowercol);
|
||||
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),1.0,frame_lowercol);
|
||||
|
||||
r.InsetBy(1,1);
|
||||
_layerdata.highcolor=frame_highcol;
|
||||
pt=r.RightTop();
|
||||
pt.x--;
|
||||
_driver->StrokeLine(r.LeftTop(),pt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_highcol);
|
||||
pt=r.LeftBottom();
|
||||
pt.y--;
|
||||
_driver->StrokeLine(r.LeftTop(),pt,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftTop(),pt,1.0,frame_highcol);
|
||||
|
||||
_layerdata.highcolor=frame_lowcol;
|
||||
_driver->StrokeLine(r.RightTop(),r.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeLine(r.RightTop(),r.RightBottom(),1.0,frame_lowcol);
|
||||
_driver->StrokeLine(r.LeftBottom(),r.RightBottom(),1.0,frame_lowcol);
|
||||
|
||||
r.InsetBy(1,1);
|
||||
_layerdata.highcolor=frame_midcol;
|
||||
_driver->StrokeRect(r,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(r,1.0,frame_midcol);
|
||||
r.InsetBy(1,1);
|
||||
_driver->StrokeRect(r,&_layerdata,pat_solidhigh);
|
||||
_driver->StrokeRect(r,1.0,frame_midcol);
|
||||
}
|
||||
|
||||
extern "C" float get_decorator_version(void)
|
||||
|
||||
Reference in New Issue
Block a user