Exemple #1
0
        public int OnDockableChange(int fDockable, int x, int y, int w, int h)
        {
            if (this.frame != null)
            {
                // Beta2: There is a bug with the width and height passed to this notification, so
                // for now we get the width and height directly from the frame
                // This is a workaround that should be removed by RTM
                VSSETFRAMEPOS[] pos = new VSSETFRAMEPOS[1];
                Guid            unusedGuid;
                int             unusedX;
                int             unusedY;
                frame.GetFramePos(pos, out unusedGuid, out unusedX, out unusedY, out w, out h);
            }
            this.x        = x;
            this.y        = y;
            this.width    = w;
            this.height   = h;
            this.dockable = (fDockable != 0);

            this.GenerateStatusChangeEvent(this, new EventArgs());

            return(Microsoft.VisualStudio.VSConstants.S_OK);
        }
Exemple #2
0
        public WindowStatus(IVsOutputWindowPane outputWindowPane, IVsWindowFrame frame)
        {
            outputPane = outputWindowPane;
            this.frame = frame;

            if (frame != null)
            {
                VSSETFRAMEPOS[] pos = new VSSETFRAMEPOS[1];
                int             x;
                int             y;
                int             width;
                int             height;
                Guid            unused;
                frame.GetFramePos(pos, out unused, out x, out y, out width, out height);
                this.dockable = (pos[0] & VSSETFRAMEPOS.SFP_fFloat) != VSSETFRAMEPOS.SFP_fFloat;
            }
        }
        public WindowStatus(IVsOutputWindowPane outputWindowPane, IVsWindowFrame frame)
        {
            outputPane = outputWindowPane;
            this.frame = frame;

            if (frame != null)
            {
                VSSETFRAMEPOS[] pos = new VSSETFRAMEPOS[1];
                int x;
                int y;
                int width;
                int height;
                Guid unused;
                frame.GetFramePos(pos, out unused, out x, out y, out width, out height);
                dockable = (pos[0] & VSSETFRAMEPOS.SFP_fFloat) != VSSETFRAMEPOS.SFP_fFloat;
            }
        }
        private void ResizeControl()
        {
            ToolWindowPane listFunctionsWindow = TalkCodePackage.currentPackage.FindToolWindow(typeof(AccessibilityToolWindow), 0, true);

            if ((null == listFunctionsWindow) || (null == listFunctionsWindow.Frame))
            {
                return;
            }

            IVsWindowFrame windowFrame = (IVsWindowFrame)listFunctionsWindow.Frame;

            Guid gui = Guid.Empty;
            int  px, py, pcx, pcy;

            VSSETFRAMEPOS[] vssetArr = { VSSETFRAMEPOS.SFP_fFloat };
            windowFrame.GetFramePos(vssetArr, out gui, out px, out py, out pcx, out pcy);
            MainScrollViewer.Height = pcy;
            MainScrollViewer.Width  = pcx;
        }
Exemple #5
0
 // --------------------------------------------------------------------------------------------
 /// <summary>
 /// Returns the position of the window.
 /// </summary>
 /// <param name="pdwSFP">Pointer to the frame position.</param>
 /// <param name="pguidRelativeTo">Not used.</param>
 /// <param name="px">Pointer to the absolute x ordinate.</param>
 /// <param name="py">Pointer to the absolute y ordinate.</param>
 /// <param name="pcx">Pointer to the x ordinate relative to px.</param>
 /// <param name="pcy">Pointer to the y ordinate relative to py.</param>
 /// <returns>
 /// If the method succeeds, it returns S_OK. If it fails, it returns an error code.
 /// </returns>
 // --------------------------------------------------------------------------------------------
 int IVsWindowFrame.GetFramePos(VSSETFRAMEPOS[] pdwSFP, out Guid pguidRelativeTo, out int px,
                                out int py, out int pcx, out int pcy)
 {
     return(_Frame.GetFramePos(pdwSFP, out pguidRelativeTo, out px, out py, out pcx, out pcy));
 }