コード例 #1
0
// --------------------------------------------------------------------------------------
void HandleDrawContent(WindowRef prefsWindow)
{
    RgnHandle visibleRegion;
    ListHandle iconList;

    GetWindowProperty(prefsWindow, kAppSignature, kIconListTag, sizeof(ListHandle), NULL,
                      &iconList);

    visibleRegion = NewRgn();
    GetPortVisibleRegion(GetWindowPort(prefsWindow), visibleRegion);

    if (visibleRegion != NULL)
    {
        Boolean active = IsWindowHilited(prefsWindow);
        SInt16 pixelDepth;
        Boolean isColorDevice;

        if (active)
            SetThemeWindowBackground(prefsWindow, kThemeBrushModelessDialogBackgroundActive,
                                     false);
        else
            SetThemeWindowBackground(prefsWindow,
                                     kThemeBrushModelessDialogBackgroundInactive, false);

        EraseRgn(visibleRegion);
        UpdateControls(prefsWindow, visibleRegion);

        GetWindowDeviceDepthAndColor(prefsWindow, &pixelDepth, &isColorDevice);
        SetThemeBackground(kThemeBrushWhite, pixelDepth, isColorDevice);
        LUpdate(visibleRegion, iconList);
        drawFrameAndFocus(iconList, active, prefsWindow);
        DisposeRgn(visibleRegion);
    }
}
コード例 #2
0
Boolean drawWindowCollapseBox(WindowRef window, Boolean hilite)
{
    /*------------------------------------------------------
        This function draws the collapse box.
        If hilite is true it draws the hiliting as well.
    --------------------------------------------------------*/
    RgnHandle collapseBoxRegion=NewRgn();
    getWindowCollapseBoxRegion(window,collapseBoxRegion);
    EraseRgn(collapseBoxRegion);//clear away old stuff
    if(hilite){
        //do hilighting
    }
    DisposeRgn(collapseBoxRegion);
    return hilite;
}
コード例 #3
0
ファイル: PTPaintView.cpp プロジェクト: MaddTheSane/tntbasic
/*=====================================
	EraseAreaUnderSelection
======================================*/
void PTPaintView::EraseAreaUnderSelection()
{
	if ( !mCurrentSelection->IsEmpty() )
	{
		StSaveGWorld		aSaver;
		
		mCurrentImage->BeginDrawing();
			StColorPenState		aPenState;
			aPenState.Normalize();
			//PmBackColor( mBackColor );
			mCurrentImage->SetBackColor( mBackColor );
			EraseRgn( mCurrentSelection->GetRegion() );		
		mCurrentImage->EndDrawing();
	}
}
コード例 #4
0
Boolean drawWindowZoomBox(WindowRef window, Boolean hilite)
{
    /*------------------------------------------------------
        This function draws the zoom box.
        If hilite is true it draws the hiliting as well.
    --------------------------------------------------------*/
    RgnHandle zoomBoxRegion=NewRgn();
    getWindowZoomBoxRegion(window,zoomBoxRegion);
    EraseRgn(zoomBoxRegion);//clear away old
    //draw zoom Box
    if(hilite)
    {
        //do hilighting
    }
    DisposeRgn(zoomBoxRegion);
    return hilite;
}