merge the formfield patch from ooo-build
[ooovba.git] / reportdesign / source / ui / inc / StartMarker.hxx
blob65e1f560be750399619bbb55be2c9d86719588a5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: StartMarker.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef RPTUI_STARTMARKER_HXX
31 #define RPTUI_STARTMARKER_HXX
33 #include <osl/interlck.h>
34 #include <svtools/ruler.hxx>
35 #include "ColorListener.hxx"
36 #include <vcl/fixed.hxx>
39 namespace rptui
41 class OSectionWindow;
42 class OStartMarker : public OColorListener
45 Ruler m_aVRuler;
46 FixedText m_aText;
47 FixedImage m_aImage;
48 OSectionWindow* m_pParent;
49 static Image* s_pDefCollapsed;
50 static Image* s_pDefExpanded;
51 static Image* s_pDefCollapsedHC;
52 static Image* s_pDefExpandedHC;
53 static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed
55 sal_Bool m_bShowRuler;
57 void changeImage();
58 void initDefaultNodeImages();
59 void setColor();
60 virtual void ImplInitSettings();
61 OStartMarker(OStartMarker&);
62 void operator =(OStartMarker&);
63 public:
64 OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sColorEntry);
65 virtual ~OStartMarker();
67 // SfxListener
68 virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
69 // window overloads
70 virtual void Paint( const Rectangle& rRect );
71 virtual void MouseButtonUp( const MouseEvent& rMEvt );
72 virtual void Resize();
73 virtual void RequestHelp( const HelpEvent& rHEvt );
74 using Window::Notify;
76 void setTitle(const String& _sTitle);
77 sal_Int32 getMinHeight() const;
79 /** returns the offset where the horizontal ruler must start
81 sal_Int32 getRulerOffset() const;
83 /** shows or hides the ruler.
85 void showRuler(sal_Bool _bShow);
87 virtual void setCollapsed(sal_Bool _bCollapsed);
89 /** zoom the ruler and view windows
91 void zoom(const Fraction& _aZoom);
94 #endif // RPTUI_STARTMARKER_HXX