LibreOffice Module vcl (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 .
18 */
23#include <vcl/dllapi.h>
24#include <vcl/ctrl.hxx>
27class Slider final : public Control
47 sal_uInt16 mnStateFlags;
54 using Window::ImplInit;
55 void ImplInit( vcl::Window* pParent, WinBits nStyle );
56 void ImplInitSettings();
57 void ImplUpdateRects( bool bUpdate = true );
60 void ImplCalc( bool bUpdate = true );
61 void ImplDraw(vcl::RenderContext& rRenderContext);
62 bool ImplIsPageUp( const Point& rPos ) const;
63 bool ImplIsPageDown( const Point& rPos ) const;
66 void ImplDoMouseAction( const Point& rPos, bool bCallAction );
67 void ImplDoSlide( tools::Long nNewPos );
68 void ImplDoSlideAction( ScrollType eScrollType );
71 Slider( vcl::Window* pParent, WinBits nStyle);
72 virtual ~Slider() override;
73 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
74 virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
75 virtual void Tracking( const TrackingEvent& rTEvt ) override;
76 virtual void KeyInput( const KeyEvent& rKEvt ) override;
77 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
78 virtual void Resize() override;
79 virtual void StateChanged( StateChangedType nType ) override;
80 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
82 void Slide();
84 void SetRangeMin(tools::Long nNewRange);
86 void SetRangeMax(tools::Long nNewRange);
88 void SetRange( const Range& rRange );
89 void SetThumbPos( tools::Long nThumbPos );
91 void SetLineSize( tools::Long nNewSize ) { mnLineSize = nNewSize; }
93 void SetPageSize( tools::Long nNewSize ) { mnPageSize = nNewSize; }
98 void SetSlideHdl( const Link<Slider*,void>& rLink ) { maSlideHdl = rLink; }
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: ctrl.hxx:80
void ImplInitSettings()
Definition: ctrl.cxx:423
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
void SetRange(const Range &rRange)
Definition: slider.cxx:850
tools::Long mnMinRange
Definition: slider.hxx:42
tools::Long ImplCalcThumbPosPix(tools::Long nPos) const
Definition: slider.cxx:214
tools::Long mnLineSize
Definition: slider.hxx:45
tools::Long ImplDoAction()
Definition: slider.cxx:510
void ImplInitSettings()
Definition: slider.cxx:75
tools::Rectangle maChannel2Rect
Definition: slider.hxx:31
void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: slider.cxx:39
tools::Long GetRangeMin() const
Definition: slider.hxx:85
tools::Long mnThumbPixRange
Definition: slider.hxx:36
void ImplDoMouseAction(const Point &rPos, bool bCallAction)
Definition: slider.cxx:539
Size CalcWindowSizePixel() const
Definition: slider.cxx:888
tools::Long mnChannelPixBottom
Definition: slider.hxx:41
ScrollType meScrollType
Definition: slider.hxx:48
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: slider.cxx:646
tools::Long mnMaxRange
Definition: slider.hxx:43
virtual ~Slider() override
Definition: slider.cxx:70
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: slider.cxx:604
sal_uInt16 mnStateFlags
Definition: slider.hxx:47
tools::Long GetThumbPos() const
Definition: slider.hxx:90
tools::Long mnMouseOff
Definition: slider.hxx:34
Link< Slider *, void > maSlideHdl
Definition: slider.hxx:51
void SetThumbPos(tools::Long nThumbPos)
Definition: slider.cxx:874
tools::Long mnChannelPixRange
Definition: slider.hxx:39
bool ImplIsPageUp(const Point &rPos) const
Definition: slider.cxx:464
tools::Long ImplCalcThumbPos(tools::Long nPixPos) const
Definition: slider.cxx:205
virtual void StateChanged(StateChangedType nType) override
Definition: slider.cxx:776
void SetPageSize(tools::Long nNewSize)
Definition: slider.hxx:93
tools::Long mnChannelPixTop
Definition: slider.hxx:40
void ImplCalc(bool bUpdate=true)
Definition: slider.cxx:229
void ImplDraw(vcl::RenderContext &rRenderContext)
Definition: slider.cxx:326
void SetRangeMin(tools::Long nNewRange)
Definition: slider.cxx:840
void Slide()
Definition: slider.cxx:835
void ImplUpdateRects(bool bUpdate=true)
Definition: slider.cxx:98
tools::Rectangle maThumbRect
Definition: slider.hxx:32
tools::Long GetRangeMax() const
Definition: slider.hxx:87
bool mbCalcSize
Definition: slider.hxx:49
tools::Long mnStartPos
Definition: slider.hxx:33
tools::Long mnThumbPixOffset
Definition: slider.hxx:35
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: slider.cxx:823
tools::Long mnThumbSize
Definition: slider.hxx:38
void SetSlideHdl(const Link< Slider *, void > &rLink)
Definition: slider.hxx:98
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition: slider.cxx:650
virtual void Resize() override
Definition: slider.cxx:767
tools::Rectangle maChannel1Rect
Definition: slider.hxx:30
void ImplDoSlideAction(ScrollType eScrollType)
Definition: slider.cxx:592
void SetRangeMax(tools::Long nNewRange)
Definition: slider.cxx:845
tools::Long ImplSlide(tools::Long nNewPos)
Definition: slider.cxx:498
void SetLineSize(tools::Long nNewSize)
Definition: slider.hxx:91
Slider(vcl::Window *pParent, WinBits nStyle)
Definition: slider.cxx:64
tools::Long GetLineSize() const
Definition: slider.hxx:92
bool ImplIsPageDown(const Point &rPos) const
Definition: slider.cxx:481
tools::Long mnPageSize
Definition: slider.hxx:46
tools::Long GetPageSize() const
Definition: slider.hxx:94
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: slider.cxx:762
void ImplDoSlide(tools::Long nNewPos)
Definition: slider.cxx:582
tools::Long mnThumbPos
Definition: slider.hxx:44
tools::Long mnThumbPixPos
Definition: slider.hxx:37
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: slider.cxx:722
long Long
Definition: vclenum.hxx:372
Definition: window.hxx:291
sal_Int64 WinBits
Definition: wintypes.hxx:109