public Rect(ref NativeOS.Rect rect) { MinX = rect.MinX; MinY = rect.MinY; MaxX = rect.MaxX; MaxY = rect.MaxY; }
/*! \brief Force a redraw on the area of the window given. * \param [in] area The rectangular area of the window to redraw. * \return Nothing. */ public void ForceRedraw(OS.Rect area) { var rect = new NativeOS.Rect(area); OS.ThrowOnError(NativeMethods.Window_ForceRedraw(0, ID, Method.ForceRedraw, ref rect)); }
public ShowObjectFullSpecBlock(Toolbox.ShowObjectFull spec) { Visible = new NativeOS.Rect(spec.Visible); Scroll = new NativeOS.Coord(spec.Scroll); BehindWindow = spec.StackPosition; WindowFlags = spec.WindowFlags; ParentWindowHandle = spec.ParentWindowHandle; AlignmentFlags = spec.AlignmentFlags; }
// Drag types 8-11 not supported. public DragStartBlock(uint handle, Wimp.DragType type, OS.Rect initial, OS.Rect parent) { WindowHandle = handle; DragType = type; InitialBox = new NativeOS.Rect(initial); ParentBox = new NativeOS.Rect(parent); }
/*! \brief Call the Drawfile RISC OS module to render a draw file to screen. * \param [in] flags Additional rendering options. * \param [in] drawfile A byte array holding the draw file. * \param [in] matrix A standard RISC OS matrix, that allows the draw file to * be translated, rotated, scaled, etc. * \param [in] clip A clipping rectangle to limit the parts of the draw file to * be rendered. Usually used in a Wimp redraw loop. Set to \b null to render all * the draw file. * \param [in] flatness A value defining how smooth curves should be rendered. * \return Nothing. * \note There is no x,y coordinate defining the position to render the draw * file. Instead, the matrix is used to translate the file to the correct * position. * \note The origin of the draw file (ie, point 0,0) is at its bottom left * hand corner. * \note The RISC OS call requires the size in bytes of the draw file. This is * assumed to be the length of the byte array that contains it. */ public static void Render(RenderFlags flags, byte [] drawfile, OS.Matrix matrix, ref NativeOS.Rect clip, int flatness) { OS.ThrowOnError(NativeMethods.Drawfile_Render(flags, drawfile, drawfile.Length, matrix, ref clip, flatness)); }
/*! \brief Find the origin of the window when its state is already known. */ public OS.Coord GetOrigin(ref NativeOS.Rect visible, ref NativeOS.Coord scroll) { return(WimpWindow.GetOrigin(ref visible, ref scroll)); }
internal static extern IntPtr Drawfile_Render(Drawfile.RenderFlags flags, [In] byte [] drawfile, int size, [In] OS.Matrix matrix, ref NativeOS.Rect clip, int flatness);
internal static extern IntPtr Gadget_GetBBox(uint flags, uint windowID, int method, uint componentID, out NativeOS.Rect bbox);
internal static extern IntPtr Gadget_MoveGadget(uint flags, uint windowID, int method, uint componentID, ref NativeOS.Rect bbox);
internal static extern IntPtr Window_ForceRedraw(uint flags, uint WindowID, int method, ref NativeOS.Rect extent);
internal static extern IntPtr Wimp_SetExtent( uint handle, [In, MarshalAs(UnmanagedType.Struct)] ref NativeOS.Rect extent);
/*! \brief Find the origin of the window when its state is already known. */ public OS.Coord GetOrigin(ref NativeOS.Rect visible, ref NativeOS.Coord scroll) { return(new OS.Coord(visible.MinX - scroll.X, visible.MaxY - scroll.Y)); }
/*! \brief Set the work area size of the window. */ public void SetExtent(OS.Rect extent) { var native_extent = new NativeOS.Rect(extent); Wimp.SetExtent(WimpWindow.Handle, ref native_extent); }