/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ #ifndef __com_sun_star_frame_XFrame_idl__ #define __com_sun_star_frame_XFrame_idl__ #ifndef __com_sun_star_lang_XComponent_idl__ #include #endif #ifndef __com_sun_star_awt_XWindow_idl__ #include #endif //============================================================================= module com { module sun { module star { module frame { published interface XFrameActionListener; published interface XController; published interface XFramesSupplier; //============================================================================= /** a frame object can be considered to be an "anchor" object where a component can be attached to.

A frame can be (it's not a must!) a part of a frame tree. If not this frame willn't be accessible by using the api. This mode make sense for previews. The root node of the tree can be a Desktop implementation.

@see Desktop */ published interface XFrame: com::sun::star::lang::XComponent { //------------------------------------------------------------------------- /** is called to initialize the frame within a window - the container window.

This window will be used as parent for the component window and to support some UI relevant features of the frame service. Note: Re-parenting mustn't supported by a real frame implementation! It's designed for initializing - not for setting.

This frame will take over ownership of the window refered from xWindow. Thus, the previous owner is not allowed to dispose this window anymore.

@param xWindow the new container window @see XFrame::getContainerWindow() */ void initialize( [in] com::sun::star::awt::XWindow xWindow ); //------------------------------------------------------------------------- /** provides access to the container window of the frame.

Normally this is used as the parent window of the component window.

@return the container window of this frame @see XFrame::initialize() */ com::sun::star::awt::XWindow getContainerWindow(); //------------------------------------------------------------------------- /** sets the frame container that created this frame.

Only the creator is allowed to call this method. But creator doesn't mean the implementation which creates this instance ... it means the parent frame of the frame hierarchy. Because; normaly a frame should be created by using the api and is neccessary for searches inside the tree (e.g. XFrame::findFrame())

@param Creator the creator (parent) of this frame @see XFrame::getCreator() */ [oneway] void setCreator( [in] XFramesSupplier Creator ); //------------------------------------------------------------------------- /** provides access to the creator (parent) of this frame @returns the frame container that created and contains this frame. @see XFrame::setCreator() */ XFramesSupplier getCreator(); //------------------------------------------------------------------------- /** access to the name property of this frame @returns the programmatic name of this frame. @see XFrame::setName() */ string getName(); //------------------------------------------------------------------------- /** sets the name of the frame.

Normally the name of the frame is set initially (e.g. by the creator). The name of a frame will be used for identifying it if a frame search was started. These searches can be forced by:

Note: Special targets like "_blank", "_self" etc. are not allowed. That's why frame names shouldn't start with a sign "_".

@param aName the new programmatic name of this frame @see XFrame::findFrame() @see XFrame::getName() @see XDispatchProvider @see XComponentLoader */ [oneway] void setName( [in] string aName ); //------------------------------------------------------------------------- /** searches for a frame with the specified name.

Frames may contain other frames (e.g., a frameset) and may be contained in other frames. This hierarchy is searched with this method. First some special names are taken into account, i.e. "", "_self", "_top", "_blank" etc. SearchFlags is ignored when comparing these names with TargetFrameName; further steps are controlled by SearchFlags. If allowed, the name of the frame itself is compared with the desired one, and then ( again if allowed ) the method is called for all children of the frame. Finally may be called for the siblings and then for parent frame (if allowed).

List of special target names:
""/"_self"address the starting frame itself
"_parent"address the direct parent frame only
"_top"address the top frame of this subtree of the frametree
"_blank"creates a new top frame

If no frame with the given name is found, a new top frame is created; if this is allowed by a special flag FrameSearchFlag::CREATE. The new frame also gets the desired name.

@param aTargetFrameName identify