LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XLayoutManager Interface Reference

central interface to query for, create, destroy and manipulate user interface elements which are bound to a layout manager. More...

import"XLayoutManager.idl";

Inheritance diagram for XLayoutManager:
XInterface XLayoutManager2 LayoutManager

Public Member Functions

void attachFrame ([in] com::sun::star::frame::XFrame Frame)
 attaches a com::sun::star::frame::XFrame to a layout manager. More...
 
void reset ()
 resets the layout manager and remove all of its internal user interface elements. More...
 
com::sun::star::awt::Rectangle getCurrentDockingArea ()
 provides the current docking area size of the layout manager. More...
 
com::sun::star::ui::XDockingAreaAcceptor getDockingAreaAcceptor ()
 retrieves the current docking area acceptor that controls the border space of the frame's container window. More...
 
void setDockingAreaAcceptor ([in] com::sun::star::ui::XDockingAreaAcceptor xDockingAreaAcceptor)
 sets a docking area acceptor that controls the border space of the frame's container window. More...
 
void createElement ([in] string ResourceURL)
 creates a new user interface element. More...
 
void destroyElement ([in] string ResourceURL)
 destroys a user interface element. More...
 
boolean requestElement ([in] string ResourceURL)
 request to make a user interface element visible if it is not in hidden state. More...
 
com::sun::star::ui::XUIElement getElement ([in] string ResourceURL)
 retrieves a user interface element which has been created before. More...
 
sequence< com::sun::star::ui::XUIElementgetElements ()
 retrieves all user interface elements which are currently instantiated. More...
 
boolean showElement ([in] string ResourceURL)
 shows a user interface element. More...
 
boolean hideElement ([in] string ResourceURL)
 hides a user interface element. More...
 
boolean dockWindow ([in] string ResourceURL, [in] com::sun::star::ui::DockingArea DockingArea, [in] com::sun::star::awt::Point Pos)
 docks a window based user interface element to a specified docking area. More...
 
boolean dockAllWindows ([in] short nElementType)
 docks all windows which are member of the provided user interface element type. More...
 
boolean floatWindow ([in] string ResourceURL)
 forces a window based user interface element to float. More...
 
boolean lockWindow ([in] string ResourceURL)
 locks a window based user interface element if it's in a docked state. More...
 
boolean unlockWindow ([in] string ResourceURL)
 unlocks a window based user interface element if it's in a docked state. More...
 
void setElementSize ([in] string ResourceURL, [in] com::sun::star::awt::Size Size)
 sets a new size for a window based user interface element. More...
 
void setElementPos ([in] string ResourceURL, [in] com::sun::star::awt::Point Pos)
 sets a new position for a window based user interface element. More...
 
void setElementPosSize ([in] string ResourceURL, [in] com::sun::star::awt::Point Pos, [in] com::sun::star::awt::Size Size)
 sets a new position and size for a window based user interface element. More...
 
boolean isElementVisible ([in] string ResourceURL)
 retrieves the current visibility state of a window based user interface element. More...
 
boolean isElementFloating ([in] string ResourceURL)
 retrieves the current floating state of a window based user interface element. More...
 
boolean isElementDocked ([in] string ResourceURL)
 retrieves the current docking state of a window based user interface element. More...
 
boolean isElementLocked ([in] string ResourceURL)
 retrieves the current lock state of a window based user interface element. More...
 
com::sun::star::awt::Size getElementSize ([in] string ResourceURL)
 retrieves the current size of a window based user interface element. More...
 
com::sun::star::awt::Point getElementPos ([in] string ResourceURL)
 retrieves the current pixel position of a window based user interface element. More...
 
void lock ()
 prohibit all layout updates until unlock is called again. More...
 
void unlock ()
 permit layout updates again. More...
 
void doLayout ()
 forces a complete new layouting of all user interface elements. More...
 
void setVisible ([in] boolean Visible)
 sets the layout manager to invisible state and hides all user interface elements. More...
 
boolean isVisible ()
 retrieves the visibility state of a layout manager. 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...
 

Detailed Description

central interface to query for, create, destroy and manipulate user interface elements which are bound to a layout manager.

Every user interface element which is controlled by a layout manager has a unique identifier called resource URL.

A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.

Currently the following user interface element types are defined:

See also
com::sun::star::ui::UIElementTypes
com::sun::star::frame::XFrame
Since
OOo 2.0

Member Function Documentation

◆ attachFrame()

void attachFrame ( [in] com::sun::star::frame::XFrame  Frame)

attaches a com::sun::star::frame::XFrame to a layout manager.

Parameters
Framespecifies the frame that should be attached to the layout manager

A layout manager needs a com::sun::star::frame::XFrame to be able to work. Without a it no user interface elements can be created.

◆ createElement()

void createElement ( [in] string  ResourceURL)

creates a new user interface element.

Parameters
ResourceURLspecifies which user interface element should be created. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.

◆ destroyElement()

void destroyElement ( [in] string  ResourceURL)

destroys a user interface element.

Parameters
ResourceURLspecifies which user interface element should be destroyed. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.

◆ dockAllWindows()

boolean dockAllWindows ( [in] short  nElementType)

docks all windows which are member of the provided user interface element type.

Parameters
nElementTypespecifies which user interface element type should be docked.
Returns
returns TRUE if all user interface elements of the requested type could be docked, otherwise FALSE will be returned.
See also
com::sun::star::ui::UIElementType

◆ dockWindow()

boolean dockWindow ( [in] string  ResourceURL,
[in] com::sun::star::ui::DockingArea  DockingArea,
[in] com::sun::star::awt::Point  Pos 
)

docks a window based user interface element to a specified docking area.

Parameters
ResourceURLspecifies which user interface element should be docked. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
DockingAreaspecifies on which docking area the window based user interface element should docked.
Posspecifies the position inside the docking area.
Returns
returns TRUE if the user interface element has been docked, otherwise FALSE will be returned.
See also
com::sun::star::ui::DockingArea

◆ doLayout()

void doLayout ( )

forces a complete new layouting of all user interface elements.

◆ floatWindow()

boolean floatWindow ( [in] string  ResourceURL)

forces a window based user interface element to float.

Parameters
ResourceURLspecifies which user interface element should be float. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element has been docked, otherwise FALSE will be returned.

◆ getCurrentDockingArea()

com::sun::star::awt::Rectangle getCurrentDockingArea ( )

provides the current docking area size of the layout manager.

Returns
The com::sun::star::awt::Rectangle contains pixel values. The members of com::sun::star::awt::Rectangle are filled as following:
  • X = docking area on left side (in pixel)
  • Y = docking area on top side (in pixel)
  • Width = docking area on right side (in pixel)
  • Height = docking area on bottom side (in pixel)

◆ getDockingAreaAcceptor()

com::sun::star::ui::XDockingAreaAcceptor getDockingAreaAcceptor ( )

retrieves the current docking area acceptor that controls the border space of the frame's container window.

Returns
current docking area acceptor which controls the border space of frame's container window.

A docking area acceptor retrieved by this method is owned by the layout manager. It is not allowed to dispose this object, it will be destroyed on reference count!

◆ getElement()

com::sun::star::ui::XUIElement getElement ( [in] string  ResourceURL)

retrieves a user interface element which has been created before.

Parameters
ResourceURLspecifies which user interface element should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.

The layout manager instance is owner of the returned user interface element. That means that the life time of the user interface element is controlled by the layout manager. It can be disposed at every time!

◆ getElementPos()

com::sun::star::awt::Point getElementPos ( [in] string  ResourceURL)

retrieves the current pixel position of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the current position should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
the size in pixel of the user interface element. A non-window based user interface element provides a zero size.

◆ getElements()

sequence< com::sun::star::ui::XUIElement > getElements ( )

retrieves all user interface elements which are currently instantiated.

Returns
a sequence of user interface elements providing com::sun::star::ui::XUIElement interface.

The layout manager instance is owner of the returned user interface elements. That means that the life time of the user interface elements is controlled by the layout manager. They can be disposed at every time!

◆ getElementSize()

com::sun::star::awt::Size getElementSize ( [in] string  ResourceURL)

retrieves the current size of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the current size should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
the size in pixel of the user interface element. A non-window based user interface element provides a zero size.

◆ hideElement()

boolean hideElement ( [in] string  ResourceURL)

hides a user interface element.

Parameters
ResourceURLspecifies which user interface element should be hidden. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element has been hidden, otherwise FALSE will be returned.

◆ isElementDocked()

boolean isElementDocked ( [in] string  ResourceURL)

retrieves the current docking state of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the docking state should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
TRUE if the user interface element is docked, otherwise FALSE.

◆ isElementFloating()

boolean isElementFloating ( [in] string  ResourceURL)

retrieves the current floating state of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the floating state should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
TRUE if the user interface element is floating, otherwise FALSE.

◆ isElementLocked()

boolean isElementLocked ( [in] string  ResourceURL)

retrieves the current lock state of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the lock state should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
TRUE if the user interface element is locked, otherwise FALSE.

◆ isElementVisible()

boolean isElementVisible ( [in] string  ResourceURL)

retrieves the current visibility state of a window based user interface element.

Parameters
ResourceURLspecifies for which user interface element the visibility state should be retrieved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
TRUE if the user interface element is visible, otherwise FALSE.

◆ isVisible()

boolean isVisible ( )

retrieves the visibility state of a layout manager.

A layout manager can be set to invisible state to force it to hide all of its user interface elements. If another component wants to use the window for its own user interface elements it can use this function. This function is normally used to implement inplace editing.

◆ lock()

void lock ( )

prohibit all layout updates until unlock is called again.

This call can be used to speed up the creation process of several user interface elements. Otherwise the layout manager would calculate the layout for every creation.

◆ lockWindow()

boolean lockWindow ( [in] string  ResourceURL)

locks a window based user interface element if it's in a docked state.

Parameters
ResourceURLspecifies which user interface element should be locked. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element has been locked, otherwise FALSE will be returned.

◆ requestElement()

boolean requestElement ( [in] string  ResourceURL)

request to make a user interface element visible if it is not in hidden state.

Parameters
ResourceURLspecifies which user interface element should be made visible. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element could be made visible, otherwise FALSE will be returned.

If a user interface element should forced to the visible state XLayoutManager::showElement() should be used. This function can be used for context dependent elements which should respect the current visibility state.

◆ reset()

void reset ( )

resets the layout manager and remove all of its internal user interface elements.

This call should be handled with care as all user interface elements will be destroyed and the layout manager is reset to a state after a attachFrame() has been made. That means an attached frame which has been set by attachFrame() is not released. The layout manager itself calls reset after a component has been attached or reattached to a frame.

◆ setDockingAreaAcceptor()

void setDockingAreaAcceptor ( [in] com::sun::star::ui::XDockingAreaAcceptor  xDockingAreaAcceptor)

sets a docking area acceptor that controls the border space of the frame's container window.

Parameters
xDockingAreaAcceptora docking area acceptor which controls the border space of frame's container window.

A docking area acceptor decides if the layout manager can use requested border space for docking windows. If the acceptor denies the requested space the layout manager automatically set all docked windows into floating state and will not use this space for docking.
After setting a docking area acceptor the object is owned by the layout manager. It is not allowed to dispose this object, it will be destroyed on reference count!

◆ setElementPos()

void setElementPos ( [in] string  ResourceURL,
[in] com::sun::star::awt::Point  Pos 
)

sets a new position for a window based user interface element.

Parameters
ResourceURLspecifies which user interface element should be moved. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Posspecifies the new position in pixel.

It is up to the layout manager to decide if the user interface element can be moved. The new position can be retrieved by calling getElementPos().

◆ setElementPosSize()

void setElementPosSize ( [in] string  ResourceURL,
[in] com::sun::star::awt::Point  Pos,
[in] com::sun::star::awt::Size  Size 
)

sets a new position and size for a window based user interface element.

Parameters
ResourceURLspecifies which user interface element should be moved and resized. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Posspecifies the new position in pixel.
Sizespecifies the new position in pixel.

It is up to the layout manager to decide if the user interface element can be moved and resized. The new position and size can be retrieved by calling getElementPos() and getElementSize().

◆ setElementSize()

void setElementSize ( [in] string  ResourceURL,
[in] com::sun::star::awt::Size  Size 
)

sets a new size for a window based user interface element.

Parameters
ResourceURLspecifies which user interface element should be resized. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Sizespecifies the new size in pixel.

It is up to the layout manager to decide if the user interface element can be resized. The new size can be retrieved by calling getElementSize().

◆ setVisible()

void setVisible ( [in] boolean  Visible)

sets the layout manager to invisible state and hides all user interface elements.

A layout manager can be set to invisible state to force it to hide all of its user interface elements. If another component wants to use the window for its own user interface elements it can use this function. This function is normally used to implement inplace editing.

Parameters
Visibleprovide FALSE to make layout manager invisible otherwise this must be set to TRUE.

◆ showElement()

boolean showElement ( [in] string  ResourceURL)

shows a user interface element.

Parameters
ResourceURLspecifies which user interface element should be shown. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element has been shown, otherwise FALSE will be returned.

◆ unlock()

void unlock ( )

permit layout updates again.

This function should be called to permit layout updates. The layout manager starts to calculate the new layout after this call.

◆ unlockWindow()

boolean unlockWindow ( [in] string  ResourceURL)

unlocks a window based user interface element if it's in a docked state.

Parameters
ResourceURLspecifies which user interface element should be unlocked. A resource URL must meet the following syntax: "private:resource/$type/$name". It is only allowed to use ASCII characters for type and name.
Returns
returns TRUE if the user interface element has been unlocked, otherwise FALSE will be returned.

The documentation for this interface was generated from the following file: