LibreOffice Module sc (master)
1
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
sc
source
ui
inc
hdrcont.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_HDRCONT_HXX
21
#define INCLUDED_SC_SOURCE_UI_INC_HDRCONT_HXX
22
23
#include <
vcl/window.hxx
>
24
#include <types.hxx>
25
26
#define HDR_SIZE_OPTIMUM 0xFFFF
27
28
// Size of the sliders
29
#define HDR_SLIDERSIZE 2
30
31
class
ScTabView
;
32
class
SelectionEngine
;
33
34
class
ScHeaderControl
:
public
vcl::Window
35
{
36
private
:
37
SelectionEngine
*
pSelEngine
;
38
vcl::Font
aNormFont
;
39
vcl::Font
aBoldFont
;
40
bool
bBoldSet
;
41
42
bool
bVertical
;
// Vertical = Row header
43
44
tools::Long
nWidth
;
45
tools::Long
nSmallWidth
;
46
tools::Long
nBigWidth
;
47
48
SCCOLROW
nSize
;
49
50
SCCOLROW
nMarkStart
;
51
SCCOLROW
nMarkEnd
;
52
bool
bMarkRange
;
53
54
bool
bDragging
;
// Resizing
55
SCCOLROW
nDragNo
;
56
tools::Long
nDragStart
;
57
tools::Long
nDragPos
;
58
void
*
nTipVisible
;
59
bool
bDragMoved
;
60
61
bool
bIgnoreMove
;
62
63
bool
bInRefMode
;
64
65
tools::Long
GetScrPos
(
SCCOLROW
nEntryNo )
const
;
66
SCCOLROW
GetMousePos
(
const
MouseEvent
& rMEvt,
bool
& rBorder )
const
;
67
bool
IsSelectionAllowed
(
SCCOLROW
nPos)
const
;
68
void
ShowDragHelp
();
69
70
void
DoPaint
(
SCCOLROW
nStart,
SCCOLROW
nEnd );
71
72
protected
:
73
ScTabView
*
pTabView
;
74
75
// Window overrides
76
77
virtual
void
Paint
(
vcl::RenderContext
& rRenderContext,
const
tools::Rectangle
& rRect )
override
;
78
79
virtual
void
MouseMove
(
const
MouseEvent
& rMEvt )
override
;
80
virtual
void
MouseButtonUp
(
const
MouseEvent
& rMEvt )
override
;
81
virtual
void
MouseButtonDown
(
const
MouseEvent
& rMEvt )
override
;
82
virtual
void
Tracking
(
const
TrackingEvent
& rTEvt )
override
;
83
84
virtual
void
RequestHelp
(
const
HelpEvent
& rHEvt )
override
;
85
86
// new methods
87
88
virtual
SCCOLROW
GetPos
()
const
= 0;
// current position (Scrolling)
89
virtual
sal_uInt16
GetEntrySize
(
SCCOLROW
nEntryNo )
const
= 0;
// width / height (Pixel)
90
virtual
OUString
GetEntryText
(
SCCOLROW
nEntryNo )
const
= 0;
91
92
virtual
SCCOLROW
GetHiddenCount
(
SCCOLROW
nEntryNo )
const
;
93
virtual
bool
IsLayoutRTL
()
const
;
94
virtual
bool
IsMirrored
()
const
;
95
96
virtual
void
SetEntrySize
(
SCCOLROW
nPos, sal_uInt16 nNewWidth ) = 0;
97
virtual
void
HideEntries
(
SCCOLROW
nStart,
SCCOLROW
nEnd ) = 0;
98
99
virtual
void
SetMarking
(
bool
bSet );
100
virtual
void
SelectWindow
();
101
virtual
bool
IsDisabled
()
const
;
102
virtual
bool
ResizeAllowed
()
const
;
103
virtual
OUString
GetDragHelp
(
tools::Long
nVal );
104
105
virtual
void
DrawInvert
(
tools::Long
nDragPos );
106
virtual
void
Command
(
const
CommandEvent
& rCEvt )
override
;
107
108
public
:
109
ScHeaderControl
(
vcl::Window
* pParent,
SelectionEngine
* pSelectionEngine,
110
SCCOLROW
nNewSize,
bool
bNewVertical,
ScTabView
* pTab );
111
virtual
~ScHeaderControl
()
override
;
112
113
void
SetIgnoreMove
(
bool
bSet) { bIgnoreMove = bSet; }
114
115
void
StopMarking
();
116
117
void
SetMark
(
bool
bNewSet,
SCCOLROW
nNewStart,
SCCOLROW
nNewEnd );
118
119
tools::Long
GetWidth
()
const
{
return
nWidth
; }
120
tools::Long
GetSmallWidth
()
const
{
return
nSmallWidth
; }
121
tools::Long
GetBigWidth
()
const
{
return
nBigWidth
; }
122
void
SetWidth
(
tools::Long
nNew );
123
void
GetMarkRange
(
SCCOLROW
& rStart,
SCCOLROW
& rEnd)
const
;
124
};
125
126
#endif
127
128
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScHeaderControl::bIgnoreMove
bool bIgnoreMove
Definition:
hdrcont.hxx:61
ScHeaderControl::ScHeaderControl
ScHeaderControl(vcl::Window *pParent, SelectionEngine *pSelectionEngine, SCCOLROW nNewSize, bool bNewVertical, ScTabView *pTab)
Definition:
hdrcont.cxx:47
ScHeaderControl::bMarkRange
bool bMarkRange
Definition:
hdrcont.hxx:52
ScHeaderControl::nDragNo
SCCOLROW nDragNo
Definition:
hdrcont.hxx:55
ScHeaderControl::nWidth
tools::Long nWidth
Definition:
hdrcont.hxx:44
ScHeaderControl::IsDisabled
virtual bool IsDisabled() const
Definition:
hdrcont.cxx:978
ScHeaderControl::nTipVisible
void * nTipVisible
Definition:
hdrcont.hxx:58
TrackingEvent
ScHeaderControl::bDragMoved
bool bDragMoved
Definition:
hdrcont.hxx:59
ScHeaderControl::GetBigWidth
tools::Long GetBigWidth() const
Definition:
hdrcont.hxx:121
ScHeaderControl::IsMirrored
virtual bool IsMirrored() const
Definition:
hdrcont.cxx:973
ScHeaderControl::SetIgnoreMove
void SetIgnoreMove(bool bSet)
Definition:
hdrcont.hxx:113
tools::Long
long Long
ScHeaderControl::GetScrPos
tools::Long GetScrPos(SCCOLROW nEntryNo) const
Definition:
hdrcont.cxx:174
ScHeaderControl::nSmallWidth
tools::Long nSmallWidth
Definition:
hdrcont.hxx:45
ScHeaderControl::SetMark
void SetMark(bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd)
Definition:
hdrcont.cxx:131
ScHeaderControl::GetMarkRange
void GetMarkRange(SCCOLROW &rStart, SCCOLROW &rEnd) const
Definition:
hdrcont.cxx:1005
ScHeaderControl::IsSelectionAllowed
bool IsSelectionAllowed(SCCOLROW nPos) const
Definition:
hdrcont.cxx:564
ScHeaderControl::nSize
SCCOLROW nSize
Definition:
hdrcont.hxx:48
ScHeaderControl::DrawInvert
virtual void DrawInvert(tools::Long nDragPos)
Definition:
hdrcont.cxx:992
ScHeaderControl::MouseButtonUp
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition:
hdrcont.cxx:697
ScTabView
Definition:
tabview.hxx:117
ScHeaderControl::pSelEngine
SelectionEngine * pSelEngine
Definition:
hdrcont.hxx:37
ScHeaderControl::StopMarking
void StopMarking()
Definition:
hdrcont.cxx:883
ScHeaderControl::nDragStart
tools::Long nDragStart
Definition:
hdrcont.hxx:56
ScHeaderControl::GetDragHelp
virtual OUString GetDragHelp(tools::Long nVal)
Definition:
hdrcont.cxx:996
ScHeaderControl::GetWidth
tools::Long GetWidth() const
Definition:
hdrcont.hxx:119
SCCOLROW
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition:
types.hxx:24
ScHeaderControl::Tracking
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition:
hdrcont.cxx:813
ScHeaderControl::DoPaint
void DoPaint(SCCOLROW nStart, SCCOLROW nEnd)
Definition:
hdrcont.cxx:112
vcl::Font
ScHeaderControl::nMarkEnd
SCCOLROW nMarkEnd
Definition:
hdrcont.hxx:51
ScHeaderControl::IsLayoutRTL
virtual bool IsLayoutRTL() const
Definition:
hdrcont.cxx:968
ScHeaderControl::RequestHelp
virtual void RequestHelp(const HelpEvent &rHEvt) override
Definition:
hdrcont.cxx:946
ScHeaderControl::SetMarking
virtual void SetMarking(bool bSet)
Definition:
hdrcont.cxx:1001
ScHeaderControl::GetHiddenCount
virtual SCCOLROW GetHiddenCount(SCCOLROW nEntryNo) const
Definition:
hdrcont.cxx:957
ScHeaderControl::ShowDragHelp
void ShowDragHelp()
Definition:
hdrcont.cxx:905
ScHeaderControl::GetMousePos
SCCOLROW GetMousePos(const MouseEvent &rMEvt, bool &rBorder) const
Definition:
hdrcont.cxx:524
ScHeaderControl::bInRefMode
bool bInRefMode
Definition:
hdrcont.hxx:63
ScHeaderControl::SetWidth
void SetWidth(tools::Long nNew)
Definition:
hdrcont.cxx:94
OutputDevice
ScHeaderControl::nMarkStart
SCCOLROW nMarkStart
Definition:
hdrcont.hxx:50
ScHeaderControl::Command
virtual void Command(const CommandEvent &rCEvt) override
Definition:
hdrcont.cxx:826
tools::Rectangle
ScHeaderControl::pTabView
ScTabView * pTabView
Definition:
hdrcont.hxx:73
HelpEvent
ScHeaderControl
Definition:
hdrcont.hxx:34
ScHeaderControl::GetPos
virtual SCCOLROW GetPos() const =0
ScHeaderControl::aNormFont
vcl::Font aNormFont
Definition:
hdrcont.hxx:38
CommandEvent
ScHeaderControl::~ScHeaderControl
virtual ~ScHeaderControl() override
Definition:
hdrcont.cxx:108
ScHeaderControl::HideEntries
virtual void HideEntries(SCCOLROW nStart, SCCOLROW nEnd)=0
ScHeaderControl::aBoldFont
vcl::Font aBoldFont
Definition:
hdrcont.hxx:39
ScHeaderControl::ResizeAllowed
virtual bool ResizeAllowed() const
Definition:
hdrcont.cxx:983
ScHeaderControl::GetEntrySize
virtual sal_uInt16 GetEntrySize(SCCOLROW nEntryNo) const =0
ScHeaderControl::MouseButtonDown
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition:
hdrcont.cxx:603
ScHeaderControl::nDragPos
tools::Long nDragPos
Definition:
hdrcont.hxx:57
vcl::Window
SelectionEngine
window.hxx
MouseEvent
ScHeaderControl::Paint
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition:
hdrcont.cxx:204
ScHeaderControl::MouseMove
virtual void MouseMove(const MouseEvent &rMEvt) override
Definition:
hdrcont.cxx:759
ScHeaderControl::bDragging
bool bDragging
Definition:
hdrcont.hxx:54
ScHeaderControl::bBoldSet
bool bBoldSet
Definition:
hdrcont.hxx:40
ScHeaderControl::SetEntrySize
virtual void SetEntrySize(SCCOLROW nPos, sal_uInt16 nNewWidth)=0
ScHeaderControl::GetSmallWidth
tools::Long GetSmallWidth() const
Definition:
hdrcont.hxx:120
ScHeaderControl::GetEntryText
virtual OUString GetEntryText(SCCOLROW nEntryNo) const =0
ScHeaderControl::bVertical
bool bVertical
Definition:
hdrcont.hxx:42
ScHeaderControl::SelectWindow
virtual void SelectWindow()
Definition:
hdrcont.cxx:988
ScHeaderControl::nBigWidth
tools::Long nBigWidth
Definition:
hdrcont.hxx:46
Generated on Thu Jan 21 2021 08:29:12 for LibreOffice Module sc (master) by
1.8.10