1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVTOOLS_SOURCE_TOOLPANEL_TABITEMDESCRIPTOR_HXX
21 #define INCLUDED_SVTOOLS_SOURCE_TOOLPANEL_TABITEMDESCRIPTOR_HXX
23 #include <svtools/toolpanel/toolpanel.hxx>
24 #include <svtools/toolpanel/tabitemcontent.hxx>
26 #include <tools/gen.hxx>
27 #include <osl/diagnose.h>
42 Rectangle aCompleteArea
; // bounding area if the both text and icon are to be rendererd
43 Rectangle aIconOnlyArea
; // bounding area if the icon is to be rendererd
44 Rectangle aTextOnlyArea
; // bounding area if the text is to be rendererd
45 TabItemContent eContent
;
46 // content to be used for this particular item. Might differ from item content which has been set
47 // up for the complete control, in case not the complete content fits into the available space.
54 ,eContent( TABITEM_IMAGE_AND_TEXT
)
58 const Rectangle
& GetRect( const TabItemContent i_eItemContent
) const
60 OSL_ENSURE( i_eItemContent
!= TABITEM_AUTO
, "ItemDescriptor::GetRect: illegal value!" );
62 return ( i_eItemContent
== TABITEM_IMAGE_AND_TEXT
)
64 : ( ( i_eItemContent
== TABITEM_TEXT_ONLY
)
70 const Rectangle
& GetCurrentRect() const
72 return GetRect( eContent
);
76 typedef ::std::vector
< ItemDescriptor
> ItemDescriptors
;
83 #endif // INCLUDED_SVTOOLS_SOURCE_TOOLPANEL_TABITEMDESCRIPTOR_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */