xref: /aoo4110/main/toolkit/source/awt/vclxdialog.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef LAYOUT_AWT_VCLXDIALOG_HXX
25 #define LAYOUT_AWT_VCLXDIALOG_HXX
26 
27 #include <com/sun/star/awt/XDialog2.hpp>
28 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
29 #include <com/sun/star/awt/XTopWindow.hpp>
30 #include <comphelper/uno3.hxx>
31 #include <layout/core/bin.hxx>
32 #include <toolkit/awt/vclxtopwindow.hxx>
33 
34 namespace layoutimpl
35 {
36 
37 typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XDialog2 > VCLXDialog_Base;
38 
39 class TOOLKIT_DLLPUBLIC VCLXDialog : public VCLXWindow
40                                    , public VCLXTopWindow_Base
41                                    , public VCLXDialog_Base
42                                    , public Bin
43 {
44 private:
45     bool bRealized, bResizeSafeguard;
46     css::uno::Reference< css::awt::XLayoutUnit > mxLayoutUnit;
47 
48     VCLXDialog( const VCLXDialog& );            // never implemented
49     VCLXDialog& operator=( const VCLXDialog& ); // never implemented
50 
51 protected:
52     vos::IMutex& GetMutexImpl();
53     Window* GetWindowImpl();
54     ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl();
55 
56     ~VCLXDialog();
57 
58     // XInterface
59     DECLARE_XINTERFACE()
60 
61     // XTypeProvider
62     DECLARE_XTYPEPROVIDER()
63 
64     // XComponent
65     void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
66 
67     // VclWindowPeer
68     virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
69     virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
70 
71     // VCLXWindow
72     void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
73 
74     // ::com::sun::star::awt::XDialog
75     void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
76     ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
77     sal_Int16 SAL_CALL execute() throw(::com::sun::star::uno::RuntimeException);
78     void SAL_CALL endExecute() throw(::com::sun::star::uno::RuntimeException);
79 
80     // ::com::sun::star::awt::XLayoutContainer
81     virtual void SAL_CALL allocateArea( const css::awt::Rectangle &rArea )
82         throw (css::uno::RuntimeException);
83 
84     void resizedCb();
85 
ImplGetPropertyIds(std::list<sal_uInt16> &)86     static void     ImplGetPropertyIds( std::list< sal_uInt16 > &/*aIds*/ )
87     {
88     }
GetPropertyIds(std::list<sal_uInt16> & aIds)89     virtual void    GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
90 
91 
92 public:
93     VCLXDialog();
94 
95     // ::com::sun::star::awt::XDialog2
96     void SAL_CALL endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException);
97     void SAL_CALL setHelpId( const rtl::OUString& id ) throw(::com::sun::star::uno::RuntimeException);
98 
99 };
100 
101 } // namespace layoutimpl
102 
103 #endif /* LAYOUT_AWT_VCLXDIALOG_HXX */
104