/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef _SCRWIN_HXX #define _SCRWIN_HXX #include "svtools/svtdllapi.h" #ifndef _SCRBAR_HXX //autogen #include #endif class DataChangedEvent; // ------------------------- // - ScrollableWindow-Type - // ------------------------- typedef USHORT ScrollableWindowFlags; #define SCRWIN_THUMBDRAGGING 1 #define SCRWIN_VCENTER 2 #define SCRWIN_HCENTER 4 #define SCRWIN_DEFAULT (SCRWIN_THUMBDRAGGING | SCRWIN_VCENTER | SCRWIN_HCENTER) // -------------------- // - ScrollableWindow - // -------------------- class SVT_DLLPUBLIC ScrollableWindow: public Window { private: Point aPixOffset; // offset to virtual window (pixel) Size aTotPixSz; // total size of virtual window (pixel) long nLinePixH; // size of a line/column (pixel) long nColumnPixW; ScrollBar aVScroll; // the scrollbars ScrollBar aHScroll; ScrollBarBox aCornerWin; // window in the bottom right corner BOOL bScrolling:1, // user controlled scrolling bHandleDragging:1, // scroll window while dragging bHCenter:1, bVCenter:1; #ifdef _SVT_SCRWIN_CXX SVT_DLLPRIVATE void ImpInitialize( ScrollableWindowFlags nFlags ); DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * ); DECL_DLLPRIVATE_LINK( EndScrollHdl, ScrollBar * ); #endif public: ScrollableWindow( Window* pParent, WinBits nBits = 0, ScrollableWindowFlags = SCRWIN_DEFAULT ); ScrollableWindow( Window* pParent, const ResId& rId, ScrollableWindowFlags = SCRWIN_DEFAULT ); virtual void Resize(); virtual void Command( const CommandEvent& rCEvt ); virtual void DataChanged( const DataChangedEvent& rDEvt ); virtual void StartScroll(); virtual void EndScroll( long nDeltaX, long nDeltaY ); using OutputDevice::SetMapMode; virtual void SetMapMode( const MapMode& rNewMapMode ); virtual MapMode GetMapMode() const; void SetTotalSize( const Size& rNewSize ); Size GetTotalSize() { return PixelToLogic( aTotPixSz ); } void SetVisibleSize( const Size& rNewSize ); BOOL MakeVisible( const Rectangle& rTarget, BOOL bSloppy = FALSE ); Rectangle GetVisibleArea() const; void SetLineSize( ULONG nHorz, ULONG nVert ); using Window::Scroll; virtual void Scroll( long nDeltaX, long nDeltaY, USHORT nFlags = 0 ); void ScrollLines( long nLinesX, long nLinesY ); void ScrollPages( long nPagesX, ULONG nOverlapX, long nPagesY, ULONG nOverlapY ); private: SVT_DLLPRIVATE Size GetOutputSizePixel() const; SVT_DLLPRIVATE Size GetOutputSize() const; }; #endif llabora/cp-4.3'>distro/collabora/cp-4.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2017-08-04rename SIP_SA_EDGELINEDELTAANZ->SIP_SA_EDGELINEDELTACOUNTNoel Grandin
2017-06-05Improved loplugin:cstylecast to reference types: svxStephan Bergmann
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
2016-11-21convert inventorId to scoped enumNoel Grandin
2016-11-08tdf#91222 VclBuilder constructor cleanupmelikeyurtoglu
2016-10-05convert MapUnit to scoped enumNoel Grandin
2016-01-25svx: SdrEdgeLineDeltaAnzItem -> SdrEdgeLineDeltaCountItemMiklos Vajna
2016-01-18svx: SvxXConnectionPreview::GetLineDeltaAnz -> GetLineDeltaCountMiklos Vajna
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-01remove old standalone Sun bug numbersNoel Grandin
2015-09-16boost->stdCaolán McNamara
2015-05-13refactor SvxXConnectionPreview to use RenderContextTomaž Vajngerl
2015-05-12Switch VclBuilder constructors to use VclPtr.Michael Meeks
2015-05-11Revert "Switch VclBuilder constructors to use VclPtr."Michael Meeks
2015-05-11Switch VclBuilder constructors to use VclPtr.Michael Meeks
2015-05-11tdf#91052 - more macros for 'make' constructors.Michael Meeks
2015-05-11loplugin:cstylecast: nop between pointer types of exactly same spellingStephan Bergmann
2015-04-29mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)Tomaž Vajngerl
2015-04-10vclwidget: only call dispose() onceNoel Grandin
2015-04-09vcl: VclPtr conversion in svx.Noel Grandin
2015-01-12convert SETTINGS_ #defines to 'enum class'Noel Grandin
2015-01-12fdo#84938: replace DATACHANGED_ constants with 'enum class'Noel Grandin
2014-11-07fdo#84938: replace MOUSE_ modifier constants with enumNoel Grandin
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky
2014-10-23Fraction: Revert "coverity#1247617 there is nothing to do if width is 0"Jan Holesovsky
2014-10-20loplugin: cstylecastNoel Grandin
2014-10-17coverity#1247617 there is nothing to do if width is 0David Tardon
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca
2014-09-23fdo#82577: Handle WindowNoel Grandin
2014-09-12Turn SfxItemState into a C++11 scoped enumerationStephan Bergmann
2014-08-16Consistently use size_t and SAL_MAX_SIZEMatteo Casalin
2014-08-16Consistently use size_t and SAL_MAX_SIZEMatteo Casalin
2014-06-22Avoid possible memory leaks in case of exceptionsTakeshi Abe
2014-05-06Move headers included only in svx itself from include/svx to svx/incTor Lillqvist
2014-02-27coverity#1103661 Division or modulo by zeroCaolán McNamara
2014-02-20Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxxTobias Lippert
2014-02-12coverity#1103661 Division or modulo by zeroCaolán McNamara
2014-02-10coverity#708829 Unused pointer valueCaolán McNamara
2014-01-28bool improvementsStephan Bergmann
2013-10-22Bin comments that claim to say why some header is includedTor Lillqvist
2013-09-12Convert connector tab page to widget UIOlivier Hallot
2013-07-02fdo#62699 drop pass-through header svx/svdattrx.hxxThomas Arnhold
2013-03-15sal_Bool to boolTakeshi Abe