xref: /aoo41x/main/toolkit/source/awt/vclxdialog.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef LAYOUT_AWT_VCLXDIALOG_HXX
29 #define LAYOUT_AWT_VCLXDIALOG_HXX
30 
31 #include <com/sun/star/awt/XDialog2.hpp>
32 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
33 #include <com/sun/star/awt/XTopWindow.hpp>
34 #include <comphelper/uno3.hxx>
35 #include <layout/core/bin.hxx>
36 #include <toolkit/awt/vclxtopwindow.hxx>
37 
38 namespace layoutimpl
39 {
40 
41 typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XDialog2 > VCLXDialog_Base;
42 
43 class TOOLKIT_DLLPUBLIC VCLXDialog : public VCLXWindow
44                                    , public VCLXTopWindow_Base
45                                    , public VCLXDialog_Base
46                                    , public Bin
47 {
48 private:
49     bool bRealized, bResizeSafeguard;
50     css::uno::Reference< css::awt::XLayoutUnit > mxLayoutUnit;
51 
52     VCLXDialog( const VCLXDialog& );            // never implemented
53     VCLXDialog& operator=( const VCLXDialog& ); // never implemented
54 
55 protected:
56     vos::IMutex& GetMutexImpl();
57     Window* GetWindowImpl();
58     ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl();
59 
60     ~VCLXDialog();
61 
62     // XInterface
63     DECLARE_XINTERFACE()
64 
65     // XTypeProvider
66     DECLARE_XTYPEPROVIDER()
67 
68     // XComponent
69     void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
70 
71     // VclWindowPeer
72     virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
73     virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
74 
75     // VCLXWindow
76     void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
77 
78     // ::com::sun::star::awt::XDialog
79     void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
80     ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
81     sal_Int16 SAL_CALL execute() throw(::com::sun::star::uno::RuntimeException);
82     void SAL_CALL endExecute() throw(::com::sun::star::uno::RuntimeException);
83 
84     // ::com::sun::star::awt::XLayoutContainer
85     virtual void SAL_CALL allocateArea( const css::awt::Rectangle &rArea )
86         throw (css::uno::RuntimeException);
87 
88     void resizedCb();
89 
90     static void     ImplGetPropertyIds( std::list< sal_uInt16 > &/*aIds*/ )
91     {
92     }
93     virtual void    GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
94 
95 
96 public:
97     VCLXDialog();
98 
99     // ::com::sun::star::awt::XDialog2
100     void SAL_CALL endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException);
101     void SAL_CALL setHelpId( const rtl::OUString& id ) throw(::com::sun::star::uno::RuntimeException);
102 
103 };
104 
105 } // namespace layoutimpl
106 
107 #endif /* LAYOUT_AWT_VCLXDIALOG_HXX */
108