sync master with lastest vba changes
[ooovba.git] / reportdesign / source / ui / inc / StartMarker.hxx
blobf5edc018075ec061ee2f89b76679da26c207d3e5
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 initDefaultNodeImages();
58 void setColor();
59 virtual void ImplInitSettings();
60 OStartMarker(OStartMarker&);
61 void operator =(OStartMarker&);
62 public:
63 OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sColorEntry);
64 virtual ~OStartMarker();
66 // SfxListener
67 virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
68 // window overloads
69 virtual void Paint( const Rectangle& rRect );
70 virtual void MouseButtonUp( const MouseEvent& rMEvt );
71 virtual void Resize();
72 virtual void RequestHelp( const HelpEvent& rHEvt );
73 using Window::Notify;
75 void setTitle(const String& _sTitle);
76 sal_Int32 getMinHeight() const;
78 /** returns the offset where the horizontal ruler must start
80 sal_Int32 getRulerOffset() const;
82 /** shows or hides the ruler.
84 void showRuler(sal_Bool _bShow);
86 virtual void setCollapsed(sal_Bool _bCollapsed);
88 /** zoom the ruler and view windows
90 void zoom(const Fraction& _aZoom);
93 #endif // RPTUI_STARTMARKER_HXX