view:set-context
List of: Scheme Extensions
Subjects: Viewing
Contents: Graphic Interaction

Action: Sets the rendering context that is displayed in the view.

Filename: gi/gi_scm/view_scm_gi.cxx

Syntax: (view:set-context [view=active]


[context=dl_context])

Arg Types: view view

context string

Returns: boolean

Description: Use this extension to change the rendering_context used to render the PART in the specified view. context is specified as a string. It first removes view from its current rendering context and adds it to the rendering context corresponding to the input string. If the new rendering context does not exist, it is created. If no argument for context is provided, the default is "dl_context".


This extension returns #t if the rendering context change is successful; otherwise, it returns #f.

Limitations: This extension is available on all platforms, but produces results only on NT using OpenGL. Works in OpenGL views only.

Example: ; view:set-context

; Define a new view.

; You must have OpenGL.

(define view1 (view:gl))

;; view1

(define view2 (view:dl))

;; view2

(view:context view1)

;; "gl_context"

(view:context view2)

;; "dl_context"

; Set the rendering_context for the new view.

(view:set-context view2 "dl_context")

;; #[view 1075541080]

(view:context view2)

;; "dl_context"
PDF/GI/03SCV.PDF
HTM/DATA/GI/GI/03SCV/0030.HTM