Documentation for gcanvas.ew v0.10.5
Table of Contents

Internal

Information for developers


  • const blank_canvas   My standard way of maintaining consistency in reasonably complex sequences
  • var canvas_list   sequence. Maintains a list to of Canvas objects
  • func CI(canvasID)   returns the index into the canvas_list of the canvas with ID canvasID or
  • const C_*   unfortunately named like Euphoria's C_* constants, so might change
  • var debug_draw_bbox   controls whether a BrightRed box is drawn around the extents of all rendered objects
  • proc ev_onScroll   internally set event handler for both types of scroll bar
  • const GC_HSCROLL   and GC_VSCROLL
  • proc gfxCanvasAddScrollButton(canvasID)   Adds the little button that is so natural with two scroll bars present
  • proc gfxCanvasDebugShowBBOX(integer true_or_false)   This is a debug routine which displays an objects bounding box in red around an object.
  • proc gfxCanvasRemoveScrollButton()   Removes the natural scroll bar button
  • proc gfxCanvasUpdateOSB(integer canvasID)   Redraws any objects on the offscreen buffer that need to be shown
  • var last_id   integer. Last id of object added to canvas.
  • var scroll_but_r_id   This remembers the routine id of the event handler for w32HClick on the scroll bar button

    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [const]
    blank_canvas

    My standard way of maintaining consistency in reasonably complex sequences

    Category: Internal

    Defaults are White background, Do AutoScrollBars, and no grid

    See Also: canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [var]
    canvas_list

    sequence. Maintains a list to of Canvas objects

    Category: Internal

    See Also: blank_canvas, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [func]
    CI
    (canvasID)

    returns the index into the canvas_list of the canvas with ID canvasID or

    Returns: the index or -1 if an invalid canvasID

    Category: Internal

    See Also: blank_canvas, canvas_list, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [const]
    C_*

    unfortunately named like Euphoria's C_* constants, so might change

    Category: Internal

    C_ID - the ID of the canvas: all routines use this ID
    C_GFX - the id of the graphex used to DISPLAY the canvas
    C_OFS_X
    C_OFS_Y are the coordinates in the Parent window of the canvas display
    C_WINDOW is the win32lib ID of the parent window of the canvas
    C_BGCOLOR C_BGCOLOUR is the colour that the canvas will be cleared to before rendering
    C_OSB is the hidden graphex used for the full time offscreen buffer
    C_HSCROL_ID is the id of any horizontal scroll bar associated with the canvas
    C_VSCROL_ID is the id of any vertical scroll bar
    C_AUTOSCROL is on by default and controls creating scroll bars if the OSB is bigger than the GFX
    C_DIRTY is used to force repainting under "certain cirumstances" (OK I don't remember right now)
    C_GRID_DATA is the data for the grid, see Grid
    C_PROPERTY is a free form property for the _canvas_ see setGfxCanvasProperty
    C_RECTS is currently reserved
    C_OBJECTS is the list of all the objects in the canvas

    See Also: blank_canvas, canvas_list, CI, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [var]
    debug_draw_bbox

    controls whether a BrightRed box is drawn around the extents of all rendered objects

    Category: Internal

    Used for testing gfxCanvasObjectAt

    See Also: blank_canvas, canvas_list, CI, C_*, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    ev_onScroll

    internally set event handler for both types of scroll bar

    Category: Internal

    updates the canvas offset for each type of scroll bar new value

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [const]
    GC_HSCROLL

    and GC_VSCROLL

    Category: Internal

    help the scroll bar event handler determine which type of scroll bar it is with a userProperty

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    gfxCanvasAddScrollButton
    (canvasID)

    Adds the little button that is so natural with two scroll bars present

    Category: Internal

    Hard to justify making global as the presence of both scroll bars is not guaranteed.

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    gfxCanvasDebugShowBBOX
    (integer true_or_false)

    This is a debug routine which displays an objects bounding box in red around an object.

    Category: Internal

    It is used for working on the gfxCanvasObjectAt routine

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    gfxCanvasRemoveScrollButton
    ()

    Removes the natural scroll bar button

    Category: Internal

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasUpdateOSB, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [proc]
    gfxCanvasUpdateOSB
    (integer canvasID)

    Redraws any objects on the offscreen buffer that need to be shown

    Category: Internal

    This is the place to optimise the speed, needs to only draw what the gfx can show given the objects present and the X and Y offset of the view port

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, last_id, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [var]
    last_id

    integer. Last id of object added to canvas.

    Category: Internal

    Therefore all objects have a unique ID (until the integer overflows?)

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, scroll_but_r_id


    Documentation for gcanvas.ew v0.10.5
    Table of Contents

    [var]
    scroll_but_r_id

    This remembers the routine id of the event handler for w32HClick on the scroll bar button

    Category: Internal

    See Also: blank_canvas, canvas_list, CI, C_*, debug_draw_bbox, ev_onScroll, GC_HSCROLL, gfxCanvasAddScrollButton, gfxCanvasDebugShowBBOX, gfxCanvasRemoveScrollButton, gfxCanvasUpdateOSB, last_id