"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/wp/ap/xp/ap_LeftRuler.cpp" between
abiword-3.0.1.tar.gz and abiword-3.0.2.tar.gz

About: AbiWord is a free word processing program. It is suitable for typing papers, letters, reports, memos, and so forth.

ap_LeftRuler.cpp  (abiword-3.0.1):ap_LeftRuler.cpp  (abiword-3.0.2)
skipping to change at line 1365 skipping to change at line 1365
if(m_pG == NULL) if(m_pG == NULL)
{ {
return; return;
} }
//fl_HdrFtrShadow * pShadow = pView->getEditShadow(); //fl_HdrFtrShadow * pShadow = pView->getEditShadow();
//bool hdr = (hdrftr && //bool hdr = (hdrftr &&
// pShadow->getHdrFtrSectionLayout()->getHFType() < FL_HDRFTR_FOOTER); // pShadow->getHdrFtrSectionLayout()->getHFType() < FL_HDRFTR_FOOTER);
UT_Rect rTop, rBottom; UT_Rect rTop, rBottom;
UT_uint32 onePX = m_pG->tlu(1);
_getMarginMarkerRects(pInfo,rTop,rBottom); _getMarginMarkerRects(pInfo,rTop,rBottom);
GR_Painter painter(m_pG); GR_Painter painter(m_pG);
#if !defined(TOOLKIT_GTK)
painter.fillRect(GR_Graphics::CLR3D_Background, rTop); painter.fillRect(GR_Graphics::CLR3D_Background, rTop);
#else
painter.fillRect(GR_Graphics::CLR3D_BevelDown, rTop);
#endif
m_pG->setColor3D(GR_Graphics::CLR3D_Foreground); m_pG->setColor3D(GR_Graphics::CLR3D_Foreground);
painter.drawLine( rTop.left, rTop.top, rTop.left + rTop.width, rTop.top) ; painter.drawLine( rTop.left, rTop.top, rTop.left + rTop.width, rTop.top) ;
painter.drawLine( rTop.left + rTop.width, rTop.top, rTop.left + rTop.wid th, rTop.top + rTop.height); painter.drawLine( rTop.left + rTop.width, rTop.top, rTop.left + rTop.wid th, rTop.top + rTop.height);
painter.drawLine( rTop.left + rTop.width, rTop.top + rTop.height, rTop.l eft, rTop.top + rTop.height); painter.drawLine( rTop.left + rTop.width, rTop.top + rTop.height, rTop.l eft, rTop.top + rTop.height);
painter.drawLine( rTop.left, rTop.top + rTop.height, rTop.left, rTop.top ); painter.drawLine( rTop.left, rTop.top + rTop.height, rTop.left, rTop.top );
#if !defined(TOOLKIT_GTK)
UT_uint32 onePX = m_pG->tlu(1);
m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp); m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp);
painter.drawLine( rTop.left + onePX, rTop.top + onePX, rTop.left + rTop. width - onePX, rTop.top + onePX); painter.drawLine( rTop.left + onePX, rTop.top + onePX, rTop.left + rTop. width - onePX, rTop.top + onePX);
painter.drawLine( rTop.left + onePX, rTop.top + rTop.height - m_pG->tlu( 2), rTop.left + onePX, rTop.top + onePX); painter.drawLine( rTop.left + onePX, rTop.top + rTop.height - m_pG->tlu( 2), rTop.left + onePX, rTop.top + onePX);
#endif
// TODO: this isn't the right place for this logic. But it works. // TODO: this isn't the right place for this logic. But it works.
// if (hdrftr && !hdr) // if (hdrftr && !hdr)
// return; // return;
#if !defined(TOOLKIT_GTK)
painter.fillRect(GR_Graphics::CLR3D_Background, rBottom); painter.fillRect(GR_Graphics::CLR3D_Background, rBottom);
#else
painter.fillRect(GR_Graphics::CLR3D_BevelDown, rBottom);
#endif
m_pG->setColor3D(GR_Graphics::CLR3D_Foreground); m_pG->setColor3D(GR_Graphics::CLR3D_Foreground);
painter.drawLine( rBottom.left, rBottom.top, rBottom.left + rBottom.widt h, rBottom.top); painter.drawLine( rBottom.left, rBottom.top, rBottom.left + rBottom.widt h, rBottom.top);
painter.drawLine( rBottom.left + rBottom.width, rBottom.top, rBottom.lef t + rBottom.width, rBottom.top + rBottom.height); painter.drawLine( rBottom.left + rBottom.width, rBottom.top, rBottom.lef t + rBottom.width, rBottom.top + rBottom.height);
painter.drawLine( rBottom.left + rBottom.width, rBottom.top + rBottom.he ight, rBottom.left, rBottom.top + rBottom.height); painter.drawLine( rBottom.left + rBottom.width, rBottom.top + rBottom.he ight, rBottom.left, rBottom.top + rBottom.height);
painter.drawLine( rBottom.left, rBottom.top + rBottom.height, rBottom.le ft, rBottom.top); painter.drawLine( rBottom.left, rBottom.top + rBottom.height, rBottom.le ft, rBottom.top);
#if !defined(TOOLKIT_GTK)
m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp); m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp);
painter.drawLine( rBottom.left + onePX, rBottom.top + onePX, rBottom.lef t + rBottom.width - onePX, rBottom.top + onePX); painter.drawLine( rBottom.left + onePX, rBottom.top + onePX, rBottom.lef t + rBottom.width - onePX, rBottom.top + onePX);
painter.drawLine( rBottom.left + onePX, rBottom.top + rBottom.height - m _pG->tlu(2), rBottom.left + onePX, rBottom.top + onePX); painter.drawLine( rBottom.left + onePX, rBottom.top + rBottom.height - m _pG->tlu(2), rBottom.left + onePX, rBottom.top + onePX);
#if 0
m_pG->setColor3D(GR_Graphics::CLR3D_BevelDown);
painter.drawLine( rBottom.left + rBottom.width - onePX, rBottom.top + on
ePX, rBottom.left + rBottom.width - onePX, rBottom.top + rBottom.height - onePX)
;
painter.drawLine( rBottom.left + rBottom.width - onePX, rBottom.top + rB
ottom.height - onePX, rBottom.left + onePX, rBottom.top + rBottom.height - onePX
);
#endif #endif
} }
void AP_LeftRuler::_getCellMarkerRects(const AP_LeftRulerInfo * pInfo, UT_sint32 iCell, void AP_LeftRuler::_getCellMarkerRects(const AP_LeftRulerInfo * pInfo, UT_sint32 iCell,
UT_Rec t &rCell, fp_TableContainer * pBroke) UT_Rec t &rCell, fp_TableContainer * pBroke)
{ {
if(pInfo->m_mode != AP_LeftRulerInfo::TRI_MODE_TABLE) if(pInfo->m_mode != AP_LeftRulerInfo::TRI_MODE_TABLE)
{ {
rCell.set(0,0,0,0); rCell.set(0,0,0,0);
return; return;
skipping to change at line 1647 skipping to change at line 1654
{ {
return; return;
} }
GR_Painter painter(m_pG); GR_Painter painter(m_pG);
UT_sint32 left = prDrag->left; UT_sint32 left = prDrag->left;
UT_sint32 right = left + prDrag->width - m_pG->tlu(1); UT_sint32 right = left + prDrag->width - m_pG->tlu(1);
UT_sint32 top = prDrag->top; UT_sint32 top = prDrag->top;
UT_sint32 bot = top + prDrag->height - m_pG->tlu(1); // For the clever pe ople: this gives the rect a height of 5 pixels (eg. top:10, bot:14 is 5 pixels)! UT_sint32 bot = top + prDrag->height - m_pG->tlu(1); // For the clever pe ople: this gives the rect a height of 5 pixels (eg. top:10, bot:14 is 5 pixels)!
#if !defined(TOOLKIT_GTK)
painter.fillRect(GR_Graphics::CLR3D_Background, left, top, prDrag->width, prDrag->height); painter.fillRect(GR_Graphics::CLR3D_Background, left, top, prDrag->width, prDrag->height);
#else
painter.fillRect(GR_Graphics::CLR3D_Highlight, left, top, prDrag->width,
prDrag->height);
#endif
m_pG->setColor3D(GR_Graphics::CLR3D_Foreground); m_pG->setColor3D(GR_Graphics::CLR3D_Foreground);
painter.drawLine(left,top,right,top); painter.drawLine(left,top,right,top);
painter.drawLine(left,top,left,bot); painter.drawLine(left,top,left,bot);
painter.drawLine(left,bot,right,bot); painter.drawLine(left,bot,right,bot);
painter.drawLine(right,top,right,bot); painter.drawLine(right,top,right,bot);
#if !defined(TOOLKIT_GTK)
m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp); m_pG->setColor3D(GR_Graphics::CLR3D_BevelUp);
painter.drawLine( left + m_pG->tlu(1), top + m_pG->tlu(1), right - m_pG-> tlu(1), top + m_pG->tlu(1)); painter.drawLine( left + m_pG->tlu(1), top + m_pG->tlu(1), right - m_pG-> tlu(1), top + m_pG->tlu(1));
painter.drawLine( left + m_pG->tlu(1), top + m_pG->tlu(1), left + m_pG->t lu(1), bot - m_pG->tlu(1)); painter.drawLine( left + m_pG->tlu(1), top + m_pG->tlu(1), left + m_pG->t lu(1), bot - m_pG->tlu(1));
#endif
} }
/*****************************************************************/ /*****************************************************************/
void AP_LeftRuler::drawLU(const UT_Rect *clip) void AP_LeftRuler::drawLU(const UT_Rect *clip)
{ {
FV_View * pView = static_cast<FV_View *>(m_pView); FV_View * pView = static_cast<FV_View *>(m_pView);
if (!pView) if (!pView)
return; return;
if(pView->getPoint() == 0) if(pView->getPoint() == 0)
 End of changes. 13 change blocks. 
11 lines changed or deleted 19 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS