Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX
21 : #define INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX
22 :
23 : #include <com/sun/star/uno/Reference.hxx>
24 :
25 : #include <rtl/ref.hxx>
26 :
27 : #include <boost/optional.hpp>
28 :
29 : namespace com { namespace sun { namespace star { namespace accessibility {
30 : class XAccessible;
31 : } } } }
32 : class Rectangle;
33 : class Point;
34 :
35 :
36 : namespace svt
37 : {
38 :
39 :
40 :
41 : //= IDeckLayouter
42 :
43 0 : class IDeckLayouter : public ::rtl::IReference
44 : {
45 : public:
46 : /** re-arranges the elements of the tool deck, taking into account the
47 : available space for the complete deck.
48 :
49 : @param i_rDeckPlayground
50 : the playground for the complete tool panel deck
51 : @return
52 : the content area for a single tool panel
53 : */
54 : virtual ::Rectangle Layout( const ::Rectangle& i_rDeckPlayground ) = 0;
55 :
56 : /** destroys the instance
57 :
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,
61 : but non-functional.
62 : */
63 : virtual void Destroy() = 0;
64 :
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.
67 : */
68 : virtual void SetFocusToPanelSelector() = 0;
69 :
70 : /** returns the number of components in the XAccessible hierarchy which are needed to represent all elements
71 : the layouter is responsible form.
72 :
73 : Note that the implementation must guarantee that the count is fixed over the life time of the layouter.
74 : */
75 : virtual size_t GetAccessibleChildCount() const = 0;
76 :
77 : /** retrieves the XAccessible implementation for the <code>i_nChildIndex</code>'th child in the XAccessible
78 : hierarchy.
79 : */
80 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
81 : GetAccessibleChild(
82 : const size_t i_nChildIndex,
83 : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible
84 : ) = 0;
85 :
86 0 : virtual ~IDeckLayouter()
87 0 : {
88 0 : }
89 : };
90 :
91 : typedef ::rtl::Reference< IDeckLayouter > PDeckLayouter;
92 :
93 :
94 : } // namespace svt
95 :
96 :
97 : #endif // INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX
98 :
99 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|