LibreOffice Module framework (master) 1
|
#include <framecontainer.hxx>
Public Member Functions | |
FrameContainer () | |
constructor / destructor More... | |
~FrameContainer () | |
-*************************************************************************************************************** More... | |
void | append (const css::uno::Reference< css::frame::XFrame > &xFrame) |
add/remove/mark container items More... | |
void | remove (const css::uno::Reference< css::frame::XFrame > &xFrame) |
-*************************************************************************************************************** More... | |
void | setActive (const css::uno::Reference< css::frame::XFrame > &xFrame) |
-*************************************************************************************************************** More... | |
css::uno::Reference< css::frame::XFrame > | getActive () const |
-*************************************************************************************************************** More... | |
bool | exist (const css::uno::Reference< css::frame::XFrame > &xFrame) const |
checks and free memory More... | |
void | clear () |
-*************************************************************************************************************** More... | |
sal_uInt32 | getCount () const |
deprecated IndexAccess! More... | |
css::uno::Reference< css::frame::XFrame > | operator[] (sal_uInt32 nIndex) const |
-*************************************************************************************************************** More... | |
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > | getAllElements () const |
replacement for deprecated index access More... | |
css::uno::Reference< css::frame::XFrame > | searchOnAllChildrens (const OUString &sName) const |
special helper for Frame::findFrame() More... | |
css::uno::Reference< css::frame::XFrame > | searchOnDirectChildrens (std::u16string_view sName) const |
-*************************************************************************************************************** More... | |
Private Attributes | |
TFrameContainer | m_aContainer |
list to hold all frames More... | |
css::uno::Reference< css::frame::XFrame > | m_xActiveFrame |
one container item can be the current active frame. It's necessary for Desktop or Frame implementation. More... | |
Definition at line 46 of file framecontainer.hxx.
framework::FrameContainer::FrameContainer | ( | ) |
constructor / destructor
-***************************************************************************************************************
initialize an empty container @descr The container will be empty then - special features (e.g. the async quit mechanism) are disabled.
@threadsafe not necessary - it's not a singleton
Definition at line 36 of file framecontainer.cxx.
framework::FrameContainer::~FrameContainer | ( | ) |
-***************************************************************************************************************
deinitialize may a filled container @descr Special features (if the currently are running) will be disabled and we free all used other resources.
@threadsafe not necessary - it's not a singleton
Definition at line 50 of file framecontainer.cxx.
References m_aContainer, and m_xActiveFrame.
void framework::FrameContainer::append | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame | ) |
add/remove/mark container items
-***************************************************************************************************************
append a new frame to the container @descr We accept the incoming frame only, if it is a valid reference and doesn't exist already.
xFrame | frame, which should be added to this container Must be a valid reference. |
@threadsafe yes
Definition at line 67 of file framecontainer.cxx.
References exist(), m_aContainer, and xFrame.
Referenced by framework::OFrames::append().
void framework::FrameContainer::clear | ( | ) |
-***************************************************************************************************************
delete all existing items of the container @threadsafe yes
Definition at line 123 of file framecontainer.cxx.
References m_aContainer, and m_xActiveFrame.
Referenced by framework::Desktop::disposing().
bool framework::FrameContainer::exist | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame | ) | const |
checks and free memory
-***************************************************************************************************************
check if the given frame currently exist inside the container
xFrame | reference to the queried frame |
@threadsafe yes
Definition at line 113 of file framecontainer.cxx.
References m_aContainer, and xFrame.
Referenced by append(), and setActive().
css::uno::Reference< css::frame::XFrame > framework::FrameContainer::getActive | ( | ) | const |
-***************************************************************************************************************
return the current active frame of this container @descr Value can be null in case the frame was removed from the container and nobody from outside decide which of all others should be the new one...
@threadsafe yes
Definition at line 223 of file framecontainer.cxx.
References m_xActiveFrame.
Referenced by framework::Desktop::getActiveFrame(), framework::Desktop::getFastPropertyValue(), and framework::Desktop::setActiveFrame().
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > framework::FrameContainer::getAllElements | ( | ) | const |
replacement for deprecated index access
-***************************************************************************************************************
returns a snapshot of all currently existing frames inside this container @descr Should be used to replace the deprecated functions getCount()/operator[]!
@threadsafe yes
Definition at line 188 of file framecontainer.cxx.
References comphelper::containerToSequence(), and m_aContainer.
Referenced by framework::Desktop::impl_closeFrames().
sal_uInt32 framework::FrameContainer::getCount | ( | ) | const |
deprecated IndexAccess!
-***************************************************************************************************************
returns count of all current existing frames
@threadsafe yes
Definition at line 143 of file framecontainer.cxx.
References m_aContainer.
Referenced by framework::OFrames::getByIndex(), framework::OFrames::getCount(), framework::OFrames::hasElements(), and framework::OFrames::queryFrames().
css::uno::Reference< css::frame::XFrame > framework::FrameContainer::operator[] | ( | sal_uInt32 | nIndex | ) | const |
-***************************************************************************************************************
returns one item of this container
nIndex | a value between 0 and (getCount()-1) to address one container item |
@threadsafe yes
Definition at line 161 of file framecontainer.cxx.
References m_aContainer, nIndex, SAL_INFO, and xFrame.
void framework::FrameContainer::remove | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame | ) |
-***************************************************************************************************************
remove a frame from the container @descr In case we remove the last frame and our internal special feature (the async quit mechanism) was enabled by the desktop instance, we start it.
xFrame | frame, which should be deleted from this container Must be a valid reference. |
@threadsafe yes
Definition at line 87 of file framecontainer.cxx.
References m_aContainer, m_xActiveFrame, and xFrame.
Referenced by framework::OFrames::remove().
css::uno::Reference< css::frame::XFrame > framework::FrameContainer::searchOnAllChildrens | ( | const OUString & | sName | ) | const |
special helper for Frame::findFrame()
-***************************************************************************************************************
implements a simple search based on current container items @descr It can be used for findFrame() and implements a deep down search.
sName | target name, which is searched |
@threadsafe yes
Definition at line 241 of file framecontainer.cxx.
References m_aContainer, and sName.
Referenced by framework::Desktop::findFrame().
css::uno::Reference< css::frame::XFrame > framework::FrameContainer::searchOnDirectChildrens | ( | std::u16string_view | sName | ) | const |
-***************************************************************************************************************
implements a simple search based on current container items @descr It can be used for findFrame() and search on members of this container only!
sName | target name, which is searched |
@threadsafe yes
Definition at line 276 of file framecontainer.cxx.
References m_aContainer, and sName.
Referenced by framework::Desktop::findFrame().
void framework::FrameContainer::setActive | ( | const css::uno::Reference< css::frame::XFrame > & | xFrame | ) |
-***************************************************************************************************************
set the given frame as the new active one inside this container @descr We accept this frame only, if it's already a part of this container.
xFrame | reference to the new active frame Must be a valid reference and already part of this container. |
@threadsafe yes
Definition at line 204 of file framecontainer.cxx.
References exist(), m_xActiveFrame, and xFrame.
Referenced by framework::Desktop::setActiveFrame().
|
private |
list to hold all frames
Definition at line 54 of file framecontainer.hxx.
Referenced by append(), clear(), exist(), getAllElements(), getCount(), operator[](), remove(), searchOnAllChildrens(), searchOnDirectChildrens(), and ~FrameContainer().
|
private |
one container item can be the current active frame. It's necessary for Desktop or Frame implementation.
Definition at line 56 of file framecontainer.hxx.
Referenced by clear(), getActive(), remove(), setActive(), and ~FrameContainer().