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#pragma once
21
22#include <vcl/seleng.hxx>
23
24#include "viewdata.hxx"
25
26class ScTabView;
27
29{
30private:
32public:
34 ScSplitPos eSplitPos );
35
36 ScSplitPos GetWhich() const { return eWhich; }
37 void SetWhich(ScSplitPos eNew) { eWhich = eNew; }
38};
39
40class ScViewFunctionSet : public FunctionSet // View (Gridwin / keyboard)
41{
42private:
45
49
50 ScSplitPos GetWhich() const;
51
52 sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
53 bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
54
55public:
56 ScViewFunctionSet( ScViewData* pNewViewData );
57
58 void SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
59
60 void SetAnchor( SCCOL nPosX, SCROW nPosY );
61 void SetAnchorFlag( bool bSet );
62
63 virtual void BeginDrag() override;
64 virtual void CreateAnchor() override;
65 virtual void DestroyAnchor() override;
66 virtual void SetCursorAtPoint( const Point& rPointPixel, bool bDontSelectAtCursor = false ) override;
67 virtual bool IsSelectionAtPoint( const Point& rPointPixel ) override;
68 virtual void DeselectAtPoint( const Point& rPointPixel ) override;
69 virtual void DeselectAll() override;
70
71 bool SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll );
72 bool CheckRefBounds(SCCOL nPosX, SCROW nPosY);
73};
74
75class ScHeaderFunctionSet : public FunctionSet // Column / row headers
76{
77private:
79 bool bColumn; // Col- / Rowbar
81
82 bool bAnchor;
84
85public:
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{
104public:
106};
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void CreateAnchor() override
Definition: select.cxx:820
virtual void BeginDrag() override
Definition: select.cxx:815
virtual void DeselectAtPoint(const Point &rPointPixel) override
Definition: select.cxx:969
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
Definition: select.cxx:846
ScHeaderFunctionSet(ScViewData *pNewViewData)
Definition: select.cxx:795
void SetColumn(bool bSet)
Definition: select.cxx:805
SCCOLROW nCursorPos
Definition: select.hxx:83
ScViewData * pViewData
Definition: select.hxx:78
void SetAnchorFlag(bool bSet)
Definition: select.hxx:99
ScSplitPos eWhich
Definition: select.hxx:80
void SetWhich(ScSplitPos eNew)
Definition: select.cxx:810
virtual void DestroyAnchor() override
Definition: select.cxx:840
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
Definition: select.cxx:955
virtual void DeselectAll() override
Definition: select.cxx:973
ScHeaderSelectionEngine(vcl::Window *pWindow, ScHeaderFunctionSet *pFuncSet)
Definition: select.cxx:979
virtual void DeselectAtPoint(const Point &rPointPixel) override
Definition: select.cxx:761
virtual void DeselectAll() override
Definition: select.cxx:766
bool SetCursorAtCell(SCCOL nPosX, SCROW nPosY, bool bScroll)
Definition: select.cxx:437
ScAddress m_aAnchorPos
Definition: select.hxx:48
virtual void CreateAnchor() override
Definition: select.cxx:220
ScViewData * m_pViewData
Definition: select.hxx:43
ScSplitPos GetWhich() const
Definition: select.cxx:55
virtual void BeginDrag() override
Definition: select.cxx:146
void SetAnchorFlag(bool bSet)
Definition: select.cxx:289
sal_uLong CalcUpdateInterval(const Size &rWinSize, const Point &rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll)
Definition: select.cxx:63
void SetSelectionEngine(ScViewSelectionEngine *pSelEngine)
Definition: select.cxx:140
ScViewFunctionSet(ScViewData *pNewViewData)
Definition: select.cxx:46
virtual void DestroyAnchor() override
Definition: select.cxx:275
void SetAnchor(SCCOL nPosX, SCROW nPosY)
Definition: select.cxx:231
virtual void SetCursorAtPoint(const Point &rPointPixel, bool bDontSelectAtCursor=false) override
Definition: select.cxx:294
bool CheckRefBounds(SCCOL nPosX, SCROW nPosY)
Definition: select.cxx:426
ScViewSelectionEngine * m_pEngine
Definition: select.hxx:44
virtual bool IsSelectionAtPoint(const Point &rPointPixel) override
Definition: select.cxx:740
ScSplitPos GetWhich() const
Definition: select.hxx:36
ScSplitPos eWhich
Definition: select.hxx:31
void SetWhich(ScSplitPos eNew)
Definition: select.hxx:37
ScViewSelectionEngine(vcl::Window *pWindow, ScTabView *pView, ScSplitPos eSplitPos)
Definition: select.cxx:785
sal_uIntPtr sal_uLong
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
ScSplitPos
Definition: viewdata.hxx:44