1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: blink.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
37 #include <vcl/timer.hxx>
38 #include <tools/gen.hxx>
40 #include <svtools/svarray.hxx>
45 const SwLinePortion
*pPor
;
46 const SwRootFrm
*pFrm
;
49 SwBlinkPortion( const SwLinePortion
* pPortion
, USHORT nDirection
)
50 { pPor
= pPortion
; nDir
= nDirection
; }
51 SwBlinkPortion( const SwBlinkPortion
* pBlink
, const SwLinePortion
* pPort
)
52 { pPor
= pPort
; pFrm
= pBlink
->pFrm
; aPos
= pBlink
->aPos
; nDir
= pBlink
->nDir
; }
53 void SetPos( const Point
& aNew
){ aPos
= aNew
; }
54 const Point
& GetPos() const{ return aPos
; }
55 void SetRootFrm( const SwRootFrm
* pNew
){ pFrm
= pNew
; }
56 const SwRootFrm
* GetRootFrm() const{ return pFrm
; }
57 const SwLinePortion
*GetPortion() const{ return pPor
; }
58 USHORT
GetDirection() const { return nDir
; }
59 BOOL
operator<( const SwBlinkPortion
& rBlinkPortion
) const
60 { return (long)pPor
< (long)rBlinkPortion
.pPor
; }
61 BOOL
operator==( const SwBlinkPortion
& rBlinkPortion
) const
62 { return (long)pPor
== (long)rBlinkPortion
.pPor
; }
65 typedef SwBlinkPortion
* SwBlinkPortionPtr
;
66 SV_DECL_PTRARR_SORT_DEL(SwBlinkList
, SwBlinkPortionPtr
, 0, 10)
77 DECL_LINK( Blinker
, Timer
* );
79 void Insert( const Point
& rPoint
, const SwLinePortion
* pPor
,
80 const SwTxtFrm
*pTxtFrm
, USHORT nDir
);
81 void Replace( const SwLinePortion
* pOld
, const SwLinePortion
* pNew
);
82 void Delete( const SwLinePortion
* pPor
);
83 void FrmDelete( const SwRootFrm
* pRoot
);
84 inline BOOL
IsVisible() const { return bVisible
; }
87 // Blink-Manager, globale Variable, in Blink.Cxx angelegt
88 extern SwBlink
*pBlink
;