shellops.c

Go to the documentation of this file.
00001 
00002 /*  $Id: shellops.c 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #include "frontier.h"
00029 #include "standard.h"
00030 
00031 #include "font.h"
00032 #include "quickdraw.h"
00033 #include "scrollbar.h"
00034 #include "shell.h"
00035 #include "shellprivate.h"
00036 
00037 
00038 
00039 
00040 /*
00041 void shellsetscrollbarinfo (void) {
00042 
00043     register hdlwindowinfo h = shellwindowinfo;
00044     
00045     setscrollbarinfo (
00046         (**h).vertscrollbar, (**h).vertmin, (**h).vertmax, (**h).vertcurrent);
00047 
00048     setscrollbarinfo (
00049         (**h).horizscrollbar, (**h).horizmin, (**h).horizmax, (**h).horizcurrent);
00050     } /%shellsetscrollbarinfo%/
00051 */
00052 
00053 void shellsetdefaultstyle (hdlwindowinfo hinfo) {
00054     
00055     /*
00056     set the defaultstyle field of the windowinfo record based on the bits set in
00057     the selectioninfo record.
00058     
00059     6/28/91 dmb: now use union for style to make things a lot easier
00060     */
00061     
00062     register hdlwindowinfo hw = hinfo;
00063     register short x = (**hw).selectioninfo.fontstyle;
00064     register Style style;
00065     
00066     if (x == 0)
00067         style = normal;
00068     else
00069         style = x ^ (**hw).defaultstyle;
00070     
00071     (**hw).defaultstyle = style;
00072     } /*shellsetdefaultstyle*/
00073 
00074 
00075 void shellsetselectioninfo (void) {
00076     
00077     /*
00078     2/12/92 dmb: keep window's font/size in sync with settings
00079     */
00080     
00081     register hdlwindowinfo hw = shellwindowinfo;
00082     
00083     (*shellglobals.setselectioninforoutine) (); /*fill in selectioninfo record*/
00084     
00085     if (shellwindow != nil) {
00086         
00087         //Code change by Timothy Paustian Monday, August 21, 2000 4:31:49 PM
00088     //Must pass a CGrafPtr to pushport on OS X to avoid a crash
00089     CGrafPtr    thePort;
00090     #if TARGET_API_MAC_CARBON == 1
00091     thePort = GetWindowPort(shellwindow);
00092     #else
00093     thePort = (GrafPtr)shellwindow;
00094     #endif
00095         
00096     pushport (thePort);
00097         
00098         setfontsizestyle ((**hw).selectioninfo.fontnum, (**hw).selectioninfo.fontsize, 0);
00099         
00100         popport ();
00101         }
00102     
00103     (**hw).selectioninfo.fldirty = false; /*consume its dirtyness*/
00104     } /*shellsetselectioninfo*/
00105 
00106 
00107 
00108 
00109 

Generated on Wed May 31 18:20:01 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6