122de8995SAndre Fischer /************************************************************** 222de8995SAndre Fischer * 322de8995SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 422de8995SAndre Fischer * or more contributor license agreements. See the NOTICE file 522de8995SAndre Fischer * distributed with this work for additional information 622de8995SAndre Fischer * regarding copyright ownership. The ASF licenses this file 722de8995SAndre Fischer * to you under the Apache License, Version 2.0 (the 822de8995SAndre Fischer * "License"); you may not use this file except in compliance 922de8995SAndre Fischer * with the License. You may obtain a copy of the License at 1022de8995SAndre Fischer * 1122de8995SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 1222de8995SAndre Fischer * 1322de8995SAndre Fischer * Unless required by applicable law or agreed to in writing, 1422de8995SAndre Fischer * software distributed under the License is distributed on an 1522de8995SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1622de8995SAndre Fischer * KIND, either express or implied. See the License for the 1722de8995SAndre Fischer * specific language governing permissions and limitations 1822de8995SAndre Fischer * under the License. 1922de8995SAndre Fischer * 2022de8995SAndre Fischer *************************************************************/ 2122de8995SAndre Fischer 2222de8995SAndre Fischer #ifndef SFX_SIDEBAR_TITLE_BAR_HXX 2322de8995SAndre Fischer #define SFX_SIDEBAR_TITLE_BAR_HXX 2422de8995SAndre Fischer 25ff12d537SAndre Fischer #include "Paint.hxx" 26*7a32b0c8SAndre Fischer 27*7a32b0c8SAndre Fischer #include <vcl/window.hxx> 28*7a32b0c8SAndre Fischer #include <vcl/toolbox.hxx> 2922de8995SAndre Fischer 3022de8995SAndre Fischer 31ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 3222de8995SAndre Fischer 3322de8995SAndre Fischer class TitleBar 3422de8995SAndre Fischer : public Window 3522de8995SAndre Fischer { 3622de8995SAndre Fischer public: 3722de8995SAndre Fischer TitleBar ( 3822de8995SAndre Fischer const ::rtl::OUString& rsTitle, 39*7a32b0c8SAndre Fischer Window* pParentWindow, 40*7a32b0c8SAndre Fischer const sidebar::Paint& rInitialBackgroundPaint); 4122de8995SAndre Fischer virtual ~TitleBar (void); 4222de8995SAndre Fischer 4322de8995SAndre Fischer virtual void Paint (const Rectangle& rUpdateArea); 44*7a32b0c8SAndre Fischer virtual void DataChanged (const DataChangedEvent& rEvent); 45*7a32b0c8SAndre Fischer virtual void SetPosSizePixel ( 46*7a32b0c8SAndre Fischer long nX, 47*7a32b0c8SAndre Fischer long nY, 48*7a32b0c8SAndre Fischer long nWidth, 49*7a32b0c8SAndre Fischer long nHeight, 50*7a32b0c8SAndre Fischer sal_uInt16 nFlags = WINDOW_POSSIZE_ALL); 5122de8995SAndre Fischer 52ff12d537SAndre Fischer protected: 53*7a32b0c8SAndre Fischer ToolBox maToolBox; 54*7a32b0c8SAndre Fischer 55ff12d537SAndre Fischer virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox) = 0; 56ff12d537SAndre Fischer virtual void PaintDecoration (const Rectangle& rTitleBarBox) = 0; 57ff12d537SAndre Fischer virtual sidebar::Paint GetBackgroundPaint (void) = 0; 58ff12d537SAndre Fischer virtual Color GetTextColor (void) = 0; 59*7a32b0c8SAndre Fischer virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex); 60ff12d537SAndre Fischer 6122de8995SAndre Fischer private: 6222de8995SAndre Fischer const ::rtl::OUString msTitle; 63ff12d537SAndre Fischer 64ff12d537SAndre Fischer void PaintTitle (const Rectangle& rTitleBox); 65*7a32b0c8SAndre Fischer DECL_LINK(SelectionHandler, ToolBox*); 6622de8995SAndre Fischer }; 6722de8995SAndre Fischer 6822de8995SAndre Fischer 69ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 7022de8995SAndre Fischer 7122de8995SAndre Fischer #endif 72