Esempio n. 1
0
 public Rect(ref NativeOS.Rect rect)
 {
     MinX = rect.MinX;
     MinY = rect.MinY;
     MaxX = rect.MaxX;
     MaxY = rect.MaxY;
 }
Esempio n. 2
0
            /*! \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));
            }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
            // 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);
            }
Esempio n. 5
0
 /*! \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));
 }
Esempio n. 6
0
 /*! \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));
 }
Esempio n. 7
0
 internal static extern IntPtr Drawfile_Render(Drawfile.RenderFlags flags,
                                               [In] byte [] drawfile,
                                               int size,
                                               [In] OS.Matrix matrix,
                                               ref NativeOS.Rect clip,
                                               int flatness);
Esempio n. 8
0
 internal static extern IntPtr Gadget_GetBBox(uint flags,
                                              uint windowID,
                                              int method,
                                              uint componentID,
                                              out NativeOS.Rect bbox);
Esempio n. 9
0
 internal static extern IntPtr Gadget_MoveGadget(uint flags,
                                                 uint windowID,
                                                 int method,
                                                 uint componentID,
                                                 ref NativeOS.Rect bbox);
Esempio n. 10
0
 internal static extern IntPtr Window_ForceRedraw(uint flags,
                                                  uint WindowID,
                                                  int method,
                                                  ref NativeOS.Rect extent);
Esempio n. 11
0
 internal static extern IntPtr Wimp_SetExtent(
     uint handle,
     [In, MarshalAs(UnmanagedType.Struct)]
     ref NativeOS.Rect extent);
Esempio n. 12
0
 /*! \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));
 }
Esempio n. 13
0
            /*! \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);
            }