summaryrefslogtreecommitdiff
path: root/include/toolkit/awt/vclxwindow.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/toolkit/awt/vclxwindow.hxx')
-rw-r--r--include/toolkit/awt/vclxwindow.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 6306ce6717e3..1ab1f9e8a8d2 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -128,8 +128,12 @@ public:
VCLXWindow( bool bWithDefaultProps = false );
virtual ~VCLXWindow();
- virtual void SetWindow( vcl::Window* pWindow );
- vcl::Window* GetWindow() const { return static_cast<vcl::Window*>(GetOutputDevice()); }
+ virtual void SetWindow( const VclPtr< vcl::Window > &pWindow );
+ template< class derived_type > VclPtr< derived_type > GetAs() const {
+ return VclPtr< derived_type >( static_cast< derived_type * >( GetOutputDevice().get() ) ); }
+ template< class derived_type > VclPtr< derived_type > GetAsDynamic() const {
+ return VclPtr< derived_type >( dynamic_cast< derived_type * >( GetOutputDevice().get() ) ); }
+ VclPtr<vcl::Window> GetWindow() const { return GetAs<vcl::Window>(); }
void suspendVclEventListening( );
void resumeVclEventListening( );