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

FV_VisualInlineImage Class Reference

#include <fv_InlineImage.h>

Inheritance diagram for FV_VisualInlineImage:
FV_Base FV_UnixVisualInlineImage

List of all members.

Public Member Functions

 FV_VisualInlineImage (FV_View *pView)
 ~FV_VisualInlineImage ()
bool isActive (void) const
void setMode (FV_InlineDragMode iInlineDragMode)
FV_InlineDragMode getInlineDragMode (void) const
void setDragType (UT_sint32 x, UT_sint32 y, bool bDrawImage)
FV_DragWhat mouseMotion (UT_sint32 x, UT_sint32 y)
void mouseLeftPress (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)
bool drawImage (void)
void getImageFromSelection (UT_sint32 x, UT_sint32 y, PP_AttrProp **pAP=NULL)
PP_AttrPropgetImageAPFromXY (UT_sint32 x, UT_sint32 y)
PT_DocPosition getPosFromXY (UT_sint32 x, UT_sint32 y) const
void drawCursor (PT_DocPosition newPos)
void clearCursor (void)
void cleanUP (void)
void abortDrag (void)
const char * getPNGImage (const UT_ByteBuf **pBuf) const
UT_sint32 getImageSelBoxSize () const
void setSelectionDrawn (bool bSelectionDrawn)

Static Public Member Functions

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

Protected Member Functions

virtual void _mouseDrag (UT_sint32 x, UT_sint32 y)

Private Attributes

FV_InlineDragMode m_iInlineDragMode
GR_Imagem_pDragImage
UT_sint32 m_iLastX
UT_sint32 m_iLastY
UT_sint32 m_iInitialOffX
UT_sint32 m_iInitialOffY
bool m_bTextCut
GR_Imagem_pDocUnderCursor
bool m_bCursorDrawn
UT_Rect m_recCursor
UT_Timerm_pAutoScrollTimer
bool m_bDoingCopy
PP_AttrPropm_pImageAP
GR_Imagem_screenCache
UT_UTF8String m_sCopyName
bool m_bIsEmbedded
bool m_bEmbedCanResize
UT_UTF8String m_sDataId
bool m_bSelectionDrawn

Friends

class fv_View

Constructor & Destructor Documentation

FV_VisualInlineImage::FV_VisualInlineImage ( FV_View pView  ) 

References UT_ASSERT_HARMLESS.

FV_VisualInlineImage::~FV_VisualInlineImage (  ) 

Member Function Documentation

void FV_VisualInlineImage::abortDrag ( void   ) 
PP_AttrProp * FV_VisualInlineImage::getImageAPFromXY ( UT_sint32  x,
UT_sint32  y 
)

This method returns the Attributes/Properties pointer of the image at location (X,y). It return NULL if there is no image at (x,y)

References getImageFromSelection().

Referenced by mouseLeftPress().

UT_sint32 FV_VisualInlineImage::getImageSelBoxSize (  )  const
FV_InlineDragMode FV_VisualInlineImage::getInlineDragMode ( void   )  const [inline]
const char * FV_VisualInlineImage::getPNGImage ( const UT_ByteBuf **  pBuf  )  const
bool FV_VisualInlineImage::isActive ( void   )  const
FV_DragWhat FV_VisualInlineImage::mouseMotion ( UT_sint32  x,
UT_sint32  y 
)
void FV_VisualInlineImage::mouseRelease ( UT_sint32  x,
UT_sint32  y 
)

x and y is the location in the document windows of the mouse in logical units.

References FV_Base::_endGlob(), FV_View::_generalUpdate(), FV_View::_restorePieceTableState(), FV_View::_saveAndNotifyPieceTableChange(), FV_View::_updateInsertionPoint(), UT_String::c_str(), GR_Graphics::CAP_PROJECTING, cleanUP(), clearCursor(), FV_View::cmdSelect(), DELETEP, DIM_IN, GR_Painter::drawImage(), FV_DragWhole, FV_InlineDrag_DRAGGING, FV_InlineDrag_RESIZE, gchar, PP_AttrProp::getAttribute(), FV_Base::getDoc(), FV_Base::getDragWhat(), FV_Base::getGraphics(), FV_View::getMouseContext(), FV_View::getPageSize(), FV_View::getPoint(), getPosFromXY(), PP_AttrProp::getProperty(), UT_Rect::height, fp_PageSize::Height(), PD_Document::insertObject(), GR_Graphics::JOIN_MITER, UT_Rect::left, GR_Graphics::LINE_SOLID, m_bDoingCopy, FV_Base::m_bFirstDragDone, m_bIsEmbedded, m_bSelectionDrawn, m_bTextCut, FV_Base::m_iFirstEverX, FV_Base::m_iFirstEverY, FV_Base::m_iGlobCount, m_iInitialOffX, m_iInitialOffY, m_iInlineDragMode, m_pAutoScrollTimer, m_pDragImage, m_pImageAP, FV_Base::m_pView, FV_Base::m_recCurFrame, m_sCopyName, m_screenCache, FV_View::setCharFormat(), GR_Graphics::setClipRect(), GR_Graphics::setLineProperties(), FV_View::setPoint(), UT_String::size(), UT_Timer::stop(), GR_Graphics::tlu(), UT_Rect::top, FV_View::updateScreen(), UT_DEBUGMSG, UT_LAYOUT_RESOLUTION, UT_String_setProperty(), UT_UTF8String_sprintf(), UT_UTF8String::utf8_str(), FV_View::warpInsPtToXY(), UT_Rect::width, and fp_PageSize::Width().

Referenced by FV_View::releaseInlineImage().

void FV_VisualInlineImage::setDragType ( UT_sint32  x,
UT_sint32  y,
bool  bDrawImage 
)

This method finds the correct image on the screen associated with the (x,y) point. It sets the FV_ImageDragMode and the FV_InlineDragWhat mode depending on which control is selected at the (x,y) position.

top left top edge top right X----------X----------X | | | | left edge X X right edge | | | | X----------X----------X Bot left Bot edge Bot right

An (x,y) point that does not fall in a specified control sets drag whole frame mode.

Also sets the image attributes/property list variables m_sAttributes, m_sProperties

References drawImage(), FRAME_HANDLE_SIZE, FV_DragBotEdge, FV_DragBotLeftCorner, FV_DragBotRightCorner, FV_DragLeftEdge, FV_DragNothing, FV_DragRightEdge, FV_DragTopEdge, FV_DragTopLeftCorner, FV_DragTopRightCorner, FV_DragWhole, FV_InlineDrag_NOT_ACTIVE, FV_Base::getDragWhat(), FV_Base::getGraphics(), getImageFromSelection(), UT_Rect::height, UT_Rect::left, m_bEmbedCanResize, m_bIsEmbedded, m_iInlineDragMode, m_iLastX, m_iLastY, FV_Base::m_pView, FV_Base::m_recCurFrame, FV_View::setCursorToContext(), FV_Base::setDragWhat(), GR_Graphics::tlu(), UT_Rect::top, UT_Rect::width, and xxx_UT_DEBUGMSG.

Referenced by FV_View::btn0InlineImage(), and mouseLeftPress().

void FV_VisualInlineImage::setMode ( FV_InlineDragMode  iInlineDragMode  ) 
void FV_VisualInlineImage::setSelectionDrawn ( bool  bSelectionDrawn  ) 

References m_bSelectionDrawn.

Referenced by FV_View::drawSelectionBox().


Friends And Related Function Documentation

friend class fv_View [friend]

Member Data Documentation


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