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 27*3b2c5b9dSAndre Fischer #include <vcl/fixed.hxx> 288a1a651aSAndre Fischer #include "sfx2/sidebar/SidebarToolBox.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); 444e21436dSAndre 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); 5652d13b84SAndre Fischer const ToolBox& GetToolBox (void) const; 5765908a7eSAndre Fischer 58ff12d537SAndre Fischer protected: 598a1a651aSAndre Fischer SidebarToolBox maToolBox; 60*3b2c5b9dSAndre Fischer ::rtl::OUString msTitle; 617a32b0c8SAndre Fischer 62ff12d537SAndre Fischer virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox) = 0; 63ff12d537SAndre Fischer virtual void PaintDecoration (const Rectangle& rTitleBarBox) = 0; 6465908a7eSAndre Fischer virtual void PaintFocus (const Rectangle& rFocusBox); 65ff12d537SAndre Fischer virtual sidebar::Paint GetBackgroundPaint (void) = 0; 66ff12d537SAndre Fischer virtual Color GetTextColor (void) = 0; 677a32b0c8SAndre Fischer virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex); 68*3b2c5b9dSAndre Fischer virtual cssu::Reference<css::accessibility::XAccessible> CreateAccessible (void); 69ff12d537SAndre Fischer 7022de8995SAndre Fischer private: 714e21436dSAndre Fischer Image maIcon; 72ff12d537SAndre Fischer 73ff12d537SAndre Fischer void PaintTitle (const Rectangle& rTitleBox); 747a32b0c8SAndre Fischer DECL_LINK(SelectionHandler, ToolBox*); 7522de8995SAndre Fischer }; 7622de8995SAndre Fischer 7722de8995SAndre Fischer 78ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 7922de8995SAndre Fischer 8022de8995SAndre Fischer #endif 81