Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members Related Pages

# LayerC.h

    00001 //-------------------------------------------------------------------------
    00002 //
    00003 // File:        LayerC.h
    00004 // Desc:        Composition layer class.
    00005 // Author:      memon <memon@inside.org>
    00006 //
    00007 //-------------------------------------------------------------------------
    00008 //  Copyright (c) 2000-2002 Moppi Productions. All Rights Reserved.
    00009 //  This file is part of Moppi Demopaja SDK. For conditions of
    00010 //  distribution and use, see the accompanying license.txt file.
    00011 //  http://moppi.inside.org/demopaja/
    00012 //-------------------------------------------------------------------------
    00013
    00014 #ifndef __DEMOPAJA_LAYERC_H__
    00015 #define __DEMOPAJA_LAYERC_H__
    00016
    00017 namespace Composition {
    00018     class LayerC;
    00019 };
    00020
    00021 #include "PajaTypes.h"
    00022 #include "DataBlockI.h"
    00023 #include "EditableI.h"
    00024 #include "UndoC.h"
    00025 #include "TimeSegmentC.h"
    00026 #include "EffectI.h"
    00027 #include "GizmoI.h"
    00028 #include "FileIO.h"
    00029 #include "SceneC.h"
    00030 #include <string>
    00031 #include <vector>
    00032
    00033
    00034 namespace Composition {
    00035
    00037
    00044     class LayerC : public Edit::EditableI
    00045     {
    00046     public:
    00048         static LayerC*              create_new( SceneC* pParent );
    00050         virtual Edit::DataBlockI*   create();
    00052         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00054         virtual void                copy( Edit::EditableI* pEditable );
    00056         virtual void                restore( Edit::EditableI* pEditable );
    00057
    00059         void                        set_name( const char* szName );
    00061         const char*                 get_name() const;
    00062
    00064         PajaTypes::int32            get_effect_count();
    00066         EffectI*                    get_effect( PajaTypes::int32 i32Index );
    00067
    00069         PajaTypes::int32            add_effect( EffectI* pEffect );
    00071         void                        del_effect( PajaTypes::int32 i32Index );
    00072
    00074
    00078         EffectI*                    remove_effect( PajaTypes::int32 i32Index );
    00080         void                        insert_effect( PajaTypes::int32 i32IndexBefore, EffectI* pEffect  );
    00081
    00083
    00087         void                        set_flags( PajaTypes::int32 i32Flags );
    00089         void                        add_flags( PajaTypes::int32 i32Flags );
    00091         void                        del_flags( PajaTypes::int32 i32Flags );
    00093         void                        toggle_flags( PajaTypes::int32 i32Flags );
    00095         PajaTypes::int32            get_flags();
    00096
    00098         void                        set_parent( SceneC* pScene );
    00100         SceneC*                     get_parent() const;
    00101
    00103         TimeSegmentC*               get_timesegment();
    00104
    00106         PajaTypes::uint32           save( FileIO::SaveC* pSave );
    00108         PajaTypes::uint32           load( FileIO::LoadC* pLoad );
    00109
    00110     protected:
    00112         LayerC( SceneC* pParent );
    00114         LayerC( Edit::EditableI* pOriginal );
    00116         virtual ~LayerC();
    00117
    00118     private:
    00119         std::string             m_sName;
    00120         std::vector<EffectI*>   m_rEffects;
    00121         PajaTypes::int32        m_i32Flags;
    00122         TimeSegmentC*           m_pTimeSegment;
    00123         SceneC*                 m_pParent;
    00124     };
    00125
    00126 };
    00127
    00128 #endif // __LAYERC_H__