xref: /trunk/main/svl/inc/svl/smplhint.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
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 _SFXSMPLHINT_HXX
24 #define _SFXSMPLHINT_HXX
25 
26 #include "svl/svldllapi.h"
27 #include <svl/hint.hxx>
28 #include <tools/rtti.hxx>
29 
30 #define SFX_HINT_DYING              0x00000001
31 #define SFX_HINT_NAMECHANGED        0x00000002
32 #define SFX_HINT_TITLECHANGED       0x00000004
33 #define SFX_HINT_DATACHANGED        0x00000008
34 #define SFX_HINT_DOCCHANGED         0x00000010
35 #define SFX_HINT_UPDATEDONE         0x00000020
36 #define SFX_HINT_DEINITIALIZING     0x00000040
37 #define SFX_HINT_MODECHANGED        0x00000080
38     // unused, formerly SFX_HINT_CANCELLABLE
39     // unused, formerly SFX_HINT_DATAAVAILABLE
40     // unused, formerly SFX_HINT_SAVECOMPLETED
41     // unused, formerly SFX_HINT_RELEASEREF
42 #define SFX_HINT_COLORS_CHANGED     0x00001000
43 #define SFX_HINT_CTL_SETTINGS_CHANGED   0x00002000
44 #define SFX_HINT_ACCESSIBILITY_CHANGED  0x00004000
45     // unused, formerly SFX_HINT_VIEWCREATED
46 #define SFX_HINT_USER00             0x00010000
47 #define SFX_HINT_USER01             0x00020000
48 #define SFX_HINT_USER02             0x00040000
49 #define SFX_HINT_USER03             0x00080000
50 #define SFX_HINT_USER04             0x00100000
51 #define SFX_HINT_USER05             0x00200000
52 #define SFX_HINT_USER06             0x00400000
53 #define SFX_HINT_USER07             0x00800000
54 #define SFX_HINT_USER08             0x01000000
55 #define SFX_HINT_USER09             0x02000000
56 #define SFX_HINT_USER10             0x04000000
57 #define SFX_HINT_USER11             0x08000000
58 #define SFX_HINT_USER12             0x10000000
59 #define SFX_HINT_USER13             0x20000000
60 #define SFX_HINT_UNDO_OPTIONS_CHANGED 0x40000000
61 #define SFX_HINT_USER_OPTIONS_CHANGED 0x80000000
62 #define SFX_HINT_ALL                0xFFFFFFFF
63 
64 class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
65 {
66 private:
67     sal_uLong mnId;
68 public:
69     TYPEINFO();
SfxSimpleHint(sal_uLong nId)70     SfxSimpleHint( sal_uLong nId ) { mnId = nId; }
GetId() const71     sal_uLong GetId() const { return mnId; }
72 };
73 
74 //--------------------------------------------------------------------
75 
76 #define DECL_OBJHINT(Name, Type) \
77         class Name: public SfxSimpleHint \
78         { \
79             Type  aObj; \
80         \
81         public: \
82             TYPEINFO(); \
83             Name( sal_uInt16 nId, const Type& rObject ); \
84             ~Name(); \
85             const Type& GetObject() const { return aObj; } \
86         }
87 
88 #define IMPL_OBJHINT(Name, Type) \
89         TYPEINIT1(Name, SfxSimpleHint); \
90         Name::Name( sal_uInt16 nID, const Type& rObject ): \
91             SfxSimpleHint( nID ), aObj(rObject) \
92             { } \
93         Name::~Name() {}
94 
95 #endif
96