xref: /trunk/main/svx/source/inc/fmgroup.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*3334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3334a7e6SAndrew Rist  * distributed with this work for additional information
6*3334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
9*3334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*3334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*3334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3334a7e6SAndrew Rist  * software distributed under the License is distributed on an
15*3334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*3334a7e6SAndrew Rist  * specific language governing permissions and limitations
18*3334a7e6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*3334a7e6SAndrew Rist  *************************************************************/
21*3334a7e6SAndrew Rist 
22*3334a7e6SAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_FMGROUP_HXX
24cdf0e10cSrcweir #define _SVX_FMGROUP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef _SVX_FMCPONT_HXX
27cdf0e10cSrcweir #include "fmcpont.hxx"
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #ifndef __DBFORM_HXX
31cdf0e10cSrcweir #include <dbform.hxx>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir 
34cdf0e10cSrcweir DECLARE_LIST( FmCtrlModelList, XInterface* );
35cdf0e10cSrcweir 
36cdf0e10cSrcweir struct FmXGroupModel_Impl;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir //==================================================================
39cdf0e10cSrcweir // FmXGroupModel
40cdf0e10cSrcweir //==================================================================
41cdf0e10cSrcweir class FmXGroupModel : public XBoundControl,
42cdf0e10cSrcweir                       public XLoadListener,
43cdf0e10cSrcweir                       public XPropertyChangeListener,
44cdf0e10cSrcweir                       public XGroup,
45cdf0e10cSrcweir                       public FmXControlModel
46cdf0e10cSrcweir {
47cdf0e10cSrcweir     FmFormControlMap        aControlMap;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     friend Reflection*      FmXGroupModel_getReflection();
50cdf0e10cSrcweir     FmXGroupModel_Impl*     pGroupModelData;            // Properties
51cdf0e10cSrcweir 
52cdf0e10cSrcweir public:
53cdf0e10cSrcweir     FmXGroupModel();
54cdf0e10cSrcweir     virtual ~FmXGroupModel();
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     // UNO Anbindung
57cdf0e10cSrcweir     SMART_UNO_DECLARATION( FmXGroupModel, FmXControlModel );
58cdf0e10cSrcweir     virtual XInterface*     queryInterface(UsrUik);
59cdf0e10cSrcweir     virtual XIdlClassRef    getIdlClass();
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     // XGroup
62cdf0e10cSrcweir     virtual sal_Int32 getFormControlCount();
63cdf0e10cSrcweir     virtual XFormControlRef getFormControlByName( const XubString& sName ) const;
64cdf0e10cSrcweir     virtual XFormControlRef getFormControlByIndex( sal_Int32 Index ) const;
65cdf0e10cSrcweir     virtual void appendFormControl( const XFormControlRef& FormControl );
66cdf0e10cSrcweir     virtual XFormControlRef removeFormControl( const XFormControlRef& FormControl );
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     // XFormControl
69cdf0e10cSrcweir     virtual void setParent( const XFormRef& Parent );
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     // XEventListener
72cdf0e10cSrcweir     virtual void disposing( const EventObject& Source );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     // XPropertiesChangeListener
75cdf0e10cSrcweir     virtual void propertyChange( const PropertyChangeEvent& evt );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     // XLoadListener
78cdf0e10cSrcweir     virtual void loaded( const EventObject& rEvent );
79cdf0e10cSrcweir     virtual void unloaded( const EventObject& rEvent );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     // XBoundControl
82cdf0e10cSrcweir     virtual void addBoundControlListener( const XBoundControlListenerRef& l );
83cdf0e10cSrcweir     virtual void removeBoundControlListener( const XBoundControlListenerRef& l );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     // XPersistObject
86cdf0e10cSrcweir     virtual XubString getServiceName( void ) const;
87cdf0e10cSrcweir     virtual void write( const XObjectOutputStreamRef& OutStream );
88cdf0e10cSrcweir     virtual void read( const XObjectInputStreamRef& InStream );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir     // PropertySetInterface
91cdf0e10cSrcweir     virtual FmXPropertySetInfo* createPropertySetInfo() const;
92cdf0e10cSrcweir     virtual sal_Bool setPropertyValue( sal_uInt16 nId, const XubString& aPropertyName,
93cdf0e10cSrcweir                                    const UsrAny& aValue,
94cdf0e10cSrcweir                                    PropertyChangeEventSequence* pSeq,
95cdf0e10cSrcweir                                    sal_Int32 nIndex );
96cdf0e10cSrcweir     virtual UsrAny getPropertyValue( sal_uInt16 nId, const XubString& aPropertyName ) const;
97cdf0e10cSrcweir     virtual void addPropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
98cdf0e10cSrcweir     virtual void removePropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
99cdf0e10cSrcweir };
100cdf0e10cSrcweir 
101cdf0e10cSrcweir //==================================================================
102cdf0e10cSrcweir // FmXGroupModelInfo
103cdf0e10cSrcweir // Properties:
104cdf0e10cSrcweir //==================================================================
105cdf0e10cSrcweir class FmXGroupModelInfo : public FmXControlModelInfo
106cdf0e10cSrcweir {
107cdf0e10cSrcweir     friend class FmXGroupModel;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir protected:
110cdf0e10cSrcweir     FmXGroupModelInfo( const FmXGroupModel* pCp );
111cdf0e10cSrcweir     virtual void fillProperties( sal_uInt32& nIndex, PropertySequence& aSeq ) const;
112cdf0e10cSrcweir };
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 
115cdf0e10cSrcweir #endif // _SVX_FMGROUP_HXX
116