#include <gr_Caret.h>
GR_Caret::GR_Caret | ( | GR_Graphics * | pG | ) | [explicit] |
GR_Caret::GR_Caret | ( | GR_Graphics * | pG, | |
const std::string & | sID | |||
) | [explicit] |
References _getCursorBlinkTime(), _getCursorBlinkTimeout(), CURSOR_DELAY_TIME, UT_GenericVector< T >::getItemCount(), m_blinkTimeout, m_enabler, m_iCaretNumber, GR_Graphics::m_vecCarets, m_worker, s_blink_timeout(), s_enable(), s_work(), UT_Timer::set(), setBlink(), UT_WorkerFactory::static_constructor(), and UT_WorkerFactory::TIMER.
GR_Caret::~GR_Caret | ( | ) |
References DELETEP, m_blinkTimeout, m_enabler, m_worker, and UT_Timer::stop().
GR_Caret::GR_Caret | ( | ) | [private] |
GR_Caret::GR_Caret | ( | const GR_Caret & | rhs | ) | [private] |
void GR_Caret::_blink | ( | bool | bExplicit | ) | [private] |
References _getCanCursorBlink(), _getCursorBlinkTime(), GR_Graphics::_tduX(), GR_Graphics::allCarets(), GR_Painter::drawLine(), GR_Graphics::getColor(), AllCarets::JustErase(), m_bCaret1OnScreen, m_bCaret2OnScreen, m_bCursorIsOn, m_bPendingBlink, m_bPointDirection, m_bPositionSet, m_bRecursiveDraw, m_bRemote, m_bSplitCaret, m_clrInsert, m_clrOverwrite, m_clrRemote, m_iCaretNumber, m_iLastDrawTime, m_insertMode, m_iPointHeight, m_iRetry, m_pG, m_xPoint, m_xPoint2, m_yPoint, m_yPoint2, GR_Graphics::restoreRectangle(), s, GR_Graphics::saveRectangle(), GR_Graphics::setColor(), GR_Graphics::tlu(), UT_MAX, UT_MIN, and xxx_UT_DEBUGMSG.
Referenced by _erase(), doBlinkIfNeeded(), forceDraw(), s_enable(), and s_work().
void GR_Caret::_erase | ( | ) | [private] |
References _blink(), and m_bCursorIsOn.
Referenced by disable().
bool GR_Caret::_getCanCursorBlink | ( | ) | const [private] |
References m_bCursorBlink.
Referenced by _blink().
UT_uint32 GR_Caret::_getCursorBlinkTime | ( | ) | const [private] |
Referenced by _blink(), and GR_Caret().
UT_uint32 GR_Caret::_getCursorBlinkTimeout | ( | ) | const [private] |
Referenced by GR_Caret().
void GR_Caret::disable | ( | bool | bNoMulti = false |
) |
References _erase(), m_bCursorIsOn, m_bRecursiveDraw, m_enabler, m_nDisableCount, m_worker, and UT_Timer::stop().
Referenced by AllCarets::disable(), and FV_View::removeCaret().
bool GR_Caret::doBlinkIfNeeded | ( | void | ) |
References _blink(), and m_bPendingBlink.
void GR_Caret::enable | ( | ) |
References m_bRecursiveDraw, m_enabler, m_nDisableCount, UT_Timer::start(), UT_Timer::stop(), and xxx_UT_DEBUGMSG.
Referenced by FV_View::addCaret(), AllCarets::enable(), and resetBlinkTimeout().
void GR_Caret::forceDraw | ( | void | ) |
Only call this is you are absolutely certain you need it!
References _blink(), and m_nDisableCount.
Referenced by Defun1(), AllCarets::doBlinkIfNeeded(), AllCarets::forceDraw(), sActualMoveLeft(), and sActualMoveRight().
std::string GR_Caret::getID | ( | void | ) | const [inline] |
Referenced by GR_Graphics::getCaret(), and GR_Graphics::removeCaret().
bool GR_Caret::getInsertMode | ( | ) | [inline] |
bool GR_Caret::isEnabled | ( | ) | const [inline] |
Referenced by resetBlinkTimeout().
Erase the current caret if it's Position overlaps calling value. This prevents remote carets saving a drawn caret in the saveRectange() call
References m_bCursorIsOn, m_bRecursiveDraw, m_bSplitCaret, m_iCaretNumber, m_nDisableCount, m_pG, m_xPoint, m_yPoint, GR_Graphics::restoreRectangle(), GR_Graphics::tlu(), and xxx_UT_DEBUGMSG.
Referenced by AllCarets::JustErase().
void GR_Caret::operator= | ( | const GR_Caret & | rhs | ) | [private] |
void GR_Caret::resetBlinkTimeout | ( | void | ) |
References enable(), isEnabled(), m_blinkTimeout, UT_Timer::start(), and UT_Timer::stop().
Referenced by FV_Caret_Listener::notify(), and FV_View::updateCarets().
void GR_Caret::s_blink_timeout | ( | UT_Worker * | w | ) | [static, private] |
Referenced by GR_Caret().
void GR_Caret::s_enable | ( | UT_Worker * | _w | ) | [static, private] |
One-time enabler.
References _blink(), UT_Worker::getInstanceData(), m_bCursorIsOn, m_enabler, m_worker, UT_Timer::start(), and UT_Timer::stop().
Referenced by GR_Caret().
void GR_Caret::s_work | ( | UT_Worker * | w | ) | [static, private] |
References _blink(), GR_Graphics::flush(), UT_Worker::getInstanceData(), m_nDisableCount, m_pG, setPendingBlink(), and xxx_UT_DEBUGMSG.
Referenced by GR_Caret().
void GR_Caret::setBlink | ( | bool | bBlink | ) |
Determines whether Abi is going to blink the caret or not.
If not, then _blink() won't actually clear the caret; it'll only draw.
References m_bCursorBlink, and UT_UNUSED.
Referenced by FV_View::addCaret(), GR_Caret(), and AllCarets::setBlink().
void GR_Caret::setCoords | ( | UT_sint32 | x, | |
UT_sint32 | y, | |||
UT_uint32 | h, | |||
UT_sint32 | x2 = 0 , |
|||
UT_sint32 | y2 = 0 , |
|||
UT_uint32 | h2 = 0 , |
|||
bool | bPointDirection = false , |
|||
const UT_RGBColor * | pClr = NULL | |||
) |
References m_bCaret1OnScreen, m_bCaret2OnScreen, m_bPointDirection, m_bPositionSet, m_bRemote, m_iPointHeight, m_iPointHeight2, m_iWindowHeight, m_iWindowWidth, m_pClr, m_xPoint, m_xPoint2, m_yPoint, m_yPoint2, and UT_DEBUGMSG.
Referenced by FV_View::_fixInsertionPointCoords(), and AllCarets::setCoords().
void GR_Caret::setInsertMode | ( | bool | mode | ) | [inline] |
Referenced by AllCarets::setInsertMode().
void GR_Caret::setPendingBlink | ( | void | ) |
References m_bPendingBlink, and xxx_UT_DEBUGMSG.
Referenced by s_work().
void GR_Caret::setRemoteColor | ( | UT_RGBColor | clrRemote | ) |
References m_clrRemote.
Referenced by FV_View::addCaret().
References m_bCaret1OnScreen, m_bCaret2OnScreen, m_iWindowHeight, m_iWindowWidth, m_yPoint, and m_yPoint2.
Referenced by FV_View::_fixInsertionPointCoords(), and AllCarets::setWindowSize().
friend class GR_Graphics [friend] |
bool GR_Caret::m_bCaret1OnScreen [private] |
Referenced by _blink(), setCoords(), and setWindowSize().
bool GR_Caret::m_bCaret2OnScreen [private] |
Referenced by _blink(), setCoords(), and setWindowSize().
bool GR_Caret::m_bCursorBlink [private] |
Referenced by _getCanCursorBlink(), and setBlink().
bool GR_Caret::m_bCursorIsOn [private] |
Referenced by _blink(), _erase(), disable(), JustErase(), and s_enable().
UT_Timer* GR_Caret::m_blinkTimeout [private] |
Referenced by GR_Caret(), resetBlinkTimeout(), and ~GR_Caret().
bool GR_Caret::m_bPendingBlink [private] |
Referenced by _blink(), doBlinkIfNeeded(), and setPendingBlink().
bool GR_Caret::m_bPointDirection [private] |
Referenced by _blink(), and setCoords().
bool GR_Caret::m_bPositionSet [private] |
Referenced by _blink(), and setCoords().
bool GR_Caret::m_bRecursiveDraw [private] |
Referenced by _blink(), disable(), enable(), and JustErase().
bool GR_Caret::m_bRemote [private] |
Referenced by _blink(), and setCoords().
bool GR_Caret::m_bSplitCaret [private] |
Referenced by _blink(), and JustErase().
UT_RGBColor GR_Caret::m_clrInsert [private] |
Referenced by _blink().
UT_RGBColor GR_Caret::m_clrOverwrite [private] |
Referenced by _blink().
UT_RGBColor GR_Caret::m_clrRemote [private] |
Referenced by _blink(), and setRemoteColor().
UT_Timer* GR_Caret::m_enabler [private] |
Referenced by disable(), enable(), GR_Caret(), s_enable(), and ~GR_Caret().
UT_sint32 GR_Caret::m_iCaretNumber [private] |
Referenced by _blink(), GR_Caret(), and JustErase().
long GR_Caret::m_iLastDrawTime [private] |
Referenced by _blink().
bool GR_Caret::m_insertMode [private] |
Referenced by _blink().
UT_uint32 GR_Caret::m_iPointHeight [private] |
Referenced by _blink(), and setCoords().
UT_uint32 GR_Caret::m_iPointHeight2 [private] |
Referenced by setCoords().
UT_sint32 GR_Caret::m_iRetry [private] |
Referenced by _blink().
UT_uint32 GR_Caret::m_iWindowHeight [private] |
Referenced by setCoords(), and setWindowSize().
UT_uint32 GR_Caret::m_iWindowWidth [private] |
Referenced by setCoords(), and setWindowSize().
UT_uint32 GR_Caret::m_nDisableCount [private] |
Referenced by disable(), enable(), forceDraw(), JustErase(), and s_work().
const UT_RGBColor* GR_Caret::m_pClr [private] |
Referenced by setCoords().
GR_Graphics* GR_Caret::m_pG [private] |
Referenced by _blink(), JustErase(), and s_work().
std::string GR_Caret::m_sID [private] |
UT_Timer* GR_Caret::m_worker [private] |
Referenced by disable(), GR_Caret(), s_enable(), and ~GR_Caret().
UT_sint32 GR_Caret::m_xPoint [private] |
Referenced by _blink(), JustErase(), and setCoords().
UT_sint32 GR_Caret::m_xPoint2 [private] |
Referenced by _blink(), and setCoords().
UT_sint32 GR_Caret::m_yPoint [private] |
Referenced by _blink(), JustErase(), setCoords(), and setWindowSize().
UT_sint32 GR_Caret::m_yPoint2 [private] |
Referenced by _blink(), setCoords(), and setWindowSize().