コード例 #1
0
ファイル: AddLayerEvent.cs プロジェクト: unhammer/gimp-sharp
 public AddLayerEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     Parameters.Fill(this);
       if (_objc != null)
     _objc.Fill(this);
 }
コード例 #2
0
 public SelectLayerByNameEvent(ActionEvent srcEvent, string name)
     : base(srcEvent)
 {
     _name = name;
       _modifier = Parameters["selectionModifier"] as EnumParameter;
       _makeVisible = Parameters["MkVs"] as BoolParameter;
 }
コード例 #3
0
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_obj != null)
            {
                if (_obj.Set[0] is PropertyType)
                {
                    PropertyType property = _obj.Set[0] as PropertyType;

                    switch (property.ClassID2)
                    {
                    case "Path":
                        return(new StrokePathEvent(this));

                    default:
                        Console.WriteLine("StrokeEvent: " + property.ClassID2);
                        break;
                    }
                }
            }
            return(this);
        }
コード例 #4
0
 public DuplicateChannelEvent(ActionEvent srcEvent, string name) :
     base(srcEvent)
 {
     _name = name;
 }
コード例 #5
0
ファイル: DeselectEvent.cs プロジェクト: unhammer/gimp-sharp
 public DeselectEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     _executable = true;
 }
コード例 #6
0
 public SelectEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     _executable = true;
 }
コード例 #7
0
 public ActionEvent(ActionEvent srcEvent)
 {
     EventForDisplay = srcEvent.EventForDisplay;
     NumberOfItems   = srcEvent.NumberOfItems;
     _parameters     = srcEvent._parameters;
 }
コード例 #8
0
 public DuplicateEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     _executable = true;
 }
コード例 #9
0
ファイル: TransformEvent.cs プロジェクト: unhammer/gimp-sharp
 public TransformEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     _executable = true;
 }
コード例 #10
0
ファイル: AddGuideEvent.cs プロジェクト: unhammer/gimp-sharp
        string _units = "#Prc"; // Fix me!

        #endregion Fields

        #region Constructors

        public AddGuideEvent(ActionEvent srcEvent, ObjcParameter myObject)
            : base(srcEvent)
        {
            myObject.Fill(this);
        }
コード例 #11
0
ファイル: SelectionEvent.cs プロジェクト: unhammer/gimp-sharp
 public SelectionEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     Parameters.Fill(this);
       _executable = true;
 }
コード例 #12
0
ファイル: ClearEvent.cs プロジェクト: unhammer/gimp-sharp
 public ClearEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     _executable = true;
 }
コード例 #13
0
ファイル: SelectEvent.cs プロジェクト: unhammer/gimp-sharp
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_obj != null)
            {
                ReferenceType parameter = _obj.Set[0];

                if (parameter is NameType)
                {
                    NameType name = parameter as NameType;

                    switch (name.ClassID2)
                    {
                    case "Chnl":
                        return(new SelectChannelByNameEvent(this, name.Key));

                    case "Lyr":
                        return(new SelectLayerByNameEvent(this, name.Key));

                    case "SnpS":
                        return(new SelectSnapshotEvent(this, name.Key));

                    default:
                        Console.WriteLine("SelectEvent: " + name.ClassID2);
                        break;
                    }
                }
                else if (parameter is PropertyType)
                {
                    PropertyType property = parameter as PropertyType;
                    switch (property.Key)
                    {
                    case "Bckg":
                        return(new SelectLayerByNameEvent(this, "Background"));

                    case "CrnH":
                        return(new SelectCurrentHistoryStateEvent(this));

                    default:
                        Console.WriteLine("Property: " + property.Key);
                        break;
                    }
                }
                else if (parameter is EnmrType)
                {
                    EnmrType enmr = parameter as EnmrType;
                    switch (enmr.Key)
                    {
                    case "Chnl":
                        return(new SelectChannelEvent(this, enmr.Value));

                    case "HstS":
                        return(new SelectHistoryStateEvent(this, enmr.Value));

                    case "Lyr":
                        return(new SelectLayerEvent(this, enmr.Value));

                    case "Mn":
                        return(new SelectMenuItemEvent(this, enmr.Value));

                    default:
                        Console.WriteLine("SelectEvent.Enmr: " + enmr.Key);
                        break;
                    }
                }
                else if (parameter is ReleType)
                {
                    ReleType rele = parameter as ReleType;
                    switch (rele.ClassID2)
                    {
                    case "Dcmn":
                        return(new SelectDocumentEvent(this, rele.Offset));

                    case "HstS":
                        return(new SelectHistoryStateEvent(this, rele.Offset));

                    default:
                        Console.WriteLine("rele.ClassID2: " + rele.ClassID2);
                        break;
                    }
                }
                else if (parameter is IndexType)
                {
                    IndexType index = parameter as IndexType;
                    switch (index.Key)
                    {
                    case "Brsh":
                        return(new SelectBrushByIndexEvent(this, index.Index));

                    case "Chnl":
                        return(new SelectChannelByIndexEvent(this, index.Index));

                    default:
                        Console.WriteLine("SelectEvent index.Key: " + index.Key);
                        break;
                    }
                }
                else if (parameter is ClassType)
                {
                    ClassType type = parameter as ClassType;
                    return(new SelectBrushEvent(this, type.ClassID2));
                }
                else
                {
                    Console.WriteLine("SelectEvent-1: " + parameter);
                }
            }

            return(myEvent);
        }
コード例 #14
0
ファイル: ActionEvent.cs プロジェクト: unhammer/gimp-sharp
 public ActionEvent(ActionEvent srcEvent)
 {
     EventForDisplay = srcEvent.EventForDisplay;
       NumberOfItems = srcEvent.NumberOfItems;
       _parameters = srcEvent._parameters;
 }
コード例 #15
0
ファイル: Action.cs プロジェクト: unhammer/gimp-sharp
 public void Add(ActionEvent actionEvent)
 {
     _set.Add(actionEvent);
 }
コード例 #16
0
        string _units = "#Prc"; // Fix me!

        public AddGuideEvent(ActionEvent srcEvent, ObjcParameter myObject)
            : base(srcEvent)
        {
            myObject.Fill(this);
        }
コード例 #17
0
 public SelectBrushByIndexEvent(ActionEvent srcEvent, int index) :
     base(srcEvent)
 {
     _index = index;
 }
コード例 #18
0
ファイル: AddMaskEvent.cs プロジェクト: unhammer/gimp-sharp
 public AddMaskEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
 }
コード例 #19
0
 public SetChannelPropertyEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     Parameters.Fill(this);
 }
コード例 #20
0
 public MakeBackgroundLayerEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
 }
コード例 #21
0
 public SelectLayerEvent(ActionEvent srcEvent, string mode)
     : base(srcEvent)
 {
     _mode = mode;
 }
コード例 #22
0
 public NewDocumentEvent(ActionEvent srcEvent, ObjcParameter myObject) :
     base(srcEvent)
 {
     myObject.Fill(this);
 }
コード例 #23
0
 public SelectChannelByNameEvent(ActionEvent srcEvent, string name)
     : base(srcEvent)
 {
     _name = name;
 }
コード例 #24
0
 public AddAdjustmentLayerEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
 }
コード例 #25
0
 public AddAdjustmentLayerEvent(ActionEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #26
0
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_object != null && _object is ObjcParameter)
            {
                string classID = (_object as ObjcParameter).ClassID2;

                switch (classID)
                {
                case "AdjL":
                    return(new AddAdjustmentLayerEvent(this));

                case "Chnl":
                    return(new NewChannelEvent(this, _object as ObjcParameter));

                case "Dcmn":
                    return(new NewDocumentEvent(this, _object as ObjcParameter));

                case "Gd":
                    return(new AddGuideEvent(this, _object as ObjcParameter));

                case "Lyr":
                    return(new AddLayerEvent(this));

                default:
                    Console.WriteLine("MakeEvent-2: {0} not implemented", classID);
                    break;
                }
            }
            if (_object != null && _object is TypeParameter)
            {
                return(new AddMaskEvent(this));
            }
            else if (_obj != null)
            {
                ClassType classType = _obj.Set[0] as ClassType;
                switch (classType.ClassID2)
                {
                case "Actn":
                    return(new MakeActionEvent(this));

                case "AdjL":
                    return(new AddAdjustmentLayerEvent(this));

                case "annotation":
                    return(new MakeAnnotationEvent(this));

                case "BckL":
                    return(new MakeBackgroundLayerEvent(this));

                case "contentLayer":
                    return(new MakeContentLayerEvent(this));

                case "layerSection":
                    return(new MakeGroupEvent(this));

                case "Lyr":
                    return(new AddLayerEvent(this));

                case "Path":
                    return(new MakePathEvent(this));

                case "Ptrn":
                    return(new MakePatternEvent(this));

                case "SnpS":
                    return(new MakeSnapshotEvent(this));

                case "Styl":
                    return(new MakeStyleEvent(this));

                case "TxLr":
                    return(new AddTextLayerEvent(this));

                case "TxLy":
                    return(new AddTextLayerEvent(this));

                default:
                    Console.WriteLine("MakeEvent-1: {0} not implemented",
                                      classType.ClassID2);
                    break;
                }
            }
            else
            {
                Console.WriteLine("MakeEvent: Disaster!");
            }

            return(myEvent);
        }
コード例 #27
0
 public NewDocumentEvent(ActionEvent srcEvent, ObjcParameter myObject)
     : base(srcEvent)
 {
     myObject.Fill(this);
 }
コード例 #28
0
 public MoveLayerEvent(ActionEvent srcEvent, string direction)
     : base(srcEvent)
 {
     _direction = direction;
 }
コード例 #29
0
 public SelectHistoryStateEvent(ActionEvent srcEvent, string name) :
     base(srcEvent)
 {
     _name = name;
 }
コード例 #30
0
ファイル: AddMaskEvent.cs プロジェクト: unhammer/gimp-sharp
 public AddMaskEvent(ActionEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #31
0
 public SelectHistoryStateEvent(ActionEvent srcEvent, int offset) :
     base(srcEvent)
 {
     _offset = offset;
 }
コード例 #32
0
ファイル: DeleteEvent.cs プロジェクト: unhammer/gimp-sharp
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_obj != null)
            {
                if (_obj.Set[0] is EnmrType)
                {
                    EnmrType type = _obj.Set[0] as EnmrType;
                    switch (type.Key)
                    {
                    case "Chnl":
                        return(new DeleteChannelEvent(this));

                    case "Gd":
                        return(new DeleteGuideEvent(this, type.Value));

                    case "Lyr":
                        return(new DeleteLayerEvent(this));

                    default:
                        Console.WriteLine("DeleteEvent-1: {0} unknown", type.Key);
                        break;
                    }
                }
                else if (_obj.Set[0] is NameType)
                {
                    NameType type = _obj.Set[0] as NameType;
                    switch (type.ClassID2)
                    {
                    case "Chnl":
                        return(new DeleteChannelByNameEvent(this, type.Key));

                    case "Lyr":
                        return(new DeleteLayerEvent(this));

                    default:
                        Console.WriteLine("DeleteEvent-2: {0} unknown",
                                          type.ClassID2);
                        break;
                    }
                }
                else if (_obj.Set[0] is PropertyType)
                {
                    PropertyType type = _obj.Set[0] as PropertyType;
                    switch (type.ClassID2)
                    {
                    case "Lyr":
                        return(new DeleteLayerByNameEvent(this, type.Key));

                    default:
                        Console.WriteLine("DeleteEvent-3: {0} unknown",
                                          type.ClassID2);
                        break;
                    }
                }
                else if (_obj.Set[0] is IndexType)
                {
                    IndexType type = _obj.Set[0] as IndexType;
                    switch (type.Key)
                    {
                    case "Chnl":
                        return(new DeleteChannelByIndexEvent(this, type.Index));

                    default:
                        Console.WriteLine("DeleteEvent-4: {0} unknown", type.Key);
                        break;
                    }
                }
                else
                {
                    Console.WriteLine("DeleteEvent: " + _obj.Set[0]);
                }
            }
            return(myEvent);
        }
コード例 #33
0
 public SetChannelPropertyEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     Parameters.Fill(this);
 }
コード例 #34
0
 public ClearEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     _executable = true;
 }
コード例 #35
0
ファイル: DuplicateEvent.cs プロジェクト: unhammer/gimp-sharp
 public DuplicateEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     _executable = true;
 }
コード例 #36
0
 public SelectLayerEvent(ActionEvent srcEvent, string mode) : base(srcEvent)
 {
     _mode = mode;
 }
コード例 #37
0
 public DeleteChannelByIndexEvent(ActionEvent srcEvent, int index) :
     base(srcEvent)
 {
     _index = index;
 }
コード例 #38
0
 public void Add(ActionEvent actionEvent)
 {
     _set.Add(actionEvent);
 }
コード例 #39
0
ファイル: MoveEvent.cs プロジェクト: unhammer/gimp-sharp
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_type != null)
            {
                if (_type is ReferenceParameter)
                {
                    ReferenceParameter type = _type as ReferenceParameter;

                    if (type.Set[0] is EnmrType)
                    {
                        EnmrType enmr = type.Set[0] as EnmrType;

                        switch (enmr.Key)
                        {
                        case "Lyr":
                            return(new MoveLayerEvent(this, enmr.Value));

                        default:
                            Console.WriteLine("MoveEvent, unknown key: " + enmr.Key);
                            break;
                        }
                    }
                    else if (type.Set[0] is IndexType)
                    {
                        IndexType index = type.Set[0] as IndexType;
                        switch (index.Key)
                        {
                        case "Lyr":
                            return(new MoveLayerByIndexEvent(this, index.Index));

                        default:
                            Console.WriteLine("MoveEvent, unknown key: " +
                                              index.Key);
                            break;
                        }
                    }
                }
                else if (_type is ObjcParameter)
                {
                    ObjcParameter type = _type as ObjcParameter;

                    if (type.ClassID2 == "Ofst")
                    {
                        return(new MoveOffsetEvent(this, type));
                    }
                    else
                    {
                        Console.WriteLine("MoveEvent-1: " + type.ClassID2);
                    }
                }
                else
                {
                    Console.WriteLine("MoveEvent-2");
                }
            }
            else
            {
                Console.WriteLine("MoveEvent-3");
            }
            return(myEvent);
        }
コード例 #40
0
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_obj != null)
            {
                if (_obj.Set[0] is EnmrType)
                {
                    var type = _obj.Set[0] as EnmrType;

                    switch (type.Key)
                    {
                    case "Chnl":
                        return(new DuplicateChannelEvent(this, type.Value));

                    case "Dcmn":
                        return(new DuplicateDocumentEvent(this, type.Value));

                    case "Lyr":
                        return(new DuplicateLayerEvent(this));

                    default:
                        Console.WriteLine("DuplicateEvent: {0} unknown", type.Key);
                        break;
                    }
                }
                else if (_obj.Set[0] is NameType)
                {
                    var type = _obj.Set[0] as NameType;

                    switch (type.ClassID2)
                    {
                    case "Chnl":
                        return(new DuplicateChannelByNameEvent(this, type.Key));

                    case "Lyr":
                        return(new DuplicateLayerByNameEvent(this, type.Key));

                    default:
                        Console.WriteLine("DuplicateEvent-1: {0} unknown",
                                          type.ClassID2);
                        break;
                    }
                }
                else if (_obj.Set[0] is PropertyType)
                {
                    var type = _obj.Set[0] as PropertyType;

                    switch (type.ClassID2)
                    {
                    case "Lyr":
                        return(new DuplicateLayerByNameEvent(this, type.Key));

                        break;

                    case "Chnl":
                        if (type.Key == "fsel")
                        {
                            return(new DuplicateSelectionEvent(this));
                        }
                        else
                        {
                            Console.WriteLine("Duplicate Channel!");
                        }
                        break;

                    default:
                        Console.WriteLine("DuplicateEvent: {0} unknown", type.Key);
                        break;
                    }
                }
                else
                {
                    Console.WriteLine("DuplicateEvent-2: {0} unknown", _obj.Set[0]);
                }
            }
            return(this);
        }
コード例 #41
0
 public SetFileInfoEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     Parameters.Fill(this);
       _objc.Fill(this);
 }
コード例 #42
0
ファイル: SetEvent.cs プロジェクト: unhammer/gimp-sharp
        override public ActionEvent Parse(ActionParser parser)
        {
            ActionEvent myEvent = base.Parse(parser);

            if (_obj != null)
            {
                if (_obj.Set[0] is PropertyType)
                {
                    PropertyType property = _obj.Set[0] as PropertyType;

                    switch (property.ClassID2)
                    {
                    case "Clr":
                        switch (property.Key)
                        {
                        case "BckC":
                            return(new SetBackgroundColorEvent(this));

                        case "ClrT":
                            return(new SetColorTableEvent(this));

                        case "FrgC":
                            return(new SetForegroundColorEvent(this));

                        default:
                            Console.WriteLine("SetEvent.Clr.Prpr: " + property.Key);
                            break;
                        }
                        break;

                    case "Chnl":
                        if (property.Key == "fsel")
                        {
                            return(new SelectionEvent(this).Parse(parser));
                        }
                        break;

                    case "Lyr":
                        return(new SetLayerPropertyEvent(this));

                    case "Prpr":
                        switch (property.Key)
                        {
                        case "FlIn":
                            return(new SetFileInfoEvent(this));

                        case "Grdn":
                            return(new SetGradientEvent(this));

                        case "Lefx":
                            return(new SetLayerEffectsEvent(this));

                        case "QucM":
                            return(new SetQuickMaskEvent(this));

                        default:
                            Console.WriteLine("SetEvent.Prpr: " + property.Key);
                            break;
                        }
                        break;

                    case "HstS":
                        return(new SetHistoryStateEvent(this));

                        break;

                    default:
                        Console.WriteLine("SetEvent.Parse: " + property.ClassID2);
                        break;
                    }
                }
                else if (_obj.Set[0] is EnmrType)
                {
                    EnmrType enmr = _obj.Set[0] as EnmrType;
                    switch (enmr.Key)
                    {
                    case "AdjL":
                        return(new SetAdjustmentLayerEvent(this));

                    case "Brsh":
                        return(new SetBrushEvent(this));

                    case "Chnl":
                        return(new SetChannelPropertyEvent(this));

                    case "contentLayer":
                        return(new SetContentLayerEvent(this));

                    case "Lyr":
                        return(new SetLayerPropertyEvent(this));

                    case "TxLr":
                        return(new SetTextLayerPropertyEvent(this));

                    default:
                        Console.WriteLine("SetEvent.Parse-1: unknown key " +
                                          enmr.Key);
                        break;
                    }
                }
                else if (_obj.Set[0] is IndexType)
                {
                    IndexType index = _obj.Set[0] as IndexType;
                    switch (index.Key)
                    {
                    case "Chnl":
                        return(new SetChannelToSelectionEvent(this, index.Index));

                    default:
                        Console.WriteLine("SetEvent.Parse-2: unknown key " +
                                          index.Key);
                        break;
                    }
                }
                else if (_obj.Set[0] is NameType)
                {
                    NameType name = _obj.Set[0] as NameType;
                    switch (name.ClassID2)
                    {
                    case "Chnl":
                        return(new SetChannelByNameToSelectionEvent(this, name.Key));

                    case "Lyr":
                        return(new SetLayerPropertyEvent(this, name.Key));

                    default:
                        Console.WriteLine("SetEvent.Parse-3: unknown class " +
                                          name.ClassID2);
                        break;
                    }
                }
                else
                {
                    Console.WriteLine("SetEvent.Parse: {0} unknown type",
                                      _obj.Set[0]);
                }
            }

            return(this);
        }
コード例 #43
0
 public SelectChannelEvent(ActionEvent srcEvent, string name) :
     base(srcEvent)
 {
     _name = name;
 }
コード例 #44
0
 public SelectBrushByIndexEvent(ActionEvent srcEvent, int index)
     : base(srcEvent)
 {
     _index = index;
 }
コード例 #45
0
 public SelectHistoryStateEvent(ActionEvent srcEvent, string name)
     : base(srcEvent)
 {
     _name = name;
 }
コード例 #46
0
ファイル: TransformEvent.cs プロジェクト: unhammer/gimp-sharp
 public TransformEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     _executable = true;
 }
コード例 #47
0
 public SelectHistoryStateEvent(ActionEvent srcEvent, int offset)
     : base(srcEvent)
 {
     _offset = offset;
 }
コード例 #48
0
 public SetFileInfoEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     Parameters.Fill(this);
     _objc.Fill(this);
 }
コード例 #49
0
 public MakeBackgroundLayerEvent(ActionEvent srcEvent) : base(srcEvent)
 {
 }
コード例 #50
0
ファイル: MoveEvent.cs プロジェクト: unhammer/gimp-sharp
 public MoveEvent(ActionEvent srcEvent)
     : base(srcEvent)
 {
     _executable = true;
 }
コード例 #51
0
 public DeleteChannelByIndexEvent(ActionEvent srcEvent, int index)
     : base(srcEvent)
 {
     _index = index;
 }
コード例 #52
0
 public MakeEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     _executable = true;
 }
コード例 #53
0
 public DuplicateChannelEvent(ActionEvent srcEvent, string name)
     : base(srcEvent)
 {
     _name = name;
 }
コード例 #54
0
 public SelectionEvent(ActionEvent srcEvent) : base(srcEvent)
 {
     Parameters.Fill(this);
     _executable = true;
 }
コード例 #55
0
ファイル: MoveLayerEvent.cs プロジェクト: unhammer/gimp-sharp
 public MoveLayerEvent(ActionEvent srcEvent, string direction)
     : base(srcEvent)
 {
     _direction = direction;
 }