LibreOffice
LibreOffice 24.2 SDK API Reference
|
a frame object can be considered to be an "anchor" object where a component can be attached to. More...
import"XFrame.idl";
Public Member Functions | |
void | initialize ([in] com::sun::star::awt::XWindow xWindow) |
is called to initialize the frame within a window - the container window. More... | |
com::sun::star::awt::XWindow | getContainerWindow () |
provides access to the container window of the frame. More... | |
void | setCreator ([in] XFramesSupplier Creator) |
sets the frame container that created this frame. More... | |
XFramesSupplier | getCreator () |
provides access to the creator (parent) of this frame More... | |
string | getName () |
access to the name property of this frame More... | |
void | setName ([in] string aName) |
sets the name of the frame. More... | |
XFrame | findFrame ([in] string aTargetFrameName, [in] long nSearchFlags) |
searches for a frame with the specified name. More... | |
boolean | isTop () |
determines if the frame is a top frame. More... | |
void | activate () |
activates this frame and thus the component within. More... | |
void | deactivate () |
is called by the creator frame when another sub-frame gets activated. More... | |
boolean | isActive () |
determines if the frame is active. More... | |
boolean | setComponent ([in] com::sun::star::awt::XWindow xComponentWindow, [in] XController xController) |
sets a new component into the frame or release an existing one from a frame. More... | |
com::sun::star::awt::XWindow | getComponentWindow () |
provides access to the component window More... | |
XController | getController () |
provides access to the controller More... | |
void | contextChanged () |
notifies the frame that the context of the controller within this frame changed (i.e. More... | |
void | addFrameActionListener ([in]XFrameActionListener xListener) |
registers an event listener, which will be called when certain things happen to the components within this frame or within sub-frames of this frame. More... | |
void | removeFrameActionListener ([in] XFrameActionListener xListener) |
unregisters an event listener More... | |
Public Member Functions inherited from XComponent | |
void | dispose () |
The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More... | |
void | addEventListener ([in] XEventListener xListener) |
adds an event listener to the object. More... | |
void | removeEventListener ([in] XEventListener aListener) |
removes an event listener from the listener list. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
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 won't be accessible by using the API. This mode make sense for previews. The root node of the tree can be a Desktop implementation.
void activate | ( | ) |
activates this frame and thus the component within.
At first the frame sets itself as the active frame of its creator by calling XFramesSupplier::setActiveFrame(), then it broadcasts a FrameActionEvent with FrameAction::FRAME_ACTIVATED. The component within this frame may listen to this event to grab the focus on activation; for simple components this can be done by the FrameLoader.
Finally, most frames may grab the focus to one of its windows or forward the activation to a sub-frame.
void addFrameActionListener | ( | [in] XFrameActionListener | xListener | ) |
registers an event listener, which will be called when certain things happen to the components within this frame or within sub-frames of this frame.
E.g., it is possible to determine instantiation/destruction and activation/deactivation of components.
xListener | specifies the listener which will be informed |
void contextChanged | ( | ) |
notifies the frame that the context of the controller within this frame changed (i.e.
the selection).
According to a call to this interface, the frame calls XFrameActionListener::frameAction() with FrameAction::CONTEXT_CHANGED to all listeners which are registered using XFrame::addFrameActionListener(). For external controllers this event can be used to requery dispatches.
void deactivate | ( | ) |
is called by the creator frame when another sub-frame gets activated.
At first the frame deactivates its active sub-frame, if any. Then broadcasts a FrameActionEvent with FrameAction::FRAME_DEACTIVATING.
XFrame findFrame | ( | [in] string | aTargetFrameName, |
[in] long | nSearchFlags | ||
) |
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.
aTargetFrameName | identify
|
nSearchFlags | optional parameter to regulate search if no special target was used for TargetFrameName |
com::sun::star::awt::XWindow getComponentWindow | ( | ) |
provides access to the component window
Note: Don't dispose this window - the frame is the owner of it.
NULL
if no one currently existcom::sun::star::awt::XWindow getContainerWindow | ( | ) |
provides access to the container window of the frame.
Normally this is used as the parent window of the component window.
XController getController | ( | ) |
provides access to the controller
Note: Don't dispose it - the frame is the owner of it. Use XController::getFrame() to dispose the frame after you the controller agreed with a XController::suspend() call.
NULL
if no one currently existXFramesSupplier getCreator | ( | ) |
provides access to the creator (parent) of this frame
string getName | ( | ) |
access to the name property of this frame
void initialize | ( | [in] com::sun::star::awt::XWindow | xWindow | ) |
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 referred from xWindow. Thus, the previous owner is not allowed to dispose this window anymore.
xWindow | the new container window |
boolean isActive | ( | ) |
determines if the frame is active.
TRUE
for active or UI active frames FALSE
otherwiseboolean isTop | ( | ) |
determines if the frame is a top frame.
In general a top frame is the frame which is a direct child of a task frame or which does not have a parent. Possible frame searches must stop the search at such a frame unless the flag FrameSearchFlag::TASKS is set.
TRUE
if frame supports top frame specification FALSE
otherwise void removeFrameActionListener | ( | [in] XFrameActionListener | xListener | ) |
unregisters an event listener
xListener | specifies the listener which won't be informed any longer |
boolean setComponent | ( | [in] com::sun::star::awt::XWindow | xComponentWindow, |
[in] XController | xController | ||
) |
sets a new component into the frame or release an existing one from a frame.
xComponentWindow | the window of the new component or NULL for release |
A valid component window should be a child of the frame container window.
xController | the controller of the new component or NULL for release |
Simple components may implement a com::sun::star::awt::XWindow only. In this case no controller must be given here.
TRUE
if setting of new component or release of an existing one was successfully FALSE
otherwise (especially, if an existing controller disagree within his XController::suspend() call)void setCreator | ( | [in] XFramesSupplier | Creator | ) |
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; normally a frame should be created by using the API and is necessary for searches inside the tree (e.g. XFrame::findFrame())
Creator | the creator (parent) of this frame |
void setName | ( | [in] string | aName | ) |
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 "_".
aName | the new programmatic name of this frame |