[futurebasic] Quartz on GroupBox

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2007 : Group Archive : Group : All Groups

From: Yoshiyuki Hasegawa <hase44@...>
Date: Tue, 5 Jun 2007 06:40:25 +0900
Hi,

Quartz seems not to be displayed on the "-" ID window and GroupBox.
Please teach the display method.

Thanks.
Yoshiyuki

Test code
'---------------------------
include "Tlbx CoreGraphics.incl"

local fn QuartzDrawLine( wRef as WindowRef )
'~'1
dim as Rect            r
dim as CGContextRef    @ ctx
dim as CGrafPtr          port
dim as OSStatus          ignore

port = fn GetWindowPort( wRef )
ignore = fn GetWindowBounds( wRef, _kWindowContentRgn, @r )

ignore = fn QDBeginCGContext( port, @ctx )

fn CGContextTranslateCTM( ctx, 0.0, r.bottom - r.top )
fn CGContextScaleCTM( ctx, 1.0, -1.0 )

fn CGContextSetLineWidth( ctx, 1.0 )
fn CGContextSetRGBStrokeColor( ctx, 0.0, 0.0, 0.0, 1.0 )

fn CGContextMoveToPoint( ctx, 50, 50 )
fn CGContextAddLineToPoint( ctx, 450, 350 )
fn CGContextStrokePath( ctx )

fn CGContextSynchronize( ctx )

ignore = fn QDEndCGContext( port, ctx )
end fn

local fn MainWnd
dim as Rect   r

SetRect(r, 0, 0, 500, 400)
appearance window -1, "Main Wnd", @r, _kDocumentWindowClass
def SetWindowBackground(_kThemeActiveDialogBackgroundBrush, _zTrue)

SetRect(r, 20, 20, 500-20, 400-20)
appearance button 1, _activeBtn, _kControlSupportsEmbedding,,,, @r,  
_kControlGroupBoxSecondaryTextTitleProc

fn QuartzDrawLine( window(_wndRef) )

appearance window 1

'fn QuartzDrawLine( window(_wndRef) )
end fn

fn MainWnd

do
HandleEvents
until gFBQuit
'----------------------------