MvcCore/views/elementdocviewevents.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  elementdocviewevents.h
00004  *  Digest
00005  * 
00006  *  Created by Aidan Lane on Thu Jun 10 2005.
00007  *  Copyright (c) 2005 Optimisation and Constraint Solving Group,
00008  *  Monash University. All rights reserved.
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00023  */
00024 
00025 #ifndef ELEMENTDOCVIEWEVENTS_H
00026 #define ELEMENTDOCVIEWEVENTS_H
00027 
00028 
00029 #include "attributedocviewevents.h"
00030 #include "elementdoccontainers.h"
00031 
00032 
00033 class VElementDocEvent : public VAttributeDocEvent {
00034 public:
00035   enum Type {
00036     ElementAdded                 = VAttributeDocEvent::User,
00037     ElementRemoved,
00038     ElementAttributeAdded,
00039     ElementAttributeRemoved,
00040     ElementAttributeDataChanged,
00041     ElementSetOrderChanged,
00042     User                         = VAttributeDocEvent::User + 1000
00043   };
00044 protected:
00045   VElementDocEvent( Type type, MvcBase* sender )
00046     : VAttributeDocEvent((VAttributeDocEvent::Type)type, sender) {}
00047 };
00048 
00049 
00050 class VElementEvent : public VElementDocEvent,
00051                       public AbstractElementContainer {
00052 public:
00053   VElementEvent( Type type, AbstractElement* element, MvcBase* sender )
00054     : VElementDocEvent(type, sender),
00055       AbstractElementContainer(element) {}
00056 };
00057 
00058 
00059 class VElementSetEvent : public VElementDocEvent,
00060                          public AbstractElementSetContainer {
00061 public:
00062   VElementSetEvent( Type type,
00063                     const AbstractElementSet& elements, MvcBase* sender )
00064     : VElementDocEvent(type, sender),
00065       AbstractElementSetContainer(elements) {}
00066 };
00067 
00068 
00070 class VElementAddedEvent : public VElementEvent {
00071 public:
00072   VElementAddedEvent( AbstractElement* element, MvcBase* sender )
00073     : VElementEvent(ElementAdded, element, sender) {}
00074 };
00075 
00077 class VElementRemovedEvent : public VElementEvent {
00078 public:
00079   VElementRemovedEvent( AbstractElement* element, MvcBase* sender )
00080     : VElementEvent(ElementRemoved, element, sender) {}
00081 };
00082 
00083 
00084 class VElementAttributeEvent : public VElementEvent,
00085                                public AbstractElementAttributeContainer {
00086 public:
00087   VElementAttributeEvent( Type type,
00088                           AbstractElement* element,
00089                           AbstractElementAttribute* attribute,
00090                           MvcBase* sender )
00091     : VElementEvent(type, element, sender),
00092       AbstractElementAttributeContainer(attribute) {}
00093 };
00094 
00096 class VElementAttributeAddedEvent : public VElementAttributeEvent {
00097 public:
00098   VElementAttributeAddedEvent( AbstractElement* element,
00099                                AbstractElementAttribute* attribute,
00100                                MvcBase* sender )
00101     : VElementAttributeEvent(ElementAttributeAdded, element,
00102                              attribute, sender) {}
00103 };
00104 
00106 class VElementAttributeRemovedEvent : public VElementAttributeEvent {
00107 public:
00108   VElementAttributeRemovedEvent( AbstractElement* element,
00109                                  AbstractElementAttribute* attribute,
00110                                  MvcBase* sender )
00111     : VElementAttributeEvent(ElementAttributeRemoved, element,
00112                              attribute, sender) {}
00113 };
00114 
00121 class VElementAttributeDataChangedEvent : public VElementAttributeEvent {
00122 public:
00123   VElementAttributeDataChangedEvent( AbstractElement* element,
00124                                      AbstractElementAttribute* attribute,
00125                                      MvcBase* sender )
00126     : VElementAttributeEvent(ElementAttributeDataChanged, element,
00127                              attribute, sender) {}
00128 };
00129 
00130 
00131 class VElementSetOrderChangedEvent : public VElementSetEvent,
00132                                      public ElementOrderActionContainer {
00133 public:
00134   VElementSetOrderChangedEvent( const AbstractElementSet& elements,
00135                                 Action action, MvcBase* sender )
00136     : VElementSetEvent(ElementSetOrderChanged, elements, sender),
00137       ElementOrderActionContainer(action) {}
00138 };
00139 
00140 
00141 #endif //  ! ELEMENTDOCVIEWEVENTS_H

Generated on Mon Jul 30 09:46:50 2007 for Digest by  doxygen 1.5.2