Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends

FV_VisualDragText Class Reference

#include <fv_VisualDragText.h>

Inheritance diagram for FV_VisualDragText:
FV_UnixVisualDrag

List of all members.

Public Member Functions

 FV_VisualDragText (FV_View *pView)
virtual ~FV_VisualDragText ()
GR_GraphicsgetGraphics (void) const
bool isActive (void) const
void setMode (FV_VisualDragMode iVisualDragMode)
FV_VisualDragMode getVisualDragMode (void) const
virtual void mouseDrag (UT_sint32 x, UT_sint32 y)
void mouseCut (UT_sint32 x, UT_sint32 y)
void mouseCopy (UT_sint32 x, UT_sint32 y)
void mouseRelease (UT_sint32 x, UT_sint32 y)
void drawImage (void)
void getImageFromSelection (UT_sint32 x, UT_sint32 y)
bool reposOffsets (UT_sint32 x, UT_sint32 y)
PT_DocPosition getPosFromXY (UT_sint32 x, UT_sint32 y)
void drawCursor (PT_DocPosition newPos)
void clearCursor (void)
void abortDrag (void)
bool isNotdraggingImage (void)
bool isDoingCopy (void)
UT_RectgetCurFrame (void)

Static Public Member Functions

static void _actuallyScroll (UT_Worker *pTimer)
static void _autoScroll (UT_Worker *pTimer)

Protected Member Functions

void _mouseDrag (UT_sint32 x, UT_sint32 y)

Protected Attributes

FV_Viewm_pView

Private Attributes

FV_VisualDragMode m_iVisualDragMode
GR_Imagem_pDragImage
UT_sint32 m_iLastX
UT_sint32 m_iLastY
UT_Rect m_recCurFrame
UT_sint32 m_iInitialOffX
UT_sint32 m_iInitialOffY
UT_Rect m_recOrigLeft
UT_Rect m_recOrigRight
bool m_bTextCut
GR_Imagem_pDocUnderCursor
bool m_bCursorDrawn
UT_Rect m_recCursor
UT_Rect m_recDoc
UT_Timerm_pAutoScrollTimer
UT_sint32 m_xLastMouse
UT_sint32 m_yLastMouse
bool m_bDoingCopy
bool m_bNotDraggingImage
bool m_bSelectedRow

Friends

class fv_View

Constructor & Destructor Documentation

FV_VisualDragText::FV_VisualDragText ( FV_View pView  ) 

References UT_ASSERT_HARMLESS.

FV_VisualDragText::~FV_VisualDragText (  )  [virtual]

Member Function Documentation

UT_Rect* FV_VisualDragText::getCurFrame ( void   )  [inline]
void FV_VisualDragText::getImageFromSelection ( UT_sint32  x,
UT_sint32  y 
)

This method creates an image from the current selection. It sets the drag rectangle, the initial offsets and the initial positions of the cursor.

References FV_View::_findPositionCoords(), GR_Painter::genImageFromRectangle(), fl_DocSectionLayout::getActualColumnWidth(), fp_Line::getBlock(), fp_Run::getBlock(), FV_View::getCellAtPos(), fp_Container::getContainer(), fl_ContainerLayout::getContainerType(), fl_BlockLayout::getDocSectionLayout(), FV_View::getDocument(), fl_ContainerLayout::getFirstContainer(), fp_Line::getFirstRun(), getGraphics(), fp_Line::getHeight(), fp_CellContainer::getLeftAttach(), fl_CellLayout::getLength(), fp_Run::getLine(), fp_Line::getMaxWidth(), fp_Container::getNext(), fl_ContainerLayout::getNextBlockInDocument(), FV_View::getNthSelection(), FV_View::getNumSelections(), fp_Line::getPage(), FV_View::getPoint(), fl_ContainerLayout::getPosition(), fp_CellContainer::getRightAttach(), fp_Line::getScreenOffsets(), fp_VerticalContainer::getScreenRect(), fp_ContainerObject::getSectionLayout(), FV_View::getSelectionAnchor(), FV_View::getSelectionMode(), FV_View::getTableAtPos(), fp_CellContainer::getTopAttach(), AV_View::getWindowHeight(), AV_View::getWindowWidth(), fp_Line::getX(), fp_Run::getX(), UT_Rect::height, PD_Document::isBlockAtPos(), PD_Document::isCellAtPos(), isDoingCopy(), fl_BlockLayout::isEmbeddedType(), PD_Document::isEndTableAtPos(), PD_Document::isTableAtPos(), UT_Rect::left, m_bNotDraggingImage, m_bSelectedRow, m_iInitialOffX, m_iInitialOffY, m_iLastX, m_iLastY, m_pDragImage, PD_DocumentRange::m_pos1, m_pView, m_recCurFrame, m_recOrigLeft, m_recOrigRight, fl_ContainerLayout::myContainingLayout(), GR_Graphics::setCursor(), UT_Rect::top, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, and UT_Rect::width.

Referenced by mouseCopy(), and mouseCut().

FV_VisualDragMode FV_VisualDragText::getVisualDragMode ( void   )  const [inline]
bool FV_VisualDragText::isActive ( void   )  const

References FV_VisualDrag_NOT_ACTIVE, and m_iVisualDragMode.

Referenced by Defun1().

bool FV_VisualDragText::isDoingCopy ( void   )  [inline]
bool FV_VisualDragText::isNotdraggingImage ( void   )  [inline]

Referenced by Defun(), and sActualVisualDrag().

void FV_VisualDragText::mouseDrag ( UT_sint32  x,
UT_sint32  y 
) [virtual]

Reimplemented in FV_UnixVisualDrag.

References _mouseDrag().

Referenced by FV_View::dragVisualText().

bool FV_VisualDragText::reposOffsets ( UT_sint32  x,
UT_sint32  y 
)

This method is called at the commencement of a visual drag. If the offsets to the caret are too big, this method will adjust them and shift the image of the dragged text to a comfortable distance fromthe caret. Returns true if the offsets are shifted. UT_sint32 x pos of the caret UT_sint32 y pos of the caret

References drawImage(), getGraphics(), UT_Rect::height, UT_Rect::left, m_iInitialOffX, m_iInitialOffY, m_pView, m_recCurFrame, m_recOrigLeft, m_recOrigRight, UT_Rect::set(), GR_Graphics::setClipRect(), GR_Graphics::tlu(), UT_Rect::top, FV_View::updateScreen(), UT_DEBUGMSG, and UT_Rect::width.

Referenced by _mouseDrag().


Friends And Related Function Documentation

friend class fv_View [friend]

Member Data Documentation

Referenced by clearCursor(), and drawCursor().


The documentation for this class was generated from the following files: