1*9ee13d13SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9ee13d13SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9ee13d13SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9ee13d13SAndrew Rist * distributed with this work for additional information 6*9ee13d13SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9ee13d13SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9ee13d13SAndrew Rist * "License"); you may not use this file except in compliance 9*9ee13d13SAndrew Rist * with the License. You may obtain a copy of the License at 10*9ee13d13SAndrew Rist * 11*9ee13d13SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*9ee13d13SAndrew Rist * 13*9ee13d13SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9ee13d13SAndrew Rist * software distributed under the License is distributed on an 15*9ee13d13SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9ee13d13SAndrew Rist * KIND, either express or implied. See the License for the 17*9ee13d13SAndrew Rist * specific language governing permissions and limitations 18*9ee13d13SAndrew Rist * under the License. 19*9ee13d13SAndrew Rist * 20*9ee13d13SAndrew Rist *************************************************************/ 21*9ee13d13SAndrew Rist 22*9ee13d13SAndrew Rist 23cdf0e10cSrcweir #ifndef RPTUI_STARTMARKER_HXX 24cdf0e10cSrcweir #define RPTUI_STARTMARKER_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <osl/interlck.h> 27cdf0e10cSrcweir #include <svtools/ruler.hxx> 28cdf0e10cSrcweir #include "ColorListener.hxx" 29cdf0e10cSrcweir #include <vcl/fixed.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace rptui 33cdf0e10cSrcweir { 34cdf0e10cSrcweir class OSectionWindow; 35cdf0e10cSrcweir class OStartMarker : public OColorListener 36cdf0e10cSrcweir { 37cdf0e10cSrcweir 38cdf0e10cSrcweir Ruler m_aVRuler; 39cdf0e10cSrcweir FixedText m_aText; 40cdf0e10cSrcweir FixedImage m_aImage; 41cdf0e10cSrcweir OSectionWindow* m_pParent; 42cdf0e10cSrcweir static Image* s_pDefCollapsed; 43cdf0e10cSrcweir static Image* s_pDefExpanded; 44cdf0e10cSrcweir static Image* s_pDefCollapsedHC; 45cdf0e10cSrcweir static Image* s_pDefExpandedHC; 46cdf0e10cSrcweir static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed 47cdf0e10cSrcweir 48cdf0e10cSrcweir sal_Bool m_bShowRuler; 49cdf0e10cSrcweir 50cdf0e10cSrcweir void changeImage(); 51cdf0e10cSrcweir void initDefaultNodeImages(); 52cdf0e10cSrcweir void setColor(); 53cdf0e10cSrcweir virtual void ImplInitSettings(); 54cdf0e10cSrcweir OStartMarker(OStartMarker&); 55cdf0e10cSrcweir void operator =(OStartMarker&); 56cdf0e10cSrcweir public: 57cdf0e10cSrcweir OStartMarker(OSectionWindow* _pParent,const ::rtl::OUString& _sColorEntry); 58cdf0e10cSrcweir virtual ~OStartMarker(); 59cdf0e10cSrcweir 60cdf0e10cSrcweir // SfxListener 61cdf0e10cSrcweir virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint); 62cdf0e10cSrcweir // window overloads 63cdf0e10cSrcweir virtual void Paint( const Rectangle& rRect ); 64cdf0e10cSrcweir virtual void MouseButtonUp( const MouseEvent& rMEvt ); 65cdf0e10cSrcweir virtual void Resize(); 66cdf0e10cSrcweir virtual void RequestHelp( const HelpEvent& rHEvt ); 67cdf0e10cSrcweir using Window::Notify; 68cdf0e10cSrcweir 69cdf0e10cSrcweir void setTitle(const String& _sTitle); 70cdf0e10cSrcweir sal_Int32 getMinHeight() const; 71cdf0e10cSrcweir 72cdf0e10cSrcweir /** shows or hides the ruler. 73cdf0e10cSrcweir */ 74cdf0e10cSrcweir void showRuler(sal_Bool _bShow); 75cdf0e10cSrcweir 76cdf0e10cSrcweir virtual void setCollapsed(sal_Bool _bCollapsed); 77cdf0e10cSrcweir 78cdf0e10cSrcweir /** zoom the ruler and view windows 79cdf0e10cSrcweir */ 80cdf0e10cSrcweir void zoom(const Fraction& _aZoom); 81cdf0e10cSrcweir }; 82cdf0e10cSrcweir } 83cdf0e10cSrcweir #endif // RPTUI_STARTMARKER_HXX 84cdf0e10cSrcweir 85