TweetFollow Us on Twitter

SuperSub
Volume Number:5
Issue Number:6
Column Tag:C Workshop

Related Info: TextEdit

Sub and Superscripting with TE

By Robert McKenzie, Santa Ana, CA

SUPERSCRIPTING AND SUBSCRIPTING IN TE

Robert McKenzie formerly of Mountain Lake Software, Inc. as the project manager of network, file, and multitasking programming tools for ClassKit™, a C++ object-oriented application framework. His career experience of 15 years ranges from programming parallel processor mainframes to desktop computers. For the past two and one half years he has been programming on the Macintosh with emphasis at the network and driver level.

Introduction

This article describes how to encrypt a super/subscripting scheme into the data structures of the new Text Edit manager routines. Adding this scheme requires that one or two trap hooks be intercepted. This is also shown.

It was good to see Apple take a quantum leap from the original TE manager to the new TE manager. But with all the capabilities now built into TE, including color support and style runs, it’s hard to understand why they left out super/subscripting.

An application which finally provoked me to look for a way to add this functionality to TE was a test generation program for teachers called MAKETEST®. In particular, teachers who need to indicate power/base notation need super/subscripting, unless of course they were to be limited to some Fortran-like notation, such as:

 x^3 + y = 5

Data Structures in TE

The method I will describe depends on the new TE manager routines. These routines provide the run styles which are needed to keep the necessary style information on a character by character basis. Trying to manage character by character style information in the old TE manager routines would require a completely different approach.

{1}

 STElement:
 stCount:  INTEGER; 
 stHeight: INTEGER; 
 stAscent: INTEGER; 
 stFont: INTEGER; 
 stFace:  Style; 
 stSize:  INTEGER; 
 stColor: RGBColor; 

The data structure of interest is called an STElement (V-262). A style element in TE is the collection of individual styles common to a sequence of characters in the TE text buffer. Any sequence of characters that share the same combination of styles, whether the sequences are adjacent or not, share the same style element entry in the TE manager’s data structures.

As the TE manager updates the screen it checks where one run ends and another begins. Each time the styles of a character sequence change, the grafport’s font and text information are set to the combination of fonts and styles found in the style element entry for the new style run.

The TE manager does not draw characters one at a time. Once it has set the grafport’s text parameters to the information contained in the style run, it calls the QuickDraw routine ’DrawText’ to draw all the characters within the style run at one time.

Now we have a couple of pieces of information gathered which begin to suggest an approach for supporting super/subscripting within TE:

1) STElements is where style combinations are held. This is where we need to find a place to store the super/subscripting flags.

2) TE always uses ’DrawText’ for displaying one or many characters. This can be verified by using the trap intercept functionality of TMON. By trying to intercept various traps while forcing TE to output to the screen in all the ways it can, you can determine that only DrawText is used.

3) The grafport must be set with all the correct font and style information if the characters are to be drawn correctly with DrawText.

If we are going to use the style element structure to store the super/subscripting flags, we must find some unused bits within one of the fields: stCount, stHeight, stAscent, stFont, stFace, stSize, or stColor. Super/subscripting requires a 3 state representation: super/sub/normal. Therefore, we need 2 bits which can represent up to 4 states.

The stStyle field seems like a likely place to look, especially since it is the field used to represent the standard styles. However, being a 7-bit set type it only leaves 1 unused bit. Not enough.

The stCount, stHeight, stAscent, and stSize fields contain numeric values used to compute character spacing for any given combination of styles. If we tried to encode super/subscripting in one of these fields it would alter the values computed in the character spacing calculations. The unpredictability of when one of these fields might be used makes these fields particularly messy to use.

It might be possible to use the stColor field if we imposed some constraints on the color schemes that could be used. For example, if we used bits 0 and 1 within the stColor field, that would mean that the other entries in the color table would have to be organized such that if 0-2 were added to it we would still get the same color. Otherwise, for example, if a user was typing with green characters and chose only super/subscripting from the menu, the super/subscripted character might come out as, say, red instead of green. Of course you’d have to be very familiar with the Color manager in order to create a color table to avoid this problem. (See the Color manager of Inside Mac-V for more information on the Color manager.)

This leaves only the stFont field as a place for these super/subscripting bits to live. To know if this is possible we have to know how the font number is used. The most important point is how the font number is used to look up the character characteristics of the various fonts. When QuickDraw is called to output text, as when DrawText is called, it passes the font number to the Font manager to get the font description information. The font number is checked against fonts that are already loaded. If the font is loaded, a handle to the font description information is given back to QuickDraw for its use. If it isn’t loaded, then the font number is given to the Resource manager and, again, a handle is returned to QuickDraw. Great. With this knowledge we now have a well defined event in which an attempt to use the field we have altered can be intercepted, the super/subscripting bits temporarily masked, and the normal TE character processing sequence can then go on. Of course using 2 bits within the stFont field also causes constraints on the range of usable font values. Without tabulating all the existing font numbers in the world this constraint seems quite reasonable.

Choosing the Super/Subscripting Bits

The font number is a 16-bit integer which allows for approximately 32K fonts. That’s a lot of fonts for people to choose from. Most of the fonts that I know of are assigned increasing values starting at 0 (0 is the systemfont), so obviously we don’t want to use any of the low ordered bits within the font field. It’s also the case that many programmers assign a field to be a negative value when its meaning is to be temporarily or permanently changed. Therefore, I chose not to use bit 15 either. The two best bits to use are bits 13 and 14 of the integer field.

The corresponding value for each bit is:

 13:   8192
 14:  16384

This means that no fonts with numbers between 8192 and 16384 can be used if we reserve these bits for super/subscripting. Does anybody know of such fonts? (My knowledge of font number assignment is limited.) Of course, giving the user a choice of over 8K fonts to choose from is still plenty.

Setting the Super/Subscripting Bits

Setting the super/subscripting bits is done quite easily, and in a straightforward manner using the normal TE manager style setting function. An example is shown in the ‘doEditing’ function in the source listing given.

First I defined some C constants which define the 3 states of super/subscripting:

 SUPER  0x4000   /* THE 14th BIT */
 SUB    0x2000   /* THE 13th BIT */
 REGULAR0x1FFF /* BITS 0 - 12    */

When the user chooses one of these states, the existing font information is retrieved by using the function:

/* 2 */

 TEGetStyle((**TEH).selStart-1,
 &Styl,&lhgt,&ascent,TEH)

In each case the old super/subscripting information is cleared with the bitwise AND operator:

 Styl.tsFont &= REGULAR;

In the case of normal scripting this is all that needs to be done before resetting the style. If super or subscripting is chosen, the appropriate bit is set with an OR operator:

 Styl.tsFont |= SUPER;

or

 Styl.tsFont |= SUB;

Then all that needs to be done is to set the new style:

/* 3 */

 TESetStyle(doFont,&Style,1,TEH);

Shifting characters up or down

To make use of the bits that we just set we need to hook into the QuickDraw DrawText function. It is when this function is called that we will make our move and fool the TE manager into shifting the characters appropriately. Hooking into the DrawText trap will be explained in the next section.

But once our intercept routine has been called what do we do? We make use of point 3 from the ‘Data Structures in TE’ section which states that the grafport is set correctly just before the text is about to be drawn. When set, the grafport’s font field will contain the font value set in the Styl.tsFont field above including our super/subscripting bits. Therefore, the hook routine can get the font value from the grafport, test it for having either the super/subscripting bit set, and adjust the grafport’s pen location appropriately. (See Figure 2) The complete routine is then:

/* 4 */

 DrawTextHook(...)
 ...
 {
 register int  fnt,offset;
 GrafPtrgptr;

 GetPort(&gptr);
 fnt  = gptr->txFont;
 
 offset = ((fnt & SUPER) 
 ? -3 
 : ((fnt & SUB) 
 ? 3 
 : 0));

 if (offset)
 { Move(0,offset);
 TextFont(fnt & REGULAR);
 }

 DrawText(text,pos,cnt);

 if (offset)
 { Move(0,-offset);
 TextFont(fnt);
 }
 }

Notice the first TextFont call resets the grafport’s font to the expected font by stripping the subscripting bits. The text is drawn and, if needed, the pen loc and grafport font is restored to the state previously set by the TE manager.

Intercepting the DrawText/GetResource traps

Setting up trap hooks requires knowledge of assembly and stack management, particularly when mixing languages like I have done in this project. My programming was done under MPW using assembly and the GreenHill C compiler. Trap intercepting is itself a topic of interest. Here I will explain the important points as related to super/subscripting.

The DrawText hook is used to call our DrawTextHook function described above. The GetResource hook is used to keep QuickDraw from being confused by a strange font value found in a style run. The GetResource hook will be called as the TE manager tries to setup the grafport with the character attributes of a style run before it calls DrawText. Trying to set up the grafport with an unknown font number is the same well-defined event as described earlier.

When GetDrawTrapInfo and GetResTrapInfo are called at application startup time they merely calculate trap information, such as the amount of data space the trap needs, its code size, and its beginning location. These values are used to set up the hook functions in the system heap as required.

As seen in the assembly source listing, the data space definitions only force the assembler to output the correct code. Actual allocation of data space for the hook routine must be done by the SetupHook function. The actual trap code is between the TrapBeg and TrapEnd labels. This is the code copied down into the system heap.

Neither of these trap hooks is reentrant. Therefore, a call-level variable, ‘CLvl’, must be maintained in order to keep track of how deeply any calls to these routines are nested. If the CLvl becomes greater than one, then it should do nothing except act like the standard trap.

When the toolbox calls the DrawText trap, we have to take care of transforming the Pascal-oriented parameters on the stack to MPW-C parameters. The Pascal call to DrawText has the form:

 DrawText(textPtr,firstByte,byteCount);

where:

textptr: is a 32-bit pointer

firstByte: is a 16-bit integer

byteCount: is a 16-bit integer

And, of course, the parameters get pushed onto the stack from left to right which would leave the stack in the condition:

Return Address: RRRR 4 bytes

byteCount: BB 2 bytes

firstByte: FF 2 bytes

TextPtr: PPPP 4 bytes

When calling a C routine, integers must be treated as 32-bit integers. Therefore the DrawText hook has a little stack management to do. (See Figure 1) First it saves the return address of the original caller and adjusts the stack pointer. Then it temporarily copies the byteCount value into D0 without altering the stack pointer. Then to transform the firstByte value to a 32-bit integer, it simply zeros out the high order word of the stack. Now the stack contains only the firstByte and textPtr parameters. Next the byteCount value in D0 is extended to be a 32-bit integer and its value is pushed back on the stack.

Figure. 1

C parameters are pushed on the stack from right to left. Instead of trying to correct the ordering problem on the stack, and unnecessarily wasting time, we can just take advantage of this knowledge and declare our DrawTextHook with its parameters in the reverse order. Therefore the omitted parameters to DrawTextHook above would be:

/* 5 */

                        DrawTextHook(cnt,pos,text)
                                    int       cnt;
                                    int       pos;
                                    char    *text;
                        { ...
                        }

I was writing and finishing this article just as the latest tech notes from Apple were issued. Tech Note #207 describes additional functionality added to the TE manager in System 6.0. The significant addition with respect to this article is the TEDrawHook. It provides exactly the same kind of functionality that was required when writing the hook routine to intercept DrawText. The TEDrawHook function is provided with the same parameters, plus some, that is needed by the DrawTextHook function. Therefore, the DrawTextHook could be used as the definition for this now supported TE hook.

The essence of the GetResource hook is much simpler. The only thing we have to do here is to keep the Font manager from returning bogus font information when given an altered font number with our super/subscripting bits set.

We know that the Font manager is trying to look up font description information when it calls GetResource with a resource type of ‘FOND’. Therefore, any time GetResource is called with this type, and following our constraint that no fonts in the range 8192 to 16384 will be allowed, then all the GetResource hook has to do is mask out the 13th and 14th bit of the font number where it sits on the stack. (See Figure 2) Once these bits are cleared, then we just let the Resource manager continue to do its thing.

Figure 2.

Summary Remarks

A scheme to add the functionality of super/subscripting was presented. However, there are many alterations that can be made to this scheme in order to refine the functionality into a more word processing-like functionality. For example super/subscripted characters in this basic scheme are printed in the same point size and with a fixed offset of 3 points. A more sophisticated approach would be to reduce the point size of shifted characters and allow the user to choose how many points to offset the shifted characters.

However, beware that if these extra capabilities are added, you will also have to handle having the correct font description resources loaded correctly and, perhaps, reposition the pen loc more carefully. Otherwise, character blurring may occur.

Listing: DoMake

make > MakeMiniEdit
MakeMiniEdit
Listing: MakeFile

MiniEditƒƒwindows.c.o
 MiniEdit.c.o    
 SuperSub.c.o    
 TrapDefs.a.o    
 TrapHook.c.o
link -bf  
 windows.c.o
 MiniEdit.c.o    
 SuperSub.c.o    
 TrapHook.c.o    
 TrapDefs.a.o    
 “{clibraries}cruntime.o” 
 “{clibraries}cinterface.o” 
 “{libraries}interface.o” 
 -o MiniEdit
 
windows.c.o ƒ  windows.c  
 MiniEdit.h
 c -g windows.c

MiniEdit.c.o     ƒ MiniEdit.c 
 MiniEdit.h 
 TrapHook.h
 c -g MiniEdit.c
 
SuperSub.c.o   ƒ SuperSub.c 
 TrapHook.h
 c -g SuperSub.c

TrapHook.c.o   ƒ TrapHook.c 
 TrapHook.h
 c -g TrapHook.c
 
TrapDefs.a.o   ƒ TrapDefs.a
 asm -case obj TrapDefs.a
Listing: TrapDefs.a

;**********************************************************
;
;TrapDefs.a
;
;**********************************************************

 PRINT  OFF
 INCLUDE‘Traps.a’
 INCLUDE‘SysEqu.a’
 PRINT  ON,OBJ
 
 CODEREFS FORCEJT

StackFrameRECORD {A6Link},DECR
 DataSizePtr:    ds.l1
 TrapSizePtr:  ds.l1
 TrapAddrPtr:  ds.l1
 retaddr: ds.l 1
 A6Link:ds.l1
 stacksize: EQU  *
 ENDR
; ==============================================

GetDrawTrapInfo PROC EXPORT

 WITH StackFrame
 link a6,#stacksize
 move.l DataSizePtr(a6),a0; compute size of parm’s.
 lea    ParmEnd-ParmBeg,a1; put it in a ‘c’ var
 move.l a1,(a0)  
 move.l TrapSizePtr(a6),a0; compute size of trap 
 lea    TrapEnd-TrapBeg,a1; put it in a ‘c’ var
 move.l a1,(a0)  ; put hook address ...
 move.l TrapAddrPtr(a6),a0
 lea    TrapBeg,a1 ; in a ‘c’ variable.
 move.l a1,(a0)
 unlk a6
 rts
 ENDWITH

ParmBeg
SvRTS   dc.l0  ; place holder for compiling.
FcAdr   dc.l0  ; place holder for compiling.
TpAdr   dc.l0  ; place holder for compiling.
CLvl    dc.l0  ; place holder for compiling.
ParmEnd

; The following block of code actually gets copied down into 
; the SysHeap due to trap table nearness requirements...
 
TrapBeg lea CLvl,a0; keep track of nested hook calls.
 addq.w #1,(a0); see how many calls deep we are.
 cmpi.w #1,(a0)  ; just call trap if call level > 1.
 bgt.s  CallTrap 
CallHooklea SvRTS,a0 ; save address to get back too...
 move.l (a7)+,(a0); save ‘len’ parm to ‘DrawText’
 move.w  (a7),d0 ; ‘clr.w’ trans‘offset’ to ‘int’
 clr.w  (a7) ; transform ‘len’ parm to MPW-C ‘int’.
 ext.l  d0; put ‘len’ parm back on stack.
 move.l d0,-(a7) ; get out address of our trap.
 move.l FcAdr,a0 ; call with MPW-C stack parms. 
 jsr    (a0); do a ‘pascal’ clean up.
 add.l  #12,a7   
 lea    CLvl,a0; indicate exit of nested call.
 subi.w #1,(a0)  ; setup jump to original caller.
 move.l SvRTS,a0 ; get out of here!!
 jmp  (a0)
CallTraplea CLvl,a0; indicate exit of nested call.
 subi.w #1,(a0)  ; just call standard trap.
 move.l TpAdr,a0 ; this won’t come back here.
 jmp  (a0)
TrapEnd

 ENDPROC
; ==============================================

GetResTrapInfo PROCEXPORT

 WITH StackFrame
 link   a6,#stacksize
 move.l DataSizePtr(a6),a0; compute size of parm’s.
 lea    ParmEnd-ParmBeg,a1; put it in a ‘c’ var
 move.l a1,(a0)  
 move.l TrapSizePtr(a6),a0; compute size of trap 
 lea    TrapEnd-TrapBeg,a1; put it in a ‘c’ var
 move.l a1,(a0)  
 move.l TrapAddrPtr(a6),a0; put hook address ...
 lea    TrapBeg,a1 ; in a ‘c’ variable.
 move.l a1,(a0)  
 unlk a6
 rts
 ENDWITH
 
ParmBeg
SvRTS   dc.l0  ; place holder for compiling.
FcAdr   dc.l0  ; place holder for compiling.
TpAdr   dc.l0  ; place holder for compiling.
CLvl    dc.l0  ; place holder for compiling.
ParmEnd

FontID  EQU 4

; The following block of code actually gets copied down into 
; the SysHeap due to trap table nearness requirements...

TrapBeg lea CLvl,a0 ; keep track of nested hook calls.
 addi.w #1,(a0)  ; see how many calls deep we are.
 cmpi.w #1,(a0); just call trap if call level > 1.
 bgt.s  CallTrap 
CallHook: ; unload the resType from the stack.
 move.l 6(a7),d0 ; check it for type ‘FOND’.
 cmpi.l #’FOND’,d0 ; do nothing if it isn’t.
 bne.s  CallTrap; else - clear special super/sub bits
 ; so FontMgr gets Font info of a known Font.
 andi.w #$1FFF,FontID(a7) 
 
CallTrap:leaCLvl,a0; indicate exit of nested call.
 subi.w #1,(a0)  ; just call standard trap.
 move.l TpAdr,a0; this won’t come back here.
 jmp  (a0)
TrapEnd
 ENDPROC
; ==============================================

UnChainHook PROC EXPORT
 WITH StackFrame
 link   a6,#stacksize
 move.l TrapSizePtr(a6),a0; compute size of trap 
 lea    TrapEnd-NormTrap,a1 ; put it in a ‘c’ var
 move.l a1,(a0)  
 move.l TrapAddrPtr(a6),a0; put hook address ...
 lea    NormTrap,a1; put it in a ‘c’ variable.
 move.l a1,(a0)  
 unlk a6
 rts
 ENDWITH

SvRTS   dc.l0  ; place holder for compiling.
FcAdr   dc.l0  ; place holder for compiling.
TpAdr   dc.l0  ; place holder for compiling.
CLvl    dc.l0  ; place holder for compiling.

NormTrap; just call standard trap.
 move.l TpAdr,a0 ; this won’t come back here.
 jmp  (a0)
TrapEnd 
 ENDPROC
 END
Listing: TrapHook.h

/**********************************************************
 TrapHook.h
**********************************************************/

#define SUPER    0x4000
#define SUB 0x2000
#define REGULAR  0x1FFF

typedef 
 struct TrapHookRecord
 { long SvRTS;
 long FuncAddress;
 long TrapAddress;
 long HookCallLevel;
 long Code;
 } TrapHookRecord, *TrapHookPointer;
Listing:  TrapHook.c

/*********************************************************
 TrapHook.c
*********************************************************/

#include “TrapHook.h”
#include <Memory.h>
#include <Menus.h>
#include <strings.h>

#define DrawCharNum0x083

extern long InsertHookAddr;
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetupHook(InfoFunc,HookFunc,
 TrapNum,HookAddr,NormalTrap)
 int    (*InfoFunc)();
 long   HookFunc;
 int    TrapNum;
 TrapHookPointer *HookAddr;
 long   *NormalTrap;
{
 int    ParamsSize;
 int    CodeSize;
 long   CodeAddr;
 long   OldZone;
 
 (*InfoFunc)(&CodeAddr,&CodeSize,&ParamsSize);
 
 /*  MAKE SURE TRAP HOOK IS IN SYS HEAP... */
 OldZone = (long)GetZone();
 SetZone (SystemZone());
 *HookAddr = (TrapHookPointer)
 NewPtr(ParamsSize + CodeSize);
 SetZone (OldZone);
 
 *NormalTrap= GetTrapAddress(TrapNum);
 (**HookAddr).FuncAddress = HookFunc;
 (**HookAddr).TrapAddress = *NormalTrap;
 (**HookAddr).HookCallLevel = 0;
 BlockMove(CodeAddr,&((**HookAddr).Code),CodeSize);
 
 SetTrapAddress(&((**HookAddr).Code),TrapNum);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

UnsetTrapHook(HookAddr)
 TrapHookPointer HookAddr;
{
 int  CodeSize;
 long CodeAddr;

 UnChainHook(&CodeAddr,&CodeSize);
 
 BlockMove(CodeAddr,&(HookAddr->Code),CodeSize);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
Listing: windows.c

/*********************************************************
 Windows.c
*********************************************************/

/* NEEDED TO DEFINE NEW TEXTEDIT ROUTINES IN TEXTEDIT.H */
#define __ALLNU__

#include <QuickDraw.h>
#include <Types.h>
#include <Windows.h>
#include <TextEdit.h>
#include <Controls.h>
#include <Events.h>
#include <fonts.h>
#include <toolutils.h>

#include “MiniEdit.h”

extern WindowRecordwRecord;
extern WindowPtr   myWindow;
extern ControlHandle vScroll;
extern TEHandle    TEH;
extern char    dirty;
extern Str255    theFileName;
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetUpWindows()
{
 Rect   destRect, viewRect;
 Rect   vScrollRect;
 FontInfo myInfo;
 int    height;
 TextStyleStyl;
 
 myWindow = GetNewWindow(windowID,&wRecord, (WindowPtr)-1L);
 SetPort(myWindow);
 
 vScrollRect     = (*myWindow).portRect;
 vScrollRect.left  = vScrollRect.right-15;
 vScrollRect.right += 1;
 vScrollRect.bottom  -= 14;
 vScrollRect.top -= 1;
 vScroll  = NewControl(myWindow, &vScrollRect, 
 “”, 1, 0, 0, 0, scrollBarProc, 0L);

 viewRect = qd.thePort->portRect;
 viewRect.right  -= SBarWidth;
 viewRect.bottom -= SBarWidth;
 InsetRect(&viewRect, 4, 4);
 
 TEH    = TEStylNew( &viewRect, &viewRect );
 Styl.tsFont   = newYork;
 Styl.tsSize   = 14;
 TESetStyle(doSize+doFont,&Styl,1,TEH);
 
 SetView(qd.thePort);
 dirty = 0;
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

AdjustText ()
{
 int    oldScroll, newScroll, delta;
 
 oldScroll  = (**TEH).viewRect.top - (**TEH).destRect.top;
 newScroll  = GetCtlValue(vScroll) * (**TEH).lineHeight;
 delta  = oldScroll - newScroll;
 
 if (delta != 0)
   TEScroll(0, delta, TEH);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetVScroll()
{
 register int  n,lines;
 
 lines = linesInView(TEH,NULL);

 n = (**TEH).nLines-lines;

 if (((**TEH).teLength > 0) && 
 ((*((**TEH).hText))[(**TEH).teLength-1]==’\r’))
 n++;

 SetCtlMax(vScroll, n > 0 ? n : 0);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

ShowSelect()
{
 register int    topLine, bottomLine, theLine, lines;
 
 SetVScroll();
 AdjustText();
 
 lines = linesInView(TEH,NULL);
 
 topLine  = GetCtlValue(vScroll);
 bottomLine = topLine + lines;
 
 if ((**TEH).selStart < (**TEH).lineStarts[topLine] ||
 (**TEH).selStart >= 
 (**TEH).lineStarts[bottomLine])
 {
 for (theLine = 0; 
   (**TEH).selStart >= (**TEH).lineStarts[theLine];
   theLine++)
 ;
 
 SetCtlValue(vScroll, theLine - lines / 2);
 AdjustText();
 }
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

linesInView(TEHdl,above)
 TEHandle TEHdl;
 int    *above;
{
 register LHHandle LHHdl;
 register LHPtr  LHptr;
 register int    nLines,before,within;
 Rect   dest,view;
 
 dest   = (**TEHdl).destRect;
 view   = (**TEHdl).viewRect;
 
 LHHdl  = (**GetStylHandle(TEHdl)).lhTab;
 nLines = (**TEHdl).nLines;
 before = 0;
 
 HLock(LHHdl);
 LHptr = *LHHdl;
 
 while ((dest.top < 0) && (before < nLines))
 dest.top += LHptr[before++].lhHeight;
 
 within = before;
 
 while ((dest.top < view.bottom) && (within < nLines))
 dest.top += LHptr[within++].lhHeight;
 HUnlock(LHHdl);
 
 if (above) *above = before;
 within -= before;
 
 return(within);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetView(w)
 WindowPtr w;
{
 (**TEH).viewRect  = w->portRect;
 (**TEH).viewRect.right   -= SBarWidth;
 (**TEH).viewRect.bottom  -= SBarWidth;
 InsetRect(&(**TEH).viewRect, 4, 4);

 (**TEH).destRect.right   = (**TEH).viewRect.right;
 
 TECalText(TEH);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

UpdateWindow(theWindow)
 WindowPtrtheWindow;
{
 GrafPtrsavePort;
 
 GetPort( &savePort );
 SetPort( theWindow );
 
 BeginUpdate( theWindow );
 EraseRect(&theWindow->portRect);
 DrawControls( theWindow );
 DrawGrowIcon( theWindow );
 TEUpdate( &theWindow->portRect, TEH );
 EndUpdate( theWindow );
 
 SetPort( savePort );
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

pascal void ScrollProc(theControl, theCode)
 ControlHandle theControl;
 int    theCode;
{
 int  pageSize;
 int  scrollAmt;
 int  lines;
 
 if (theCode == 0)
 return;
 
 lines = linesInView(TEH,NULL);
 
 pageSize = lines - 1;
 
 switch (theCode)
 {
 case inUpButton: 
 scrollAmt = -1;
 break;
 case inDownButton: 
 scrollAmt = 1;
 break;
 case inPageUp: 
 scrollAmt = -pageSize;
 break;
 case inPageDown: 
 scrollAmt = pageSize;
 break;
 }
 
 SetCtlValue( theControl, GetCtlValue(theControl)+scrollAmt );
 AdjustText();

}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

DoContent(theWindow, theEvent)
 WindowPtrtheWindow;
 EventRecord*theEvent;
{
 int    cntlCode;
 ControlHandle   theControl;
 int    pageSize;
 GrafPtrsavePort;
 
 GetPort(&savePort);
 SetPort(theWindow);
 GlobalToLocal( &theEvent->where );
 
 if ((cntlCode = FindControl(&theEvent->where,
  theWindow, &theControl)) == 0)
 {
 if (PtInRect( &theEvent->where, &(**TEH).viewRect ))
 TEClick( &theEvent->where, 
 (theEvent->modifiers & shiftKey )!=0, 
 TEH);
 }
 else 
 if (cntlCode == inThumb)
 {
 TrackControl(theControl, &theEvent->where, 0L);
 AdjustText();
 }
 else
 TrackControl(theControl, 
 &theEvent->where, ScrollProc);

 SetPort(savePort);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

MyGrowWindow( w, p )
 WindowPtr  w;
 Point   p;
{
 GrafPtrsavePort;
 long   theResult;
 int    oScroll,b,r;
 Rect   rct, oView;
 
 GetPort( &savePort );
 SetPort( w );

 b = qd.screenBits.bounds.bottom;
 r = qd. screenBits.bounds.right;

 SetRect(&rct, 80, 80, r, b);
 theResult = GrowWindow( w, p, &rct );
 
 if (theResult == 0)
   return;
   
 SizeWindow( w, LoWord(theResult), HiWord(theResult), 1);

 InvalRect(&w->portRect);
 oView  = (**TEH).viewRect;
 oScroll  = GetCtlValue(vScroll);
 
 SetView(w);
 HidePen();
 MoveControl(vScroll,
 w->portRect.right - SBarWidth,w->portRect.top-1);
 SizeControl(vScroll, SBarWidth+1,w->portRect.bottom - 
 w->portRect.top-(SBarWidth-2));
 ShowPen();

 SetVScroll();
 AdjustText();
 
 SetPort( savePort );
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

CloseMyWindow()
{
 HideWindow( myWindow );
 TESetSelect( 0, (**TEH).teLength, TEH );
 TEDelete( TEH );
 SetVScroll();
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
Listing: SuperSub.c

/*********************************************************
 SuperSub.c
*********************************************************/

#include <QuickDraw.h>
#include <Types.h>
#include <Fonts.h>
#include <Windows.h>
#include <Menus.h>
#include <TextEdit.h>
#include <Dialogs.h>
#include <Events.h>
#include <Desk.h>
#include <Files.h>
#include <ToolUtils.h>
#include <Controls.h>
#include <strings.h>

#include “traphook.h”

extern TEHandle  TEH;
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

DrawTextHook(cnt,pos,text)
 int    cnt;
 int    pos;
 char   *text;
{
 register int  fnt,offset;
 GrafPtr  gptr;
 
 GetPort(&gptr);
 fnt = gptr->txFont;
 
 offset = ((fnt & SUPER) ? -3 : ((fnt & SUB) ? 3 : 0));
 
 if (offset)
 { Move(0,offset);
 TextFont(fnt & REGULAR);
 }
 
 DrawText(text,pos,cnt);
 
 if (offset)
 { Move(0,-offset);
 TextFont(fnt);
 }
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
Listing:  MiniEdit.h

/*********************************************************
 MiniEdit.h
*********************************************************/

#define windowID 128
#define ErrorAlert 256
#define AdviseAlert257

/* resource IDs of menus */
#define appleID  128
#define fileID   129
#define editID   130

/* Edit menu command indices */
#define cutCommand 1
#define copyCommand2
#define pasteCommand 3
#define TimesCommand 5
#define GenevaCommand6
#define NewYorkCommand  7
#define s9Command9
#define s10Command 10
#define s12Command 11
#define s14Command 12
#define s18Command 13
#define plainCommand 15
#define ulineCommand 16
#define boldCommand17
#define italicCommand18
#define shadowCommand19
#define SuperCommand 20
#define RegularCommand  21
#define SubCommand 22

/* Menu indices */
#define appleM   0
#define fileM    1
#define editM    2

#define fmQuit   1

#define aaSave   1
#define aaDiscard
#define aaCancel 3

#define SBarWidth15

#define NULL     0L
Listing:  MiniEdit.c

/*********************************************************
 MiniEdit.c
*********************************************************/

/* NEEDED TO DEFINE NEW TEXTEDIT ROUTINES IN TEXTEDIT.H */
#define __ALLNU__

#include <QuickDraw.h>
#include <Types.h>
#include <Fonts.h>
#include <Windows.h>
#include <Menus.h>
#include <TextEdit.h>
#include <Dialogs.h>
#include <Events.h>
#include <Desk.h>
#include <Files.h>
#include <ToolUtils.h>
#include <Controls.h>
#include <resources.h>
#include <strings.h>
#include <Scrap.h>

#include “MiniEdit.h”
#include “TrapHook.h”

#define DrawCharNum0x085
#define GetRes   0x1A0

WindowRecordwRecord;
WindowPtr myWindow;
TEHandleTEH;
Rect    dragRect = { 0, 0, 1024, 1024 };
MenuHandlemyMenus[3];
ControlHandle    vScroll;
Cursor  editCursor;
Cursor  waitCursor;
char    dirty;
EventRecord myEvent;
intbaseoffset = 0;
TrapHookPointer  InsertHookAddr;
TrapHookPointer  ResHook;
long    NormalTrap;
long    ResTrap;

GetDrawTrapInfo();
GetResTrapInfo();
DrawTextHook();
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

main() 
{
 int    myRsrc;

 InitGraf(&qd.thePort);
 InitFonts();
 FlushEvents( everyEvent, 0 );
 InitWindows();
 InitMenus();
 TEInit();
 InitDialogs(0L);
 InitCursor();
 MaxApplZone();
 
 SetUpCursors();
 SetUpMenus();
 SetUpWindows();
 
 SetupHook(GetDrawTrapInfo,DrawTextHook,
 DrawCharNum,&InsertHookAddr,&NormalTrap);
 SetupHook(GetResTrapInfo,NULL,
 GetRes,&ResHook,&ResTrap);
 
 while (MainEvent());
 
 UnsetTrapHook(InsertHookAddr);
 UnsetTrapHook(ResHook);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

doMouse(myEvent)
 EventRecord   *myEvent;
{
 WindowPtrwhichWindow;
 
 switch (FindWindow( &myEvent->where, &whichWindow ))
 {
 case inDesk: 
 break;
 case inGoAway:
 if (ours(whichWindow))
 if (TrackGoAway( myWindow, 
 myEvent->where) )
 /*DoFile(fmClose) */
 ;
 break;
 case inMenuBar:
 return( DoCommand( 
 MenuSelect(myEvent->where) ) );
 case inSysWindow:
 SystemClick( &myEvent, whichWindow );
 break;
 case inDrag:
 if (ours(whichWindow))
 DragWindow( whichWindow, 
 &myEvent->where, &dragRect );
 break;
 case inGrow:
 if (ours(whichWindow))
 MyGrowWindow( whichWindow, 
 &myEvent->where );
 break;
 case inContent:
 if (whichWindow != FrontWindow())
 SelectWindow(whichWindow);
 else 
 if (ours(whichWindow))
 DoContent(whichWindow, &myEvent);
 break;
 default: ;
 }
 
 return(1);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

doKey(myEvent)
 EventRecord*myEvent;
{
 register char theChar;
 
 theChar = myEvent->message & charCodeMask;
 if ((myEvent->modifiers & cmdKey) != 0) 
 return( DoCommand( MenuKey( theChar ) ));
 else
 {
 TEKey( theChar, TEH );
 ShowSelect();
 dirty = 1;
 }
 
 return(1);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

doActivate(myEvent)
 EventRecord*myEvent;
{
 Rect   rct;

 if (ours((WindowPtr)myEvent->message))
 {
 rct    = (*myWindow).portRect;
 rct.top  = rct.bottom - (SBarWidth+1);
 rct.left = rct.left - (SBarWidth+1);
 InvalRect(&rct);
 
 if ( myEvent->modifiers & activeFlag )
 {
 TEActivate( TEH );
 ShowControl( vScroll );
 TEFromScrap();
 }
 else
 {
 TEDeactivate(TEH);
 HideControl( vScroll );
 ZeroScrap();
 TEToScrap();
 }
 }
 
 return(1);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

int MainEvent() 
{
 WindowPtrwhichWindow;
 
 MaintainCursor();
 MaintainMenus();
 
 SetTrapAddress(NormalTrap,DrawCharNum);
 SetTrapAddress(ResTrap,GetRes);
 
 SystemTask();
 
 SetTrapAddress(&(InsertHookAddr->Code),
 DrawCharNum);
 SetTrapAddress(&(ResHook->Code),GetRes);
 
 TEIdle(TEH);
 if (GetNextEvent(everyEvent, &myEvent))
 {
 switch (myEvent.what)
 { case mouseDown:
 return(doMouse(&myEvent));
 break;
 case keyDown:
 case autoKey: 
 return(doKey(&myEvent));
 break;
 case activateEvt:
 return(doActivate(&myEvent));
 break;
 case updateEvt: 
 if (ours((WindowPtr)myEvent.message))
 UpdateWindow(myWindow);
 break;
 default: ;
 }
 }
 
 return(1);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetUpMenus()
{
 int    i;
 
 myMenus[appleM] = NewMenu( appleID, “\024” );
 AddResMenu( myMenus[appleM], ‘DRVR’ );
 
 myMenus[fileM] = GetMenu(fileID);
 myMenus[editM] = GetMenu(editID);
 
 for ( (i=appleM); (i<=editM); i++ ) InsertMenu(myMenus[i], 0) ;
 
 DrawMenuBar();
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

doEditing(theItem)
 int    theItem;
{
 WindowPeek wPtr;
 TextStyleStyl;
 int    lhgt,ascent;

 wPtr = (WindowPeek) FrontWindow();
 
 switch (theItem)
 { case cutCommand:
 TECut( TEH );
 dirty = 1;
 break;
 case copyCommand:
 TECopy( TEH );
 break;
 case pasteCommand:
 TEPaste( TEH );
 dirty = 1;
 break;
 
 case TimesCommand:
 Styl.tsFont = times;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 case GenevaCommand:
 Styl.tsFont = geneva;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 case NewYorkCommand:
 Styl.tsFont = newYork;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 
 case s9Command:
 Styl.tsSize = 9;
 TESetStyle(doSize,&Styl,1,TEH);
 break;
 case s10Command:
 Styl.tsSize = 10;
 TESetStyle(doSize,&Styl,1,TEH);
 break;
 case s12Command:
 Styl.tsSize = 12;
 TESetStyle(doSize,&Styl,1,TEH);
 break;
 case s14Command:
 Styl.tsSize = 18;
 TESetStyle(doSize,&Styl,1,TEH);
 break;
 case s18Command:
 Styl.tsSize = 24;
 TESetStyle(doSize,&Styl,1,TEH);
 break;
 
 case plainCommand:
 Styl.tsFace = 0;
 TESetStyle(doFace,&Styl,1,TEH);
 break;
 case boldCommand:
 TEGetStyle((**TEH).selStart,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFace |= bold;
 TESetStyle(doFace,&Styl,1,TEH);
 break;
 case ulineCommand:
 TEGetStyle((**TEH).selStart,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFace |= underline;
 TESetStyle(doFace,&Styl,1,TEH);
 break;
 case italicCommand:
 TEGetStyle((**TEH).selStart,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFace |= italic;
 TESetStyle(doFace,&Styl,1,TEH);
 break;
 case shadowCommand:
 TEGetStyle((**TEH).selStart,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFace |= shadow;
 TESetStyle(doFace,&Styl,1,TEH);
 break;
 
 case SuperCommand:
 TEGetStyle((**TEH).selStart-1,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFont &= REGULAR;
 Styl.tsFont |= SUPER;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 case RegularCommand:
 TEGetStyle((**TEH).selStart-1,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFont &= REGULAR;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 case SubCommand:
 TEGetStyle((**TEH).selStart-1,
 &Styl,&lhgt,&ascent,TEH);
 Styl.tsFont &= REGULAR;
 Styl.tsFont |= SUB;
 TESetStyle(doFont,&Styl,1,TEH);
 break;
 
 default: ;
 }
 ShowSelect();
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

int DoCommand( mResult )
 long mResult;
{
 int    theItem;
 Str255 name;
 
 theItem = LoWord( mResult );
 switch (HiWord(mResult))
 { case appleID:
 GetItem(myMenus[appleM], theItem, &name);
 OpenDeskAcc( &name );
 SetPort( myWindow );
 break;
 case fileID:
 if (theItem == fmQuit) return(0);
 break;
 case editID: 
 if (SystemEdit(theItem-1)==0)
 doEditing(theItem);
 break;
 }
 HiliteMenu(0);
 return(1);
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

MaintainCursor()
{
 Point  pt;
 WindowPeek wPtr;
 GrafPtrsavePort;
 Rect   TERect;
 
 wPtr = (WindowPtr)(WindowPeek)FrontWindow();
 
 if (ours(wPtr))
 { GetPort( &savePort );
 SetPort( (GrafPtr)wPtr );
 
 GetMouse(&pt);
 TERect = (**TEH).viewRect;

 if ( PtInRect(&pt, &TERect)  )
 SetCursor( &editCursor);
 else 
 InitCursor();
 
 SetPort( savePort );
 }
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

MaintainMenus()
{
 if ( !(*(WindowPeek)myWindow).visible || 
 !ours(FrontWindow()) )
 {
 EnableItem( myMenus[editM], cutCommand );
 EnableItem( myMenus[editM], copyCommand );
 }
 else
 {
 if ((**TEH).selStart==(**TEH).selEnd) {
 DisableItem( myMenus[editM], cutCommand );
 DisableItem( myMenus[editM], copyCommand );
 }
 else
 {
 EnableItem( myMenus[editM], cutCommand );
 EnableItem( myMenus[editM], copyCommand );
 }
 }
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

SetUpCursors()
{
 CursHandle hCurs;
 
 hCurs  = GetCursor(1);
 editCursor = **hCurs;
 hCurs  = GetCursor(watchCursor);
 waitCursor = **hCurs;
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

ours(w)
 WindowPtr w;
{
 return( (myWindow!=NULL) && (w==myWindow) );
}
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */

 
AAPL
$101.67
Apple Inc.
+1.91
MSFT
$44.48
Microsoft Corpora
+0.40
GOOG
$521.48
Google Inc.
+0.63

MacTech Search:
Community Search:

Software Updates via MacUpdate

RestoreMeNot 2.0.3 - Disable window rest...
RestoreMeNot provides a simple way to disable the window restoration for individual applications so that you can fine-tune this behavior to suit your needs. Please note that RestoreMeNot is designed... Read more
Macgo Blu-ray Player 2.10.9.1750 - Blu-r...
Macgo Mac Blu-ray Player can bring you the most unforgettable Blu-ray experience on your Mac. Overview Macgo Mac Blu-ray Player can satisfy just about every need you could possibly have in a Blu-ray... Read more
Apple iOS 8.1 - The latest version of Ap...
The latest version of iOS can be downloaded through iTunes. Apple iOS 8 comes with big updates to apps you use every day, like Messages and Photos. A whole new way to share content with your family.... Read more
TechTool Pro 7.0.5 - Hard drive and syst...
TechTool Pro is now 7, and this is the most advanced version of the acclaimed Macintosh troubleshooting utility created in its 20-year history. Micromat has redeveloped TechTool Pro 7 to be fully 64... Read more
PDFKey Pro 4.0.2 - Edit and print passwo...
PDFKey Pro can unlock PDF documents protected for printing and copying when you've forgotten your password. It can now also protect your PDF files with a password to prevent unauthorized access and/... Read more
Yasu 2.9.1 - System maintenance app; per...
Yasu was originally created with System Administrators who service large groups of workstations in mind, Yasu (Yet Another System Utility) was made to do a specific group of maintenance tasks... Read more
Hazel 3.3 - Create rules for organizing...
Hazel is your personal housekeeper, organizing and cleaning folders based on rules you define. Hazel can also manage your trash and uninstall your applications. Organize your files using a... Read more
Autopano Giga 3.7 - Stitch multiple imag...
Autopano Giga allows you to stitch 2, 20, or 2,000 images. Version 3.0 integrates impressive new features that will definitely make you adopt Autopano Pro or Autopano Giga: Choose between 9... Read more
MenuMeters 1.8 - CPU, memory, disk, and...
MenuMeters is a set of CPU, memory, disk, and network monitoring tools for Mac OS X. Although there are numerous other programs which do the same thing, none had quite the feature set I was looking... Read more
Coda 2.5 - One-window Web development su...
Coda is a powerful Web editor that puts everything in one place. An editor. Terminal. CSS. Files. With Coda 2, we went beyond expectations. With loads of new, much-requested features, a few... Read more

Latest Forum Discussions

See All

Clips Review
Clips Review By Jennifer Allen on October 21st, 2014 Our Rating: :: CONVENIENT PASTINGUniversal App - Designed for iPhone and iPad Making copying and pasting more powerful than usual, Clips is a great way to move stuff around.   | Read more »
MonSense Review
MonSense Review By Jennifer Allen on October 21st, 2014 Our Rating: :: ORGANIZED FINANCESiPhone App - Designed for the iPhone, compatible with the iPad Organize your finances with the quick and easy to use, MonSense.   | Read more »
This Week at 148Apps: October 13-17, 201...
Expert App Reviewers   So little time and so very many apps. What’s a poor iPhone/iPad lover to do? Fortunately, 148Apps is here to give you the rundown on the latest and greatest releases. And we even have a tremendous back catalog of reviews; just... | Read more »
Angry Birds Transformers Review
Angry Birds Transformers Review By Jennifer Allen on October 20th, 2014 Our Rating: :: TRANSFORMED BIRDSUniversal App - Designed for iPhone and iPad Transformed in a way you wouldn’t expect, Angry Birds Transformers is a quite... | Read more »
GAMEVIL Announces the Upcoming Launch of...
GAMEVIL Announces the Upcoming Launch of Mark of the Dragon Posted by Jessica Fisher on October 20th, 2014 [ permalink ] Mark of the Dragon, by GAMEVIL, put | Read more »
Interview With the Angry Birds Transform...
Angry Birds Transformers recently transformed and rolled out worldwide. This run-and-gun title is a hit with young Transformers fans, but the ample references to classic Transformers fandom has also earned it a place in the hearts of long-time... | Read more »
Hail to the King: Deathbat Review
Hail to the King: Deathbat Review By Rob Thomas on October 20th, 2014 Our Rating: :: SO FAR AWAYUniversal App - Designed for iPhone and iPad Hail to the King: Deathbat may feel like “Coming Home” for Avenged Sevenfold’s faithful,... | Read more »
Find Free Food on Campus with Ypay
Find Free Food on Campus with Ypay Posted by Jessica Fisher on October 20th, 2014 [ permalink ] iPhone App - Designed for the iPhone, compatible with the iPad | Read more »
Strung Along Review
Strung Along Review By Jordan Minor on October 20th, 2014 Our Rating: :: GOT NO STRINGSUniversal App - Designed for iPhone and iPad A cool gimmick and a great art style keep Strung Along from completely falling apart.   | Read more »
P2P file transferring app Send Anywhere...
File sharing services like Dropbox have security issues. Email attachments can be problematic when it comes to sharing large files. USB dongles don’t fit into your phone. Send Anywhere, a peer-to-peer file transferring application, solves all of... | Read more »

Price Scanner via MacPrices.net

Deals on 2011 13-inch MacBook Airs, from $649
Daily Steals has the Mid-2011 13″ 1.7GHz i5 MacBook Air (4GB/128GB) available for $699 with a 90 day warranty. The Mid-2011 13″ 1.7GHz i5 MacBook Air (4GB/128GB SSD) is available for $649 at Other... Read more
2013 15-inch 2.0GHz Retina MacBook Pro availa...
B&H Photo has leftover previous-generation 15″ 2.0GHz Retina MacBook Pros now available for $1599 including free shipping plus NY sales tax only. Their price is $400 off original MSRP. B&H... Read more
Updated iPad Prices
We’ve updated our iPad Air Price Tracker and our iPad mini Price Tracker with the latest information on prices and availability from Apple and other resellers, including the new iPad Air 2 and the... Read more
Apple Pay Available to Millions of Visa Cardh...
Visa Inc. brings secure, convenient payments to iPad Air 2 and iPad mini 3as well as iPhone 6 and 6 Plus. Starting October 20th, eligible Visa cardholders in the U.S. will be able to use Apple Pay,... Read more
Textkraft Pocket – the missing TextEdit for i...
infovole GmbH has announced the release and immediate availability of Textkraft Pocket 1.0, a professional text editor and note taking app for Apple’s iPhone. In March 2014 rumors were all about... Read more
C Spire to offer iPad Air 2 and iPad mini 3,...
C Spire on Friday announced that it will offer iPad Air 2 and iPad mini 3, both with Wi-Fi + Cellular, on its 4G+ LTE network in the coming weeks. C Spire will offer the new iPads with a range of... Read more
Belkin Announces Full Line of Keyboards and C...
Belkin International has unveiled a new lineup of keyboard cases and accessories for Apple’s newest iPads, featuring three QODE keyboards and a collection of thin, lightweight folios for both the... Read more
Verizon offers new iPad Air 2 preorders for $...
Verizon Wireless is accepting preorders for the new iPad Air 2, cellular models, for $100 off MSRP with a 2-year service agreement: - 16GB iPad Air 2 WiFi + Cellular: $529.99 - 64GB iPad Air 2 WiFi... Read more
Price drops on refurbished Mac minis, now ava...
The Apple Store has dropped prices on Apple Certified Refurbished previous-generation Mac minis, with models now available starting at $419. Apple’s one-year warranty is included with each mini, and... Read more
Apple refurbished 2014 MacBook Airs available...
The Apple Store has Apple Certified Refurbished 2014 MacBook Airs available for up to $180 off the cost of new models. An Apple one-year warranty is included with each MacBook, and shipping is free.... Read more

Jobs Board

Project Manager / Business Analyst, WW *Appl...
…a senior project manager / business analyst to work within our Worldwide Apple Fulfillment Operations and the Business Process Re-engineering team. This role will work Read more
*Apple* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
Position Opening at *Apple* - Apple (United...
…customers purchase our products, you're the one who helps them get more out of their new Apple technology. Your day in the Apple Store is filled with a range of Read more
Position Opening at *Apple* - Apple (United...
**Job Summary** At the Apple Store, you connect business professionals and entrepreneurs with the tools they need in order to put Apple solutions to work in their Read more
Position Opening at *Apple* - Apple (United...
**Job Summary** The Apple Store is a retail environment like no other - uniquely focused on delivering amazing customer experiences. As an Expert, you introduce people Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.