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 SVT_DECKLAYOUTER_HXX
21 #define SVT_DECKLAYOUTER_HXX
23 #include <com/sun/star/uno/Reference.hxx>
25 #include <rtl/ref.hxx>
27 #include <boost/optional.hpp>
29 namespace com
{ namespace sun
{ namespace star
{ namespace accessibility
{
35 //........................................................................
38 //........................................................................
40 //====================================================================
42 //====================================================================
43 class IDeckLayouter
: public ::rtl::IReference
46 /** re-arranges the elements of the tool deck, taking into account the
47 available space for the complete deck.
49 @param i_rDeckPlayground
50 the playground for the complete tool panel deck
52 the content area for a single tool panel
54 virtual ::Rectangle
Layout( const ::Rectangle
& i_rDeckPlayground
) = 0;
56 /** destroys the instance
58 Since the layouter is ref-counted, but might keep references to non-ref-counted objects
59 (in particular, the ToolPanelDeck, which is a VCL-Window, and thus cannot be ref-counted),
60 Destroy is the definitive way to dispose the instance. Technically, it's still alive afterwards,
63 virtual void Destroy() = 0;
65 /** assuming that a layouter neesds to provide some kind of panel selector control, this method
66 requests to set the focus to this control.
68 virtual void SetFocusToPanelSelector() = 0;
70 /** returns the number of components in the XAccessible hierarchy which are needed to represent all elements
71 the layouter is responsible form.
73 Note that the implementation must guarantee that the count is fixed over the life time of the layouter.
75 virtual size_t GetAccessibleChildCount() const = 0;
77 /** retrieves the XAccessible implementation for the <code>i_nChildIndex</code>'th child in the XAccessible
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
>
82 const size_t i_nChildIndex
,
83 const ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
>& i_rParentAccessible
86 virtual ~IDeckLayouter()
91 typedef ::rtl::Reference
< IDeckLayouter
> PDeckLayouter
;
93 //........................................................................
95 //........................................................................
97 #endif // SVT_DECKLAYOUTER_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */