xref: /trunk/main/svx/inc/svx/sdr/contact/viewobjectcontactofgraphic.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 
24 #ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
25 #define _SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
26 
27 #include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
28 
29 //////////////////////////////////////////////////////////////////////////////
30 // predeclarations
31 class SdrGrafObj;
32 
33 namespace sdr { namespace event {
34     class AsynchGraphicLoadingEvent;
35 }}
36 
37 //////////////////////////////////////////////////////////////////////////////
38 
39 namespace sdr
40 {
41     namespace contact
42     {
43         class ViewObjectContactOfGraphic : public ViewObjectContactOfSdrObj
44         {
45         private:
46             // allow async loading event helper to call tooling methods
47             friend class sdr::event::AsynchGraphicLoadingEvent;
48 
49             // Member which takes care for the asynch loading events which may be necessary
50             // for asynch graphics loading.
51             sdr::event::AsynchGraphicLoadingEvent*      mpAsynchLoadEvent;
52 
53             // async graphics loading helpers. Only to be used internally or from the
54             // event helper class (in .cxx file)
55             bool impPrepareGraphicWithAsynchroniousLoading();
56             bool impPrepareGraphicWithSynchroniousLoading();
57             void doAsynchGraphicLoading();
58             void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent);
59 
60         protected:
61             SdrGrafObj& getSdrGrafObj();
62 
63             // This method is responsible for creating the graphical visualisation data
64             virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
65 
66         public:
67             ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact);
68             virtual ~ViewObjectContactOfGraphic();
69         };
70     } // end of namespace contact
71 } // end of namespace sdr
72 
73 //////////////////////////////////////////////////////////////////////////////
74 
75 #endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFGRAPHIC_HXX
76 
77 // eof
78