#include <fv_Selection.h>
FV_Selection::FV_Selection | ( | FV_View * | pView | ) |
References UT_GenericVector< T >::clear(), m_vecSelRanges, m_vecSelRTFBuffers, and UT_ASSERT.
FV_Selection::~FV_Selection | ( | ) |
void FV_Selection::addCellToSelection | ( | fl_CellLayout * | pCell | ) |
Add a cell to the list of selected regions.
References UT_GenericVector< T >::addItem(), IE_Exp::copyToBuffer(), DELETEP, FV_SelectionMode_TableColumn, FV_SelectionMode_TableRow, FV_View::getCellParams(), getDoc(), PD_Document::getNextStruxOfType(), fl_Layout::getStruxDocHandle(), PD_Document::getStruxPosition(), FV_Selection::FV_SelectionCellProps::m_iBot, FV_Selection::FV_SelectionCellProps::m_iLeft, FV_Selection::FV_SelectionCellProps::m_iRight, m_iSelectionMode, FV_Selection::FV_SelectionCellProps::m_iTop, PD_DocumentRange::m_pDoc, PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, m_pView, m_vecSelCellProps, m_vecSelRanges, m_vecSelRTFBuffers, PTX_EndCell, setSelectAll(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by FV_View::cmdSelectColumn().
void FV_Selection::addSelectedRange | ( | PT_DocPosition | posLow, | |
PT_DocPosition | posHigh, | |||
bool | bAddData | |||
) |
Add a range to the list of selected regions as defined by posLow, posHigh. If bAddData is true also make a copy of the selected text in RTF format.
void FV_Selection::checkSelectAll | ( | void | ) |
void FV_Selection::clearSelection | ( | void | ) |
References FV_SelectionMode_NONE, setMode(), and setSelectAll().
Referenced by FV_View::_resetSelection().
PD_Document * FV_Selection::getDoc | ( | void | ) | const |
References FV_View::getDocument(), and m_pView.
Referenced by addCellToSelection(), and pasteRowOrCol().
FL_DocLayout * FV_Selection::getLayout | ( | void | ) | const |
References FV_View::getLayout(), and m_pView.
PD_DocumentRange * FV_Selection::getNthSelection | ( | UT_sint32 | i | ) | const |
Return the ith selection.
References UT_GenericVector< T >::getNthItem(), getNumSelections(), and m_vecSelRanges.
Referenced by FV_View::_clearSelection(), FV_View::_drawSelection(), FV_View::cmdCut(), FV_View::getNthSelection(), and pasteRowOrCol().
UT_sint32 FV_Selection::getNumSelections | ( | void | ) | const |
Return the number of active selections.
References UT_GenericVector< T >::getItemCount(), and m_vecSelRanges.
Referenced by FV_View::_clearSelection(), FV_View::_drawSelection(), getNthSelection(), FV_View::getNumSelections(), and pasteRowOrCol().
FV_SelectionMode FV_Selection::getPrevSelectionMode | ( | void | ) | const [inline] |
Referenced by FV_View::cmdPaste(), and FV_View::getPrevSelectionMode().
fl_TOCLayout* FV_Selection::getSelectedTOC | ( | void | ) | [inline] |
PT_DocPosition FV_Selection::getSelectionAnchor | ( | void | ) | const |
References FV_SelectionMode_Multiple, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_iSelectAnchor, m_iSelectionMode, PD_DocumentRange::m_pos1, and m_vecSelRanges.
Referenced by FV_View::_clearSelection(), FV_View::_deleteSelection(), FV_View::_drawSelection(), FV_View::_eraseSelection(), FV_View::_extSel(), FV_View::_moveToSelectionEnd(), FV_View::cmdInsertHyperlink(), FV_View::countWords(), FV_View::extSelToXYword(), FV_View::getAllAttrProp(), FV_View::getAttributes(), FV_View::getBlockFormat(), FV_View::getBlocksInSelection(), FV_View::getCharFormat(), FV_View::getCmdInsertRangeVariables(), FV_View::getDocumentRangeOfCurrentSelection(), FV_View::getNumRowsInSelection(), FV_View::getSectionFormat(), FV_View::getSelectedImage(), FV_View::getSelectedObject(), FV_View::getSelectionAnchor(), FV_View::getSelectionLength(), FV_View::getSelectionText(), FV_View::getStyle(), FV_View::insertAnnotation(), FV_View::isSelectionEmpty(), FV_View::processSelectedBlocks(), FV_View::queryCharFormat(), FV_View::setBlockFormat(), FV_View::setCellFormat(), FV_View::setCharFormat(), FV_View::setFrameFormat(), FV_View::setSectionFormat(), FV_View::setStyleAtPos(), FV_View::setTableFormat(), FV_View::swapSelectionOrientation(), and FV_View::toggleCase().
PT_DocPosition FV_Selection::getSelectionLeftAnchor | ( | void | ) | const |
References FV_SelectionMode_Multiple, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_iSelectionMode, m_iSelectLeftAnchor, PD_DocumentRange::m_pos1, and m_vecSelRanges.
Referenced by FV_View::extSelToXYword(), FV_View::getSelectionLeftAnchor(), FV_View::isSelectionEmpty(), and FV_View::selectRange().
FV_SelectionMode FV_Selection::getSelectionMode | ( | void | ) | const [inline] |
PT_DocPosition FV_Selection::getSelectionRightAnchor | ( | void | ) | const |
References FV_SelectionMode_Multiple, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), m_iSelectionMode, m_iSelectRightAnchor, PD_DocumentRange::m_pos2, and m_vecSelRanges.
Referenced by FV_View::extSelToXYword(), FV_View::getSelectionRightAnchor(), and FV_View::selectRange().
fl_TableLayout * FV_Selection::getTableLayout | ( | void | ) | const |
References m_pTableOfSelectedColumn.
Referenced by FV_View::cmdPaste().
bool FV_Selection::isPosSelected | ( | PT_DocPosition | pos | ) | const |
References FV_SelectionMode_Multiple, FV_SelectionMode_NONE, UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), FV_View::getPoint(), m_iSelectAnchor, m_iSelectionMode, PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, m_pView, m_vecSelRanges, and xxx_UT_DEBUGMSG.
Referenced by FV_View::_getMouseContext(), and FV_View::isPosSelected().
bool FV_Selection::isSelectAll | ( | void | ) | const [inline] |
bool FV_Selection::isSelected | ( | void | ) | const |
References FV_SelectionMode_NONE, and m_iSelectionMode.
Referenced by FV_View::_clearSelection(), FV_View::_eraseSelection(), FV_View::getSelectionAnchor(), and FV_View::isSelectionEmpty().
void FV_Selection::pasteRowOrCol | ( | void | ) |
References FV_View::_clearSelection(), FV_View::_ensureInsertionPointOnScreen(), FV_View::_fixInsertionPointCoords(), FV_View::_generalUpdate(), FV_View::_restorePieceTableState(), FV_View::_saveAndNotifyPieceTableChange(), AV_CHG_MOTION, PD_Document::beginUserAtomicGlob(), fl_SectionLayout::checkAndAdjustCellSize(), FV_View::cmdInsertCol(), DELETEP, PD_Document::disableListUpdates(), PD_Document::enableListUpdates(), PD_Document::endUserAtomicGlob(), FV_View::findCellPosAt(), FV_SelectionMode_TableColumn, FV_View::getCellParams(), FV_View::getCurrentBlock(), getDoc(), UT_ByteBuf::getLength(), UT_GenericVector< T >::getNthItem(), getNthSelection(), getNumSelections(), FV_View::getPoint(), UT_ByteBuf::getPointer(), FV_View::getRevisionLevel(), fl_BlockLayout::getSectionLayout(), PD_Document::getStruxOfTypeFromPosition(), PD_Document::getStruxPosition(), FV_View::isSelectionEmpty(), FV_View::isShowRevisions(), m_iPrevSelectionMode, PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, m_pView, m_vecSelRTFBuffers, FV_View::notifyListeners(), IE_Imp_RTF::pasteFromBuffer(), PTX_SectionCell, PTX_SectionTable, PD_Document::setDontImmediatelyLayout(), FV_View::setPoint(), PD_Document::updateDirtyLists(), and UT_return_if_fail.
Referenced by FV_View::cmdPaste().
void FV_Selection::setMode | ( | FV_SelectionMode | iSelMode | ) |
References UT_GenericVector< T >::clear(), FV_SelectionMode_NONE, FV_SelectionMode_TOC, m_iPrevSelectionMode, m_iSelectionMode, m_pSelectedTOC, m_pTableOfSelectedColumn, m_vecSelCellProps, m_vecSelRanges, m_vecSelRTFBuffers, setSelectAll(), fl_TOCLayout::setSelected(), and UT_VECTOR_PURGEALL.
Referenced by FV_View::_extSelToPos(), FV_View::_setSelectionAnchor(), clearSelection(), FV_View::cmdSelectColumn(), FV_View::setSelectionMode(), and setTOCSelected().
void FV_Selection::setSelectAll | ( | bool | bSelectAll | ) |
References m_bSelectAll, and xxx_UT_DEBUGMSG.
Referenced by addCellToSelection(), checkSelectAll(), clearSelection(), setMode(), setSelectionAnchor(), setSelectionLeftAnchor(), setSelectionRightAnchor(), and setTOCSelected().
void FV_Selection::setSelectionAnchor | ( | PT_DocPosition | pos | ) |
References FV_View::getEditableBounds(), FL_DocLayout::getLastSection(), FV_View::getPoint(), m_iSelectAnchor, FV_View::m_pLayout, m_pView, setSelectAll(), and xxx_UT_DEBUGMSG.
Referenced by FV_View::_extSelToPos(), FV_View::_resetSelection(), FV_View::_setSelectionAnchor(), FV_View::cmdInsertHyperlink(), FV_View::extSelToXYword(), FV_View::FV_View(), and FV_View::swapSelectionOrientation().
void FV_Selection::setSelectionLeftAnchor | ( | PT_DocPosition | pos | ) |
void FV_Selection::setSelectionRightAnchor | ( | PT_DocPosition | pos | ) |
void FV_Selection::setTableLayout | ( | fl_TableLayout * | pFL | ) |
References FV_SelectionMode_TableColumn, FV_SelectionMode_TableRow, m_iSelectionMode, m_pTableOfSelectedColumn, and UT_ASSERT.
Referenced by FV_View::cmdSelectColumn().
void FV_Selection::setTOCSelected | ( | fl_TOCLayout * | pTOCL | ) |
References FV_SelectionMode_TOC, fl_ContainerLayout::getPosition(), m_iSelectAnchor, m_pSelectedTOC, setMode(), setSelectAll(), fl_TOCLayout::setSelected(), and UT_return_if_fail.
Referenced by FV_View::cmdSelectTOC().
friend class fv_View [friend] |
bool FV_Selection::m_bSelectAll [private] |
Referenced by setSelectAll().
Referenced by pasteRowOrCol(), and setMode().
PT_DocPosition FV_Selection::m_iSelectAnchor [private] |
Referenced by checkSelectAll(), getSelectionAnchor(), isPosSelected(), setSelectionAnchor(), and setTOCSelected().
Referenced by getSelectionLeftAnchor(), setSelectionLeftAnchor(), and setSelectionRightAnchor().
Referenced by getSelectionRightAnchor(), setSelectionLeftAnchor(), and setSelectionRightAnchor().
fl_TOCLayout* FV_Selection::m_pSelectedTOC [private] |
Referenced by setMode(), setTOCSelected(), and ~FV_Selection().
Referenced by getTableLayout(), setMode(), setTableLayout(), and ~FV_Selection().
FV_View* FV_Selection::m_pView [private] |
Referenced by addCellToSelection(), setMode(), and ~FV_Selection().
UT_GenericVector<PD_DocumentRange *> FV_Selection::m_vecSelRanges [private] |
Referenced by addCellToSelection(), FV_Selection(), pasteRowOrCol(), setMode(), and ~FV_Selection().