Author: af
Date: Mon May 6 13:12:20 2013
New Revision: 1479558
URL: http://svn.apache.org/r1479558
Log:
122230: Fixed focus traveling in the sidebar.
Modified:
openoffice/trunk/main/sfx2/source/sidebar/Deck.cxx
openoffice/trunk/main/sfx2/source/sidebar/Deck.hxx
openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx
openoffice/trunk/main/sfx2/source/sidebar/FocusManager.hxx
openoffice/trunk/main/sfx2/source/sidebar/Panel.cxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.cxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.hxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.cxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.hxx
openoffice/trunk/main/sfx2/source/sidebar/TitleBar.cxx
openoffice/trunk/main/sfx2/source/sidebar/TitleBar.hxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.cxx
openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.hxx
Modified: openoffice/trunk/main/sfx2/source/sidebar/Deck.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/Deck.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/Deck.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/Deck.cxx Mon May 6 13:12:20 2013
@@ -265,6 +265,39 @@ void Deck::RequestLayout (void)
+void Deck::ShowPanel (const Panel& rPanel)
+{
+ if (mpVerticalScrollBar && mpVerticalScrollBar->IsVisible())
+ {
+ // Get vertical extent of the panel.
+ sal_Int32 nPanelTop (rPanel.GetPosPixel().Y());
+ const sal_Int32 nPanelBottom (nPanelTop +
rPanel.GetSizePixel().Height() - 1);
+ // Add the title bar into the extent.
+ if (rPanel.GetTitleBar() != NULL && rPanel.GetTitleBar()->IsVisible())
+ nPanelTop = rPanel.GetTitleBar()->GetPosPixel().Y();
+
+
+ // Determine what the new thumb position should be like.
+ // When the whole panel does not fit then make its top visible
+ // and it off at the bottom.
+ sal_Int32 nNewThumbPos (mpVerticalScrollBar->GetThumbPos());
+ if (nPanelBottom >= nNewThumbPos+mpVerticalScrollBar->GetVisibleSize())
+ nNewThumbPos = nPanelBottom -
mpVerticalScrollBar->GetVisibleSize();
+ if (nPanelTop < nNewThumbPos)
+ nNewThumbPos = nPanelTop;
+
+ mpVerticalScrollBar->SetThumbPos(nNewThumbPos);
+ mpScrollContainer->SetPosPixel(
+ Point(
+ mpScrollContainer->GetPosPixel().X(),
+ -nNewThumbPos));
+
+ }
+}
+
+
+
+
const char* GetWindowClassification (const Window* pWindow)
{
const String& rsName (pWindow->GetText());
Modified: openoffice/trunk/main/sfx2/source/sidebar/Deck.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/Deck.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/Deck.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/Deck.hxx Mon May 6 13:12:20 2013
@@ -64,7 +64,13 @@ public:
const SharedPanelContainer& GetPanels (void) const;
void RequestLayout (void);
::Window* GetPanelParentWindow (void);
-
+
+ /** Try to make the panel completely visible.
+ When the whole panel does not fit then make its top visible
+ and it off at the bottom.
+ */
+ void ShowPanel (const Panel& rPanel);
+
virtual void Paint (const Rectangle& rUpdateArea);
virtual void DataChanged (const DataChangedEvent& rEvent);
Modified: openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/FocusManager.cxx Mon May 6
13:12:20 2013
@@ -23,6 +23,7 @@
#include "FocusManager.hxx"
#include "Panel.hxx"
+#include "DeckTitleBar.hxx"
#include "sfx2/sidebar/Tools.hxx"
#include "TitleBar.hxx"
#include <vcl/button.hxx>
@@ -32,36 +33,20 @@
namespace sfx2 { namespace sidebar {
-namespace
+FocusManager::FocusLocation::FocusLocation (const PanelComponent eComponent,
const sal_Int32 nIndex)
+ : meComponent(eComponent),
+ mnIndex(nIndex)
{
- enum PanelComponent
- {
- PC_TitleBar,
- PC_ToolBox,
- PC_Content,
- PC_None
- };
-
- PanelComponent GetFocusedComponent (const Panel& rPanel)
- {
- if (rPanel.HasFocus())
- return PC_Content;
- else if (rPanel.GetTitleBar() != NULL)
- {
- if (rPanel.GetTitleBar()->HasFocus())
- return PC_TitleBar;
- else if (rPanel.GetTitleBar()->GetToolBox().HasFocus())
- return PC_ToolBox;
- }
- return PC_None;
- }
}
-FocusManager::FocusManager (void)
- : maPanels(),
+
+
+FocusManager::FocusManager (const ::boost::function<void(const Panel&)>&
rShowPanelFunctor)
+ : mpDeckTitleBar(),
+ maPanels(),
maButtons(),
- mpTopLevelWindow(NULL)
+ maShowPanelFunctor(rShowPanelFunctor)
{
}
@@ -78,8 +63,7 @@ FocusManager::~FocusManager (void)
void FocusManager::GrabFocus (void)
{
- if ( ! maPanels.empty())
- FocusPanel(0);
+ FocusDeckTitle();
}
@@ -87,16 +71,16 @@ void FocusManager::GrabFocus (void)
void FocusManager::Clear (void)
{
+ SetDeckTitle(NULL);
ClearPanels();
ClearButtons();
}
+
void FocusManager::ClearPanels (void)
{
- SetTopLevelWindow(NULL);
-
::std::vector<Panel*> aPanels;
aPanels.swap(maPanels);
for (::std::vector<Panel*>::iterator
iPanel(aPanels.begin()),iEnd(aPanels.end());
@@ -109,6 +93,8 @@ void FocusManager::ClearPanels (void)
UnregisterWindow(*(*iPanel)->GetTitleBar());
UnregisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
}
+
+ (*iPanel)->RemoveChildEventListener(LINK(this, FocusManager,
ChildEventListener));
}
}
@@ -129,6 +115,25 @@ void FocusManager::ClearButtons (void)
+void FocusManager::SetDeckTitle (DeckTitleBar* pDeckTitleBar)
+{
+ if (mpDeckTitleBar != NULL)
+ {
+ UnregisterWindow(*mpDeckTitleBar);
+ UnregisterWindow(mpDeckTitleBar->GetToolBox());
+ }
+ mpDeckTitleBar = pDeckTitleBar;
+
+ if (mpDeckTitleBar != NULL)
+ {
+ RegisterWindow(*mpDeckTitleBar);
+ RegisterWindow(mpDeckTitleBar->GetToolBox());
+ }
+}
+
+
+
+
void FocusManager::SetPanels (const SharedPanelContainer& rPanels)
{
ClearPanels();
@@ -142,10 +147,12 @@ void FocusManager::SetPanels (const Shar
RegisterWindow(*(*iPanel)->GetTitleBar());
RegisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
}
+
+ // Register also as child event listener at the panel.
+ (*iPanel)->AddChildEventListener(LINK(this, FocusManager,
ChildEventListener));
+
maPanels.push_back(iPanel->get());
}
-
- RegisterTopLevelListener();
}
@@ -182,68 +189,35 @@ void FocusManager::UnregisterWindow (Win
-void FocusManager::RegisterTopLevelListener (void)
-{
- if (maPanels.empty())
- return;
- Window* pWindow = maPanels.front();
- while (pWindow != NULL && pWindow->GetParent()!=NULL)
- {
- pWindow = pWindow->GetParent();
- }
- SetTopLevelWindow(pWindow);
-}
-
-
-
-
-void FocusManager::SetTopLevelWindow (Window* pWindow)
+FocusManager::FocusLocation FocusManager::GetFocusLocation (const Window&
rWindow) const
{
- if (mpTopLevelWindow != pWindow)
- {
- if (mpTopLevelWindow != NULL)
- {
- UnregisterWindow(*mpTopLevelWindow);
- mpTopLevelWindow->RemoveChildEventListener(LINK(this,
FocusManager, WindowEventListener));
- }
- mpTopLevelWindow = pWindow;
- if (mpTopLevelWindow != NULL)
- {
- RegisterWindow(*mpTopLevelWindow);
- mpTopLevelWindow->AddChildEventListener(LINK(this, FocusManager,
WindowEventListener));
- }
- }
-}
-
-
+ // Check the deck title.
+ if (mpDeckTitleBar != NULL)
+ if (mpDeckTitleBar == &rWindow)
+ return FocusLocation(PC_DeckTitle, -1);
+ else if (&mpDeckTitleBar->GetToolBox() == &rWindow)
+ return FocusLocation(PC_DeckToolBox, -1);
-
-sal_Int32 FocusManager::GetPanelIndex (const Window& rWindow) const
-{
+ // Search the panels.
for (sal_Int32 nIndex=0,nCount(maPanels.size()); nIndex<nCount; ++nIndex)
{
if (maPanels[nIndex] == &rWindow)
- return nIndex;
+ return FocusLocation(PC_PanelContent, nIndex);
TitleBar* pTitleBar = maPanels[nIndex]->GetTitleBar();
if (pTitleBar == &rWindow)
- return nIndex;
+ return FocusLocation(PC_PanelTitle, nIndex);
if (pTitleBar!=NULL && &pTitleBar->GetToolBox()==&rWindow)
- return nIndex;
+ return FocusLocation(PC_PanelToolBox, nIndex);
}
- return -1;
-}
-
-
-
-sal_Int32 FocusManager::GetButtonIndex (const Window& rWindow) const
-{
+ // Search the buttons.
for (sal_Int32 nIndex=0,nCount(maButtons.size()); nIndex<nCount; ++nIndex)
if (maButtons[nIndex] == &rWindow)
- return nIndex;
- return -1;
+ return FocusLocation(PC_TabBar, nIndex);
+
+ return FocusLocation(PC_None, -1);
}
-
+
@@ -279,6 +253,32 @@ bool FocusManager::IsAnyButtonFocused (v
+void FocusManager::FocusDeckTitle (void)
+{
+ if (IsDeckTitleVisible())
+ {
+ ToolBox& rToolBox = mpDeckTitleBar->GetToolBox();
+ if (rToolBox.GetItemCount() > 0)
+ {
+ rToolBox.GrabFocus();
+ rToolBox.Invalidate();
+ }
+ }
+ else
+ FocusPanel(0);
+}
+
+
+
+
+bool FocusManager::IsDeckTitleVisible (void) const
+{
+ return mpDeckTitleBar != NULL && mpDeckTitleBar->IsVisible();
+}
+
+
+
+
void FocusManager::FocusPanel (const sal_Int32 nPanelIndex)
{
Panel& rPanel (*maPanels[nPanelIndex]);
@@ -290,6 +290,8 @@ void FocusManager::FocusPanel (const sal
}
else
FocusPanelContent(nPanelIndex);
+ if (maShowPanelFunctor)
+ maShowPanelFunctor(rPanel);
}
@@ -354,24 +356,25 @@ void FocusManager::RemoveWindow (Window&
bool FocusManager::MoveFocusInsidePanel (
- const sal_Int32 nPanelIndex,
+ const FocusLocation aFocusLocation,
const sal_Int32 nDirection)
{
- Panel& rPanel (*maPanels[nPanelIndex]);
- switch (GetFocusedComponent(rPanel))
- {
- case PC_TitleBar:
- if (nDirection > 0)
- rPanel.GetTitleBar()->GetToolBox().GrabFocus();
+ const bool bHasToolBoxItem (
+
maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GetItemCount() >
0);
+ switch (aFocusLocation.meComponent)
+ {
+ case PC_PanelTitle:
+ if (nDirection > 0 && bHasToolBoxItem)
+
maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GrabFocus();
else
- FocusPanelContent(nPanelIndex);
+ FocusPanelContent(aFocusLocation.mnIndex);
return true;
- case PC_ToolBox:
- if (nDirection > 0)
- FocusPanelContent(nPanelIndex);
+ case PC_PanelToolBox:
+ if (nDirection < 0 && bHasToolBoxItem)
+ maPanels[aFocusLocation.mnIndex]->GetTitleBar()->GrabFocus();
else
- rPanel.GetTitleBar()->GrabFocus();
+ FocusPanelContent(aFocusLocation.mnIndex);
return true;
default:
@@ -382,121 +385,138 @@ bool FocusManager::MoveFocusInsidePanel
-long FocusManager::NotifyDockingWindowEvent (const KeyEvent& rKeyEvent)
-{
- switch(rKeyEvent.GetKeyCode().GetCode())
- {
- case KEY_F6:
- if (rKeyEvent.GetKeyCode().IsShift())
- {
- if (IsAnyButtonFocused())
- {
- FocusPanel(0);
- return 1;
- }
- }
- else
- {
- if (IsAnyPanelFocused())
- {
- FocusButton(0);
- return 1;
- }
- }
- break;
- }
- return 0;
-}
-
-
-
-
void FocusManager::HandleKeyEvent (
const KeyCode& rKeyCode,
const Window& rWindow)
{
- if (rKeyCode.GetModifier() != 0)
- return;
-
- const sal_Int32 nPanelIndex (GetPanelIndex(rWindow));
- // const bool bIsPanelTitleFocused (nPanelIndex>=0 &&
maPanels[nPanelIndex] != &rWindow);
- // const bool bIsPanelToolBoxFocused (nPanelIndex>=0 &&
maPanels[nPanelIndex] != &rWindow);
- sal_Int32 nButtonIndex (nPanelIndex==-1 ? GetButtonIndex(rWindow) : -1);
+ const FocusLocation aLocation (GetFocusLocation(rWindow));
switch (rKeyCode.GetCode())
{
- case KEY_F6:
- if (nPanelIndex >= 0)
- FocusButton(0);
- else
- return;
- break;
-
case KEY_SPACE:
- if (nPanelIndex >= 0)
- {
- if (GetFocusedComponent(*maPanels[nPanelIndex]) == PC_TitleBar)
- {
- // Toggle the expansion state.
- maPanels[nPanelIndex]->SetExpanded( !
maPanels[nPanelIndex]->IsExpanded());
- }
- }
- else if (nButtonIndex >= 0)
+ switch (aLocation.meComponent)
{
- // Activate the button.
- ClickButton(nButtonIndex);
+ case PC_PanelTitle:
+ // Toggle panel between expanded and collapsed.
+ maPanels[aLocation.mnIndex]->SetExpanded( !
maPanels[aLocation.mnIndex]->IsExpanded());
+ break;
+
+ case PC_TabBar:
+ // Activate the button.
+ ClickButton(aLocation.mnIndex);
+ break;
+
+ default:
+ break;
}
return;
case KEY_RETURN:
- if (nPanelIndex >= 0)
+ switch (aLocation.meComponent)
{
- if (GetFocusedComponent(*maPanels[nPanelIndex]) == PC_TitleBar)
- {
+ case PC_DeckToolBox:
+ FocusButton(0);
+ break;
+
+ case PC_PanelTitle:
// Enter the panel.
- FocusPanelContent(nPanelIndex);
- }
- }
- else if (nButtonIndex >= 0)
- {
- // Activate the button.
- ClickButton(nButtonIndex);
+ FocusPanelContent(aLocation.mnIndex);
+ break;
+
+ case PC_TabBar:
+ // Activate the button.
+ ClickButton(aLocation.mnIndex);
+ break;
+
+ default:
+ break;
}
return;
case KEY_TAB:
- if (nPanelIndex >= 0)
+ switch (aLocation.meComponent)
{
- if (rKeyCode.IsShift())
- MoveFocusInsidePanel(nPanelIndex, -1);
- else
- MoveFocusInsidePanel(nPanelIndex, +1);
+ case PC_PanelTitle:
+ case PC_PanelToolBox:
+ case PC_PanelContent:
+ if (rKeyCode.IsShift())
+ MoveFocusInsidePanel(aLocation, -1);
+ else
+ MoveFocusInsidePanel(aLocation, +1);
+ break;
+
+ default:
+ break;
}
break;
case KEY_LEFT:
case KEY_UP:
- // Go to previous element in focus ring.
- if (nPanelIndex >= 0)
- {
- FocusPanel((nPanelIndex + maPanels.size() - 1) %
maPanels.size());
- }
- else if (nButtonIndex >= 0)
+ switch (aLocation.meComponent)
{
- FocusButton((nButtonIndex + maButtons.size() - 1) %
maButtons.size());
+ case PC_PanelTitle:
+ case PC_PanelToolBox:
+ case PC_PanelContent:
+ // Go to previous panel or the deck title.
+ if (aLocation.mnIndex > 0)
+ FocusPanel(aLocation.mnIndex-1);
+ else if (IsDeckTitleVisible())
+ FocusDeckTitle();
+ else
+ FocusButton(maButtons.size()-1);
+ break;
+
+ case PC_DeckTitle:
+ case PC_DeckToolBox:
+ // Focus the last button.
+ FocusButton(maButtons.size()-1);
+ break;
+
+ case PC_TabBar:
+ // Go to previous tab bar item.
+ if (aLocation.mnIndex == 0)
+ FocusPanel(maPanels.size()-1);
+ else
+ FocusButton((aLocation.mnIndex + maButtons.size() - 1)
% maButtons.size());
+ break;
+
+ default:
+ break;
}
break;
case KEY_RIGHT:
case KEY_DOWN:
- // Go to next element in focus ring.
- if (nPanelIndex >= 0)
- {
- FocusPanel((nPanelIndex + 1) % maPanels.size());
- }
- else if (nButtonIndex >= 0)
+ switch(aLocation.meComponent)
{
- FocusButton((nButtonIndex + 1) % maButtons.size());
+ case PC_PanelTitle:
+ case PC_PanelToolBox:
+ case PC_PanelContent:
+ // Go to next panel.
+ if (aLocation.mnIndex < maPanels.size()-1)
+ FocusPanel(aLocation.mnIndex+1);
+ else
+ FocusButton(0);
+ break;
+
+ case PC_DeckTitle:
+ case PC_DeckToolBox:
+ // Focus the first panel.
+ FocusPanel(0);
+ break;
+
+ case PC_TabBar:
+ // Go to next tab bar item.
+ if (aLocation.mnIndex < maButtons.size()-1)
+ FocusButton(aLocation.mnIndex + 1);
+ else if (IsDeckTitleVisible())
+ FocusDeckTitle();
+ else
+ FocusPanel(0);
+ break;
+
+ default:
+ break;
}
break;
}
@@ -505,27 +525,44 @@ void FocusManager::HandleKeyEvent (
-void FocusManager::HandleTopLevelEvent (VclWindowEvent& rEvent)
+IMPL_LINK(FocusManager, WindowEventListener, VclSimpleEvent*, pEvent)
{
- switch (rEvent.GetId())
+ if (pEvent == NULL)
+ return 0;
+
+ if ( ! pEvent->ISA(VclWindowEvent))
+ return 0;
+
+ VclWindowEvent* pWindowEvent = static_cast<VclWindowEvent*>(pEvent);
+ Window* pSource = pWindowEvent->GetWindow();
+ if (pSource == NULL)
+ return 0;
+
+ switch (pWindowEvent->GetId())
{
case VCLEVENT_WINDOW_KEYINPUT:
{
- KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rEvent.GetData());
- switch (pKeyEvent->GetKeyCode().GetCode())
- {
- case KEY_F6:
- OSL_TRACE("");
- break;
- }
+ KeyEvent* pKeyEvent =
static_cast<KeyEvent*>(pWindowEvent->GetData());
+ HandleKeyEvent(pKeyEvent->GetKeyCode(), *pSource);
+ return 1;
}
+
+ case VCLEVENT_OBJECT_DYING:
+ RemoveWindow(*pSource);
+ return 1;
+
+ case VCLEVENT_WINDOW_GETFOCUS:
+ case VCLEVENT_WINDOW_LOSEFOCUS:
+ pSource->Invalidate();
}
+
+ return 0;
}
-IMPL_LINK(FocusManager, WindowEventListener, VclSimpleEvent*, pEvent)
+IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
{
if (pEvent == NULL)
return 0;
@@ -538,29 +575,48 @@ IMPL_LINK(FocusManager, WindowEventListe
if (pSource == NULL)
return 0;
- if (pSource == mpTopLevelWindow)
- HandleTopLevelEvent(*pWindowEvent);
- else
- switch (pWindowEvent->GetId())
+ switch (pWindowEvent->GetId())
+ {
+ case VCLEVENT_WINDOW_KEYINPUT:
{
- case VCLEVENT_WINDOW_KEYINPUT:
+ KeyEvent* pKeyEvent =
static_cast<KeyEvent*>(pWindowEvent->GetData());
+
+ // Go up the window hierarchy to find the parent of the
+ // event source which is known to us.
+ Window* pWindow = pSource;
+ FocusLocation aLocation (PC_None, -1);
+ while (true)
{
- KeyEvent* pKeyEvent =
static_cast<KeyEvent*>(pWindowEvent->GetData());
- HandleKeyEvent(pKeyEvent->GetKeyCode(), *pSource);
- return 1;
+ if (pWindow == NULL)
+ break;
+ aLocation = GetFocusLocation(*pWindow);
+ if (aLocation.meComponent != PC_None)
+ break;
+ pWindow = pWindow->GetParent();
}
+
+ if (aLocation.meComponent != PC_None)
+ {
+ switch (pKeyEvent->GetKeyCode().GetCode())
+ {
+ case KEY_ESCAPE:
+ // Return focus back to the panel title.
+ FocusPanel(aLocation.mnIndex);
+ break;
- case VCLEVENT_OBJECT_DYING:
- RemoveWindow(*pSource);
- return 1;
-
- case VCLEVENT_WINDOW_GETFOCUS:
- case VCLEVENT_WINDOW_LOSEFOCUS:
- pSource->Invalidate();
+ default:
+ break;
+ }
+ }
+ break;
}
- return 0;
-}
+ default:
+ break;
+ }
+
+ return 1;
+}
} } // end of namespace sfx2::sidebar
Modified: openoffice/trunk/main/sfx2/source/sidebar/FocusManager.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/FocusManager.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/FocusManager.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/FocusManager.hxx Mon May 6
13:12:20 2013
@@ -29,17 +29,32 @@ class Button;
class KeyCode;
class VclSimpleEvent;
+
namespace sfx2 { namespace sidebar {
+class DeckTitleBar;
+
/** Concentrate all focus handling in this class.
- There are two rings of windows that accept the input focus: panels
- and tab bar buttons.
- Arrow keys move the focus between them. Tab moves focus between rings.
+
+ There is one ring of windows that accept the input focus which are
+ cycled through with the arrow keys:
+ - the closer in the deck title (present only when docked)
+ - the panel title bars
+ - the tab bar items
+
+ When the focus is in a panel title then focus travels over
+ - the panel title
+ - the panel closer
+ - the panel content
+
+ Once the focus is in the panel content then focus cycles through
+ all controls inside the panel but not back to the title bar of
+ the panel. Escape places the focus back in the panel title.
*/
class FocusManager
{
public:
- FocusManager (void);
+ FocusManager (const ::boost::function<void(const Panel&)>&
rShowPanelFunctor);
~FocusManager (void);
/** Forget all panels and buttons. Remove all window listeners.
@@ -52,22 +67,38 @@ public:
*/
void GrabFocus (void);
- /** Handle the key event that was sent to the docking window.
- */
- long NotifyDockingWindowEvent (const KeyEvent& rKeyEvent);
-
+ void SetDeckTitle (DeckTitleBar* pDeckTitleBar);
void SetPanels (const SharedPanelContainer& rPanels);
-
void SetButtons (const ::std::vector<Button*>& rButtons);
private:
+ DeckTitleBar* mpDeckTitleBar;
::std::vector<Panel*> maPanels;
::std::vector<Button*> maButtons;
- Window* mpTopLevelWindow;
+ const ::boost::function<void(const Panel&)> maShowPanelFunctor;
+ enum PanelComponent
+ {
+ PC_DeckTitle,
+ PC_DeckToolBox,
+ PC_PanelTitle,
+ PC_PanelToolBox,
+ PC_PanelContent,
+ PC_TabBar,
+ PC_None
+ };
+ class FocusLocation
+ {
+ public:
+ PanelComponent meComponent;
+ sal_Int32 mnIndex;
+ FocusLocation (const PanelComponent eComponent, const sal_Int32
nIndex);
+ };
+
/** Listen for key events for panels and buttons.
*/
DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ DECL_LINK(ChildEventListener, VclSimpleEvent*);
void ClearPanels (void);
void ClearButtons (void);
@@ -77,17 +108,17 @@ private:
*/
void RegisterWindow (Window& rWindow);
void UnregisterWindow (Window& rWindow);
- void RegisterTopLevelListener (void);
/** Remove the window from the panel or the button container.
*/
void RemoveWindow (Window& rWindow);
- sal_Int32 GetPanelIndex (const Window& rWindow) const;
- sal_Int32 GetButtonIndex (const Window& rWindow) const;
bool IsAnyPanelFocused (void) const;
bool IsAnyButtonFocused (void) const;
+ void FocusDeckTitle (void);
+ bool IsDeckTitleVisible (void) const;
+
/** Set the focus to the title bar of the panel or, if the the
title bar is not visible, directly to the panel.
*/
@@ -96,15 +127,15 @@ private:
void FocusButton (const sal_Int32 nButtonIndex);
void ClickButton (const sal_Int32 nButtonIndex);
bool MoveFocusInsidePanel (
- const sal_Int32 nPanelIndex,
+ const FocusLocation aLocation,
const sal_Int32 nDirection);
void HandleKeyEvent (
const KeyCode& rKeyCode,
const Window& rWindow);
- void SetTopLevelWindow (Window* pWindow);
- void HandleTopLevelEvent (VclWindowEvent& rEvent);
+ FocusLocation GetFocusLocation (const Window& rWindow) const;
+
};
} } // end of namespace sfx2::sidebar
Modified: openoffice/trunk/main/sfx2/source/sidebar/Panel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/Panel.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/Panel.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/Panel.cxx Mon May 6 13:12:20 2013
@@ -52,7 +52,7 @@ namespace sfx2 { namespace sidebar {
Panel::Panel (
const PanelDescriptor& rPanelDescriptor,
Window* pParentWindow,
- const ::boost::function<void(void)>& rDeckLayoutTrigger )
+ const ::boost::function<void(void)>& rDeckLayoutTrigger)
: Window(pParentWindow),
msPanelId(rPanelDescriptor.msId),
mpTitleBar(new PanelTitleBar(
@@ -68,7 +68,6 @@ Panel::Panel (
SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
#ifdef DEBUG
- OSL_TRACE("creating Panel at %x", this);
SetText(A2S("Panel"));
#endif
}
@@ -78,7 +77,6 @@ Panel::Panel (
Panel::~Panel (void)
{
- OSL_TRACE("destroying Panel at %x", this);
Dispose();
}
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx Mon May 6
13:12:20 2013
@@ -108,13 +108,16 @@ SidebarController::SidebarController (
::boost::bind(&SidebarController::ShowPopupMenu, this,
_1,_2,_3))),
mxFrame(rxFrame),
maCurrentContext(OUString(), OUString()),
+ maRequestedContext(),
msCurrentDeckId(A2S("PropertyDeck")),
+ msCurrentDeckTitle(),
maPropertyChangeForwarder(::boost::bind(&SidebarController::BroadcastPropertyChange,
this)),
maContextChangeUpdate(::boost::bind(&SidebarController::UpdateConfigurations,
this)),
mbIsDeckRequestedOpen(),
mbIsDeckOpen(),
mbCanDeckBeOpened(true),
mnSavedSidebarWidth(pParentWindow->GetSizePixel().Width()),
+ maFocusManager(::boost::bind(&SidebarController::ShowPanel, this, _1)),
mxReadOnlyModeDispatch(),
mbIsDocumentReadOnly(false),
mpSplitWindow(NULL),
@@ -611,6 +614,7 @@ void SidebarController::SwitchToDeck (
// Tell the focus manager about the new panels and tab bar
// buttons.
+ maFocusManager.SetDeckTitle(mpCurrentDeck->GetTitleBar());
maFocusManager.SetPanels(aNewPanels);
mpTabBar->UpdateFocusManager(maFocusManager);
UpdateTitleBarIcons();
@@ -1162,4 +1166,13 @@ void SidebarController::UpdateTitleBarIc
}
+
+
+void SidebarController::ShowPanel (const Panel& rPanel)
+{
+ if (mpCurrentDeck)
+ mpCurrentDeck->ShowPanel(rPanel);
+}
+
+
} } // end of namespace sfx2::sidebar
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.hxx Mon May 6
13:12:20 2013
@@ -209,6 +209,12 @@ private:
SfxSplitWindow* GetSplitWindow (void);
void ProcessNewWidth (const sal_Int32 nNewWidth);
void UpdateCloseIndicator (const bool bIsIndicatorVisible);
+
+ /** Typically called when a panel is focused via keyboard.
+ Tries to scroll the deck up or down to make the given panel
+ completely visible.
+ */
+ void ShowPanel (const Panel& rPanel);
virtual void SAL_CALL disposing (void);
};
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.cxx
(original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.cxx Mon May
6 13:12:20 2013
@@ -84,31 +84,6 @@ void SidebarDockingWindow::GetFocus()
-long SidebarDockingWindow::PreNotify (NotifyEvent& rEvent)
-{
- switch (rEvent.GetType())
- {
- case EVENT_KEYINPUT:
- {
- const KeyEvent* pKeyEvent = rEvent.GetKeyEvent();
- if (pKeyEvent != NULL)
- return
mpSidebarController->GetFocusManager().NotifyDockingWindowEvent(*pKeyEvent);
- else
- break;
- }
-
- case EVENT_GETFOCUS:
- OSL_TRACE("");
- break;
-
- }
-
- return SfxDockingWindow::PreNotify(rEvent);
-}
-
-
-
-
SfxChildWindow* SidebarDockingWindow::GetChildWindow (void)
{
return GetChildWindow_Impl();
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.hxx
(original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarDockingWindow.hxx Mon May
6 13:12:20 2013
@@ -52,7 +52,6 @@ public:
protected:
// Window overridables
virtual void GetFocus (void);
- virtual long PreNotify (NotifyEvent& rEvent);
private:
::rtl::Reference<sfx2::sidebar::SidebarController> mpSidebarController;
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.cxx Mon May 6
13:12:20 2013
@@ -156,4 +156,21 @@ void SidebarToolBox::SetPosSizePixel (
+
+long SidebarToolBox::Notify (NotifyEvent& rEvent)
+{
+ if (rEvent.GetType() == EVENT_KEYINPUT)
+ {
+ if (rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB)
+ {
+ // Special handling for transferring handling of KEY_TAB
+ // that becomes necessary because of our parent that is
+ // not the dialog but a background control.
+ return DockingWindow::Notify(rEvent);
+ }
+ }
+ return ToolBox::Notify(rEvent);
+}
+
+
} } // end of namespace sfx2::sidebar
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarToolBox.hxx Mon May 6
13:12:20 2013
@@ -44,6 +44,7 @@ public:
long nWidth,
long nHeight,
sal_uInt16 nFlags);
+ virtual long Notify (NotifyEvent& rEvent);
private:
bool mbParentIsBorder;
Modified: openoffice/trunk/main/sfx2/source/sidebar/TitleBar.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/TitleBar.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/TitleBar.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/TitleBar.cxx Mon May 6 13:12:20
2013
@@ -139,6 +139,14 @@ ToolBox& TitleBar::GetToolBox (void)
+const ToolBox& TitleBar::GetToolBox (void) const
+{
+ return maToolBox;
+}
+
+
+
+
void TitleBar::HandleToolBoxItemClick (const sal_uInt16 nItemIndex)
{
(void)nItemIndex;
@@ -187,6 +195,10 @@ void TitleBar::PaintFocus (const Rectang
{
Push(PUSH_FONT | PUSH_TEXTCOLOR | PUSH_LINECOLOR | PUSH_FILLCOLOR);
+ Font aFont(GetFont());
+ aFont.SetWeight(WEIGHT_BOLD);
+ SetFont(aFont);
+
const Rectangle aTextBox (
GetTextRect(
rFocusBox,
Modified: openoffice/trunk/main/sfx2/source/sidebar/TitleBar.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/TitleBar.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/TitleBar.hxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/TitleBar.hxx Mon May 6 13:12:20
2013
@@ -53,6 +53,7 @@ public:
sal_uInt16 nFlags = WINDOW_POSSIZE_ALL);
ToolBox& GetToolBox (void);
+ const ToolBox& GetToolBox (void) const;
protected:
ToolBox maToolBox;
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
Mon May 6 13:12:20 2013
@@ -1565,18 +1565,22 @@ ParaPropertyPanel::ParaPropertyPanel(Win
maFTUL (new FixedText(this, SVX_RES(FT_SPACING))),
maTbxUL_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
maTbxUL_IncDec
(ControlFactory::CreateToolBox(maTbxUL_IncDecBackground.get(),SVX_RES(TBX_UL_INC_DEC))),
- maTopDist (new SvxRelativeField(this, SVX_RES(MF_ABOVE_PARASPACING))),
- maBottomDist (new SvxRelativeField(this, SVX_RES(MF_BELOW_PARASPACING))),
- maLineSPTbxBackground(ControlFactory::CreateToolBoxBackground(this)),
- maLineSPTbx
(ControlFactory::CreateToolBox(maLineSPTbxBackground.get(),SVX_RES(TBX_LINESP))),
maFTIndent (new FixedText(this, SVX_RES(FT_INDENT))),
maTbxIndent_IncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
maTbxIndent_IncDec
(ControlFactory::CreateToolBox(maTbxIndent_IncDecBackground.get(),SVX_RES(TBX_INDENT_INC_DEC))),
- maTbxProDemoteBackground(ControlFactory::CreateToolBoxBackground(this)),
- maTbxProDemote
(ControlFactory::CreateToolBox(maTbxProDemoteBackground.get(),SVX_RES(TBX_INDENT_PRO_DEMOTE))),
+
+ maTopDist (new SvxRelativeField(this, SVX_RES(MF_ABOVE_PARASPACING))),
maLeftIndent (new SvxRelativeField(this, SVX_RES(MF_BEFORE_INDENT))),
+
+ maBottomDist (new SvxRelativeField(this, SVX_RES(MF_BELOW_PARASPACING))),
maRightIndent (new SvxRelativeField(this, SVX_RES(MF_AFTER_INDENT))),
+
+ maLineSPTbxBackground(ControlFactory::CreateToolBoxBackground(this)),
+ maLineSPTbx
(ControlFactory::CreateToolBox(maLineSPTbxBackground.get(),SVX_RES(TBX_LINESP))),
maFLineIndent (new SvxRelativeField(this, SVX_RES(MF_FL_INDENT))),
+
+ maTbxProDemoteBackground(ControlFactory::CreateToolBoxBackground(this)),
+ maTbxProDemote
(ControlFactory::CreateToolBox(maTbxProDemoteBackground.get(),SVX_RES(TBX_INDENT_PRO_DEMOTE))),
mpColorUpdater (),
maFISpace1 ( this, SVX_RES( FI_SPACE1)),
maFISpace2 ( this, SVX_RES( FI_SPACE2)),
Modified:
openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
Mon May 6 13:12:20 2013
@@ -112,20 +112,20 @@ private:
::boost::scoped_ptr<FixedText> maFTUL;
::boost::scoped_ptr<Window>
maTbxUL_IncDecBackground;
::boost::scoped_ptr<ToolBox> maTbxUL_IncDec;
+ ::boost::scoped_ptr<FixedText> maFTIndent;
+ ::boost::scoped_ptr<Window>
maTbxIndent_IncDecBackground;
+ ::boost::scoped_ptr<ToolBox> maTbxIndent_IncDec;
::boost::scoped_ptr<SvxRelativeField> maTopDist;
- ::boost::scoped_ptr<SvxRelativeField> maBottomDist;
+ ::boost::scoped_ptr<SvxRelativeField> maLeftIndent;
+ ::boost::scoped_ptr<SvxRelativeField> maBottomDist;
+ ::boost::scoped_ptr<SvxRelativeField> maRightIndent;
//Line spacing
::boost::scoped_ptr<Window> maLineSPTbxBackground;
::boost::scoped_ptr<ToolBox> maLineSPTbx;
+ ::boost::scoped_ptr<SvxRelativeField> maFLineIndent;
//Indent
- ::boost::scoped_ptr<FixedText> maFTIndent;
- ::boost::scoped_ptr<Window>
maTbxIndent_IncDecBackground;
- ::boost::scoped_ptr<ToolBox> maTbxIndent_IncDec;
::boost::scoped_ptr<Window>
maTbxProDemoteBackground;
::boost::scoped_ptr<ToolBox> maTbxProDemote;
- ::boost::scoped_ptr<SvxRelativeField> maLeftIndent;
- ::boost::scoped_ptr<SvxRelativeField> maRightIndent;
- ::boost::scoped_ptr<SvxRelativeField> maFLineIndent;
::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpColorUpdater;
/**********************************************************
Modified: openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.cxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.cxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.cxx Mon May
6 13:12:20 2013
@@ -172,18 +172,14 @@ TextPropertyPanel::TextPropertyPanel (
: Control(pParent, SVX_RES(RID_SIDEBAR_TEXT_PANEL)),
mpFontNameBox (new SvxSBFontNameBox(this, SVX_RES(CB_SBFONT_FONT))),
maFontSizeBox (this, SVX_RES(MB_SBFONT_FONTSIZE)),
-
mpToolBoxIncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxIncDec(ControlFactory::CreateToolBox(
- mpToolBoxIncDecBackground.get(),
- SVX_RES(TB_INCREASE_DECREASE))),
mpToolBoxFontBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxFont(ControlFactory::CreateToolBox(
mpToolBoxFontBackground.get(),
SVX_RES(TB_FONT))),
-
mpToolBoxFontColorBackground(ControlFactory::CreateToolBoxBackground(this)),
- mpToolBoxFontColor(ControlFactory::CreateToolBox(
- mpToolBoxFontColorBackground.get(),
- SVX_RES(TB_FONTCOLOR))),
+
mpToolBoxIncDecBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpToolBoxIncDec(ControlFactory::CreateToolBox(
+ mpToolBoxIncDecBackground.get(),
+ SVX_RES(TB_INCREASE_DECREASE))),
mpToolBoxScriptBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxScript(ControlFactory::CreateToolBox(
mpToolBoxScriptBackground.get(),
@@ -196,6 +192,10 @@ TextPropertyPanel::TextPropertyPanel (
mpToolBoxSpacing(ControlFactory::CreateToolBox(
mpToolBoxSpacingBackground.get(),
SVX_RES(TB_SPACING))),
+
mpToolBoxFontColorBackground(ControlFactory::CreateToolBoxBackground(this)),
+ mpToolBoxFontColor(ControlFactory::CreateToolBox(
+ mpToolBoxFontColorBackground.get(),
+ SVX_RES(TB_FONTCOLOR))),
mpToolBoxHighlightBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxHighlight(ControlFactory::CreateToolBox(
mpToolBoxHighlightBackground.get(),
Modified: openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.hxx?rev=1479558&r1=1479557&r2=1479558&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.hxx
(original)
+++ openoffice/trunk/main/svx/source/sidebar/text/TextPropertyPanel.hxx Mon May
6 13:12:20 2013
@@ -87,18 +87,18 @@ private:
//ui controls
::boost::scoped_ptr<SvxSBFontNameBox> mpFontNameBox;
FontSizeBox maFontSizeBox;
- ::boost::scoped_ptr<Window> mpToolBoxIncDecBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxIncDec;
::boost::scoped_ptr<Window> mpToolBoxFontBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxFont;
- ::boost::scoped_ptr<Window> mpToolBoxFontColorBackground;
- ::boost::scoped_ptr<ToolBox> mpToolBoxFontColor;
+ ::boost::scoped_ptr<Window> mpToolBoxIncDecBackground;
+ ::boost::scoped_ptr<ToolBox> mpToolBoxIncDec;
::boost::scoped_ptr<Window> mpToolBoxScriptBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxScript;
::boost::scoped_ptr<Window> mpToolBoxScriptSwBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxScriptSw;
::boost::scoped_ptr<Window> mpToolBoxSpacingBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxSpacing;
+ ::boost::scoped_ptr<Window> mpToolBoxFontColorBackground;
+ ::boost::scoped_ptr<ToolBox> mpToolBoxFontColor;
::boost::scoped_ptr<Window> mpToolBoxHighlightBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxHighlight;
::boost::scoped_ptr<ToolboxButtonColorUpdater> mpFontColorUpdater;