diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/toolpanel/toolpanel.hxx | 4 | ||||
-rw-r--r-- | svtools/source/toolpanel/drawerlayouter.cxx | 1 | ||||
-rw-r--r-- | svtools/source/toolpanel/dummypanel.cxx | 6 | ||||
-rw-r--r-- | svtools/source/toolpanel/dummypanel.hxx | 1 | ||||
-rwxr-xr-x | svtools/workben/toolpanel/toolpaneltest.cxx | 7 |
5 files changed, 19 insertions, 0 deletions
diff --git a/svtools/inc/svtools/toolpanel/toolpanel.hxx b/svtools/inc/svtools/toolpanel/toolpanel.hxx index d4d009b5c169..432dea64e8b5 100644 --- a/svtools/inc/svtools/toolpanel/toolpanel.hxx +++ b/svtools/inc/svtools/toolpanel/toolpanel.hxx @@ -32,6 +32,7 @@ #include <rtl/ustring.hxx> #include <vcl/image.hxx> +#include <vcl/smartid.hxx> #include <boost/noncopyable.hpp> @@ -60,6 +61,9 @@ namespace svt /// retrieves the image associated with the panel, if any virtual Image GetImage() const = 0; + /// retrieves the help ID associated with the panel, if any. + virtual SmartId GetHelpID() const = 0; + /** activates the panel Usually, this means the panel's Window is created (if not previosly done so) and shown. diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx index f10e9439ef0b..040f33045fff 100644 --- a/svtools/source/toolpanel/drawerlayouter.cxx +++ b/svtools/source/toolpanel/drawerlayouter.cxx @@ -165,6 +165,7 @@ namespace svt OSL_PRECOND( i_nPosition <= m_aDrawers.size(), "DrawerDeckLayouter::PanelInserted: inconsistency!" ); PToolPanelDrawer pDrawer( new ToolPanelDrawer( m_rParentWindow, i_pPanel->GetDisplayName() ) ); + pDrawer->SetSmartHelpId( i_pPanel->GetHelpID() ); // proper Z-Order if ( i_nPosition == 0 ) { diff --git a/svtools/source/toolpanel/dummypanel.cxx b/svtools/source/toolpanel/dummypanel.cxx index dae50723d4f1..20f140a6e610 100644 --- a/svtools/source/toolpanel/dummypanel.cxx +++ b/svtools/source/toolpanel/dummypanel.cxx @@ -80,6 +80,12 @@ namespace svt } //-------------------------------------------------------------------- + SmartId DummyPanel::GetHelpID() const + { + return SmartId(); + } + + //-------------------------------------------------------------------- void DummyPanel::GrabFocus() { } diff --git a/svtools/source/toolpanel/dummypanel.hxx b/svtools/source/toolpanel/dummypanel.hxx index b37e5cca19af..adb98e52077e 100644 --- a/svtools/source/toolpanel/dummypanel.hxx +++ b/svtools/source/toolpanel/dummypanel.hxx @@ -49,6 +49,7 @@ namespace svt // IToolPanel virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; + virtual SmartId GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx index 812d6479b887..6d044cee7c93 100755 --- a/svtools/workben/toolpanel/toolpaneltest.cxx +++ b/svtools/workben/toolpanel/toolpaneltest.cxx @@ -145,6 +145,7 @@ public: // IToolPanel virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; + virtual SmartId GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); @@ -270,6 +271,12 @@ Image ColoredPanel::GetImage() const return Image( m_aPanelIcon ); } +//----------------------------------------------------------------------------- +SmartId ColoredPanel::GetHelpID() const +{ + return SmartId(); +} + //============================================================================= //= OptionsWindow //============================================================================= |