LibreOffice Module sc (master)  1
select.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_SELECT_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SELECT_HXX
22 
23 #include <vcl/seleng.hxx>
24 
25 #include "viewdata.hxx"
26 
27 class ScTabView;
28 
30 {
31 private:
33 public:
35  ScSplitPos eSplitPos );
36 
37  ScSplitPos GetWhich() const { return eWhich; }
38  void SetWhich(ScSplitPos eNew) { eWhich = eNew; }
39 };
40 
41 class ScViewFunctionSet : public FunctionSet // View (Gridwin / keyboard)
42 {
43 private:
46 
47  bool bAnchor;
48  bool bStarted;
50 
51  ScSplitPos GetWhich() const;
52 
53  sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
54  bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
55 
56 public:
57  ScViewFunctionSet( ScViewData* pNewViewData );
58 
59  void SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
60 
61  void SetAnchor( SCCOL nPosX, SCROW nPosY );
62  void SetAnchorFlag( bool bSet );
63 
64  virtual void BeginDrag() override;
65  virtual void CreateAnchor() override;
66  virtual void DestroyAnchor() override;
67  virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override;
68  virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override;
69  virtual void DeselectAtPoint( const Point& rPointPixel ) override;
70  virtual void DeselectAll() override;
71 
72  bool SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll );
73 };
74 
75 class ScHeaderFunctionSet : public FunctionSet // Column / row headers
76 {
77 private:
79  bool bColumn; // Col- / Rowbar
81 
82  bool bAnchor;
84 
85 public:
86  ScHeaderFunctionSet( ScViewData* pNewViewData );
87 
88  void SetColumn( bool bSet );
89  void SetWhich( ScSplitPos eNew );
90 
91  virtual void BeginDrag() override;
92  virtual void CreateAnchor() override;
93  virtual void DestroyAnchor() override;
94  virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override;
95  virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override;
96  virtual void DeselectAtPoint( const Point& rPointPixel ) override;
97  virtual void DeselectAll() override;
98 
99  void SetAnchorFlag(bool bSet) { bAnchor = bSet; }
100 };
101 
103 {
104 public:
106 };
107 
108 #endif
109 
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void BeginDrag() override
Definition: select.cxx:143
void SetWhich(ScSplitPos eNew)
Definition: select.hxx:38
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
Definition: select.cxx:285
virtual void DeselectAll() override
Definition: select.cxx:744
ScViewSelectionEngine(vcl::Window *pWindow, ScTabView *pView, ScSplitPos eSplitPos)
Definition: select.cxx:763
sal_uIntPtr sal_uLong
ScHeaderFunctionSet(ScViewData *pNewViewData)
Definition: select.cxx:773
ScViewSelectionEngine * pEngine
Definition: select.hxx:45
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
Definition: select.cxx:718
sal_uLong CalcUpdateInterval(const Size &rWinSize, const Point &rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll)
Definition: select.cxx:60
void SetSelectionEngine(ScViewSelectionEngine *pSelEngine)
Definition: select.cxx:137
ScSplitPos
Definition: viewdata.hxx:45
void SetColumn(bool bSet)
Definition: select.cxx:783
ScHeaderSelectionEngine(vcl::Window *pWindow, ScHeaderFunctionSet *pFuncSet)
Definition: select.cxx:957
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
ScSplitPos eWhich
Definition: select.hxx:32
void SetWhich(ScSplitPos eNew)
Definition: select.cxx:788
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
Definition: select.cxx:933
virtual void DeselectAll() override
Definition: select.cxx:951
ScViewData * pViewData
Definition: select.hxx:44
sal_Int16 SCCOL
Definition: types.hxx:22
virtual void CreateAnchor() override
Definition: select.cxx:798
SCCOLROW nCursorPos
Definition: select.hxx:83
ScSplitPos eWhich
Definition: select.hxx:80
virtual void BeginDrag() override
Definition: select.cxx:793
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
Definition: select.cxx:824
ScSplitPos GetWhich() const
Definition: select.hxx:37
ScSplitPos GetWhich() const
Definition: select.cxx:52
void SetAnchorFlag(bool bSet)
Definition: select.hxx:99
sal_Int32 SCROW
Definition: types.hxx:18
ScAddress aAnchorPos
Definition: select.hxx:49
void SetAnchor(SCCOL nPosX, SCROW nPosY)
Definition: select.cxx:225
virtual void DestroyAnchor() override
Definition: select.cxx:269
virtual void DestroyAnchor() override
Definition: select.cxx:818
ScViewData * pViewData
Definition: select.hxx:78
virtual void DeselectAtPoint(const Point &rPointPixel) override
Definition: select.cxx:947
virtual void DeselectAtPoint(const Point &rPointPixel) override
Definition: select.cxx:739
virtual void CreateAnchor() override
Definition: select.cxx:214
void SetAnchorFlag(bool bSet)
Definition: select.cxx:280
bool SetCursorAtCell(SCCOL nPosX, SCROW nPosY, bool bScroll)
Definition: select.cxx:417
ScViewFunctionSet(ScViewData *pNewViewData)
Definition: select.cxx:43