Inheritance: IDisposable
Exemple #1
0
        public virtual bool getDisplayExtent(int doc, int gs, Floats box)
        {
            bool ret = touchvgPINVOKE.MgCoreView_getDisplayExtent__SWIG_1(swigCPtr, doc, gs, Floats.getCPtr(box));

            if (touchvgPINVOKE.SWIGPendingException.Pending)
            {
                throw touchvgPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #2
0
        public virtual bool getBoundingBox(Floats box)
        {
            bool ret = touchvgPINVOKE.MgCoreView_getBoundingBox__SWIG_0(swigCPtr, Floats.getCPtr(box));

            if (touchvgPINVOKE.SWIGPendingException.Pending)
            {
                throw touchvgPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #3
0
        public virtual bool getBoundingBox(int doc, int gs, Floats box, int shapeId)
        {
            bool ret = touchvgPINVOKE.MgCoreView_getBoundingBox__SWIG_2(swigCPtr, doc, gs, Floats.getCPtr(box), shapeId);

            if (touchvgPINVOKE.SWIGPendingException.Pending)
            {
                throw touchvgPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #4
0
        public virtual bool displayToModel(Floats d)
        {
            bool ret = touchvgPINVOKE.MgCoreView_displayToModel(swigCPtr, Floats.getCPtr(d));

            if (touchvgPINVOKE.SWIGPendingException.Pending)
            {
                throw touchvgPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #5
0
        public virtual bool showContextActions(Ints actions, Floats buttonXY, float x, float y, float w, float h)
        {
            bool ret = (SwigDerivedClassHasMethod("showContextActions", swigMethodTypes5) ? touchvgPINVOKE.GiView_showContextActionsSwigExplicitGiView(swigCPtr, Ints.getCPtr(actions), Floats.getCPtr(buttonXY), x, y, w, h) : touchvgPINVOKE.GiView_showContextActions(swigCPtr, Ints.getCPtr(actions), Floats.getCPtr(buttonXY), x, y, w, h));

            if (touchvgPINVOKE.SWIGPendingException.Pending)
            {
                throw touchvgPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #6
0
 public bool getBoundingBox(Floats box)
 {
     bool ret = touchvgcsPINVOKE.GiCoreView_getBoundingBox(swigCPtr, Floats.getCPtr(box));
     if (touchvgcsPINVOKE.SWIGPendingException.Pending) throw touchvgcsPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #7
0
 public virtual int readFloatArray(string name, Floats values) {
   int ret = touchvgPINVOKE.MgStorageBase_readFloatArray(swigCPtr, name, Floats.getCPtr(values));
   if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Exemple #8
0
 public bool getBoundingBox(Floats box, int shapeId)
 {
     bool ret = touchvgPINVOKE.GiCoreView_getBoundingBox__SWIG_1(swigCPtr, Floats.getCPtr(box), shapeId);
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #9
0
 //! 得到指定ID的图形的包络框显示坐标
 public Rect GetShapeBox(int sid)
 {
     Floats box = new Floats(4);
     return ToBox(box, CoreView.getBoundingBox(box, sid));
 }
Exemple #10
0
        //! 视图坐标转为模型坐标
        public bool DisplayToModel(Rect rect)
        {
            Floats p = new Floats((float)rect.Left, (float)rect.Top,
                (float)rect.Right, (float)rect.Bottom);
            bool ret = CoreView.displayToModel(p);

            rect.X = p.get(0);
            rect.Y = p.get(1);
            rect.Width = p.get(2) - rect.X;
            rect.Height = p.get(3) - rect.Y;

            return ret;
        }
Exemple #11
0
 public virtual bool getDisplayExtent(int doc, int gs, Floats box)
 {
     bool ret = touchvgPINVOKE.MgCoreView_getDisplayExtent__SWIG_1(swigCPtr, doc, gs, Floats.getCPtr(box));
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #12
0
 public virtual bool getBoundingBox(int doc, int gs, Floats box, int shapeId)
 {
     bool ret = touchvgPINVOKE.MgCoreView_getBoundingBox__SWIG_2(swigCPtr, doc, gs, Floats.getCPtr(box), shapeId);
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #13
0
 public virtual bool displayToModel(Floats d)
 {
     bool ret = touchvgPINVOKE.MgCoreView_displayToModel(swigCPtr, Floats.getCPtr(d));
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #14
0
 public static int getDimensions(GiCoreView coreView, Floats vars, Chars types)
 {
     int ret = touchvgcsPINVOKE.EduCmds_getDimensions(GiCoreView.getCPtr(coreView), Floats.getCPtr(vars), Chars.getCPtr(types));
     if (touchvgcsPINVOKE.SWIGPendingException.Pending) throw touchvgcsPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #15
0
 public override bool showContextActions(Ints actions, Floats buttonXY,
     float x, float y, float w, float h)
 {
     hideContextActions();
     if (buttonCaptions == null)
         buttonCaptions = Resource1.basic_actions.Split(new Char[] { ',' });
     if (actions != null && !createActionImages(actions, buttonXY))
         createActionButtons(actions, buttonXY);
     return isContextActionsVisible();
 }
Exemple #16
0
 public virtual void writeFloatArray(string name, Floats values) {
   touchvgPINVOKE.MgStorageBase_writeFloatArray(swigCPtr, name, Floats.getCPtr(values));
   if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
 }
Exemple #17
0
 internal static HandleRef getCPtr(Floats obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Exemple #18
0
 public virtual bool getBoundingBox(Floats box)
 {
     bool ret = touchvgPINVOKE.MgCoreView_getBoundingBox__SWIG_0(swigCPtr, Floats.getCPtr(box));
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #19
0
        //! 视图坐标转为模型坐标
        public bool DisplayToModel(Point pt)
        {
            Floats p = new Floats((float)pt.X, (float)pt.Y);
            bool ret = CoreView.displayToModel(p);

            pt.X = p.get(0);
            pt.Y = p.get(1);
            return ret;
        }
Exemple #20
0
 public virtual bool showContextActions(Ints actions, Floats buttonXY, float x, float y, float w, float h)
 {
     bool ret = (SwigDerivedClassHasMethod("showContextActions", swigMethodTypes5) ? touchvgPINVOKE.GiView_showContextActionsSwigExplicitGiView(swigCPtr, Ints.getCPtr(actions), Floats.getCPtr(buttonXY), x, y, w, h) : touchvgPINVOKE.GiView_showContextActions(swigCPtr, Ints.getCPtr(actions), Floats.getCPtr(buttonXY), x, y, w, h));
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
Exemple #21
0
 //! 得到指定ID的图形的模型坐标范围
 public Rect getModelBox(int sid)
 {
     Floats box = new Floats(4);
     return ToBox(box, CoreView.getModelBox(box, sid));
 }
Exemple #22
0
            private void createActionButtons(Ints actions, Floats buttonXY)
            {
                if (ActionButtons == null)
                    ActionButtons = new List<Button>();

                int actionCount = actions.count();
                for (int i = 0; i < actionCount; i++)
                {
                    int cmdIndex = actions.get(i);
                    if (cmdIndex >= buttonCaptions.Length)
                        continue;

                    string cmdName = buttonCaptions[cmdIndex];

                    Button button = new Button()
                    {
                        Content = cmdName,
                        Tag = cmdIndex,
                        Width = cmdName.Length * 14 + 8,
                        Height = 24
                    };
                    button.Click += new RoutedEventHandler(button_Click);
                    _owner.TempCanvas.Children.Add(button);
                    Canvas.SetLeft(button, buttonXY.get(2 * i) - button.Width / 2);
                    Canvas.SetTop(button, buttonXY.get(2 * i + 1) - button.Height / 2);
                    ActionButtons.Add(button);
                }
            }
Exemple #23
0
 private Rect ToBox(Floats box, bool ret)
 {
     return !ret ? new Rect() : new Rect(box.get(0), box.get(1),
             box.get(2) - box.get(0), box.get(3) - box.get(1));
 }
Exemple #24
0
 internal static HandleRef getCPtr(Floats obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Exemple #25
0
 public override bool showContextActions(Ints actions, Floats buttonXY,
     float x, float y, float w, float h)
 {
     ClearActions();
     if (actions != null && !createActionImages(actions, buttonXY))
         createActionButtons(actions, buttonXY);
     return isContextActionsVisible();
 }
Exemple #26
0
        //! 得到当前图形的各种度量尺寸
        public string getDimensions(float[] vars)
        {
            Floats v = new Floats(vars.Length);
            Chars types = new Chars(vars.Length);
            int n = EduCmds.getDimensions(CoreView, v, types);

            if (n > 0)
            {
                StringBuilder buf = new StringBuilder(n);
                for (int i = 0; i < n; i++)
                {
                    buf.Append(v.get(i));
                    vars[i] = v.get(i);
                }
                return buf.ToString();
            }
            return "";
        }
Exemple #27
0
            private bool createActionImages(Ints actions, Floats buttonXY)
            {
                int actionCount = actions.count();
                for (int i = 0; i < actionCount; i++)
                {
                    int cmdIndex = actions.get(i);
                    if (cmdIndex >= buttonCaptions.Length)
                        continue;

                    ImageSource imageSource = WPFImageSourceHelper.Instance.ActionImageSource(cmdIndex);
                    if (imageSource == null)
                        continue;

                    string cmdName = buttonCaptions[cmdIndex];
                    System.Diagnostics.Trace.WriteLine(string.Format("{0},{1}", cmdIndex, cmdName));

                    Image image = new Image()
                    {
                        Source = imageSource,
                        ToolTip = cmdName,
                        Tag = cmdIndex,
                        Width = imageSource.Width,
                        Height = imageSource.Height
                    };
                    image.MouseDown += new MouseButtonEventHandler(image_MouseDown);
                    _owner.TempCanvas.Children.Add(image);
                    Canvas.SetLeft(image, buttonXY.get(2 * i) - image.Width / 2);
                        Canvas.SetTop(image, buttonXY.get(2 * i + 1) - image.Height / 2);
                        ActionImages.Add(image);
                    ActionImages.Add(image);
                }

                return actionCount == 0 || ActionImages.Count > 0;
            }
Exemple #28
0
 public override bool getDisplayExtent(Floats box)
 {
     bool ret = touchvgPINVOKE.GiCoreView_getDisplayExtent(swigCPtr, Floats.getCPtr(box));
     if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }