xref: /AOO41X/main/svx/source/inc/fmgroup.hxx (revision 3334a7e6acdae9820fa1a6f556bb10129a8de6b2)
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 #ifndef _SVX_FMGROUP_HXX
24 #define _SVX_FMGROUP_HXX
25 
26 #ifndef _SVX_FMCPONT_HXX
27 #include "fmcpont.hxx"
28 #endif
29 
30 #ifndef __DBFORM_HXX
31 #include <dbform.hxx>
32 #endif
33 
34 DECLARE_LIST( FmCtrlModelList, XInterface* );
35 
36 struct FmXGroupModel_Impl;
37 
38 //==================================================================
39 // FmXGroupModel
40 //==================================================================
41 class FmXGroupModel : public XBoundControl,
42                       public XLoadListener,
43                       public XPropertyChangeListener,
44                       public XGroup,
45                       public FmXControlModel
46 {
47     FmFormControlMap        aControlMap;
48 
49     friend Reflection*      FmXGroupModel_getReflection();
50     FmXGroupModel_Impl*     pGroupModelData;            // Properties
51 
52 public:
53     FmXGroupModel();
54     virtual ~FmXGroupModel();
55 
56     // UNO Anbindung
57     SMART_UNO_DECLARATION( FmXGroupModel, FmXControlModel );
58     virtual XInterface*     queryInterface(UsrUik);
59     virtual XIdlClassRef    getIdlClass();
60 
61     // XGroup
62     virtual sal_Int32 getFormControlCount();
63     virtual XFormControlRef getFormControlByName( const XubString& sName ) const;
64     virtual XFormControlRef getFormControlByIndex( sal_Int32 Index ) const;
65     virtual void appendFormControl( const XFormControlRef& FormControl );
66     virtual XFormControlRef removeFormControl( const XFormControlRef& FormControl );
67 
68     // XFormControl
69     virtual void setParent( const XFormRef& Parent );
70 
71     // XEventListener
72     virtual void disposing( const EventObject& Source );
73 
74     // XPropertiesChangeListener
75     virtual void propertyChange( const PropertyChangeEvent& evt );
76 
77     // XLoadListener
78     virtual void loaded( const EventObject& rEvent );
79     virtual void unloaded( const EventObject& rEvent );
80 
81     // XBoundControl
82     virtual void addBoundControlListener( const XBoundControlListenerRef& l );
83     virtual void removeBoundControlListener( const XBoundControlListenerRef& l );
84 
85     // XPersistObject
86     virtual XubString getServiceName( void ) const;
87     virtual void write( const XObjectOutputStreamRef& OutStream );
88     virtual void read( const XObjectInputStreamRef& InStream );
89 
90     // PropertySetInterface
91     virtual FmXPropertySetInfo* createPropertySetInfo() const;
92     virtual sal_Bool setPropertyValue( sal_uInt16 nId, const XubString& aPropertyName,
93                                    const UsrAny& aValue,
94                                    PropertyChangeEventSequence* pSeq,
95                                    sal_Int32 nIndex );
96     virtual UsrAny getPropertyValue( sal_uInt16 nId, const XubString& aPropertyName ) const;
97     virtual void addPropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
98     virtual void removePropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
99 };
100 
101 //==================================================================
102 // FmXGroupModelInfo
103 // Properties:
104 //==================================================================
105 class FmXGroupModelInfo : public FmXControlModelInfo
106 {
107     friend class FmXGroupModel;
108 
109 protected:
110     FmXGroupModelInfo( const FmXGroupModel* pCp );
111     virtual void fillProperties( sal_uInt32& nIndex, PropertySequence& aSeq ) const;
112 };
113 
114 
115 #endif // _SVX_FMGROUP_HXX
116 
117