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" 267a32b0c8SAndre Fischer 277a32b0c8SAndre Fischer #include <vcl/window.hxx> 287a32b0c8SAndre 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, 397a32b0c8SAndre Fischer Window* pParentWindow, 407a32b0c8SAndre Fischer const sidebar::Paint& rInitialBackgroundPaint); 4122de8995SAndre Fischer virtual ~TitleBar (void); 4222de8995SAndre Fischer 4354eaaa32SAndre Fischer void SetTitle (const ::rtl::OUString& rsTitle); 44*4e21436dSAndre Fischer void SetIcon (const Image& rIcon); 4554eaaa32SAndre Fischer 4622de8995SAndre Fischer virtual void Paint (const Rectangle& rUpdateArea); 477a32b0c8SAndre Fischer virtual void DataChanged (const DataChangedEvent& rEvent); 487a32b0c8SAndre Fischer virtual void SetPosSizePixel ( 497a32b0c8SAndre Fischer long nX, 507a32b0c8SAndre Fischer long nY, 517a32b0c8SAndre Fischer long nWidth, 527a32b0c8SAndre Fischer long nHeight, 537a32b0c8SAndre Fischer sal_uInt16 nFlags = WINDOW_POSSIZE_ALL); 5422de8995SAndre Fischer 5565908a7eSAndre Fischer ToolBox& GetToolBox (void); 5665908a7eSAndre Fischer 57ff12d537SAndre Fischer protected: 587a32b0c8SAndre Fischer ToolBox maToolBox; 597a32b0c8SAndre Fischer 60ff12d537SAndre Fischer virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox) = 0; 61ff12d537SAndre Fischer virtual void PaintDecoration (const Rectangle& rTitleBarBox) = 0; 6265908a7eSAndre Fischer virtual void PaintFocus (const Rectangle& rFocusBox); 63ff12d537SAndre Fischer virtual sidebar::Paint GetBackgroundPaint (void) = 0; 64ff12d537SAndre Fischer virtual Color GetTextColor (void) = 0; 657a32b0c8SAndre Fischer virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex); 66ff12d537SAndre Fischer 6722de8995SAndre Fischer private: 6854eaaa32SAndre Fischer ::rtl::OUString msTitle; 69*4e21436dSAndre Fischer Image maIcon; 70ff12d537SAndre Fischer 71ff12d537SAndre Fischer void PaintTitle (const Rectangle& rTitleBox); 727a32b0c8SAndre Fischer DECL_LINK(SelectionHandler, ToolBox*); 7322de8995SAndre Fischer }; 7422de8995SAndre Fischer 7522de8995SAndre Fischer 76ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 7722de8995SAndre Fischer 7822de8995SAndre Fischer #endif 79