TweetFollow Us on Twitter

Printing XCMD
Volume Number:6
Issue Number:7
Column Tag:XCMD Corner

Related Info: Print Manager

Printing Primer

By Donald Koscheka, Contributing Editor

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

Printing Primer

This month, I revisit the wonderful and often misunderstood world of printing from Hypercard. I can’t imagine how much effort is spent generating simple reports for users, but the other day, I was working with a PC programmer who was absolutely enthralled with the fact that he could draw boxes around paragraphs of text in a report. As Mac People, we tend to take aesthetics for granted, yet scores of otherwise great programmers simply lose it when it comes to printing. This month, I will present a “printing primer” for Hypercard and hopefully you will be able to use these ideas in your own stacks.

Printing is as simple as drawing to the screen, only harder. The added complexity stems from the fact that printing requires page management -- page breaks, physical page layout and the like.

One approach to page management that you might find useful is to create a series of report generation commands, a mini-report program generator, if you will. You generate reports by issuing a sequence of commands from HyperTalk. Listings 1 & 2, “ReportUtils.c” , exemplify such a scheme. ReportUtils is a collection of generic printing routines that you can use in your XCMDs as well as in applications that you create from scratch. ReportUtils consists of two parts: (1) parsing code to translate commands from the input stream and (2) formatting code that allows you some modicum of control over the report’s layout (you should enhance the code to satisfy your particular criteria). Due to space limitations, I can only offer a sampling of what this report generator can do. Beyond that, please read the source code for details. Printing is easy and like all programming jobs, the best way to learn it is to do it.

Creating a report now becomes a simple matter of executing the report generation commands in the correct order. You start by invoking the command “BeginReport( listing 3 ). BeginReport initializes the report generation environment and creates some resources that will be needed by the other XCMDs in this suite. As long as the report remains open, you can send the report a series of formatting and printing commands. I have provided some examples in the following listings but it should also be fun to create your own suite of commands. When you want to close the report, you invoke the XCMD, “EndReport” (listing 4).

In Macintosh parlance, opening a report means opening access to the printer driver, creating a job record and opening a printing document. BeginReport tracks all of the data needed for the report generator in a special “print record” (see listing 2). which it places in the system heap. Note that Begin report puts up the print dialog so that the user can exercise some control over the print job. This step is optional; you can initialize the job dialog yourself and bypass the user interface as MPW does. Bypassing the user interface allows you to print multiple documents without user intervention. If you are writing the world’s greatest word processor, please make this an option for your user.

The special record alluded to earlier is declared as struct of type pInfo in ReportUtils.h. All information about this print job is stored here and you can add fields to this record as needed. I store this information in the system heap or in the system resource file so that any XCMD can get at the information quickly. With arguing this approach on its merits, it is an effective method for sharing information among several XCMDs. I keep track of rather mundane stuff -- where the pen is on the page, the page margins, the current drawing style (curntStyle), the default style and foot noting information. Of course, we also store the print Record, the status record and the printer’s grafPort as this information will be needed by the print manager and quickdraw.

The important thing to keep in mind about the pInfo record is that any XCMD in the reporting suite can access it because BeginReport stores the record as a resource in the system file with the call to addSystemResource (published previously). Any XCMD that wishes to participate in the report generation need only get a copy of this handle, set the port to prPort and manage the other fields in the record.

BeginReport initializes the fields in this record and opens up the document which will be closed in one of two ways: (1) EndReport is invoked or (2) the maximum of 128 pages in a document is exceeded in which case the current document is closed, the page count is recycled (totalpages) and a new document is opened. Tracking the document pages independently of the printed pages ensures that page numbers don’t print modulo 128.

HyperReportMaker allows you to set up footnotes with up to 4 fields on up to two lines. Each line contains two fields, one on the right side of the page, the other on the left (I call this “split” justification because I don’t know the printer’s term for a line where the center is left blank).

As you print text, you might want to change the style. This is done using the SetStyle command (listing 5). Printing is fairly routine and is handled by PrintParagraph (listing 6) and PrintTitle (listing 7). A sample control XCMD is shown in EjectPage (listing 8) which shows how to force a form feed at any time during printing. This is useful when you want to include data for one card on each page. Once the information for a given card is printed, eject the page and move to the next card. HyperReportMaker includes XCMDs for setting margins, printing headers and printing footnotes. Unfortunately space precludes including these in the column. If you need the code, get this month’s source disk. If you can’t wait for the source disk, you should be able to wire the code together from ReportUtils.c.

When you are done with the report, you shut it down by invoking endReport. This XCMD shuts down the current page and document, executes the spooler (PrPicFile) if needed and removes the printing resource from the system resource file. BeginReport and EndReport must therefore bracket all of the commands that you wish to use to compose a report from a Hypertalk script. Invoking a report command outside of this bracketing won’t cause an error but it won’t do anything either.

There are several ways that you can embellish this code -- try adding a command to print pictures or to add page frames or to improve any of the listings. By all means, please experiment. Read the code and try to find out what the limits are, and then break them!

One last note: I’m hosting a new service - an XCMD programmer’s SIG on America-On-Line. I’m available to answer questions about my code (but rarely to defend it). Stop by for a visit or an informal chat. My address is “AFC Donald”.

Listing 1:  PrintUtils.h

/*******************************************\
*file:  PrintUtils.h *
*version: 1.0ß   *
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/
 /********************************************/
 /*-- CONSTANTS -- */
 /********************************************/

#define CARDTRUE
#define BKGND    FALSE
#define NULL0x00
#define TAB 0x09
#define CR0x0D
#define LF0x0A
#define FF0x0C 
#define QUOTE    0x22 
#define COMMA    0x2C 
#define PERIOD   0x2E
#define PAREN    0x28
 
#define TIMES    20
#define DEFAULT_FONT 20   /*** Times ***/
#define DEFAULT_SIZE 12
#define PLAIN_TEXT 0 
#define teJustFill 2

#define PAGE_INFO‘pifr’
#define PAGE_ID  128

#define TEXT_JUSTIFICATION12396
#define TEXT_STYLES12549
#define STRING_TYPE‘STR#’
#define TEXT_SIZE10

enum{ /*** different device types  ***/
 Screen = 1,
 Printer,
 File,
 Remote
};

 /********************************************/
 /*-- TYPE DEFINITIONS -- */
 /********************************************/
/*** This structure is used internally by    ***/
/*** the printing routines. ***/
typedef struct styleSet{
 short  Font;  /*** current font ***/
 short  Size;  /*** current font size***/
 short  Style; /*** current font style ***/
 short  Just;  /*** current justification    ***/
}styleSet, *stylePtr;

/*** footnote    ***/
/*** this is a study piece only  we’ll want to embellish this concept 
***/

typedef struct{
 Handle key1;
 Handle key2;
 Handle key3;
 short  hite;  /*** if zero, no footnote set  ***/
}foot, *footPtr, *footHand;

typedef struct{
 short  portType; /*** RESERVED FOR FUTURE EXPANSION***/
 GrafPtrprPort; /*** pointer to the display port ***/
 Point  curntPen; /*** where we currently drawing ***/
 Rect   margin; /*** “local” paragraph margin ***/
 styleSet curntStyle; /*** current style settings ***/
 styleSet defaultStyle; /*** default style settings ***/

 short  pagecount; /*** number of the current page ***/
 short  totalpages; /*** total pages printed in doc ***/       
 /*** following will go in a union ***/
 /*** so structure can be used for ***/
 /*** for screen drawing also.***/
 THPrintprRecHandle; /*** Handle to printing rec. ***/
 TPrStatusmyStRec; /*** print style information ***/
 foot   footNote;
}pInfo, *pInfoPtr, **pInfoHand;

 /********************************************/
 /*-- FUNCTION PROTOTYPES --*/
 /********************************************/
long  matchToken( Handle buf, short tabl );
long    parseNum( char *bp );
char    *nextToken( char *bp );
void  parseRect( Handle buf, Rect *theRect );
void  PrintString( pInfoPtr pp, Handle theText, short hite );
void  PrintParagraph();
void    CheckPageBreak(); 
void    SetMargin( pInfoPtr pp, short t, short l, short b, short r );

void    DrawTextRun();

void  SetFont( stylePtr sp, short theFont);
void  SetFontSize( stylePtr sp, short theSize);
void  SetFontStyle( stylePtrpp, short theStyle);
void  SetFontJust( stylePtr sp, short theJust);

void  SetFontStyles( pInfoPtr pp, stylePtr sp );
Listing 2:  ReportUtils.c

/*******************************************\
*file:  ReportUtils.c*
*version: 1.0ß   *
*Common routines for printing reports*
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include <ReportUtils.h>

 /****************************************************/
 /*     -- MISCELLANEOUS UTILITIES -- */
 /****************************************************/
short getStringHandleSize( h )
 Handle h;
/******************************
* In hypercard, strings are padded
* out to even boundaries so that the
* handle size may be longer than
* you’d like.
* This routine returns the length
* of the string up to but not 
* including the NULL
* This routine is to be used for 
* NULL terminated strings only!
*******************************/
{
 short  i = 0;
 char *endPoint;
 
 if( validHandle( h ) ){
 i = (short)GetHandleSize( h );
 
 endPoint = *h + i - 1;
 while( *endPoint ){
 --i;
 --endPoint;
 }
 }
 return( i );
}

short strNComp( s1, s2, len )
 char *s1;
 char *s2;
 long len;
{
 short  indx;
 short  match = 1;
 
 for( indx = 1; indx <= len; indx++ )
 if( *s1++ != *s2++ ){
 match = 0;
 break;
 }
 return( match );
}

 /****************************************************/
 /*     -- PARSING ROUTINES --*/
 /****************************************************/

long matchToken( buf, tabl )
 Handle buf;
 short  tabl;
/******************************
* given an input buffer and the resource 
* id of the parse table, return 
* the token that represents the input
* string.
* A token of 0 is returned if no
* match is found.  This way, you
* can use the first item in the list
* as the default item!
* The symbol table should have the 
* format:
*<string>, <token>
* where string mathces to the input
* string and token is that value for 
* a given match.
******************************/
{
 char *bp; /*** pointer to input strings     ***/
 char *tp;
 Handle strH; /*** handle to parse strings resource ***/
 long token = 0; /*** return the default if no match ***/
 short  indx= 0;
 short  theID;
 ResTypetheType; 
 short  done = 0;
 long len;
 char theNum[31];
 char *np;
 char theName[256];
 char theString[256];
 
 bp = *buf;
 
 tp = bp;
 while( *tp ){
 toupper( *tp );
 tp++;
 }
 
 strH   = GetResource( STRING_TYPE, tabl );
 
 if( strH ){
 
 GetResInfo( strH, &theID, &theType, &theName );
 
 /*** compare the string to the allowable tokens ***/
 indx = 1 ;
 
 while( !done ){
 theString[0] = ‘\0’;
 GetIndString( &theString, tabl, indx );
 
 if( theString[0] == ‘\0’ )
 /* no strings matched the input   */
 done = 1;
 else{  /* attempt to match to current str */
 
 PtoCstr( (char *)&theString );
 
 len = 0;
 
 bp = theString;
 while ( *bp != ‘,’ ){
 bp++;
 len++;
 }
 
 if( strncmp( *buf, (char *)theString, len ) == 0){
 /* have a match so extract the token */                       
 
 /*** move past any garbage in the string ***/
 while( (*bp < ‘0’ || *bp > ‘9’) && *bp != ‘-’)
 bp++;
 
 /*** now copy what bp points to into a  ***/
 /*** a pascal style string ***/
 
 theNum[0] = ‘\0’;
 np = &theNum[1];
 
 while( *bp >= ‘0’ && *bp <= ‘9’ ){
 theNum[0]++;
 *np++ = *bp++;
 }
 
 /*** np is a valid p-string***/
 StringToNum( theNum, &token );
 done = 1;
 }
 else
 indx++;
 }
 }
 }
 
 return( token );
}

long  parseNum( bp )
 char *bp;
/******************************
* parse the data stream 
* and return a numeric 
* value.  The stream is null
* terminated.
******************************/
{
 long num = 0;
 
 char theString[256];
 short  done = 0;
 char *ps;
 
 /*** move input pointer until we’re looking at a number ***/
 while( *bp && ( *bp < ‘0’ || *bp > ‘9’ ) && *bp != ‘-’ )
 bp++;
 
 /*** copy the data into a pascal string     ***/
 ps= theString;
 ps++;
 
 while( *bp >= ‘0’ && *bp <= ‘9’ )
 *ps++ = *bp++;
 
 /*** moved one past the output so try this  ***/
 theString[0] = (char)( ps - theString -1  );      
 StringToNum( theString, &num );
 
 return( num );  
}

char  *nextToken( bp )
 char *bp;
/******************************
* given a pointer to an
* input stream, move to the 
* next token in the stream. 
* Token’s are delineated by
* ‘,’ or whitespace
* Assumes we are pointing to the current token
* Move past the current token and the white
* space that follows it.
******************************/
{
 /*** move past the current token  ***/
 while( *bp &&(*bp != ‘,’ && *bp != SPACE && *bp != CR && *bp != LF && 
*bp != TAB) )
 bp++;

 /*** move past the white space to the next token ***/
 while( *bp == ‘,’ || *bp == SPACE || *bp == CR || *bp == LF || *bp == 
TAB )
 bp++;
 
 return( bp );
}

void  parseRect( buf, theRect )
 Handle buf;
 Rect *theRect;
/******************************
* parse the data stream 
* into a rectangle
******************************/
{
 char *bp;
 
 HLock( buf );
 
 bp = *buf;
 theRect->top = parseNum( bp );
 bp= nextToken( bp );
 
 theRect->left = parseNum( bp );
 bp= nextToken( bp );
 
 theRect->bottom = parseNum( bp );
 bp= nextToken( bp );
 
 theRect->right = parseNum( bp );
 bp= nextToken( bp );
 
 HUnlock( buf );
}

void  CopyRect( r1, r2 )
 Rect *r1;
 Rect *r2;
/****************************
* copy rectangle r1 to r2
****************************/
{
 r2->top  = r1->top;
 r2->left = r1->left;
 r2->bottom = r1->bottom;
 r2->right= r1->right;
}
 
 /****************************************************/
 /*     -- PRINTING UTILITIES --   */
 /****************************************************/

void  FootNotePage( pp )
 pInfoPtr pp;
/******************************
* draw the footnote for this page
******************************/
{
 Handle theText;
 footPtrmyFoot;
 short  siz;
 FontInfo fInfo;
 short  hite;
 GrafPtroldPort;
 styleSet footStyle;
 char   thePage[32];
 char   theNum[32];
 Rect   temp;
 
 if( pp->footNote.hite ){
 CopyRect( &(pp->margin), &temp );

 SetMargin( pp, 0, 0, 0 ,0 );
 
 GetPort( &oldPort );
 SetPort( (GrafPtr)(pp->prPort) );
 
 PenNormal();
 
 footStyle.Font = TIMES;
 footStyle.Size = 12;
 footStyle.Style= PLAIN_TEXT;
 footStyle.Just = teJustLeft;
 
 SetFontStyles( pp, (stylePtr)&footStyle );
 
 GetFontInfo( &fInfo );
 hite  = fInfo.ascent + fInfo.descent + fInfo.leading;
 
 /*** draw the company name and the version number ***/
 if( theText = pp->footNote.key1 ){
 MoveTo( pp->margin.left, pp->margin.bottom+(2*hite)-4 );
 siz = getStringHandleSize( theText );
 
 HLock( theText ); 
 DrawTextRun( pp, *theText, siz, teJustLeft );     
 HUnlock( theText );
 }
 
 if( theText = pp->footNote.key2 ){
 MoveTo( pp->margin.left, pp->margin.bottom+(2*hite)-4);
 siz = getStringHandleSize( theText );
 
 HLock( theText ); 
 DrawTextRun( pp, *theText, siz, teJustRight );    
 HUnlock( theText );
 }
 
 /*** draw the date and the page number ***/
 if( theText = pp->footNote.key3 ){
 MoveTo( pp->margin.left, pp->margin.bottom+(3*hite)-4);
 siz = getStringHandleSize( theText );
 
 HLock( theText ); 
 DrawTextRun( pp, *theText, siz, teJustLeft );     
 HUnlock( theText );
 }
 
 if( pp->pagecount ){
 thePage[0] = ‘\0’;
 MoveTo( pp->margin.left, pp->margin.bottom+(3*hite)-4);
 strcat( thePage, “Page #”);
 NumToString( (long)pp->pagecount, theNum );
 
 PtoCstr( (char *)&theNum );
 strcat( thePage, theNum );
 DrawTextRun( pp, thePage, strlen( thePage ), teJustRight );
 }

 CopyRect( &temp, &(pp->margin) );
 SetFontStyles( pp, (stylePtr)&(pp->defaultStyle) );
 SetPort( oldPort );
 }
}

void  EjectPage( pp )
 pInfoPtr pp;
/******************************
* Eject the current page and 
* adjust the rectangle 
* accordingly
******************************/
{
 FootNotePage( pp );
 
 PrClosePage( pp->prPort );
 
 pp->pagecount++;
 pp->totalpages++;
 
 if( pp->totalpages == 128 ){
 TPPrPort tp;
 PrCloseDoc( pp->prPort );
 
 tp = PrOpenDoc( pp->prRecHandle, NIL, NIL );
 pp->prPort = (GrafPtr)tp;
 pp->totalpages = 0;
 SetPort( (GrafPtr)tp );
 }
 
 PrOpenPage( pp->prPort, NIL );

 pp->curntPen.h = pp->margin.left;
 pp->curntPen.v = pp->margin.top;
}

void  NewLine( pp, y )
 pInfoPtr pp;
 short  y;
/******************************
* Move to a new position on the
* page checking for page break.
******************************/
{
 CheckPageBreak( pp, y );
 pp->curntPen.h = pp->margin.left;
 pp->curntPen.v += y;
 MoveTo( pp->curntPen.h, pp->curntPen.v );
}

void  CheckPageBreak( pp, y )
 pInfoPtr pp;
 short  y;
/******************************
* Check to see if the current line
* will fit on the page, break the 
* page if not.
*
* This routine manages the pen 
* updating.
*
*   10.31.89
******************************/
{
 if( (pp->curntPen.v + y) >= pp->margin.bottom ){
 EjectPage( pp );
 NewLine( pp, y );
 } 
 
 /* pp->curntPen.v += y; */
}
 
 /****************************************************/
 /*     -- PORT UTILITIES --*/
 /****************************************************/

void SetMargin( pp, t, l, b, r )
 pInfoPtr pp;
 short  t;
 short  l;
 short  b;
 short  r;
/******************************
* Reset the margin rectangle in
* the printing rect.
* We add to top left and subtract
* from bottom right.
* if no parameters specified, then
* set the margin to the page margin.
* 11.7.89 adjust bottom margin for
*  footer hite 
******************************/
{
 register TPPrinttp = *(pp->prRecHandle);
 
 pp->margin.top  = tp->prInfo.rPage.top + t;
 pp->margin.left = tp->prInfo.rPage.left + l;
 pp->margin.bottom = tp->prInfo.rPage.bottom - b - pp->footNote.hite;
 pp->margin.right= tp->prInfo.rPage.right - r;
}

void  SetFont( sp, theFont )
 stylePtr sp;
 short  theFont;
/*******************************
* Reset the font for this document
*******************************/
{
 if( theFont )
 sp->Font = theFont;
 else
 sp->Font = DEFAULT_FONT;
}

void  SetFontSize( sp, theSize )
 stylePtr sp;
 short  theSize;
/*******************************
* Set the font size for this document
*******************************/
{
 if( theSize )
 sp->Size = theSize;
 else
 sp->Font = DEFAULT_SIZE;
}

void  SetFontStyle( sp, theStyle )
 stylePtr sp;
 short  theStyle;
/*******************************
* Style is cumulative.  To reset it
* you must set it to plain text.
*******************************/
{
 if( theStyle )
 sp->Style &= theStyle;
 else
 sp->Style = PLAIN_TEXT;
}

void  SetFontJust( sp, theJust )
 stylePtr sp;
 short  theJust;
{

 if( theJust )
 sp->Just = theJust;
 else
 sp->Just = teJustLeft;
}

void  SetFontStyles(  pp, sp )
 pInfoPtr pp;
 stylePtr sp;
/*******************************
* facilitation piece.  requires some
* thinking yet (not fully happy with
* the data abstractions I’ve developed
* to this point-- 11.1.89)
*******************************/
{
 GrafPtroldPort;
 
 GetPort( &oldPort );
 SetPort( (GrafPtr)(pp->prPort) );
 
 TextFont( sp->Font );
 TextSize( sp->Size );  
 TextFace( sp->Style );
 
 SetPort( oldPort );
}

void  DrawTextRun( pp, tx, len, just )
 pInfoPtr pp;
 char   *tx;
 short  len;
 short  just;
/**********************************
* Draw the given run of text taking
* without breaking the page.
**********************************/
{
 short  pagewidth= pp->margin.right - pp->margin.left;
 short  twidth;
 
 /*** need to know the pixel width of the line ***/
 twidth = TextWidth( tx, 0, len );
 
 switch( just ){
 case teJustLeft:
 break;
 case teJustRight:
 Move( (pagewidth - twidth), 0 );
 break;
 case teJustCenter:
 Move( (pagewidth - twidth)/2, 0 );
 break;
 case teJustFill:
 /*** doesn’t do anything yet ***/
 break;
 }/* switch */
 DrawText( tx, 0, len );  
}

void  PrintString( pp, theText, hite )
 pInfoPtr pp;
 Handle theText;
 short  hite;
/*******************************
* draw the text object passed in
* as a parameter.
* titles are always followed by
* blank lines so double the hite 
*******************************/
{
 short  siz;
 FontInfo fInfo;

 NewLine( pp, hite );
 siz = getStringHandleSize( theText );
 DrawTextRun( pp, *theText, siz, teJustLeft );     
 NewLine( pp, hite );
 SetFontStyles( pp, (stylePtr)&(pp->defaultStyle) );
}

void  DrawTextLine( pp, tx, len, hite, just )
 pInfoPtr pp;
 char   *tx;
 short  len;
 short  hite;
 short  just;
/**********************************
* Draw the given run of text taking
* into account page breaks if necessary.
* handles justification for the line.
* A line is defined as having constant
* vertical position so we only have to move
* the pen horizontally on a line to fit
* it into the correct format.
**********************************/
{
 NewLine( pp, hite );
 DrawTextRun( pp, tx, len, just );
}

void DrawLeftMargin( pp, theLeft, hite )
 pInfoPtr pp;
 Handle theLeft;
 short  hite;
/*******************************
* Margins and style are set before
* calling this routine.
* EXPERIMENTAL ROUTINE.
*******************************/
{
 Rect   temp;
 
 /*** Draw the labels and answer portions ***/
 if( theLeft && (GetHandleSize( theLeft )) ){
 CopyRect( &(pp->margin), &temp );
 
 pp->margin.right = temp.left - 12;
 MoveTo( pp->margin.left, pp->curntPen.v );
 
 HLock( theLeft );
 DrawTextRun( pp, *theLeft, getStringHandleSize(theLeft ), teJustRight 
);
 HUnlock( theLeft );
 
 CopyRect( &temp, &(pp->margin) );
 
 SetHandleSize( theLeft, 0L );
 }
}

void DrawRightMargin( pp, theRight, hite )
 pInfoPtr pp;
 Handle theRight;
 short  hite;
/*******************************
* the answer gets printed “in the 
* margin”
* EXPERIMENTAL ROUTINE.
*******************************/
{
 Rect   temp;
 register TPPrinttp = *(pp->prRecHandle);
 
 /*** Draw the labels and answer portions ***/
 if( theRight && (GetHandleSize( theRight )) ){
 CopyRect( &(pp->margin), &temp );
 
 pp->margin.left = pp->margin.right + 30;
 pp->margin.right= tp->prInfo.rPage.right;
 MoveTo( pp->margin.left, pp->curntPen.v  );
 
 HLock( theRight);
 DrawTextRun( pp, *theRight, getStringHandleSize(theRight), teJustLeft 
 );
 HUnlock( theRight);
 MoveTo( pp->curntPen.h, pp->curntPen.v );
 
 CopyRect( &temp, &(pp->margin) );
 
 SetHandleSize( theRight, 0L );
 }
}

char  *EndOfWord( wPtr, hardline )
 char *wPtr;
 short  *hardline;
/******************************
* Given a pointer to a  word, calculate the 
* length of the next word in the run. The length
* is determined by adding the width  of each
* character together until a word break.
* The difference between tpos and wpos is always
* one word (including the sticky characters)
* IN: Pointer to text 
*wPtr == pointer to NEXT word in
*run (or NIL if No next word)
* adjusts the output ptr which will
* be pointing to the word break character.
* first occurrance of space is considered
* part of the word.
******************************/
{
 *hardline = 0;
 
 while( 1 ){
 switch( (short)*wPtr ){
 case NULL:
 return( wPtr );
 break;
 case QUOTE:
 case COMMA:
 case PERIOD:    
 case TAB:
 case SPACE:
 case ‘;’:
 case ‘!’:
 case ‘?’:
 ++wPtr;
 return( wPtr );
 break;
 case CR:
 case FF:
 ++wPtr;
 *hardline = 1;
 return( wPtr );
 break; 
 default:
 ++wPtr;
 break;
 }/*** switch( *wPtr ) ****/
 }/*** while(1) ****/
}

void  FlushLine( pp, lineStart, len, just, theLeft, theRight, hite )
 pInfoPtr pp;
 char   *lineStart;
 short  len;
 short  just;
 Handle theLeft;
 Handle theRight;
 short  hite;
/*******************************
* Flush the current line out to 
* the printer.
*******************************/
{
 if( len ){
 CheckPageBreak( pp, hite );
 NewLine( pp, hite );
 DrawLeftMargin( pp, theLeft, hite );
 DrawRightMargin( pp, theRight, hite );
 DrawTextRun( pp, lineStart, len, just );
 }
}

void  DrawParagraph( pp, theText, theLeft, theRight )
 pInfoPtr pp;
 Handle theText;
 Handle theLeft;
 Handle theRight;
/*******************************
* Draw the text.  In effect, theLeft
* is the text to the left of the 
* paragraph and theRight is text
* to the right of the paragraph.
* Margins and style are set before
* calling this routine.
* EXPERIMENTAL ROUTINE.
*******************************/
{
 short  siz;
 FontInfo fInfo;
 short  hite;
 GrafPtroldPort;
 char   *lineStart;
 char   *lineEnd;
 char   *nextWord;
 short  lineWidth= 0;
 short  wordWidth= 0;
 short  theMargin;
 short  just;
 short  hardline;
 short  wid;
 
 GetPort( &oldPort );
 SetPort( (GrafPtr)(pp->prPort) );

 GetFontInfo( &fInfo );
 hite = fInfo.ascent + fInfo.descent + fInfo.leading;
 
 NewLine( pp, hite );
 siz = getStringHandleSize( theText );

 just   = pp->curntStyle.Just;
 theMargin= pp->margin.right - pp->margin.left;
 
 HLock( theText );
 
 nextWord = lineStart = lineEnd = *theText;
 
 while( *nextWord ){
 /*** loop invariant: lineEnd >= lineStart */
 nextWord = EndOfWord( lineEnd, &hardline );
 wordWidth = TextWidth( lineEnd, 0, (short)((long)nextWord-(long)lineEnd) 
);

 if( wordWidth + lineWidth <= theMargin )
 lineWidth+= wordWidth;
 else{
 wid = (short)((long)lineEnd - (long)lineStart);
 FlushLine(pp, lineStart,wid,just,theLeft,theRight,hite);
 lineWidth = wordWidth;
 lineStart = lineEnd;
 }
 
 if( hardline ){
 lineEnd = nextWord;
 wid = (short)((long)lineEnd - (long)lineStart);
 FlushLine( pp, lineStart, wid, just, theLeft, theRight, hite);
 lineWidth = 0;
 lineStart = lineEnd;
 /*CheckPageBreak( pp, hite );
 NewLine( pp, hite );
 */
 }
 
 lineEnd = nextWord;
 
 }/* while( *nextword ) */

/*** whatever is left in buffer will fit on one line ***/
 FlushLine( pp,lineStart,(short)(lineEnd-lineStart),just,theLeft,theRight,hite);
 
 HUnlock( theText ); 
 SetPort( oldPort );
}
Listing 3:  BeginReport.c

/*******************************************\
*file:  BeginReport.c*
*version: 0.1ß   *
*  XCMD ID500    *
* Opens access to the printer for the  *
* current report.*
* Returns True if the user clicks ok in the  *
* job dialog, false otherwise.*
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
/**********************************
* we allocate the page information 
* record as a resource so that 
* subsequent xcmds will be able to
* find the data using getresource()
* allocate the resource in the system
* resource fork.
**********************************/
{
 Handle pH;
 pInfoPtr pp;
 TPPrPort tp;
 short  oldRes;
 THPrintprintRec;
 Handle result;
 
 if( !(pH = GetSystemResource( PAGE_INFO, PAGE_ID )) ){
 if( pH = NewSysHandle( (long)sizeof( pInfo ) ) ){
 PrOpen();
 
 if( printRec = (THPrint)NewHandle( (long)sizeof(TPrint) ) ){
 PrintDefault( printRec );
 
 if( PrJobDialog( printRec ) ){
 
 AddSystemResource( pH, (ResType)PAGE_INFO, PAGE_ID,
 “\p page information record” );
 
 pp = (pInfoPtr)*pH;
 pp->prRecHandle = printRec;

 tp = PrOpenDoc( pp->prRecHandle, NIL, NIL );

 pp->prPort = (GrafPtr)tp;
 PrOpenPage( tp, NIL );
 
 pp->curntPen.v = pp->curntPen.h = 0;
 
 pp->pagecount = 1; 
 /*** for printing on bottom of page ***/
 pp->totalpages = 0; 
 /*** for resetting the document. ***/
 pp->footNote.key1 = NIL;
 pp->footNote.key2 = NIL;
 pp->footNote.key3 = NIL;
 pp->footNote.hite = 0;
 
 SetMargin( pp, 0, 0, 0, 0 );
 
 SetFont((stylePtr)&(pp->curntStyle), DEFAULT_FONT);
 SetFontSize( (stylePtr)&(pp->curntStyle), DEFAULT_SIZE );
 SetFontStyle( (stylePtr)&(pp->curntStyle), PLAIN_TEXT );
 SetFontJust( (stylePtr)&(pp->curntStyle), teJustLeft );
 
 SetFont( (stylePtr)&(pp->defaultStyle), DEFAULT_FONT );
 SetFontSize( (stylePtr)&(pp->defaultStyle), DEFAULT_SIZE );
 SetFontStyle( (stylePtr)&(pp->defaultStyle), PLAIN_TEXT );
 SetFontJust( (stylePtr)&(pp->defaultStyle), teJustLeft );
 
 result = PasToZero( paramPtr, “\pTRUE”);
 }/* if job dialog */
 else{
 TrashHandle( (Handle)printRec );
 TrashHandle( (Handle)pH );
 result = PasToZero( paramPtr, “\pFALSE”);
 }/* else */
 }/* if printRec */
 }/* if pH allocated */
 }/* if pH not previously allocated */
 
 paramPtr->returnValue = result;

}
Listing 4:  EndReport.c

/*******************************************\
*file:  EndReport.c*
*version: 0.1ß   *
*  XCMD ID501    *
* Closes down the current document and *
* deallocates the report’s memory  *
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
{
 Handle pH;
 pInfoPtr pp;
 short  oldRes;
 
 if( pH = GetSystemResource( PAGE_INFO, PAGE_ID ) ){
 pp = (pInfoPtr)*pH;

 /*** shut the printing down ***/
 PrClosePage( pp->prPort );
 PrCloseDoc( pp->prPort );
 
 if( (*(pp->prRecHandle))->prJob.bJDocLoop ==  bSpoolLoop && !PrError() 
)
 PrPicFile( pp->prRecHandle, NIL, NIL, NIL, &pp->myStRec );

 PrClose();
 
 /*** deallocate our memory ***/
 DisposHandle( (Handle)pp->prRecHandle );
 
 TrashHandle( pp->footNote.key1 );
 TrashHandle( pp->footNote.key2 );
 TrashHandle( pp->footNote.key3 );
 
 RemoveSystemResource( pH );
 }
 paramPtr->returnValue = NIL;
}
Listing 5:  SetStyle.c

/*******************************************\
*file:  SetStyle.c *
*version: 0.1ß   *
*  XFCN ID505    *
* Sets style information about the text*
* Providing no parameters will reset the     *
* style.*
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
/**********************************
* params[0] == the font   
* params[1] == the size 
* params[2] == the style
* params[3] == the justification
* SHOULD BE ABLE TO RESET THE DEFAULT
* UNDER PROGRAM CONTROL!!! (REQUIRES
* ADDING FIELDS TO pInfo).
**********************************/
{
 Handle pH;
 pInfoPtr pp;
 short  theFont  = DEFAULT_FONT;
 short  theSize  = DEFAULT_SIZE;
 short  theStyle= PLAIN_TEXT;
 short  theJust  = teJustLeft;
 long   siz;
 char   *fp1;
 char   *fp2;
 char   fontName[256];
 stylePtr sp;
 
 if( pH = GetSystemResource( PAGE_INFO, PAGE_ID )  ){
 pp = (pInfoPtr)*pH;
 
 if( paramPtr->params[0] ){
 paramtoPString( paramPtr, 0, (char *)fontName );
 GetFNum( fontName, &theFont );
 }
 
 if( paramPtr->params[1] )
 theSize = parseNum( *(paramPtr->params[1] ) );
 
 if( paramPtr->params[2] )
 theStyle = (short)matchToken( paramPtr->params[2], TEXT_STYLES );
 
 if( paramPtr->params[3] )
 theJust = (short)matchToken( paramPtr->params[3], TEXT_JUSTIFICATION 
);
 
 sp = (stylePtr)&(pp->curntStyle);
 SetFont( sp, theFont );
 SetFontSize( sp, theSize );
 SetFontStyle( sp, theStyle );
 SetFontJust( sp, theJust );
 }
 paramPtr->returnValue = NIL;
}
Listing 6:  PrintParagraph.c

/*******************************************\
*file:  PrintParagraph.c  *
*version: 0.1ß   *
*  XFCN ID503    *
* Print a paragraph from Hypercard using the*
* the rules described :   *
* Paragraph are runs of text that have out-  *
* dent and indent characters (typically      *
* outline numbers and such).*
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
/**********************************
* params[0] == the text to print.
* params[1] == text to the left of paragraph
* params[2] == text to the right of paragraph
**********************************/
{
 Handle pH;
 pInfoPtr pp;
 
 if( paramPtr->paramCount && ( pH = GetSystemResource( PAGE_INFO, PAGE_ID 
) ) ){
 pp = (pInfoPtr)*pH;
 
 DrawParagraph( pp,paramPtr->params[0],paramPtr->params[1],paramPtr->params[2] 
);
 }
 paramPtr->returnValue = NIL;
}
Listing 7:  PrintTitle.c

/*******************************************\
*file:  PrintTitle.c *
*version: 0.1ß   *
*  XFCN ID502    *
* Print a title on the page.  By definition  *
* titles are 1 line. Longer than that  *
* requires a call to Printparagraph*
* params[0] == the string *
* params[1] == the font   *
* params[2] == the size   *
* params[3] == the style  *
* params[4] == the justification   *
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
/**********************************
* params[0] == the text to print.
* params[1] == the font   
* params[2] == the size 
* params[3] == the style
* params[4] == the justification
**********************************/
{
 Handle pH;
 pInfoPtr pp;
 short  theFont;
 short  theSize;
 short  theStyle;
 short  theJust;
 long   siz;
 char   *fp1;
 char   *fp2;
 char   fontName[256];
 short  hite;
 GrafPtroldPort;
 FontInfo fInfo;
 
 if( paramPtr->paramCount && ( pH = GetSystemResource( PAGE_INFO, PAGE_ID 
) ) ){
 pp = (pInfoPtr)*pH;
 
 /*** parse the input data ***/
 theFont  = 4;
 theSize  = 9;
 theStyle = 0;
 theJust  = teJustLeft;
 
 if( paramPtr->params[1] ){
 paramtoPString( paramPtr, 1, (char *)fontName );
 GetFNum( fontName, &theFont );
 }
 
 if( paramPtr->params[2] )
 theSize = parseNum( *(paramPtr->params[2] ) );
 
 if( paramPtr->params[3] )
 theStyle = (short)matchToken( paramPtr->params[3], TEXT_STYLES );
 
 if( paramPtr->params[4] )
 theJust = (short)matchToken( paramPtr->params[4], TEXT_JUSTIFICATION 
);

   SetFont( (stylePtr)&(pp->curntStyle),  theFont);
   SetFontSize( (stylePtr)&(pp->curntStyle),  theSize);
   SetFontStyle( (stylePtr)&(pp->curntStyle),  theStyle);
   SetFontJust( (stylePtr)&(pp->curntStyle),  theJust);
 
 /* consider drawtextrun here */
 GetPort( &oldPort );
 SetPort( (GrafPtr)(pp->prPort) );
 
 PenNormal();
 SetFontStyles( pp, (stylePtr)&(pp->curntStyle) );
 
 GetFontInfo( &fInfo );
 hite  = (fInfo.ascent + fInfo.descent + fInfo.leading);
 
 /*** use ( hite*4 ) to anticipate widows! ***/
 CheckPageBreak( pp, hite * 4 );
 PrintString( pp, paramPtr->params[0], hite );
 
 SetPort( oldPort );
 }
 paramPtr->returnValue = NIL;
}
Listing 8:  EjectPage.c

/*******************************************\
*file:  EjectPage.c*
*version: 0.1ß   *
*  XFCN ID507    *
* Eject a page   *
* ----------------------------------------   *
* By: Donald Koscheka*
* Date: 30-OCT-89*
* ©Copyright 1989, Donald Koscheka *
*All Rights Reserved *
\*******************************************/

#include <MacTypes.h>
#include <MemoryMgr.h>
#include <ResourceMgr.h>
#include <OSUtil.h>
#include <HyperXCmd.h>
#include <HyperUtils.h>
#include <PrintMgr.h>
#include “ReportUtils.h”

pascal void main( paramPtr )
 XCmdBlockPtr  paramPtr;
/**********************************
* params[0] == new page number.
**********************************/
{
 Handle pH;
 pInfoPtr pp;
 long   theNum;
 char   thePage[32];
 
 if(  pH = GetSystemResource( PAGE_INFO, PAGE_ID )  ){
 pp = (pInfoPtr)*pH;
 
 EjectPage( pp );
 pp->pagecount = 1;
 }
 paramPtr->returnValue = NIL;
}

 
AAPL
$118.68
Apple Inc.
+1.08
MSFT
$47.91
Microsoft Corpora
+0.44
GOOG
$538.63
Google Inc.
-2.45

MacTech Search:
Community Search:

Software Updates via MacUpdate

RapidWeaver 6.0.3 - Create template-base...
RapidWeaver is a next-generation Web design application to help you easily create professional-looking Web sites in minutes. No knowledge of complex code is required, RapidWeaver will take care of... Read more
iPhoto Library Manager 4.1.10 - Manage m...
iPhoto Library Manager lets you organize your photos into multiple iPhoto libraries. Separate your high school and college photos from your latest summer vacation pictures. Or keep some photo... Read more
iExplorer 3.5.1.9 - View and transfer al...
iExplorer is an iPhone browser for Mac lets you view the files on your iOS device. By using a drag and drop interface, you can quickly copy files and folders between your Mac and your iPhone or... Read more
MacUpdate Desktop 6.0.3 - Discover and i...
MacUpdate Desktop 6 brings seamless 1-click installs and version updates to your Mac. With a free MacUpdate account and MacUpdate Desktop 6, Mac users can now install almost any Mac app on macupdate.... Read more
SteerMouse 4.2.2 - Powerful third-party...
SteerMouse is an advanced driver for USB and Bluetooth mice. It also supports Apple Mighty Mouse very well. SteerMouse can assign various functions to buttons that Apple's software does not allow,... Read more
iMazing 1.1 - Complete iOS device manage...
iMazing (was DiskAid) is the ultimate iOS device manager with capabilities far beyond what iTunes offers. With iMazing and your iOS device (iPhone, iPad, or iPod), you can: Copy music to and from... Read more
PopChar X 7.0 - Floating window shows av...
PopChar X helps you get the most out of your font collection. With its crystal-clear interface, PopChar X provides a frustration-free way to access any font's special characters. Expanded... Read more
Carbon Copy Cloner 4.0.3 - Easy-to-use b...
Carbon Copy Cloner backups are better than ordinary backups. Suppose the unthinkable happens while you're under deadline to finish a project: your Mac is unresponsive and all you hear is an ominous,... Read more
ForeverSave 2.1.3 - Universal auto-save...
ForeverSave auto-saves all documents you're working on while simultaneously doing backup versioning in the background. Lost data can be quickly restored at any time. Losing data, caused by... Read more
Voila 3.8.1 - Capture, annotate, organiz...
Voila is a screen-capture, recording, and annotation tool that is a full-featured replacement for Mac's screen-capture and screen-recording capabilities. It has a large and robust set of editing,... Read more

Latest Forum Discussions

See All

You Can Play the Final Chapter of Lone W...
You Can Play the Final Chapter of Lone Wolf: Dawn Over V’taag Right Now Posted by Jessica Fisher on November 26th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Tales from the Borderland​s Will be Comi...
Tales from the Borderland​s Will be Coming to iOS by the End of the Year Posted by Jessica Fisher on November 26th, 2014 [ permalink ] Telltale Games has announced | Read more »
Sunburn! Review
Sunburn! Review By Campbell Bird on November 26th, 2014 Our Rating: :: DON'T DIE ALONEUniversal App - Designed for iPhone and iPad Platform through the depths of space to make sure your entire crew dies together in this satisfying... | Read more »
Black Friday has Started Early – Lots an...
It’s almost turkey time! Which means lots and lots of food but also lots and lots of sales. Some sales have even started a few days early, which is why we’ve put together a list of iOS games that are currently discounted (sometimes by a lot).... | Read more »
Loose Leaf Review
Loose Leaf Review By Jennifer Allen on November 26th, 2014 Our Rating: :: SIMPLE SKETCHINGiPad Only App - Designed for the iPad Sketch out ideas with simple drawing tools, courtesy of Loose Leaf.   | Read more »
Screeny (Utilities)
Screeny 1.0 Device: iOS iPhone Category: Utilities Price: $.99, Version: 1.0 (iTunes) Description: Screeny is an utility app that helps you save space consumed by screenshots. It screens your camera roll and helps you to filter and... | Read more »
Tilt to Live Bundle Set to Arrive This T...
Tilt to Live Bundle Set to Arrive This Thanksgiving Posted by Ellis Spice on November 25th, 2014 [ permalink ] One Man Left has unveiled an upcoming Tilt to Live bundle, allowing players to get the series for a di | Read more »
BattleLore: Command (Entertainment)
BattleLore: Command 1.0 Device: iOS Universal Category: Entertainment Price: $9.99, Version: 1.0 (iTunes) Description: ***NOTE: Compatible with iPad 2/iPad mini, iPod touch 5 and up and iPhone 4S and up – WILL NOT RUN ON EARLIER... | Read more »
Weather Or Not Review
Weather Or Not Review By Jennifer Allen on November 25th, 2014 Our Rating: :: STYLISH WEATHER REPORTINGiPhone App - Designed for the iPhone, compatible with the iPad Check the weather quickly and conveniently with Weather or Not... | Read more »
The All-New Football Manager Handheld 20...
The All-New Football Manager Handheld 2015 is Available Now Posted by Jessica Fisher on November 25th, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »

Price Scanner via MacPrices.net

Early Black Friday MacBook Air sale prices, $...
 MacMall has posted early Black Friday MacBook Air sale prices. Save $101 on all models for a limited time: - 11″ 1.4GHz/128GB MacBook Air: $798 - 11″ 1.4GHz/256GB MacBook Air: $998 - 13″ 1.4GHz/... Read more
Why iPhone 6 Tablet/Laptop Cannibalization Is...
247wallst.com blogger Douglas A. McIntyre noted last week that according to research posted on the Applovin blog site the iPhone 6 is outselling the iPhone 6 Plus by a wide margin . Hardly a surprise... Read more
Worldwide Tablet Growth Expected to Slow to 7...
The global tablet market is expected to record massive deceleration in 2014 with year-over-year growth slowing to 7.2%, down from 52.5% in 2013, according to a new forecast from International Data... Read more
Touchscreen Glove Company Announces New Produ...
Surrey, United Kingdom based TouchAbility specializes in design and manufacture of a wide variety of products compatible with touchscreen devices including smartphones, tablets and computers. Their... Read more
OtterBox Alpha Glass Screen Protectors for iP...
To complement the bigger, sharper displays on the latest Apple devices, OtterBox has introduced Alpha Glass screen protectors to the iPhone 6 and iPhone 6 Plus. The fortified glass screen protectors... Read more
Early Black Friday Mac Pro sale, 6-Core 3.5GH...
 B&H Photo has the 6-Core 3.5GHz Mac Pro on sale today for $3499 including free shipping plus NY sales tax. Their price is $500 off MSRP, and it’s the lowest price available for this model from... Read more
Early Black Friday sale price: 15-inch 2.2GHz...
 B&H Photo has the 2014 15″ 2.2GHz Retina MacBook Pro on sale today for $1699.99. Shipping is free, and B&H charges NY sales tax only. Their price is $300 off MSRP, equalling Best Buy’s price... Read more
13-inch 2.5GHz MacBook Pro (refurbished) avai...
The Apple Store has Apple Certified Refurbished 13″ 2.5GHz MacBook Pros available for $170 off the cost of new models. Apple’s one-year warranty is standard, and shipping is free: - 13″ 2.5GHz... Read more
Early Black Friday iPad mini 3 sale: $75 off...
 Best Buy has iPad mini 3s on sale for $75 off MSRP on their online store for a limited time. Choose free shipping or free local store pickup (if available). Sale prices available for online orders... Read more
Early Black Friday MacBook Pro sale: 15-inch...
 Best Buy has posted early Black Friday prices on 15″ Retina MacBook Pros, with models on sale for $300 off MSRP on their online store for a limited time. Choose free local store pickup (if available... Read more

Jobs Board

*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
Senior Event Manager, *Apple* Retail Market...
…This senior level position is responsible for leading and imagining the Apple Retail Team's global event strategy. Delivering an overarching brand story; in-store, Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
*Apple* Solutions Consultant (ASC) - Apple (...
**Job Summary** The ASC is an Apple employee who serves as an Apple brand ambassador and influencer in a Reseller's store. The ASC's role is to grow Apple Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.