LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SelectionEngine Class Reference

#include <seleng.hxx>

Collaboration diagram for SelectionEngine:
[legend]

Public Member Functions

 SelectionEngine (vcl::Window *pWindow, FunctionSet *pFunctions=nullptr)
 
 ~SelectionEngine ()
 
bool SelMouseButtonDown (const MouseEvent &rMEvt)
 
bool SelMouseButtonUp (const MouseEvent &rMEvt)
 
bool SelMouseMove (const MouseEvent &rMEvt)
 
void ReleaseMouse ()
 
void CaptureMouse ()
 
void CursorPosChanging (bool bShift, bool bMod1)
 
void SetVisibleArea (const tools::Rectangle &rNewArea)
 
void SetAddMode (bool)
 
bool IsAddMode () const
 
void AddAlways (bool bOn)
 
bool IsAlwaysAdding () const
 
void EnableDrag (bool bOn)
 
void SetSelectionMode (SelectionMode eMode)
 
SelectionMode GetSelectionMode () const
 
void SetFunctionSet (FunctionSet *pFuncs)
 
const FunctionSetGetFunctionSet () const
 
const PointGetMousePosPixel () const
 
const MouseEventGetMouseEvent () const
 
void SetWindow (vcl::Window *)
 
vcl::WindowGetWindow () const
 
void LockModifiers (sal_uInt16 nModifiers)
 
sal_uInt16 GetLockedModifiers () const
 
bool IsInSelection () const
 
void Reset ()
 
void Command (const CommandEvent &rCEvt)
 
bool HasAnchor () const
 
void SetAnchor (bool bAnchor)
 
void SetUpdateInterval (sal_uLong nInterval)
 
void ExpandSelectionOnMouseMove (bool bExpand=true)
 

Private Member Functions

 DECL_DLLPRIVATE_LINK (ImpWatchDog, Timer *, void)
 
bool ShouldDeselect (bool bModifierKey1) const
 

Private Attributes

FunctionSetpFunctionSet
 
VclPtr< vcl::WindowpWin
 
tools::Rectangle aArea
 
Timer aWTimer
 
MouseEvent aLastMove
 
SelectionMode eSelMode
 
sal_uLong nUpdateInterval
 
sal_uInt16 nLockedMods
 
SelectionEngineFlags nFlags
 

Detailed Description

Definition at line 74 of file seleng.hxx.

Constructor & Destructor Documentation

SelectionEngine::SelectionEngine ( vcl::Window pWindow,
FunctionSet pFunctions = nullptr 
)
SelectionEngine::~SelectionEngine ( )

Definition at line 51 of file seleng.cxx.

References aWTimer, and Task::Stop().

Member Function Documentation

void SelectionEngine::AddAlways ( bool  bOn)
inline

Definition at line 187 of file seleng.hxx.

References ADD_ALW, and nFlags.

Referenced by SvImpLBox::KeyInput(), SvImpLBox::SetSelectionMode(), and SvImpLBox::SetStyle().

void SelectionEngine::CaptureMouse ( )

Definition at line 287 of file seleng.cxx.

References vcl::Window::CaptureMouse(), vcl::Window::IsMouseCaptured(), and pWin.

Referenced by SelMouseButtonDown(), and SetWindow().

void SelectionEngine::Command ( const CommandEvent rCEvt)
void SelectionEngine::CursorPosChanging ( bool  bShift,
bool  bMod1 
)
SelectionEngine::DECL_DLLPRIVATE_LINK ( ImpWatchDog  ,
Timer ,
void   
)
private
void SelectionEngine::EnableDrag ( bool  bOn)
inline

Definition at line 179 of file seleng.hxx.

References DRG_ENAB, and nFlags.

Referenced by SvImpLBox::SetDragDropMode().

void SelectionEngine::ExpandSelectionOnMouseMove ( bool  bExpand = true)
inline

Definition at line 154 of file seleng.hxx.

References EXPANDONMOVE.

Referenced by SvImpLBox::SetDragDropMode(), and SvImpLBox::SvImpLBox().

const FunctionSet* SelectionEngine::GetFunctionSet ( ) const
inline

Definition at line 130 of file seleng.hxx.

sal_uInt16 SelectionEngine::GetLockedModifiers ( ) const
inline

Definition at line 141 of file seleng.hxx.

const MouseEvent& SelectionEngine::GetMouseEvent ( ) const
inline

Definition at line 134 of file seleng.hxx.

const Point& SelectionEngine::GetMousePosPixel ( ) const
inline

Definition at line 132 of file seleng.hxx.

References MouseEvent::GetPosPixel().

Referenced by SvImpLBox::BeginDrag().

SelectionMode SelectionEngine::GetSelectionMode ( ) const
inline
vcl::Window* SelectionEngine::GetWindow ( ) const
inline

Definition at line 137 of file seleng.hxx.

bool SelectionEngine::HasAnchor ( ) const
inline

Definition at line 211 of file seleng.hxx.

References HAS_ANCH, and nFlags.

bool SelectionEngine::IsAddMode ( ) const
inline

Definition at line 163 of file seleng.hxx.

References ADD_ALW, IN_ADD, and nFlags.

Referenced by CursorPosChanging(), SvImpLBox::KeyInput(), SelMouseButtonDown(), and SvImpLBox::SetCursor().

bool SelectionEngine::IsAlwaysAdding ( ) const
inline

Definition at line 195 of file seleng.hxx.

References ADD_ALW, and nFlags.

Referenced by SvImpLBox::KeyInput(), SvImpLBox::MouseButtonDown(), and SelMouseButtonUp().

bool SelectionEngine::IsInSelection ( ) const
inline

Definition at line 203 of file seleng.hxx.

References IN_SEL, and nFlags.

void SelectionEngine::LockModifiers ( sal_uInt16  nModifiers)
inline

Definition at line 139 of file seleng.hxx.

void SelectionEngine::ReleaseMouse ( )
void SelectionEngine::Reset ( void  )

Definition at line 340 of file seleng.cxx.

References aWTimer, HAS_ANCH, IN_SEL, nFlags, nLockedMods, ReleaseMouse(), and Task::Stop().

Referenced by SvImpLBox::DestroyAnchor().

bool SelectionEngine::SelMouseButtonDown ( const MouseEvent rMEvt)
bool SelectionEngine::SelMouseButtonUp ( const MouseEvent rMEvt)
bool SelectionEngine::SelMouseMove ( const MouseEvent rMEvt)
void SelectionEngine::SetAddMode ( bool  bNewMode)
inline

Definition at line 171 of file seleng.hxx.

References IN_ADD, and nFlags.

void SelectionEngine::SetAnchor ( bool  bAnchor)
inline

Definition at line 219 of file seleng.hxx.

References HAS_ANCH, and nFlags.

void SelectionEngine::SetFunctionSet ( FunctionSet pFuncs)
inline

Definition at line 128 of file seleng.hxx.

Referenced by SvImpLBox::SvImpLBox().

void SelectionEngine::SetSelectionMode ( SelectionMode  eMode)

Definition at line 62 of file seleng.cxx.

References eSelMode.

Referenced by SvImpLBox::SetSelectionMode().

void SelectionEngine::SetUpdateInterval ( sal_uLong  nInterval)
void SelectionEngine::SetVisibleArea ( const tools::Rectangle rNewArea)
inline

Definition at line 114 of file seleng.hxx.

Referenced by IconViewImpl::AdjustScrollBars(), and SvImpLBox::AdjustScrollBars().

void SelectionEngine::SetWindow ( vcl::Window pNewWin)

Definition at line 328 of file seleng.cxx.

References CaptureMouse(), IN_SEL, nFlags, pWin, and ReleaseMouse().

bool SelectionEngine::ShouldDeselect ( bool  bModifierKey1) const
inlineprivate

Definition at line 30 of file seleng.cxx.

References eSelMode, and Multiple.

Referenced by CursorPosChanging().

Member Data Documentation

tools::Rectangle SelectionEngine::aArea
private

Definition at line 79 of file seleng.hxx.

Referenced by SelMouseMove().

MouseEvent SelectionEngine::aLastMove
private

Definition at line 81 of file seleng.hxx.

Referenced by Command(), SelMouseButtonDown(), SelMouseButtonUp(), and SelMouseMove().

Timer SelectionEngine::aWTimer
private
SelectionMode SelectionEngine::eSelMode
private
SelectionEngineFlags SelectionEngine::nFlags
private
sal_uInt16 SelectionEngine::nLockedMods
private

Definition at line 84 of file seleng.hxx.

Referenced by Reset(), SelectionEngine(), SelMouseButtonDown(), and SelMouseButtonUp().

sal_uLong SelectionEngine::nUpdateInterval
private

Definition at line 83 of file seleng.hxx.

Referenced by SelectionEngine(), SelMouseMove(), and SetUpdateInterval().

FunctionSet* SelectionEngine::pFunctionSet
private
VclPtr<vcl::Window> SelectionEngine::pWin
private

Definition at line 78 of file seleng.hxx.

Referenced by CaptureMouse(), ReleaseMouse(), and SetWindow().


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