diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_Column.cpp abi.pow\src\/text/fmt/xp/fp_Column.cpp --- abi.org\src\/text/fmt/xp/fp_Column.cpp Wed Apr 19 19:50:52 2000 +++ abi.pow\src\/text/fmt/xp/fp_Column.cpp Sun May 14 14:46:52 2000 @@ -28,6 +28,7 @@ #include "fl_DocLayout.h" #include "fl_SectionLayout.h" #include "fl_BlockLayout.h" +#include "fv_View.h" #include "pp_AttrProp.h" #include "gr_Graphics.h" #include "gr_DrawArgs.h" @@ -216,6 +217,24 @@ } } +void fp_Container::_drawBoundaries(dg_DrawArgs* pDA) +{ + UT_ASSERT(pDA->pG == m_pG); + if(m_pPage->getDocLayout()->getView()->getShowPara() && m_pG->queryProperties(GR_Graphics::DGP_SCREEN)){ + UT_RGBColor clr(127,127,127); + m_pG->setColor(clr); + UT_sint32 xoffBegin = pDA->xoff - 1; + UT_sint32 yoffBegin = pDA->yoff - 1; + UT_sint32 xoffEnd = pDA->xoff + m_iWidth + 2; + UT_sint32 yoffEnd = pDA->yoff + m_iMaxHeight + 2; + + m_pG->drawLine(xoffBegin, yoffBegin, xoffEnd, yoffBegin); + m_pG->drawLine(xoffBegin, yoffEnd, xoffEnd, yoffEnd); + m_pG->drawLine(xoffBegin, yoffBegin, xoffBegin, yoffEnd); + m_pG->drawLine(xoffEnd, yoffBegin, xoffEnd, yoffEnd); + } +} + void fp_Container::draw(dg_DrawArgs* pDA) { int count = m_vecLines.getItemCount(); @@ -228,6 +247,7 @@ da.yoff += pLine->getY(); pLine->draw(&da); } + _drawBoundaries(pDA); #if 0 m_pG->drawLine(pDA->xoff, pDA->yoff, pDA->xoff + m_iWidth, pDA->yoff); diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_Column.h abi.pow\src\/text/fmt/xp/fp_Column.h --- abi.org\src\/text/fmt/xp/fp_Column.h Wed Apr 19 19:50:52 2000 +++ abi.pow\src\/text/fmt/xp/fp_Column.h Sun May 14 13:10:41 2000 @@ -109,6 +109,7 @@ fl_SectionLayout* m_pSectionLayout; GR_Graphics* m_pG; + void _drawBoundaries(dg_DrawArgs* pDA); }; class fp_Column : public fp_Container diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_Page.cpp abi.pow\src\/text/fmt/xp/fp_Page.cpp --- abi.org\src\/text/fmt/xp/fp_Page.cpp Wed Apr 19 19:50:58 2000 +++ abi.pow\src\/text/fmt/xp/fp_Page.cpp Sun May 14 14:16:16 2000 @@ -151,11 +151,50 @@ return m_pLayout; } +void fp_Page::_drawCropMarks(dg_DrawArgs* pDA) +{ + if(m_pView->getShowPara() && pDA->pG->queryProperties(GR_Graphics::DGP_SCREEN)){ + fp_Column* pFirstColumnLeader = getNthColumnLeader(0); + fl_DocSectionLayout* pFirstSectionLayout = (pFirstColumnLeader->getDocSectionLayout()); + UT_ASSERT(m_pOwner == pFirstSectionLayout); + UT_sint32 iLeftMargin = pFirstSectionLayout->getLeftMargin(); + UT_sint32 iRightMargin = pFirstSectionLayout->getRightMargin(); + UT_sint32 iTopMargin = pFirstSectionLayout->getTopMargin(); + UT_sint32 iBottomMargin = pFirstSectionLayout->getBottomMargin(); + + UT_sint32 xoffStart = pDA->xoff + iLeftMargin - 1; + UT_sint32 yoffStart = pDA->yoff + iTopMargin - 1; + UT_sint32 xoffEnd = pDA->xoff + m_iWidth - iRightMargin + 2; + UT_sint32 yoffEnd = pDA->yoff + m_iHeight - iBottomMargin + 2; + + UT_sint32 iLeftWidth = UT_MIN(iLeftMargin,20); + UT_sint32 iRightWidth = UT_MIN(iRightMargin,20); + UT_sint32 iTopHeight = UT_MIN(iTopMargin,20); + UT_sint32 iBottomHeight = UT_MIN(iBottomMargin,20); + + UT_RGBColor clr(127,127,127); + pDA->pG->setColor(clr); + pDA->pG->drawLine(xoffStart, yoffStart, xoffStart, yoffStart - iTopHeight); + pDA->pG->drawLine(xoffStart, yoffStart, xoffStart - iLeftWidth, yoffStart); + + pDA->pG->drawLine(xoffEnd, yoffStart - iTopHeight, xoffEnd, yoffStart); + pDA->pG->drawLine(xoffEnd, yoffStart, xoffEnd + iRightWidth, yoffStart); + + pDA->pG->drawLine(xoffStart, yoffEnd, xoffStart, yoffEnd + iBottomHeight); + pDA->pG->drawLine(xoffStart - iLeftWidth, yoffEnd, xoffStart, yoffEnd); + + pDA->pG->drawLine(xoffEnd, yoffEnd, xoffEnd, yoffEnd + iBottomHeight); + pDA->pG->drawLine(xoffEnd, yoffEnd, xoffEnd + iRightWidth, yoffEnd); + } +} + void fp_Page::draw(dg_DrawArgs* pDA) { // draw each column on the page int count = m_vecColumnLeaders.getItemCount(); + _drawCropMarks(pDA); + for (int i=0; isetFont(m_pG->getGUIFont()); + + UT_uint32 iTextLen = UT_UCS_strlen(pText); + UT_uint32 iTextWidth = m_pG->measureString(pText,0,iTextLen,NULL); + UT_uint32 iTextHeight = m_pG->getFontHeight(); + + UT_uint32 xoffText = xoff + (iWidth - iTextWidth) / 2; + UT_uint32 yoffText = yoff - m_pG->getFontAscent() * 2 / 3; + + m_pG->drawLine(xoff,yoff,xoff + iWidth,yoff); + UT_RGBColor clrPaper(255,255,255); + if((iTextWidth < iWidth) && (iTextHeight < iHeight)){ + m_pG->fillRect(clrPaper,xoffText,yoffText,iTextWidth,iTextHeight); + m_pG->drawChars(pText,0,iTextLen,xoffText,yoffText); + } +} ////////////////////////////////////////////////////////////////// @@ -294,6 +312,8 @@ FL_DocLayout * pLayout = m_pBL->getDocLayout(); GR_Font* pFont = pLayout->findFont(pSpanAP,pBlockAP,pSectionAP, FL_DocLayout::FIND_FONT_AT_SCREEN_RESOLUTION); + UT_parseColor(PP_evalProperty("color",pSpanAP,pBlockAP,pSectionAP, m_pBL->getDocument(), UT_TRUE), m_colorFG); + m_pG->setFont(pFont); m_iAscent = m_pG->getFontAscent(); m_iDescent = m_pG->getFontDescent(); @@ -372,6 +392,51 @@ m_pG->clearArea(xoff, yoff, m_iWidth, m_pLine->getHeight()); } +void fp_TabRun::_drawArrow(UT_uint32 iLeft,UT_uint32 iTop,UT_uint32 iWidth, UT_uint32 iHeight) +{ + if (!(m_pG->queryProperties(GR_Graphics::DGP_SCREEN))){ + return; + } + + #define NPOINTS 8 + + UT_Point * points = (UT_Point *)calloc(NPOINTS,sizeof(UT_Point)); + UT_ASSERT(points); + + UT_sint32 cur_linewidth = 1 + (UT_MAX(10,m_iAscent) - 10) / 8; + UT_uint32 iyAxis = iTop + m_pLine->getAscent() * 2 / 3; + UT_uint32 iMaxWidth = iWidth / 10 * 6; + UT_uint32 ixGap = (iWidth - iMaxWidth) / 2; + + points[0].x = iLeft + ixGap; + points[0].y = iyAxis - cur_linewidth / 2; + + points[1].x = iLeft + ixGap + iMaxWidth - cur_linewidth * 4; + points[1].y = points[0].y; + + points[2].x = points[1].x; + points[2].y = points[0].y - cur_linewidth * 2; + + points[3].x = iLeft + iWidth - ixGap; + points[3].y = iyAxis; + + points[4].x = points[1].x; + points[4].y = iyAxis + cur_linewidth * 2; + + points[5].x = points[1].x; + points[5].y = iyAxis + cur_linewidth / 2; + + points[6].x = points[0].x; + points[6].y = points[5].y; + + points[7].x = points[0].x; + points[7].y = points[0].y; + + m_pG->setColor(m_colorFG); + m_pG->polyLine(points,NPOINTS); + FREEP(points); +} + void fp_TabRun::_draw(dg_DrawArgs* pDA) { UT_ASSERT(pDA->pG == m_pG); @@ -399,10 +464,16 @@ ) { m_pG->fillRect(clrSelBackground, pDA->xoff, iFillTop, m_iWidth, iFillHeight); + if(pView->getShowPara()){ + _drawArrow(pDA->xoff, iFillTop, m_iWidth, iFillHeight); + } } else { m_pG->fillRect(clrNormalBackground, pDA->xoff, iFillTop, m_iWidth, iFillHeight); + if(pView->getShowPara()){ + _drawArrow(pDA->xoff, iFillTop, m_iWidth, iFillHeight); + } } } @@ -1032,11 +1103,33 @@ { UT_ASSERT(!m_bDirty); UT_ASSERT(m_pG->queryProperties(GR_Graphics::DGP_SCREEN)); + + UT_sint32 xoff = 0, yoff = 0; + m_pLine->getScreenOffsets(this, xoff, yoff); + UT_sint32 iWidth = m_pLine->getMaxWidth() - m_pLine->calculateWidthOfLine(); + + m_pG->clearArea(xoff,yoff,iWidth,m_pLine->getHeight()); } void fp_ForcedColumnBreakRun::_draw(dg_DrawArgs* pDA) { + if (!(m_pG->queryProperties(GR_Graphics::DGP_SCREEN))){ + return; + } + + FV_View* pView = m_pBL->getDocLayout()->getView(); + UT_ASSERT(pView); + if(!pView->getShowPara()){ + return; + } UT_ASSERT(pDA->pG == m_pG); + + UT_sint32 iLineWidth = m_pLine->getMaxWidth() - m_pLine->calculateWidthOfLine(); + + UT_UCSChar *pColumnBreak; + UT_UCS_cloneString_char(&pColumnBreak,"Column Break"); + _drawTextLine(pDA->xoff,pDA->yoff - m_pLine->getAscent() / 3,iLineWidth,m_pLine->getHeight(),pColumnBreak); + FREEP(pColumnBreak); } ////////////////////////////////////////////////////////////////// @@ -1056,11 +1149,13 @@ return UT_FALSE; } + UT_uint32 fp_ForcedPageBreakRun::containsOffset(UT_uint32 /* iOffset */) { return FP_RUN_NOT; } + UT_Bool fp_ForcedPageBreakRun::canBreakAfter(void) const { return UT_FALSE; @@ -1101,10 +1196,32 @@ { UT_ASSERT(!m_bDirty); UT_ASSERT(m_pG->queryProperties(GR_Graphics::DGP_SCREEN)); + + UT_sint32 xoff = 0, yoff = 0; + m_pLine->getScreenOffsets(this, xoff, yoff); + UT_sint32 iWidth = m_pLine->getMaxWidth() - m_pLine->calculateWidthOfLine(); + + m_pG->clearArea(xoff,yoff,iWidth,m_pLine->getHeight()); } void fp_ForcedPageBreakRun::_draw(dg_DrawArgs* pDA) { + if (!(m_pG->queryProperties(GR_Graphics::DGP_SCREEN))){ + return; + } + + FV_View* pView = m_pBL->getDocLayout()->getView(); + UT_ASSERT(pView); + if(!pView->getShowPara()){ + return; + } UT_ASSERT(pDA->pG == m_pG); + + UT_sint32 iLineWidth = m_pLine->getMaxWidth() - m_pLine->calculateWidthOfLine(); + + UT_UCSChar *pPageBreak; + UT_UCS_cloneString_char(&pPageBreak,"Page Break"); + _drawTextLine(pDA->xoff,pDA->yoff - m_pLine->getAscent() / 3,iLineWidth,m_pLine->getHeight(),pPageBreak); + FREEP(pPageBreak); } diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_Run.h abi.pow\src\/text/fmt/xp/fp_Run.h --- abi.org\src\/text/fmt/xp/fp_Run.h Wed Apr 19 19:51:02 2000 +++ abi.pow\src\/text/fmt/xp/fp_Run.h Sat May 13 17:49:33 2000 @@ -135,6 +135,8 @@ virtual UT_Bool recalcWidth(void); virtual void _draw(dg_DrawArgs*) = 0; + void _drawTextLine(UT_sint32, UT_sint32, UT_uint32, UT_uint32, UT_UCSChar *); + virtual void _clearScreen(UT_Bool bFullLineHeightRect) = 0; virtual UT_Bool canBreakAfter(void) const = 0; virtual UT_Bool canBreakBefore(void) const = 0; @@ -204,6 +206,9 @@ void setWidth(UT_sint32); protected: + UT_RGBColor m_colorFG; + + virtual void _drawArrow(UT_uint32 iLeft,UT_uint32 iTop,UT_uint32 iWidth, UT_uint32 iHeight); virtual void _draw(dg_DrawArgs*); virtual void _clearScreen(UT_Bool bFullLineHeightRect); }; diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_TextRun.cpp abi.pow\src\/text/fmt/xp/fp_TextRun.cpp --- abi.org\src\/text/fmt/xp/fp_TextRun.cpp Wed Apr 19 19:51:04 2000 +++ abi.pow\src\/text/fmt/xp/fp_TextRun.cpp Sun May 14 13:41:19 2000 @@ -810,6 +810,9 @@ } _drawDecors(pDA->xoff, yTopOfRun); + if(pView->getShowPara()){ + _drawInvisibles(pDA->xoff, yTopOfRun); + } // TODO: draw this underneath (ie, before) the text and decorations m_bSquiggled = UT_FALSE; @@ -1116,6 +1119,56 @@ m_pG->setLineWidth(m_iLineWidth); } +void fp_TextRun::_drawInvisibleSpaces(UT_sint32 xoff, UT_sint32 yoff) +{ + UT_GrowBuf * pgbCharWidths = m_pBL->getCharWidths()->getCharWidths(); + UT_uint16* pCharWidths = pgbCharWidths->getPointer(0); + const UT_UCSChar* pSpan; + UT_uint32 lenSpan; + UT_uint32 len = m_iLen; + UT_sint32 iWidth = 0; + UT_sint32 cur_linewidth = 1+ (UT_MAX(10,m_iAscent)-10)/8; + UT_sint32 iRectSize = cur_linewidth * 3 / 2; + UT_Bool bContinue = UT_TRUE; + UT_uint32 offset = m_iOffsetFirst; + + if(findCharacter(0, UCS_SPACE) > 0){ + while(bContinue){ + bContinue = m_pBL->getSpanPtr(offset,&pSpan,&lenSpan); + UT_ASSERT(lenSpan > 0); + + + if(lenSpan > len){ + lenSpan = len; + } + + UT_uint32 iy = yoff + getAscent() * 2 / 3; + + for (UT_uint32 i = 0;i < lenSpan;i++){ + if(pSpan[i] == UCS_SPACE){ + m_pG->fillRect(m_colorFG,xoff + iWidth + (pCharWidths[i + offset] - iRectSize) / 2,iy,iRectSize,iRectSize); + } + iWidth += pCharWidths[i + offset]; + } + if (len <= lenSpan){ + bContinue = UT_FALSE; + }else{ + offset += lenSpan; + len -= lenSpan; + } + + } + } +} + +void fp_TextRun::_drawInvisibles(UT_sint32 xoff, UT_sint32 yoff) +{ + if (!(m_pG->queryProperties(GR_Graphics::DGP_SCREEN))){ + return; + } + _drawInvisibleSpaces(xoff,yoff); +} + void fp_TextRun::_drawSquiggle(UT_sint32 top, UT_sint32 left, UT_sint32 right) { if (!(m_pG->queryProperties(GR_Graphics::DGP_SCREEN))) diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fp_TextRun.h abi.pow\src\/text/fmt/xp/fp_TextRun.h --- abi.org\src\/text/fmt/xp/fp_TextRun.h Wed Apr 19 19:51:04 2000 +++ abi.pow\src\/text/fmt/xp/fp_TextRun.h Wed May 10 20:14:53 2000 @@ -101,6 +101,8 @@ virtual void _clearScreen(UT_Bool bFullLineHeightRect); void _drawDecors(UT_sint32, UT_sint32); + void _drawInvisibleSpaces(UT_sint32, UT_sint32); + void _drawInvisibles(UT_sint32, UT_sint32); void _drawSquiggle(UT_sint32 top, UT_sint32 left, UT_sint32 right); void _getPartRect(UT_Rect* pRect, diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fv_View.cpp abi.pow\src\/text/fmt/xp/fv_View.cpp --- abi.org\src\/text/fmt/xp/fv_View.cpp Wed Apr 19 19:51:16 2000 +++ abi.pow\src\/text/fmt/xp/fv_View.cpp Sun May 14 12:34:37 2000 @@ -120,6 +120,7 @@ m_wrappedEnd = UT_FALSE; m_startPosition = 0; + m_bShowPara = UT_FALSE; } FV_View::~FV_View() @@ -5122,3 +5123,12 @@ return (wCount); } + + +void FV_View::setShowPara(UT_Bool bShowPara) +{ + if(bShowPara != m_bShowPara){ + m_bShowPara = bShowPara; + draw(); + } +}; diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/text/fmt/xp/fv_View.h abi.pow\src\/text/fmt/xp/fv_View.h --- abi.org\src\/text/fmt/xp/fv_View.h Wed Apr 19 19:51:17 2000 +++ abi.pow\src\/text/fmt/xp/fv_View.h Sun May 14 12:34:05 2000 @@ -240,6 +240,9 @@ FV_DocCount countWords(void); + void setShowPara(UT_Bool); + inline UT_Bool getShowPara(void) const { return m_bShowPara; }; + protected: void _generalUpdate(void); @@ -355,6 +358,8 @@ // prefs listener - to change cursor blink on/off (and possibly others) static void _prefsListener( XAP_App *, XAP_Prefs *, UT_AlphaHashTable *, void *); + + UT_Bool m_bShowPara; }; #endif /* FV_VIEW_H */ diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/beos/ap_BeOSFrame.cpp abi.pow\src\/wp/ap/beos/ap_BeOSFrame.cpp --- abi.org\src\/wp/ap/beos/ap_BeOSFrame.cpp Wed Apr 19 19:51:53 2000 +++ abi.pow\src\/wp/ap/beos/ap_BeOSFrame.cpp Thu May 11 19:44:08 2000 @@ -200,6 +200,7 @@ //((AP_FrameData*)m_pData)->m_pStatusBar->setView(pView); pView->setInsertMode(((AP_FrameData*)m_pData)->m_bInsertMode); + ((FV_View *) m_pView)->setShowPara(((AP_FrameData*)m_pData)->m_bShowPara); m_pBeDocView->Window()->Lock(); m_pView->setWindowSize(m_pBeDocView->Bounds().Width(), diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/qnx/ap_QNXFrame.cpp abi.pow\src\/wp/ap/qnx/ap_QNXFrame.cpp --- abi.org\src\/wp/ap/qnx/ap_QNXFrame.cpp Wed Apr 19 19:52:24 2000 +++ abi.pow\src\/wp/ap/qnx/ap_QNXFrame.cpp Thu May 11 19:43:52 2000 @@ -206,6 +206,7 @@ ((AP_FrameData*)m_pData)->m_pStatusBar->setView(pView); pView->setInsertMode(((AP_FrameData*)m_pData)->m_bInsertMode); + ((FV_View *) m_pView)->setShowPara(((AP_FrameData*)m_pData)->m_bShowPara); PtArg_t args[1]; PhArea_t *area; diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/unix/ap_UnixFrame.cpp abi.pow\src\/wp/ap/unix/ap_UnixFrame.cpp --- abi.org\src\/wp/ap/unix/ap_UnixFrame.cpp Wed Apr 19 19:53:01 2000 +++ abi.pow\src\/wp/ap/unix/ap_UnixFrame.cpp Thu May 11 19:43:39 2000 @@ -212,6 +212,7 @@ ((AP_FrameData*)m_pData)->m_pStatusBar->setView(pView); pView->setInsertMode(((AP_FrameData*)m_pData)->m_bInsertMode); + ((FV_View *) m_pView)->setShowPara(((AP_FrameData*)m_pData)->m_bShowPara); m_pView->setWindowSize(GTK_WIDGET(m_dArea)->allocation.width, GTK_WIDGET(m_dArea)->allocation.height); diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/win/ap_Win32Dialog_Options.cpp abi.pow\src\/wp/ap/win/ap_Win32Dialog_Options.cpp --- abi.org\src\/wp/ap/win/ap_Win32Dialog_Options.cpp Tue Apr 25 20:19:19 2000 +++ abi.pow\src\/wp/ap/win/ap_Win32Dialog_Options.cpp Thu May 11 09:16:57 2000 @@ -375,6 +375,7 @@ { // localize controls _DS(OPTIONS_CHK_ViewShowRuler, DLG_Options_Label_ViewRuler); + _DS(OPTIONS_CHK_ViewUnprintable, DLG_Options_Label_ViewUnprintable); _DS(OPTIONS_CHK_ViewCursorBlink, DLG_Options_Label_ViewCursorBlink); _DS(OPTIONS_CHK_ViewShowToolbars, DLG_Options_Label_ViewToolbars); _DS(OPTIONS_CHK_ViewAll, DLG_Options_Label_ViewAll); diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/win/ap_Win32Frame.cpp abi.pow\src\/wp/ap/win/ap_Win32Frame.cpp --- abi.org\src\/wp/ap/win/ap_Win32Frame.cpp Wed Apr 19 19:53:44 2000 +++ abi.pow\src\/wp/ap/win/ap_Win32Frame.cpp Thu May 11 19:39:32 2000 @@ -295,6 +295,7 @@ ((AP_FrameData*)m_pData)->m_pStatusBar->setView(pView); pView->setInsertMode(((AP_FrameData*)m_pData)->m_bInsertMode); + ((FV_View *) m_pView)->setShowPara(((AP_FrameData*)m_pData)->m_bShowPara); RECT r; GetClientRect(hwnd, &r); diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_Dialog_Options.cpp abi.pow\src\/wp/ap/xp/ap_Dialog_Options.cpp --- abi.org\src\/wp/ap/xp/ap_Dialog_Options.cpp Wed Apr 19 19:53:57 2000 +++ abi.pow\src\/wp/ap/xp/ap_Dialog_Options.cpp Sat May 13 14:59:00 2000 @@ -103,6 +103,7 @@ Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_CursorBlink, _gatherViewCursorBlink() ); Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_RulerVisible, _gatherViewShowRuler() ); + Save_Pref_Bool( pPrefsScheme, AP_PREF_KEY_ParaVisible, _gatherViewUnprintable() ); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // If we changed whether the ruler is to be visible @@ -113,6 +114,16 @@ pFrameData->m_bShowRuler = _gatherViewShowRuler() ; m_pFrame->toggleRuler( _gatherViewShowRuler() ); } + if ( _gatherViewUnprintable() != pFrameData->m_bShowPara ) + { + pFrameData->m_bShowPara = _gatherViewUnprintable() ; + AV_View * pAVView = m_pFrame->getCurrentView(); + UT_ASSERT(pAVView); + + FV_View * pView = static_cast (pAVView); + + pView->setShowPara( _gatherViewUnprintable() ); + } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // save ruler units value @@ -181,6 +192,9 @@ if (pPrefs->getPrefsValueBool(AP_PREF_KEY_RulerVisible,&b)) _setViewShowRuler (b); + if (pPrefs->getPrefsValueBool(AP_PREF_KEY_ParaVisible,&b)) + _setViewUnprintable (b); + if (pPrefs->getPrefsValueBool(AP_PREF_KEY_CursorBlink,&b)) _setViewCursorBlink (b); @@ -234,7 +248,7 @@ _controlEnable( id_CHECK_VIEW_SHOW_TOOLBARS, UT_FALSE ); _controlEnable( id_CHECK_VIEW_ALL, UT_FALSE ); _controlEnable( id_CHECK_VIEW_HIDDEN_TEXT, UT_FALSE ); - _controlEnable( id_CHECK_VIEW_UNPRINTABLE, UT_FALSE ); + _controlEnable( id_CHECK_VIEW_UNPRINTABLE, UT_TRUE ); // general _controlEnable( id_BUTTON_SAVE, UT_FALSE ); diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_EditMethods.cpp abi.pow\src\/wp/ap/xp/ap_EditMethods.cpp --- abi.org\src\/wp/ap/xp/ap_EditMethods.cpp Wed Apr 26 18:25:59 2000 +++ abi.pow\src\/wp/ap/xp/ap_EditMethods.cpp Sun May 07 16:26:54 2000 @@ -3976,8 +3976,26 @@ XAP_Frame * pFrame = (XAP_Frame *) pAV_View->getParentData(); UT_ASSERT(pFrame); - // TODO: synch this implementation with ap_GetState_View - s_TellNotImplemented(pFrame, "Show/Hide Paragraphs", __LINE__); + AP_FrameData *pFrameData = (AP_FrameData *)pFrame->getFrameData(); + UT_ASSERT(pFrameData); + + pFrameData->m_bShowPara = !pFrameData->m_bShowPara; + + ABIWORD_VIEW; + pView->setShowPara(pFrameData->m_bShowPara); + +#if 0 + // POLICY: make this the default for new frames, too + XAP_App * pApp = pFrame->getApp(); + UT_ASSERT(pApp); + XAP_Prefs * pPrefs = pApp->getPrefs(); + UT_ASSERT(pPrefs); + XAP_PrefsScheme * pScheme = pPrefs->getCurrentScheme(UT_TRUE); + UT_ASSERT(pScheme); + + pScheme->setValueBool(AP_PREF_KEY_ParaVisible, pFrameData->m_bShowPara); +#endif + return UT_TRUE; } diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_FrameData.cpp abi.pow\src\/wp/ap/xp/ap_FrameData.cpp --- abi.org\src\/wp/ap/xp/ap_FrameData.cpp Wed Apr 19 19:54:17 2000 +++ abi.pow\src\/wp/ap/xp/ap_FrameData.cpp Wed May 10 20:37:20 2000 @@ -37,6 +37,7 @@ m_pStatusBar = NULL; m_bShowRuler = UT_TRUE; + m_bShowPara = UT_TRUE; m_bInsertMode = UT_TRUE; if (pApp) @@ -48,6 +49,9 @@ if (pApp->getPrefsValueBool( AP_PREF_KEY_RulerVisible, &b)) m_bShowRuler = b; + + if (pApp->getPrefsValueBool( AP_PREF_KEY_ParaVisible, &b)) + m_bShowPara = b; } } diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_FrameData.h abi.pow\src\/wp/ap/xp/ap_FrameData.h --- abi.org\src\/wp/ap/xp/ap_FrameData.h Wed Apr 19 19:54:17 2000 +++ abi.pow\src\/wp/ap/xp/ap_FrameData.h Sun May 07 15:22:14 2000 @@ -48,6 +48,7 @@ UT_Bool m_bInsertMode; UT_Bool m_bShowRuler; + UT_Bool m_bShowPara; AP_TopRuler * m_pTopRuler; AP_LeftRuler * m_pLeftRuler; diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_Menu_Functions.cpp abi.pow\src\/wp/ap/xp/ap_Menu_Functions.cpp --- abi.org\src\/wp/ap/xp/ap_Menu_Functions.cpp Wed Apr 19 19:54:47 2000 +++ abi.pow\src\/wp/ap/xp/ap_Menu_Functions.cpp Sun May 07 16:49:15 2000 @@ -535,6 +535,11 @@ break; case AP_MENU_ID_VIEW_SHOWPARA: + if ( pFrameData->m_bShowPara ) + s = EV_MIS_Toggled; + else + s = EV_MIS_ZERO; + break; case AP_MENU_ID_VIEW_HEADFOOT: // TODO: implement view methods to check, toggle state s = EV_MIS_Gray; diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_Prefs_SchemeIds.h abi.pow\src\/wp/ap/xp/ap_Prefs_SchemeIds.h --- abi.org\src\/wp/ap/xp/ap_Prefs_SchemeIds.h Wed Apr 19 19:55:10 2000 +++ abi.pow\src\/wp/ap/xp/ap_Prefs_SchemeIds.h Wed May 10 20:51:29 2000 @@ -62,6 +62,9 @@ #define AP_PREF_KEY_RulerVisible "RulerVisible" /* are the rulers visible? {0,1} */ #define AP_PREF_DEFAULT_RulerVisible "1" +#define AP_PREF_KEY_ParaVisible "ParaVisible" /* are the paragraphs/spaces/tats/etc. visible? {0,1} */ +#define AP_PREF_DEFAULT_ParaVisible "0" + #define AP_PREF_KEY_SpellCheckWordList "SpellCheckWordList" /* name of ispell hash file */ @@ -111,6 +114,7 @@ dcl(OptionsTabNumber) dcl(RulerUnits) dcl(RulerVisible) +dcl(ParaVisible) dcl(SpellCheckWordList) dcl(StringSet) dcl(KeyBindings) diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_Toolbar_Functions.cpp abi.pow\src\/wp/ap/xp/ap_Toolbar_Functions.cpp --- abi.org\src\/wp/ap/xp/ap_Toolbar_Functions.cpp Wed Apr 19 19:55:23 2000 +++ abi.pow\src\/wp/ap/xp/ap_Toolbar_Functions.cpp Sun May 14 14:24:16 2000 @@ -312,7 +312,10 @@ const XML_Char ** props_in = NULL; const XML_Char * sz = NULL; - if (!pView->getSectionFormat(&props_in)) + UT_Bool bResult = pView->getSectionFormat(&props_in); + pView->draw(NULL); + + if (!bResult) return s; // NB: maybe *no* properties are consistent across the selection diff -urNwb -x CVS -x WIN32_20.1_i386_DBG -x WIN32_20.1_i386_OBJ -x abidiff.cmd -x patch.txt -x .#*.* abi.org\src\/wp/ap/xp/ap_TopRuler.cpp abi.pow\src\/wp/ap/xp/ap_TopRuler.cpp --- abi.org\src\/wp/ap/xp/ap_TopRuler.cpp Thu Apr 20 09:03:47 2000 +++ abi.pow\src\/wp/ap/xp/ap_TopRuler.cpp Sun May 14 13:24:34 2000 @@ -1279,7 +1279,9 @@ _xorGuide(UT_TRUE); m_draggingWhat = DW_NOTHING; - (static_cast(m_pView))->setSectionFormat(properties); + FV_View *pView = static_cast(m_pView); + pView->setSectionFormat(properties); + pView->draw(NULL); } return; @@ -1298,7 +1300,9 @@ _xorGuide(UT_TRUE); m_draggingWhat = DW_NOTHING; - (static_cast(m_pView))->setSectionFormat(properties); + FV_View *pView = static_cast(m_pView); + pView->setSectionFormat(properties); + pView->draw(NULL); } return; @@ -1314,7 +1318,9 @@ UT_DEBUGMSG(("TopRuler: ColumnGap [%s]\n",properties[1])); m_draggingWhat = DW_NOTHING; - (static_cast(m_pView))->setSectionFormat(properties); + FV_View *pView = static_cast(m_pView); + pView->setSectionFormat(properties); + pView->draw(NULL); } return;