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