Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CDrawBuffer Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-reader/CDrawBuffer.h>

Inheritance diagram for CDrawBuffer:

Inheritance graph
[legend]
Collaboration diagram for CDrawBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setstartpara ()
void setBop ()
bool isBop ()
void setendpara ()
void setendpara (const CStyle &cs)
int leftMargin ()
int rightMargin ()
void setEof ()
bool eof ()
CDrawBufferoperator= (CDrawBuffer &)
 CDrawBuffer (FontControl *_fs=NULL)
 ~CDrawBuffer ()
int charwidth (int numchars, CStyle &currentstyle)
int charwidth (int numchars)
int width (int availht, int numchars=-1, bool onscreen=false, int scwidth=0, unsigned short _lborder=0, unsigned short _rborder=0)
int offset (int, unsigned short, unsigned short, int)
void render (QPainter *_p, int _y, bool _bMono, int _charWidth, int scw, unsigned short, unsigned short, const QColor &, int availht)
void empty ()
void addch (tchar ch, CStyle _style)
void truncate (int)
void setright (CDrawBuffer &, int)
CStyle firststyle ()
CStyle laststyle ()
int ascent ()
int descent ()
int lineSpacing ()
int lineExtraSpacing ()
linkType getLinkType (int numchars, size_t &tgt, size_t &offset, size_t &pictgt, QImage *&, size_t &)
void resize (int)
bool showPartial ()
CStylegetNextLink (int &)
int invertLink (int)

Private Member Functions

 CDrawBuffer (const CDrawBuffer &)
CDrawBufferoperator= (const tchar *sztmp)
void Highlight (QPainter *_p, bool drawBackground, int _x, int _y, int w, QColor bgColour)

Private Attributes

bool m_hastext
CList< textsegmentsegs
int len
FontControlfc
int m_ascent
int m_descent
int m_lineSpacing
int m_lineExtraSpacing
bool m_bEof
bool m_bBop
bool m_bSop
bool m_bEop
bool m_showPartial

Constructor & Destructor Documentation

CDrawBuffer::CDrawBuffer const CDrawBuffer  )  [private]
 

CDrawBuffer::CDrawBuffer FontControl _fs = NULL  )  [inline]
 

Definition at line 49 of file CDrawBuffer.h.

References empty().

CDrawBuffer::~CDrawBuffer  ) 
 

Definition at line 8 of file CDrawBuffer.cpp.

References CList< T >::erase(), CList< T >::isEmpty(), and segs.


Member Function Documentation

void CDrawBuffer::addch tchar  ch,
CStyle  _style
 

Definition at line 106 of file CDrawBuffer.cpp.

References CList< T >::first(), CList< T >::last(), len, CList< T >::push_back(), and segs.

Referenced by BuffDoc::getline().

int CDrawBuffer::ascent  )  [inline]
 

Definition at line 75 of file CDrawBuffer.h.

References m_ascent.

Referenced by render(), and resize().

int CDrawBuffer::charwidth int  numchars  ) 
 

Definition at line 283 of file CDrawBuffer.cpp.

References CList< T >::begin(), CStyle::canScale(), CBufferFace< tchar >::data(), CList< T >::end(), end, f, fc, FontControl::fixedfontname(), CStyle::getPicture(), FontControl::getsize(), FontControl::gzoom(), FontControl::hasCourier(), CStyle::isMono(), CStyle::isPicture(), len, FontControl::name(), Dasher::Opts::Normal, segs, and text.

int CDrawBuffer::charwidth int  numchars,
CStyle currentstyle
 

Definition at line 251 of file CDrawBuffer.cpp.

References CStyle::canScale(), CBufferFace< tchar >::data(), f, fc, FontControl::fixedfontname(), CStyle::getPicture(), FontControl::getsize(), FontControl::gzoom(), FontControl::hasCourier(), CStyle::isMono(), CStyle::isPicture(), FontControl::name(), Dasher::Opts::Normal, and text.

int CDrawBuffer::descent  )  [inline]
 

Definition at line 76 of file CDrawBuffer.h.

References m_descent.

Referenced by QTReader::blitRot(), and resize().

void CDrawBuffer::empty  ) 
 

Definition at line 80 of file CDrawBuffer.cpp.

References CList< T >::erase(), CList< T >::isEmpty(), len, m_ascent, m_bBop, m_bEof, m_bEop, m_bSop, m_descent, m_lineExtraSpacing, m_lineSpacing, CList< T >::push_back(), and segs.

Referenced by BuffDoc::BuffDoc(), CDrawBuffer(), BuffDoc::getline(), BuffDoc::hyperlink(), BuffDoc::locate(), BuffDoc::openfile(), and BuffDoc::resetPos().

bool CDrawBuffer::eof  )  [inline]
 

Definition at line 47 of file CDrawBuffer.h.

References m_bEof.

Referenced by QTReader::dopagedn(), and QTReader::setautoscroll().

CStyle CDrawBuffer::firststyle  ) 
 

Definition at line 657 of file CDrawBuffer.cpp.

References CList< T >::first(), and segs.

Referenced by BuffDoc::getline().

linkType CDrawBuffer::getLinkType int  numchars,
size_t &  tgt,
size_t &  offset,
size_t &  pictgt,
QImage *&  ,
size_t & 
 

Definition at line 662 of file CDrawBuffer.cpp.

References CList< T >::begin(), eLink, CList< T >::end(), end, eNone, ePicture, eTable, CStyle::getData(), CStyle::getLink(), CStyle::getOffset(), CStyle::getPicture(), CStyle::getPictureLink(), CStyle::getPictureLinkData(), CStyle::getTable(), CStyle::isTable(), len, and segs.

CStyle * CDrawBuffer::getNextLink int &   ) 
 

Definition at line 840 of file CDrawBuffer.cpp.

References CList< T >::begin(), CList< T >::end(), NULL, qDebug(), segs, and start.

void CDrawBuffer::Highlight QPainter *  _p,
bool  drawBackground,
int  _x,
int  _y,
int  w,
QColor  bgColour
[private]
 

Definition at line 644 of file CDrawBuffer.cpp.

References m_ascent, and m_lineSpacing.

Referenced by render().

int CDrawBuffer::invertLink int   ) 
 

Definition at line 856 of file CDrawBuffer.cpp.

References CList< T >::begin(), CList< T >::end(), qDebug(), segs, and start.

bool CDrawBuffer::isBop  )  [inline]
 

Definition at line 41 of file CDrawBuffer.h.

References m_bBop.

CStyle CDrawBuffer::laststyle  ) 
 

Definition at line 652 of file CDrawBuffer.cpp.

References CList< T >::last(), and segs.

Referenced by BuffDoc::getline().

int CDrawBuffer::leftMargin  ) 
 

Definition at line 337 of file CDrawBuffer.cpp.

References CList< T >::begin(), fc, FontControl::getsize(), and segs.

Referenced by offset(), render(), and width().

int CDrawBuffer::lineExtraSpacing  )  [inline]
 

Definition at line 78 of file CDrawBuffer.h.

References m_lineExtraSpacing.

Referenced by QTReader::blitRot().

int CDrawBuffer::lineSpacing  )  [inline]
 

Definition at line 77 of file CDrawBuffer.h.

References m_lineSpacing.

Referenced by QTReader::blitRot(), and resize().

int CDrawBuffer::offset int  ,
unsigned  short,
unsigned  short,
int 
 

Definition at line 347 of file CDrawBuffer.cpp.

References CList< T >::begin(), leftMargin(), m_AlignCentre, m_AlignJustify, m_AlignLeft, m_AlignNone, m_AlignRight, rightMargin(), segs, and width().

Referenced by QTReader::getcurrentpos(), BuffDoc::getline(), QTReader::processmousewordevent(), and render().

CDrawBuffer & CDrawBuffer::operator= CDrawBuffer  ) 
 

Definition at line 41 of file CDrawBuffer.cpp.

References CList< T >::begin(), CList< T >::end(), CList< T >::erase(), i, CList< T >::isEmpty(), len, m_ascent, m_descent, m_lineExtraSpacing, m_lineSpacing, m_showPartial, CList< T >::push_back(), and segs.

CDrawBuffer & CDrawBuffer::operator= const tchar sztmp  )  [private]
 

Reimplemented from CBufferFace< tchar >.

Definition at line 66 of file CDrawBuffer.cpp.

References CList< T >::erase(), i, CList< T >::isEmpty(), len, CList< T >::push_back(), and segs.

void CDrawBuffer::render QPainter *  _p,
int  _y,
bool  _bMono,
int  _charWidth,
int  scw,
unsigned  short,
unsigned  short,
const QColor &  ,
int  availht
 

Definition at line 374 of file CDrawBuffer.cpp.

References FontControl::ascent(), ascent(), QString::at(), CStyle::bBlue(), CList< T >::begin(), CStyle::bGreen(), CStyle::Blue(), CStyle::bRed(), CStyle::canScale(), CBufferFace< tchar >::data(), end, CList< T >::end(), f, fc, QString::find(), FontControl::fixedfontname(), CStyle::getPicture(), FontControl::getsize(), CStyle::Green(), FontControl::gzoom(), FontControl::hasCourier(), Highlight(), i, CStyle::isBold(), CStyle::isItalic(), CStyle::isMono(), CStyle::isPicture(), leftMargin(), len, QString::length(), m_AlignJustify, m_bEop, m_hastext, QString::mid(), FontControl::name(), Dasher::Opts::Normal, offset(), CStyle::Red(), QString::right(), rightMargin(), segs, str, text, and width().

Referenced by QTReader::blitRot().

void CDrawBuffer::resize int   ) 
 

Definition at line 702 of file CDrawBuffer.cpp.

References FontControl::ascent(), ascent(), CList< T >::begin(), CStyle::canScale(), FontControl::descent(), descent(), CList< T >::end(), fc, FontControl::getextraspace(), FontControl::getlead(), CStyle::getPicture(), FontControl::getsize(), FontControl::gzoom(), CStyle::isPicture(), len, lineSpacing(), FontControl::lineSpacing(), m_ascent, m_bSop, m_descent, m_hastext, m_lineExtraSpacing, m_lineSpacing, m_showPartial, and segs.

Referenced by QTReader::getline().

int CDrawBuffer::rightMargin  ) 
 

Definition at line 342 of file CDrawBuffer.cpp.

References CList< T >::begin(), fc, FontControl::getsize(), and segs.

Referenced by offset(), render(), and width().

void CDrawBuffer::setBop  )  [inline]
 

Definition at line 40 of file CDrawBuffer.h.

References m_bBop.

void CDrawBuffer::setendpara const CStyle cs  ) 
 

Definition at line 96 of file CDrawBuffer.cpp.

References CList< T >::first(), len, m_bEop, and segs.

void CDrawBuffer::setendpara  )  [inline]
 

Definition at line 42 of file CDrawBuffer.h.

References m_bEop.

void CDrawBuffer::setEof  )  [inline]
 

Definition at line 46 of file CDrawBuffer.h.

References m_bEof.

void CDrawBuffer::setright CDrawBuffer ,
int 
 

Definition at line 13 of file CDrawBuffer.cpp.

References CList< T >::begin(), CList< T >::end(), CList< T >::erase(), fc, i, CList< T >::isEmpty(), len, m_ascent, m_descent, m_lineExtraSpacing, m_lineSpacing, CList< T >::push_back(), and segs.

Referenced by BuffDoc::getline().

void CDrawBuffer::setstartpara  )  [inline]
 

Definition at line 39 of file CDrawBuffer.h.

References m_bSop.

bool CDrawBuffer::showPartial  )  [inline]
 

Definition at line 83 of file CDrawBuffer.h.

References m_showPartial.

void CDrawBuffer::truncate int   ) 
 

Definition at line 120 of file CDrawBuffer.cpp.

References len.

Referenced by BuffDoc::getline().

int CDrawBuffer::width int  availht,
int  numchars = -1,
bool  onscreen = false,
int  scwidth = 0,
unsigned short  _lborder = 0,
unsigned short  _rborder = 0
 

Definition at line 126 of file CDrawBuffer.cpp.

References CList< T >::begin(), CStyle::canScale(), CBufferFace< tchar >::data(), CList< T >::end(), end, f, fc, QString::find(), FontControl::fixedfontname(), CStyle::getPicture(), FontControl::getsize(), FontControl::gzoom(), FontControl::hasCourier(), i, CStyle::isMono(), CStyle::isPicture(), leftMargin(), len, QString::length(), m_AlignJustify, m_bEop, QString::mid(), FontControl::name(), Dasher::Opts::Normal, QString::right(), rightMargin(), segs, str, and text.

Referenced by QTReader::getcurrentpos(), offset(), QTReader::processmousewordevent(), and render().


Member Data Documentation

FontControl* CDrawBuffer::fc [private]
 

Definition at line 30 of file CDrawBuffer.h.

Referenced by charwidth(), leftMargin(), render(), resize(), rightMargin(), setright(), and width().

int CDrawBuffer::len [private]
 

Definition at line 29 of file CDrawBuffer.h.

Referenced by addch(), charwidth(), empty(), getLinkType(), operator=(), render(), resize(), setendpara(), setright(), truncate(), and width().

int CDrawBuffer::m_ascent [private]
 

Definition at line 31 of file CDrawBuffer.h.

Referenced by ascent(), empty(), Highlight(), operator=(), resize(), and setright().

bool CDrawBuffer::m_bBop [private]
 

Definition at line 32 of file CDrawBuffer.h.

Referenced by empty(), isBop(), and setBop().

bool CDrawBuffer::m_bEof [private]
 

Definition at line 32 of file CDrawBuffer.h.

Referenced by empty(), eof(), and setEof().

bool CDrawBuffer::m_bEop [private]
 

Definition at line 33 of file CDrawBuffer.h.

Referenced by empty(), render(), setendpara(), and width().

bool CDrawBuffer::m_bSop [private]
 

Definition at line 33 of file CDrawBuffer.h.

Referenced by empty(), resize(), and setstartpara().

int CDrawBuffer::m_descent [private]
 

Definition at line 31 of file CDrawBuffer.h.

Referenced by descent(), empty(), operator=(), resize(), and setright().

bool CDrawBuffer::m_hastext [private]
 

Definition at line 27 of file CDrawBuffer.h.

Referenced by render(), and resize().

int CDrawBuffer::m_lineExtraSpacing [private]
 

Definition at line 31 of file CDrawBuffer.h.

Referenced by empty(), lineExtraSpacing(), operator=(), resize(), and setright().

int CDrawBuffer::m_lineSpacing [private]
 

Definition at line 31 of file CDrawBuffer.h.

Referenced by empty(), Highlight(), lineSpacing(), operator=(), resize(), and setright().

bool CDrawBuffer::m_showPartial [private]
 

Definition at line 34 of file CDrawBuffer.h.

Referenced by operator=(), resize(), and showPartial().

CList<textsegment> CDrawBuffer::segs [private]
 

Definition at line 28 of file CDrawBuffer.h.

Referenced by addch(), charwidth(), empty(), firststyle(), getLinkType(), getNextLink(), invertLink(), laststyle(), leftMargin(), offset(), operator=(), render(), resize(), rightMargin(), setendpara(), setright(), width(), and ~CDrawBuffer().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:28:23 2005 for OPIE by  doxygen 1.4.2