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

FV_FrameEdit Class Reference

#include <fv_FrameEdit.h>

Inheritance diagram for FV_FrameEdit:
FV_Base FV_UnixFrameEdit

List of all members.

Public Member Functions

 FV_FrameEdit (FV_View *pView)
 ~FV_FrameEdit ()
bool isActive (void) const
void abortDrag (void)
UT_sint32 haveDragged (void) const
void setMode (FV_FrameEditMode iEditMode)
FV_FrameEditMode getFrameEditMode (void) const
void mouseLeftPress (UT_sint32 x, UT_sint32 y)
void mouseRelease (UT_sint32 x, UT_sint32 y)
FV_DragWhat mouseMotion (UT_sint32 x, UT_sint32 y)
void drawFrame (bool bWithHandles)
void deleteFrame (fl_FrameLayout *pFL=NULL)
void setDragType (UT_sint32 x, UT_sint32 y, bool bDrawFrame)
bool getFrameStrings (UT_sint32 x, UT_sint32 y, fv_FrameStrings &FS, fl_BlockLayout **pCloseBL, fp_Page **pPage)
fl_FrameLayoutgetFrameLayout (void) const
const char * getPNGImage (UT_ConstByteBufPtr &ppByteBuf)
void setPointInside (void)
fp_FrameContainergetFrameContainer (void)
bool isImageWrapper (void) const

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_FrameEditMode m_iFrameEditMode
fl_FrameLayoutm_pFrameLayout
fp_FrameContainerm_pFrameContainer
UT_sint32 m_iLastX
UT_sint32 m_iLastY
UT_sint32 m_iInitialDragX
UT_sint32 m_iInitialDragY
bool m_bInitialClick
GR_Imagem_pFrameImage
UT_Timerm_pAutoScrollTimer
UT_sint32 m_iInitialFrameX
UT_sint32 m_iInitialFrameY
UT_String m_sRelWidth
UT_String m_sMinHeight
UT_String m_sExpandHeight

Friends

class fv_View

Constructor & Destructor Documentation

FV_FrameEdit::FV_FrameEdit ( FV_View pView  ) 

References UT_ASSERT_HARMLESS.

FV_FrameEdit::~FV_FrameEdit (  ) 

Member Function Documentation

fp_FrameContainer* FV_FrameEdit::getFrameContainer ( void   )  [inline]

Referenced by fp_FrameContainer::draw().

bool FV_FrameEdit::getFrameStrings ( UT_sint32  x,
UT_sint32  y,
fv_FrameStrings FS,
fl_BlockLayout **  pCloseBL,
fp_Page **  pPage 
)
UT_sint32 FV_FrameEdit::haveDragged ( void   )  const

Returns 0 if the frame has never been dragged at all. Returns 1 if the frame has been dragged a little bit Return 10 if the frame has been dragged a lot.

References FV_Base::getGraphics(), FV_Base::m_bFirstDragDone, FV_Base::m_iFirstEverX, FV_Base::m_iFirstEverY, FV_Base::m_xLastMouse, FV_Base::m_yLastMouse, and UT_DEBUGMSG.

Referenced by mouseRelease().

bool FV_FrameEdit::isImageWrapper ( void   )  const
FV_DragWhat FV_FrameEdit::mouseMotion ( UT_sint32  x,
UT_sint32  y 
)

Method to deal with mouse coordinates.

References FV_Base::getDragWhat().

void FV_FrameEdit::mouseRelease ( UT_sint32  x,
UT_sint32  y 
)

References FV_Base::_beginGlob(), FV_View::_charMotion(), FV_View::_clearSelection(), FV_Base::_endGlob(), FV_View::_ensureInsertionPointOnScreen(), FV_View::_findBlockAtPosition(), FV_View::_fixInsertionPointCoords(), FV_View::_generalUpdate(), FV_View::_restorePieceTableState(), FV_View::_saveAndNotifyPieceTableChange(), fp_VerticalContainer::_setX(), fp_VerticalContainer::_setY(), GR_Graphics::allCarets(), AV_CHG_HDRFTR, FV_ViewDoubleBuffering::beginDoubleBuffering(), UT_String::c_str(), PD_Document::changeStruxFmt(), EV_Mouse::clearMouseContext(), DELETEP, AllCarets::disable(), PD_Document::disableListUpdates(), drawFrame(), PD_Document::enableListUpdates(), FV_DragNothing, FV_FrameEdit_DRAG_EXISTING, FV_FrameEdit_EXISTING_SELECTED, FV_FrameEdit_RESIZE_EXISTING, FV_FrameEdit_RESIZE_INSERT, fl_ContainerLayout::getAP(), fl_ContainerLayout::getContainerType(), FV_Base::getDoc(), FV_View::getEditableBounds(), fl_ContainerLayout::getFirstContainer(), getFrameEditMode(), getFrameStrings(), FV_Base::getGraphics(), FV_Base::getLayout(), XAP_Frame::getMouse(), fl_FrameLayout::getParentContainer(), AV_View::getParentData(), pf_Frag::getPos(), fl_ContainerLayout::getPosition(), fl_BlockLayout::getPosition(), PP_AttrProp::getProperties(), fl_Layout::getStruxDocHandle(), PD_Document::getStruxPosition(), haveDragged(), UT_Rect::height, FV_View::insertParaBreakIfNeededAtPos(), PD_Document::insertStrux(), isActive(), FV_View::isPointLegal(), UT_Rect::left, FV_Base::m_bFirstDragDone, m_bInitialClick, FV_View::m_countDisable, m_iFrameEditMode, FV_Base::m_iGlobCount, m_iInitialFrameX, m_iInitialFrameY, m_iLastX, m_iLastY, m_pAutoScrollTimer, m_pFrameContainer, m_pFrameImage, m_pFrameLayout, FV_View::m_prevMouseContext, FV_Base::m_pView, FV_Base::m_recCurFrame, m_sExpandHeight, m_sMinHeight, m_sRelWidth, fl_ContainerLayout::myContainingLayout(), FV_View::notifyListeners(), PTC_AddFmt, PTX_Block, PTX_EndFrame, PTX_SectionFrame, FL_DocLayout::relocateFrame(), fv_FrameStrings::sColXpos, fv_FrameStrings::sColYpos, FV_View::setCursorToContext(), FV_Base::setDragWhat(), setMode(), FV_View::setPoint(), fv_FrameStrings::sHeight, fv_FrameStrings::sPageXpos, fv_FrameStrings::sPageYpos, fv_FrameStrings::sPrefColumn, fv_FrameStrings::sPrefPage, UT_Timer::stop(), fv_FrameStrings::sWidth, fv_FrameStrings::sXpos, fv_FrameStrings::sYpos, UT_Rect::top, PD_Document::updateDirtyLists(), FV_View::updateScreen(), UT_ASSERT, UT_DEBUGMSG, UT_return_if_fail, FV_View::warpInsPtToXY(), and UT_Rect::width.

Referenced by abortDrag(), mouseLeftPress(), and FV_View::releaseFrame().

void FV_FrameEdit::setDragType ( UT_sint32  x,
UT_sint32  y,
bool  bDrawFrame 
)

This method finds the correct frame on the screen associated with the (x,y) point. It sets the FV_FrameEditMode and the FV_FrameEditDragWhat 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.

The method also sets the fl_FrameLayout and FP_FrameContainer pointers.

References FV_View::_findBlockAtPosition(), FV_View::_getPageForXY(), GR_Graphics::allCarets(), AllCarets::disable(), drawFrame(), FRAME_HANDLE_SIZE, FV_DragBotEdge, FV_DragBotLeftCorner, FV_DragBotRightCorner, FV_DragLeftEdge, FV_DragNothing, FV_DragRightEdge, FV_DragTopEdge, FV_DragTopLeftCorner, FV_DragTopRightCorner, FV_DragWhole, FV_FrameEdit_EXISTING_SELECTED, fl_ContainerLayout::getAP(), fl_ContainerLayout::getContainerType(), FV_Base::getDoc(), FV_View::getDocPositionFromXY(), FV_Base::getDragWhat(), fl_ContainerLayout::getFirstContainer(), fp_FrameContainer::getFullHeight(), fp_FrameContainer::getFullWidth(), fp_FrameContainer::getFullX(), fp_FrameContainer::getFullY(), FV_Base::getGraphics(), FV_View::getLayout(), FL_DocLayout::getLID(), FV_View::getPageScreenOffsets(), PP_AttrProp::getProperty(), PD_Document::getStruxOfTypeFromPosition(), UT_Rect::height, isActive(), UT_Rect::left, FV_View::m_countDisable, m_iFrameEditMode, m_iInitialDragX, m_iInitialDragY, m_iLastX, m_iLastY, m_pFrameContainer, m_pFrameLayout, FV_Base::m_pView, FV_Base::m_recCurFrame, m_sExpandHeight, m_sMinHeight, m_sRelWidth, fl_ContainerLayout::myContainingLayout(), FV_View::setCursorToContext(), FV_Base::setDragWhat(), GR_Graphics::tlu(), UT_Rect::top, UT_ASSERT, UT_return_if_fail, UT_Rect::width, and xxx_UT_DEBUGMSG.

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


Friends And Related Function Documentation

friend class fv_View [friend]

Member Data Documentation


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