

#ifdef MACVERSION 
#include <standard.h>
#endif

#ifdef WIN95VERSION 
#include "standard.h"
#endif

#include "font.h"
#include "quickdraw.h"
#include "scrollbar.h"
#include "shell.h"
#include "shellprivate.h"




/*
void shellsetscrollbarinfo (void) {

	register hdlwindowinfo h = shellwindowinfo;
	
	setscrollbarinfo (
		(**h).vertscrollbar, (**h).vertmin, (**h).vertmax, (**h).vertcurrent);

	setscrollbarinfo (
		(**h).horizscrollbar, (**h).horizmin, (**h).horizmax, (**h).horizcurrent);
	} /*shellsetscrollbarinfo*/


void shellsetdefaultstyle (hdlwindowinfo hinfo) {
	
	/*
	set the defaultstyle field of the windowinfo record based on the bits set in
	the selectioninfo record.
	
	6/28/91 dmb: now use union for style to make things a lot easier
	*/
	
	register hdlwindowinfo hw = hinfo;
	register short x = (**hw).selectioninfo.fontstyle;
	register Style style;
	
	if (x == 0)
		style = normal;
	else
		style = x ^ (**hw).defaultstyle;
	
	(**hw).defaultstyle = style;
	} /*shellsetdefaultstyle*/


void shellsetselectioninfo (void) {
	
	/*
	2/12/92 dmb: keep window's font/size in sync with settings
	*/
	
	register hdlwindowinfo hw = shellwindowinfo;
	
	(*shellglobals.setselectioninforoutine) (); /*fill in selectioninfo record*/
	
	if (shellwindow != nil) {
		
		//Code change by Timothy Paustian Monday, August 21, 2000 4:31:49 PM
	//Must pass a CGrafPtr to pushport on OS X to avoid a crash
	CGrafPtr	thePort;
	#if TARGET_API_MAC_CARBON == 1
	thePort = GetWindowPort(shellwindow);
	#else
	thePort = (GrafPtr)shellwindow;
	#endif
		
	pushport (thePort);
		
		setfontsizestyle ((**hw).selectioninfo.fontnum, (**hw).selectioninfo.fontsize, 0);
		
		popport ();
		}
	
	(**hw).selectioninfo.fldirty = false; /*consume its dirtyness*/
	} /*shellsetselectioninfo*/





