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 (UT_ConstByteBufPtr &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
UT_sint32 m_iLastX
UT_sint32 m_iLastY
UT_sint32 m_iInitialOffX
UT_sint32 m_iInitialOffY
bool m_bTextCut
bool m_bCursorDrawn
UT_Rect m_recCursor
bool m_bDoingCopy
std::string m_sCopyName
bool m_bIsEmbedded
bool m_bEmbedCanResize
std::string m_sDataId
bool m_bSelectionDrawn


class fv_View

Constructor & Destructor Documentation

FV_VisualInlineImage::FV_VisualInlineImage ( FV_View pView  ) 


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 ( UT_ConstByteBufPtr 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(), 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, PT_IMAGE_DESCRIPTION, PT_IMAGE_TITLE, PT_PROPS_ATTRIBUTE_NAME, FV_View::setCharFormat(), GR_Graphics::setClipRect(), GR_Graphics::setLineProperties(), FV_View::setPoint(), UT_Timer::stop(), GR_Graphics::tlu(), UT_Rect::top, FV_View::updateScreen(), UT_DEBUGMSG, UT_LAYOUT_RESOLUTION, UT_std_string_setProperty(), UT_std_string_sprintf(), 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

std::string FV_VisualInlineImage::m_sCopyName [private]

Referenced by mouseCopy(), and mouseRelease().

std::string FV_VisualInlineImage::m_sDataId [private]

Referenced by getPNGImage(), and mouseCut().

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