LibreOffice Module framework (master) 1
|
#include <toolbarmanager.hxx>
Classes | |
struct | ExecuteInfo |
Public Types | |
enum | ExecuteCommand { EXEC_CMD_CLOSETOOLBAR , EXEC_CMD_UNDOCKTOOLBAR , EXEC_CMD_DOCKTOOLBAR , EXEC_CMD_DOCKALLTOOLBARS } |
enum | ClickAction { Click , DblClick , Execute } |
Public Member Functions | |
ToolBarManager (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XFrame > &rFrame, OUString aResourceName, ToolBox *pToolBar) | |
ToolBarManager (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XFrame > &rFrame, OUString aResourceName, weld::Toolbar *pToolBar, weld::Builder *pBuilder) | |
virtual | ~ToolBarManager () override |
ToolBox * | GetToolBar () const |
virtual void SAL_CALL | frameAction (const css::frame::FrameActionEvent &Action) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual void SAL_CALL | elementInserted (const css::ui::ConfigurationEvent &Event) override |
virtual void SAL_CALL | elementRemoved (const css::ui::ConfigurationEvent &Event) override |
virtual void SAL_CALL | elementReplaced (const css::ui::ConfigurationEvent &Event) override |
void SAL_CALL | dispose () override |
void SAL_CALL | addEventListener (const css::uno::Reference< XEventListener > &xListener) override |
void SAL_CALL | removeEventListener (const css::uno::Reference< XEventListener > &xListener) override |
void | CheckAndUpdateImages () |
void | RequestImages () |
void | FillToolbar (const css::uno::Reference< css::container::XIndexAccess > &rToolBarData, const css::uno::Reference< css::container::XIndexAccess > &rContextData, const OUString &rContextToolbarName) |
void | FillAddonToolbar (const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > &rAddonToolbar) |
void | FillOverflowToolbar (ToolBox const *pParent) |
void | notifyRegisteredControllers (const OUString &aUIElementName, const OUString &aCommand) |
void | Destroy () |
void | OnClick (bool bUseExecute=false) |
void | OnDropdownClick (bool bCreatePopupWindow=true) |
DECL_LINK (DropdownClick, ToolBox *, void) | |
DECL_LINK (DoubleClick, ToolBox *, void) | |
DECL_LINK (Select, ToolBox *, void) | |
DECL_LINK (StateChanged, StateChangedType const *, void) | |
DECL_LINK (DataChanged, DataChangedEvent const *, void) | |
DECL_LINK (MiscOptionsChanged, LinkParamNone *, void) | |
DECL_LINK (MenuButton, ToolBox *, void) | |
DECL_LINK (MenuPreExecute, ToolBox *, void) | |
DECL_LINK (MenuSelect, Menu *, bool) | |
DECL_LINK (AsyncUpdateControllersHdl, Timer *, void) | |
DECL_LINK (OverflowEventListener, VclWindowEvent &, void) | |
DECL_STATIC_LINK (ToolBarManager, ExecuteHdl_Impl, void *, void) | |
Private Types | |
typedef std::unordered_map< ToolBoxItemId, css::uno::Reference< css::frame::XStatusListener > > | ToolBarControllerMap |
typedef ::std::vector< css::uno::Reference< css::frame::XSubToolbarController > > | SubToolBarControllerVector |
typedef std::unordered_map< OUString, SubToolBarControllerVector > | SubToolBarToSubToolBarControllerMap |
Private Member Functions | |
void | Init () |
void | FillToolbarFromContainer (const css::uno::Reference< css::container::XIndexAccess > &rItemContainer, const OUString &rResourceName, ToolBoxItemId &nId, ToolBoxItemId &nAddonId) |
void | ToggleButton (const OUString &rResourceName, std::u16string_view rCommand) |
void | AddCustomizeMenuItems (ToolBox const *pToolBar) |
void | InitImageManager () |
void | RemoveControllers () |
void | CreateControllers () |
void | UpdateControllers () |
void | UpdateController (const css::uno::Reference< css::frame::XToolbarController > &xController) |
void | AddFrameActionListener () |
void | RefreshImages () |
ToolBoxItemBits | ConvertStyleToToolboxItemBits (sal_Int32 nStyle) |
css::uno::Reference< css::frame::XModel > | GetModelFromFrame () const |
bool | IsPluginMode () const |
void | HandleClick (ClickAction eAction) |
void | setToolBarImage (const Image &_aImage, const CommandToInfoMap::const_iterator &_pIter) |
void | impl_elementChanged (bool _bRemove, const css::ui::ConfigurationEvent &Event) |
Definition at line 110 of file toolbarmanager.hxx.
|
private |
Definition at line 216 of file toolbarmanager.hxx.
|
private |
Definition at line 217 of file toolbarmanager.hxx.
|
private |
Definition at line 215 of file toolbarmanager.hxx.
Enumerator | |
---|---|
Click | |
DblClick | |
Execute |
Definition at line 160 of file toolbarmanager.hxx.
Enumerator | |
---|---|
EXEC_CMD_CLOSETOOLBAR | |
EXEC_CMD_UNDOCKTOOLBAR | |
EXEC_CMD_DOCKTOOLBAR | |
EXEC_CMD_DOCKALLTOOLBARS |
Definition at line 152 of file toolbarmanager.hxx.
framework::ToolBarManager::ToolBarManager | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
const css::uno::Reference< css::frame::XFrame > & | rFrame, | ||
OUString | aResourceName, | ||
ToolBox * | pToolBar | ||
) |
framework::ToolBarManager::ToolBarManager | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
const css::uno::Reference< css::frame::XFrame > & | rFrame, | ||
OUString | aResourceName, | ||
weld::Toolbar * | pToolBar, | ||
weld::Builder * | pBuilder | ||
) |
|
overridevirtual |
Definition at line 615 of file toolbarmanager.cxx.
References m_pToolBar.
|
private |
Definition at line 1816 of file toolbarmanager.cxx.
References aURL, Menu::CheckItem(), VclPtr< class reference_type >::Create(), Menu::EnableItem(), FwkResId(), vcl::CommandInfoProvider::GetCommandKeyCodeShortcut(), vcl::Window::GetDockingManager(), DockingWindow::GetFloatStyle(), vcl::KeyCode::GetFullCode(), vcl::CommandInfoProvider::GetImageForCommand(), VCLUnoHelper::GetInterface(), Menu::GetItemCommand(), Menu::GetItemCount(), Menu::GetItemId(), ToolBox::GetMenu(), DockingWindow::GetText(), Menu::InsertItem(), Menu::InsertSeparator(), DockingManager::IsFloating(), DockingWindow::IsFloatingMode(), KEY_F10, m_pToolBar, m_xFrame, MENUITEM_TOOLBAR_CLOSE, MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, MENUITEM_TOOLBAR_DOCKALLTOOLBAR, MENUITEM_TOOLBAR_DOCKTOOLBAR, MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, MENUITEM_TOOLBAR_UNDOCKTOOLBAR, MENUITEM_TOOLBAR_VISIBLEBUTTON, nId, nPos, Menu::RemoveDisabledEntries(), Menu::SetAccelKey(), Menu::SetItemCommand(), Menu::SetItemImage(), Menu::SetPopupMenu(), PopupMenu::SetText(), framework::STARTID_CUSTOMIZE_POPUPMENU, and WB_CLOSEABLE.
|
override |
Definition at line 889 of file toolbarmanager.cxx.
References m_bDisposed, and m_mutex.
|
private |
Definition at line 1223 of file toolbarmanager.cxx.
References m_xFrame.
void framework::ToolBarManager::CheckAndUpdateImages | ( | ) |
Definition at line 634 of file toolbarmanager.cxx.
References SvtMiscOptions::GetCurrentSymbolsSize(), and SvtMiscOptions::GetIconTheme().
Referenced by framework::ToolBarWrapper::update().
|
private |
Definition at line 1232 of file toolbarmanager.cxx.
|
private |
Definition at line 1029 of file toolbarmanager.cxx.
References a, Any, aProperties, aURL, framework::CreateToolBoxController(), Exception, get(), vcl::CommandInfoProvider::GetCommandProperties(), vcl::CommandInfoProvider::GetPropertiesForCommand(), vcl::CommandInfoProvider::GetRealCommandForCommand(), VCLUnoHelper::GetWindow(), SvtCommandOptions::HasEntriesDisabled(), i, comphelper::InitAnyPropertySequence(), SvtCommandOptions::LookupDisabled(), m_pImpl, m_pToolBar, m_pWeldedToolBar, m_xContext, m_xFrame, nId, nType, UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON, and xController.
framework::ToolBarManager::DECL_LINK | ( | AsyncUpdateControllersHdl | , |
Timer * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | DataChanged | , |
DataChangedEvent const * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | DoubleClick | , |
ToolBox * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | DropdownClick | , |
ToolBox * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | MenuButton | , |
ToolBox * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | MenuPreExecute | , |
ToolBox * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | MenuSelect | , |
Menu * | , | ||
bool | |||
) |
framework::ToolBarManager::DECL_LINK | ( | MiscOptionsChanged | , |
LinkParamNone * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | OverflowEventListener | , |
VclWindowEvent & | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | Select | , |
ToolBox * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_LINK | ( | StateChanged | , |
StateChangedType const * | , | ||
void | |||
) |
framework::ToolBarManager::DECL_STATIC_LINK | ( | ToolBarManager | , |
ExecuteHdl_Impl | , | ||
void * | , | ||
void | |||
) |
void framework::ToolBarManager::Destroy | ( | ) |
Definition at line 621 of file toolbarmanager.cxx.
References LINK, m_pImpl, and SvtMiscOptions::RemoveListenerLink().
|
override |
Definition at line 813 of file toolbarmanager.cxx.
References aEvent, VclPtr< class reference_type >::clear(), Exception, m_bDisposed, m_mutex, m_pToolBar, m_xContext, and m_xFrame.
|
overridevirtual |
Definition at line 770 of file toolbarmanager.cxx.
References Exception, m_bDisposed, m_xContext, m_xFrame, and Source.
|
overridevirtual |
Definition at line 908 of file toolbarmanager.cxx.
|
overridevirtual |
Definition at line 913 of file toolbarmanager.cxx.
|
overridevirtual |
Definition at line 986 of file toolbarmanager.cxx.
void framework::ToolBarManager::FillAddonToolbar | ( | const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > & | rAddonToolbar | ) |
Definition at line 1479 of file toolbarmanager.cxx.
References framework::AddonsParams::aControlType, aURL, VclPtr< class reference_type >::clear(), vcl::CommandInfoProvider::GetCommandShortcut(), framework::MenuBarMerger::IsCorrectContext(), m_bDisposed, m_pToolBar, m_xFrame, nCount, nId, framework::CommandInfo::nId, and framework::AddonsParams::nWidth.
void framework::ToolBarManager::FillOverflowToolbar | ( | ToolBox const * | pParent | ) |
Definition at line 1559 of file toolbarmanager.cxx.
References eType, ToolBox::GetItemCommand(), ToolBox::GetItemCount(), ToolBox::GetItemData(), ToolBox::GetItemId(), ToolBox::GetItemText(), ToolBox::GetItemType(), ToolBox::GetQuickHelpText(), i, ToolBox::IsItemClipped(), m_pToolBar, nId, and framework::CommandInfo::nId.
void framework::ToolBarManager::FillToolbar | ( | const css::uno::Reference< css::container::XIndexAccess > & | rToolBarData, |
const css::uno::Reference< css::container::XIndexAccess > & | rContextData, | ||
const OUString & | rContextToolbarName | ||
) |
Definition at line 1292 of file toolbarmanager.cxx.
References aUIName, Exception, m_bDisposed, m_pImpl, nId, OUStringToOString(), and SAL_INFO.
Referenced by framework::ToolBarWrapper::impl_fillNewData().
|
private |
Definition at line 1357 of file toolbarmanager.cxx.
References aLabel, framework::MergeToolbarInstruction::aMergeContext, aProperties, vcl::CommandInfoProvider::GetCommandProperties(), vcl::CommandInfoProvider::GetLabelForCommand(), vcl::CommandInfoProvider::GetTooltipForCommand(), i, framework::MenuBarMerger::IsCorrectContext(), vcl::CommandInfoProvider::IsExperimental(), ITEM_DESCRIPTOR_COMMANDURL, framework::ITEM_DESCRIPTOR_VISIBLE, m_pImpl, m_xFrame, n, nCount, nId, framework::CommandInfo::nId, nIndex, and nType.
|
overridevirtual |
Definition at line 759 of file toolbarmanager.cxx.
References Action::Action(), and m_bDisposed.
|
private |
Definition at line 1788 of file toolbarmanager.cxx.
References m_xFrame, xController, and xModel.
ToolBox * framework::ToolBarManager::GetToolBar | ( | ) | const |
Definition at line 628 of file toolbarmanager.cxx.
References m_pToolBar.
Referenced by framework::AddonsToolBarWrapper::getRealInterface(), framework::ToolBarWrapper::getRealInterface(), and framework::ToolBarWrapper::setFastPropertyValue_NoBroadcast().
|
private |
Definition at line 1708 of file toolbarmanager.cxx.
References m_bDisposed, m_pImpl, nId, and xController.
|
private |
Definition at line 917 of file toolbarmanager.cxx.
References aSeq, and m_bDisposed.
|
private |
Definition at line 576 of file toolbarmanager.cxx.
References SvtMiscOptions::AddListenerLink(), idx, LINK, SvtCommandOptions::LookupDisabled(), m_pImpl, m_xContext, SFX_SYMBOLS_SIZE_32, and SFX_SYMBOLS_SIZE_LARGE.
|
private |
Definition at line 1255 of file toolbarmanager.cxx.
References Exception, m_xContext, m_xFrame, and xModel.
|
private |
Definition at line 1798 of file toolbarmanager.cxx.
References aSeq, m_xFrame, utl::MediaDescriptor::PROP_VIEWONLY, and xModel.
void framework::ToolBarManager::notifyRegisteredControllers | ( | const OUString & | aUIElementName, |
const OUString & | aCommand | ||
) |
Definition at line 1670 of file toolbarmanager.cxx.
References aCommand, Exception, i, nCount, and xController.
Referenced by framework::ToolBarWrapper::functionExecute().
void framework::ToolBarManager::OnClick | ( | bool | bUseExecute = false | ) |
Definition at line 1741 of file toolbarmanager.cxx.
void framework::ToolBarManager::OnDropdownClick | ( | bool | bCreatePopupWindow = true | ) |
Definition at line 1754 of file toolbarmanager.cxx.
References m_bDisposed, m_pImpl, nId, and xController.
|
private |
Definition at line 659 of file toolbarmanager.cxx.
References vcl::CommandInfoProvider::GetImageForCommand(), m_pImpl, m_xFrame, SFX_SYMBOLS_SIZE_32, SFX_SYMBOLS_SIZE_LARGE, vcl::Size16, and xController.
|
private |
Definition at line 991 of file toolbarmanager.cxx.
References DBG_TESTSOLARMUTEX, Exception, i, m_bDisposed, and m_pImpl.
|
override |
Definition at line 901 of file toolbarmanager.cxx.
References m_mutex.
void framework::ToolBarManager::RequestImages | ( | ) |
Definition at line 1624 of file toolbarmanager.cxx.
References SvtMiscOptions::AreCurrentSymbolsLarge(), i, m_pImpl, m_xContext, m_xFrame, and comphelper::mapKeysToSequence().
Referenced by framework::AddonsToolBarWrapper::populateImages().
|
private |
Definition at line 975 of file toolbarmanager.cxx.
References m_pImpl.
|
private |
Definition at line 1962 of file toolbarmanager.cxx.
References Any, bVisible, Exception, framework::getLayoutManagerFromFrame(), i, ITEM_DESCRIPTOR_COMMANDURL, framework::ITEM_DESCRIPTOR_VISIBLE, m_xFrame, Name, and nCount.
|
private |
Definition at line 737 of file toolbarmanager.cxx.
References Exception, and xController.
|
private |
Definition at line 696 of file toolbarmanager.cxx.
References a, Any, Exception, m_pImpl, m_xFrame, and SAL_MAX_INT32.
|
private |
Definition at line 246 of file toolbarmanager.hxx.
|
private |
Definition at line 244 of file toolbarmanager.hxx.
|
private |
Definition at line 232 of file toolbarmanager.hxx.
|
private |
Definition at line 236 of file toolbarmanager.hxx.
|
private |
Definition at line 250 of file toolbarmanager.hxx.
|
private |
Definition at line 238 of file toolbarmanager.hxx.
|
private |
Definition at line 230 of file toolbarmanager.hxx.
|
private |
Definition at line 249 of file toolbarmanager.hxx.
|
private |
Definition at line 231 of file toolbarmanager.hxx.
|
private |
Definition at line 245 of file toolbarmanager.hxx.
|
private |
Definition at line 219 of file toolbarmanager.hxx.
|
private |
Definition at line 220 of file toolbarmanager.hxx.
|
private |
Definition at line 221 of file toolbarmanager.hxx.
|
private |
Definition at line 223 of file toolbarmanager.hxx.
|
private |
Definition at line 237 of file toolbarmanager.hxx.
|
private |
Definition at line 224 of file toolbarmanager.hxx.
|
private |
Definition at line 226 of file toolbarmanager.hxx.
Definition at line 227 of file toolbarmanager.hxx.
|
private |
Definition at line 228 of file toolbarmanager.hxx.
|
private |
Definition at line 247 of file toolbarmanager.hxx.
|
private |
Definition at line 239 of file toolbarmanager.hxx.
|
private |
Definition at line 242 of file toolbarmanager.hxx.
|
private |
Definition at line 235 of file toolbarmanager.hxx.
|
private |
Definition at line 241 of file toolbarmanager.hxx.
|
private |
Definition at line 240 of file toolbarmanager.hxx.
|
private |
Definition at line 234 of file toolbarmanager.hxx.