diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-01 17:50:14 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-01 17:50:14 +0200 |
commit | a42067c4fd10629bd6b1f3a301b1e8eab5542584 (patch) | |
tree | 43ef4acecd26dedc4afda361d23dda952c3e9390 /svtools/source/toolpanel/tablayouter.cxx | |
parent | 076719b3429407d362f84d4939e67867cb502053 (diff) |
slidecopy: initial version of the A11Y API for the tool panel deck's tab layouter.
Effectively, the implementation showed that the current appraoch of the Deck having n+1 children
(n panel selector items, plus one active panel) doesn't work. So, a next step will be a re-factoring
so that the PanelDeck has 1+x children, where x children are provided by the layouter.
Diffstat (limited to 'svtools/source/toolpanel/tablayouter.cxx')
-rwxr-xr-x | svtools/source/toolpanel/tablayouter.cxx | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx index 186b64c001a7..4f73558afecf 100755 --- a/svtools/source/toolpanel/tablayouter.cxx +++ b/svtools/source/toolpanel/tablayouter.cxx @@ -32,6 +32,7 @@ #include "svtaccessiblefactory.hxx" #include <tools/gen.hxx> +#include <tools/diagnose_ex.h> //........................................................................ namespace svt @@ -126,6 +127,53 @@ namespace svt } //-------------------------------------------------------------------- + IToolPanelDeck& TabDeckLayouter::GetPanelDeck() const + { + lcl_checkDisposed( *m_pData ); + return m_pData->rPanels; + } + + //-------------------------------------------------------------------- + ::boost::optional< size_t > TabDeckLayouter::GetFocusedPanelItem() const + { + if ( lcl_checkDisposed( *m_pData ) ) + return ::boost::optional< size_t >(); + return m_pData->pTabBar->GetFocusedPanelItem(); + } + + //-------------------------------------------------------------------- + void TabDeckLayouter::FocusPanelItem( const size_t i_nItemPos ) + { + if ( lcl_checkDisposed( *m_pData ) ) + return; + m_pData->pTabBar->FocusPanelItem( i_nItemPos ); + } + + //-------------------------------------------------------------------- + bool TabDeckLayouter::IsPanelSelectorEnabled() const + { + if ( lcl_checkDisposed( *m_pData ) ) + return false; + return m_pData->pTabBar->IsEnabled(); + } + + //-------------------------------------------------------------------- + bool TabDeckLayouter::IsPanelSelectorVisible() const + { + if ( lcl_checkDisposed( *m_pData ) ) + return false; + return m_pData->pTabBar->IsVisible(); + } + + //-------------------------------------------------------------------- + Rectangle TabDeckLayouter::GetItemScreenRect( const size_t i_nItemPos ) const + { + if ( lcl_checkDisposed( *m_pData ) ) + return Rectangle(); + return m_pData->pTabBar->GetItemScreenRect( i_nItemPos ); + } + + //-------------------------------------------------------------------- Rectangle TabDeckLayouter::Layout( const Rectangle& i_rDeckPlayground ) { if ( lcl_checkDisposed( *m_pData ) ) @@ -210,7 +258,7 @@ namespace svt { if ( lcl_checkDisposed( *m_pData ) ) return NULL; - return m_pData->aAccessibleFactory.getFactory().createAccessibleToolPanelDeckTabBarItem( i_rParentAccessible, m_pData->rPanels, i_nItemPos ); + return m_pData->aAccessibleFactory.getFactory().createAccessibleToolPanelDeckTabBarItem( i_rParentAccessible, this, i_nItemPos ); } //........................................................................ |