LibreOffice Module framework (master) 1
|
#include <titlebarupdate.hxx>
Classes | |
struct | TModuleInfo |
Public Member Functions | |
TitleBarUpdate (css::uno::Reference< css::uno::XComponentContext > xContext) | |
virtual | ~TitleBarUpdate () override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &lArguments) override |
virtual void SAL_CALL | frameAction (const css::frame::FrameActionEvent &aEvent) override |
virtual void SAL_CALL | titleChanged (const css::frame::TitleChangedEvent &aEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &aEvent) override |
Private Member Functions | |
bool | implst_getModuleInfo (const css::uno::Reference< css::frame::XFrame > &xFrame, TModuleInfo &rInfo) |
identify the application module, which is used behind the component of our frame. More... | |
void | impl_forceUpdate () |
set a new icon and title on the title bar of our connected frame window. More... | |
void | impl_updateIcon (const css::uno::Reference< css::frame::XFrame > &xFrame) |
identify the current component (inside the connected frame) and set the right module icon on the title bar. More... | |
void | impl_updateTitle (const css::uno::Reference< css::frame::XFrame > &xFrame) |
gets the current title from the frame and set it on the window. More... | |
void | impl_updateApplicationID (const css::uno::Reference< css::frame::XFrame > &xFrame) |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
may we need a uno service manager to create own services More... | |
css::uno::WeakReference< css::frame::XFrame > | m_xFrame |
reference to the frame which was created by the office himself More... | |
Definition at line 38 of file titlebarupdate.hxx.
framework::TitleBarUpdate::TitleBarUpdate | ( | css::uno::Reference< css::uno::XComponentContext > | xContext | ) |
Definition at line 45 of file titlebarupdate.cxx.
|
overridevirtual |
Definition at line 50 of file titlebarupdate.cxx.
|
overridevirtual |
Definition at line 104 of file titlebarupdate.cxx.
|
overridevirtual |
Definition at line 85 of file titlebarupdate.cxx.
References aEvent, and impl_forceUpdate().
|
private |
set a new icon and title on the title bar of our connected frame window.
@descr It does not check if an update is really needed. That has to be done outside. It retrieves all needed information and update the title bar - nothing less - nothing more.
Definition at line 197 of file titlebarupdate.cxx.
References impl_updateApplicationID(), impl_updateIcon(), impl_updateTitle(), m_xFrame, and xFrame.
Referenced by frameAction(), and titleChanged().
|
private |
Definition at line 115 of file titlebarupdate.cxx.
References VclPtr< class reference_type >::get(), utl::ConfigManager::getProductName(), VCLUnoHelper::GetWindow(), m_xContext, SystemWindow::SetApplicationID(), and xFrame.
Referenced by impl_forceUpdate().
|
private |
identify the current component (inside the connected frame) and set the right module icon on the title bar.
xFrame | the frame which contains the component and where the icon must be set on the window title bar. |
Definition at line 221 of file titlebarupdate.cxx.
References aURL, DBG_UNHANDLED_EXCEPTION, framework::DEFAULT_ICON_ID, VclPtr< class reference_type >::get(), VCLUnoHelper::GetWindow(), implst_getModuleInfo(), framework::INVALID_ICON_ID, framework::TitleBarUpdate::TModuleInfo::nIcon, SystemWindow::SetIcon(), SystemWindow::SetRepresentedURL(), xController, xFrame, and xModel.
Referenced by impl_forceUpdate().
|
private |
gets the current title from the frame and set it on the window.
xFrame | the frame which contains the component and where the title must be set on the window title bar. |
Definition at line 289 of file titlebarupdate.cxx.
References VclPtr< class reference_type >::get(), VCLUnoHelper::GetWindow(), SystemWindow::SetText(), and xFrame.
Referenced by impl_forceUpdate().
|
private |
identify the application module, which is used behind the component of our frame.
xFrame | contains the component, which must be identified. |
rInfo | describe the module in its details. Is set only if return value is true. |
Definition at line 170 of file titlebarupdate.cxx.
References comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), framework::INVALID_ICON_ID, m_xContext, framework::TitleBarUpdate::TModuleInfo::nIcon, framework::OFFICEFACTORY_PROPNAME_ASCII_ICON, framework::TitleBarUpdate::TModuleInfo::sID, and xFrame.
Referenced by impl_updateIcon().
|
overridevirtual |
Definition at line 54 of file titlebarupdate.cxx.
|
overridevirtual |
Definition at line 99 of file titlebarupdate.cxx.
References impl_forceUpdate().
|
private |
may we need a uno service manager to create own services
Definition at line 61 of file titlebarupdate.hxx.
Referenced by impl_updateApplicationID(), and implst_getModuleInfo().
|
private |
reference to the frame which was created by the office himself
Definition at line 64 of file titlebarupdate.hxx.
Referenced by disposing(), impl_forceUpdate(), and initialize().