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

LOFixturePalette Class Reference

A Palette is a series of ranges. More...

#import <LOFixturePalette.h>


Public Member Functions

(id) - initWithName:
 Iniilise the palette with a name and no entries.
(id) - initWithXML:withinFixture:
 Initilise the palette from the XML Element.
(NSXMLElement *) - XML
 Return the palette defintion as an XML element.
(NSString *) - name
 Get the name of palette.
(void) - setName:
 Set the name of palette.
(NSArray *) - entries
 Get the entries.
(void) - addEntry:
 Add an entry into the palette.
(unsigned) - count
 Get the number of entries in the palette.
(LOFixturePaletteEntry *) - entryAtIndex:
 Get a paletter entry at a specific index.
(void) - removeLastEntry
 Remove the last entry from the palette.
(void) - removeEntryAtIndex:
 Remove a specific entry.

Protected Attributes

NSString * name
NSMutableArray * entries
 Array of LOFixturePaletteEntry.


Detailed Description

A Palette is a series of ranges.

These can be used for a number things, like for instance to define a series of entries on a wheel for a fixture, or to define a number of preset colours or positions for a fixture.


Member Function Documentation

- (void) addEntry: (LOFixturePaletteEntry *)  anEntry  

Add an entry into the palette.

See also:
entries:

- entryAtIndex:

- (unsigned) count  

Get the number of entries in the palette.

- (NSArray *) entries  

Get the entries.

Returns:
an array of LOFixturePaletteEntry
See also:
- addEntry:

- count:

- entryAtIndex:

- (LOFixturePaletteEntry *) entryAtIndex: (int)  index  

Get a paletter entry at a specific index.

Parameters:
index The index (zero indexed)
See also:
entries:

- addEntry:

- (id) initWithName: (NSString *)  theName  

Iniilise the palette with a name and no entries.

- (id) initWithXML: (NSXMLElement *)  XMLElement
withinFixture: (LOFixture *)  theFixture 

Initilise the palette from the XML Element.

- (NSString *) name  

Get the name of palette.

See also:
- setName:

- (void) removeEntryAtIndex: (unsigned)  index  

Remove a specific entry.

See also:
- removeLastEntry:

- (void) removeLastEntry  

Remove the last entry from the palette.

See also:
- removeEntryAtIndex:

- (void) setName: (NSString *)  aName  

Set the name of palette.

See also:
name:

- (NSXMLElement *) XML  

Return the palette defintion as an XML element.

 <palette name="name">
  <entry name="name">
   <range base="name" offset="x" type="block|proportional|single" start="x" end="x" [startName="name"] [endName="name"]/>
   ...
  </entry>
  ...
 </palette>   


The documentation for this class was generated from the following files: