LibreOffice Module sd (master) 1
|
Tab control for switching between views in the center pane. More...
#include <ViewTabBar.hxx>
Public Member Functions | |
ViewTabBar (const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewTabBarId, const rtl::Reference< ::sd::DrawController > &rxController) | |
virtual | ~ViewTabBar () override |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
const VclPtr< TabBarControl > & | GetTabControl () const |
bool | ActivatePage (size_t nIndex) |
virtual void SAL_CALL | notifyConfigurationChange (const css::drawing::framework::ConfigurationChangeEvent &rEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &rEvent) override |
virtual void SAL_CALL | addTabBarButtonAfter (const css::drawing::framework::TabBarButton &rButton, const css::drawing::framework::TabBarButton &rAnchor) override |
virtual void SAL_CALL | appendTabBarButton (const css::drawing::framework::TabBarButton &rButton) override |
virtual void SAL_CALL | removeTabBarButton (const css::drawing::framework::TabBarButton &rButton) override |
virtual sal_Bool SAL_CALL | hasTabBarButton (const css::drawing::framework::TabBarButton &rButton) override |
virtual css::uno::Sequence< css::drawing::framework::TabBarButton > SAL_CALL | getTabBarButtons () override |
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL | getResourceId () override |
virtual sal_Bool SAL_CALL | isAnchorOnly () override |
int | GetHeight () const |
The returned value is calculated as the difference between the total height of the control and the height of its first tab page. More... | |
void | UpdateActiveButton () |
void | AddTabBarButton (const css::drawing::framework::TabBarButton &rButton, const css::drawing::framework::TabBarButton &rAnchor) |
void | AddTabBarButton (const css::drawing::framework::TabBarButton &rButton) |
void | RemoveTabBarButton (const css::drawing::framework::TabBarButton &rButton) |
bool | HasTabBarButton (const css::drawing::framework::TabBarButton &rButton) |
css::uno::Sequence< css::drawing::framework::TabBarButton > | GetTabBarButtons () |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Private Types | |
typedef ::std::vector< css::drawing::framework::TabBarButton > | TabBarButtonList |
Private Member Functions | |
void | AddTabBarButton (const css::drawing::framework::TabBarButton &rButton, sal_Int32 nPosition) |
void | UpdateTabBarButtons () |
Static Private Member Functions | |
static vcl::Window * | GetAnchorWindow (const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewTabBarId, const rtl::Reference<::sd::DrawController > &rxController) |
This method is called from the constructor to get the window for an anchor ResourceId and pass it to our base class. More... | |
Private Attributes | |
VclPtr< TabBarControl > | mpTabControl |
rtl::Reference<::sd::DrawController > | mxController |
css::uno::Reference< css::drawing::framework::XConfigurationController > | mxConfigurationController |
TabBarButtonList | maTabBarButtons |
css::uno::Reference< css::drawing::framework::XResourceId > | mxViewTabBarId |
ViewShellBase * | mpViewShellBase |
int | mnNoteBookWidthPadding |
Additional Inherited Members | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
Tab control for switching between views in the center pane.
Definition at line 70 of file ViewTabBar.hxx.
|
private |
Definition at line 154 of file ViewTabBar.hxx.
sd::ViewTabBar::ViewTabBar | ( | const css::uno::Reference< css::drawing::framework::XResourceId > & | rxViewTabBarId, |
const rtl::Reference< ::sd::DrawController > & | rxController | ||
) |
Definition at line 60 of file ViewTabBar.cxx.
References Any, Create(), m_refCount, mpTabControl, mpViewShellBase, mxConfigurationController, mxController, and sd::ViewShellBase::SetViewTabBar().
|
overridevirtual |
Definition at line 102 of file ViewTabBar.cxx.
bool sd::ViewTabBar::ActivatePage | ( | size_t | nIndex | ) |
Definition at line 259 of file ViewTabBar.cxx.
References DBG_UNHANDLED_EXCEPTION, SfxViewShell::GetIPClient(), SfxInPlaceClient::IsObjectInPlaceActive(), maTabBarButtons, mpViewShellBase, mxController, and nIndex.
void sd::ViewTabBar::AddTabBarButton | ( | const css::drawing::framework::TabBarButton & | rButton | ) |
Definition at line 366 of file ViewTabBar.cxx.
References AddTabBarButton(), and maTabBarButtons.
void sd::ViewTabBar::AddTabBarButton | ( | const css::drawing::framework::TabBarButton & | rButton, |
const css::drawing::framework::TabBarButton & | rAnchor | ||
) |
Definition at line 339 of file ViewTabBar.cxx.
References AddTabBarButton(), maTabBarButtons, and nIndex.
Referenced by AddTabBarButton(), addTabBarButtonAfter(), and appendTabBarButton().
|
private |
Definition at line 372 of file ViewTabBar.cxx.
References maTabBarButtons, UpdateActiveButton(), and UpdateTabBarButtons().
|
overridevirtual |
Definition at line 215 of file ViewTabBar.cxx.
References AddTabBarButton().
|
overridevirtual |
Definition at line 223 of file ViewTabBar.cxx.
References AddTabBarButton().
|
overridevirtual |
|
overridevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 106 of file ViewTabBar.cxx.
References mpTabControl, mpViewShellBase, mxConfigurationController, mxController, mxViewTabBarId, and sd::ViewShellBase::SetViewTabBar().
|
staticprivate |
This method is called from the constructor to get the window for an anchor ResourceId and pass it to our base class.
It has to be static because it must not access any of the, not yet initialized members.
Definition at line 138 of file ViewTabBar.cxx.
References vcl::Window::GetParent(), SfxViewShell::GetViewFrame(), SfxViewFrame::GetWindow(), and vcl::Window::GetWindow().
int sd::ViewTabBar::GetHeight | ( | ) | const |
The returned value is calculated as the difference between the total height of the control and the height of its first tab page.
This can be considered a hack. This procedure works only when the control is visible. Calling this method when the control is not visible results in returning a default value. To be on the safe side wait for this control to become visible and the call this method again.
Definition at line 303 of file ViewTabBar.cxx.
References weld::Notebook::get_n_pages(), weld::Notebook::get_page(), maTabBarButtons, mnNoteBookWidthPadding, mpTabControl, nIndex, and weld::Widget::set_size_request().
|
overridevirtual |
Definition at line 249 of file ViewTabBar.cxx.
References mxViewTabBarId.
css::uno::Sequence< css::drawing::framework::TabBarButton > sd::ViewTabBar::GetTabBarButtons | ( | ) |
Definition at line 419 of file ViewTabBar.cxx.
References comphelper::containerToSequence(), and maTabBarButtons.
Referenced by getTabBarButtons().
|
overridevirtual |
Definition at line 241 of file ViewTabBar.cxx.
References GetTabBarButtons().
|
inline |
Definition at line 81 of file ViewTabBar.hxx.
References mpTabControl.
bool sd::ViewTabBar::HasTabBarButton | ( | const css::drawing::framework::TabBarButton & | rButton | ) |
Definition at line 401 of file ViewTabBar.cxx.
References maTabBarButtons.
Referenced by hasTabBarButton().
|
overridevirtual |
Definition at line 235 of file ViewTabBar.cxx.
References HasTabBarButton().
|
overridevirtual |
Definition at line 254 of file ViewTabBar.cxx.
|
overridevirtual |
Definition at line 190 of file ViewTabBar.cxx.
References mxViewTabBarId, and UpdateActiveButton().
void sd::ViewTabBar::RemoveTabBarButton | ( | const css::drawing::framework::TabBarButton & | rButton | ) |
Definition at line 386 of file ViewTabBar.cxx.
References maTabBarButtons, nIndex, UpdateActiveButton(), and UpdateTabBarButtons().
Referenced by removeTabBarButton().
|
overridevirtual |
Definition at line 229 of file ViewTabBar.cxx.
References RemoveTabBarButton().
void sd::ViewTabBar::UpdateActiveButton | ( | ) |
Definition at line 424 of file ViewTabBar.cxx.
References maTabBarButtons, mpTabControl, mpViewShellBase, mxViewTabBarId, and nIndex.
Referenced by AddTabBarButton(), notifyConfigurationChange(), and RemoveTabBarButton().
|
private |
Definition at line 444 of file ViewTabBar.cxx.
References weld::Notebook::append_page(), weld::Notebook::get_n_pages(), weld::Notebook::get_page(), weld::Widget::get_pixel_size(), weld::Widget::get_preferred_size(), maTabBarButtons, mnNoteBookWidthPadding, mpTabControl, nIndex, weld::Notebook::remove_page(), weld::Widget::set_size_request(), weld::Notebook::set_tab_label_text(), and Size::Width().
Referenced by AddTabBarButton(), and RemoveTabBarButton().
|
private |
Definition at line 155 of file ViewTabBar.hxx.
Referenced by ActivatePage(), AddTabBarButton(), GetHeight(), GetTabBarButtons(), HasTabBarButton(), RemoveTabBarButton(), UpdateActiveButton(), and UpdateTabBarButtons().
|
private |
Definition at line 158 of file ViewTabBar.hxx.
Referenced by GetHeight(), and UpdateTabBarButtons().
|
private |
Definition at line 151 of file ViewTabBar.hxx.
Referenced by disposing(), GetHeight(), GetTabControl(), UpdateActiveButton(), UpdateTabBarButtons(), and ViewTabBar().
|
private |
Definition at line 157 of file ViewTabBar.hxx.
Referenced by ActivatePage(), disposing(), UpdateActiveButton(), and ViewTabBar().
|
private |
Definition at line 153 of file ViewTabBar.hxx.
Referenced by disposing(), and ViewTabBar().
|
private |
Definition at line 152 of file ViewTabBar.hxx.
Referenced by ActivatePage(), disposing(), and ViewTabBar().
|
private |
Definition at line 156 of file ViewTabBar.hxx.
Referenced by disposing(), getResourceId(), notifyConfigurationChange(), and UpdateActiveButton().