1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_frame_XFramesSupplier_idl__
28#define __com_sun_star_frame_XFramesSupplier_idl__
29
30#ifndef __com_sun_star_frame_XFrame_idl__
31#include <com/sun/star/frame/XFrame.idl>
32#endif
33
34//=============================================================================
35
36 module com {  module sun {  module star {  module frame {
37
38 published interface XFrames;
39
40//=============================================================================
41/** provides access to sub frames of current one
42
43    @see XFrames
44 */
45published interface XFramesSupplier: XFrame
46{
47	//-------------------------------------------------------------------------
48    /** provides access to this container and to all other <type>XFramesSupplier</type>
49        which are available from this node of frame tree
50
51        @returns
52            the collection of frames which is represented by
53            a <type>FramesContainer</type>.
54	 */
55	XFrames getFrames();
56
57	//-------------------------------------------------------------------------
58    /** gets the current active frame of this container
59        (not of any other available supplier)
60
61        <p>
62        This may be the frame itself. The active frame is defined as
63        the frame which contains (recursively) the window with the focus.
64        If no window within the frame contains the focus, this method
65        returns the last frame which had the focus. If no containing
66        window ever had the focus, the first frame within this frame is
67        returned.
68        </p>
69
70        @returns
71            the <type>Frame</type> which is active within this frame.
72	 */
73	XFrame getActiveFrame();
74
75	//-------------------------------------------------------------------------
76	/**	is called on activation of a direct sub-frame.
77
78        <p>
79        This method is only allowed to be called by a sub-frame according to
80        <member>XFrame::activate()</member> or <member>XFramesSupplier::setActiveFrame()</member>.
81        After this call <member>XFramesSupplier::getActiveFrame()</member> will return the
82        frame specified by <var>Frame</var>.
83        </p>
84
85        <p>
86        In general this method first calls the method <member>XFramesSupplier::setActiveFrame()</member>
87        at the creator frame with <var>this</var> as the current argument. Then it broadcasts
88		the <type>FrameActionEvent</type> <const>FrameAction::FRAME_ACTIVATED</const>.
89        </p>
90
91        <p>
92        Note: Given parameter <var>Frame</var> must already exist inside the container
93        (e.g., inserted by using <member>XFrames::append()</member>)
94        </p>
95
96        @param Frame
97            the new active child frame inside this container
98	*/
99    void setActiveFrame( [in] XFrame Frame );
100};
101
102//=============================================================================
103
104}; }; }; };
105
106#endif
107