usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LOSceneManager.h

00001 /*
00002  *
00003  * Copyright (c) 2006,2005,2004 Ben Suffolk <ben@usbdmx.com>
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without 
00007  * modification, are permitted provided that the following conditions are met:
00008  *
00009  * 1. Redistributions of source code must retain the above copyright notice,
00010  *    this list of conditions and the following disclaimer.
00011  *
00012  * 2. Redistributions in binary form must reproduce the above copyright notice,
00013  *    this list of conditions and the following disclaimer in the documentation
00014  *    and/or other materials provided with the distribution.
00015  *
00016  * 3. Neither the name of the usbdmx.com web site nor the names of its 
00017  *    contributors may be used to endorse or promote products derived from this
00018  *    software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
00023  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
00024  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
00025  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
00026  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
00027  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
00028  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
00029  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00030  * POSSIBILITY OF SUCH DAMAGE.
00031  *
00032  * $Id: LOSceneManager.h 264 2010-11-22 19:52:32Z ben.suffolk $
00033  *
00034  *******************************************************************************
00035  *
00036  * History :-
00037  *
00038  * <Name>  <Date>
00039  *
00040  * <Comment>
00041  * 
00042  *******************************************************************************
00043 */
00044 
00045 
00046 #import <Cocoa/Cocoa.h>
00047 
00048 #define LOSceneManagerDidAddScene      @"LOSceneManagerDidAddScene"
00049 #define LOSceneManagerDidReorderScenes @"LOSceneManagerDidReorderScenes"
00050 #define LOSceneManagerDidReset         @"LOSceneManagerDidReset"
00051 #define LOSceneManagerDidRemoveScene   @"LOSceneManagerDidRemoveScene"
00052 #define LOSceneManagerWillRemoveScene  @"LOSceneManagerWillRemoveScene"
00053 
00054 @class LOScene;
00055 
00056 
00067 @interface LOSceneManager : NSObject
00068 {
00069  NSMutableArray *scenes; 
00070  NSMutableArray *hidden; 
00071 }
00072 
00073 
00083 + (LOSceneManager *)defaultManager;
00084 
00085 
00101 - (NSXMLElement *)XML;
00102 
00103 
00114 - (int)addScene:(LOScene *)theScene;
00115 
00116 
00124 - (LOScene *)sceneForNumber:(int)sceneNumber;
00125 
00126 
00138 - (int)numberForScene:(LOScene *)theScene;
00139 
00140 
00146 - (BOOL)doesManageScene:(LOScene *)theScene;
00147 
00148 
00154 - (void)hideScene:(LOScene *)theScene;
00155 
00156 
00163 - (void)unhideScene:(LOScene *)theScene;
00164 
00165 
00173 - (int)moveScenesAtIndexs:(NSIndexSet *)indexes toIndex:(unsigned)index;
00174 
00175 
00181 - (void)removeScenesAtIndexs:(NSIndexSet *)indexes;
00182 
00183 
00189 - (void)removeScene:(LOScene *)scene;
00190 
00191 
00197 - (void)removeEmptyHiddenScenes;
00198 
00199 
00207 - (unsigned)count;
00208 
00209 
00217 - (unsigned)countWithHidden;
00218 
00219 
00228 - (void)reset;
00229 
00230 
00244 - (BOOL)loadConfigurationFromXML:(NSXMLElement *)XMLElement;
00245 
00246 
00258 - (BOOL)secondLoadConfigurationFromXML:(NSXMLElement *)XMLElement;
00259 
00260 @end
00261 
00262 
00263 
00264 
00265 
00266 
00267 
00268 
00269 
00270