Branch libreoffice-5-0-4
[LibreOffice.git] / include / svtools / toolpanel / decklayouter.hxx
blobe5b9e9319b2858f7fc609a5d1b58b1206a08fce2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_TOOLPANEL_DECKLAYOUTER_HXX
21 #define INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX
23 #include <com/sun/star/uno/Reference.hxx>
25 #include <rtl/ref.hxx>
26 #include <salhelper/simplereferenceobject.hxx>
28 #include <boost/optional.hpp>
30 namespace com { namespace sun { namespace star { namespace accessibility {
31 class XAccessible;
32 } } } }
33 class Rectangle;
34 class Point;
37 namespace svt
42 //= IDeckLayouter
44 class IDeckLayouter : public salhelper::SimpleReferenceObject
46 public:
47 /** re-arranges the elements of the tool deck, taking into account the
48 available space for the complete deck.
50 @param i_rDeckPlayground
51 the playground for the complete tool panel deck
52 @return
53 the content area for a single tool panel
55 virtual ::Rectangle Layout( const ::Rectangle& i_rDeckPlayground ) = 0;
57 /** destroys the instance
59 Since the layouter is ref-counted, but might keep references to non-ref-counted objects
60 (in particular, the ToolPanelDeck, which is a VCL-Window, and thus cannot be ref-counted),
61 Destroy is the definitive way to dispose the instance. Technically, it's still alive afterwards,
62 but non-functional.
64 virtual void Destroy() = 0;
66 /** assuming that a layouter neesds to provide some kind of panel selector control, this method
67 requests to set the focus to this control.
69 virtual void SetFocusToPanelSelector() = 0;
71 /** returns the number of components in the XAccessible hierarchy which are needed to represent all elements
72 the layouter is responsible form.
74 Note that the implementation must guarantee that the count is fixed over the life time of the layouter.
76 virtual size_t GetAccessibleChildCount() const = 0;
78 /** retrieves the XAccessible implementation for the <code>i_nChildIndex</code>'th child in the XAccessible
79 hierarchy.
81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
82 GetAccessibleChild(
83 const size_t i_nChildIndex,
84 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible
85 ) = 0;
87 virtual ~IDeckLayouter()
92 typedef ::rtl::Reference< IDeckLayouter > PDeckLayouter;
95 } // namespace svt
98 #endif // INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */