TweetFollow Us on Twitter

Designer CDEF
Volume Number:5
Issue Number:4
Column Tag:ABC's of Macintosh

Related Info: Control Manager

Designer CDEFs

By Kirk Chase, Assistant Editor, MacTutor

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

Designer CDEFs

I was hunting around the office for software goodies a while back when I came across Prototyper™. I stuck the disk in to see what it was and was pleasantly surprised. Those hours spent getting the interface just right seemed over. Here was an environment where I could draw my windows, set up my menus and controls, and then let it generate the code for the interface.

Prototyper™ wasn’t everything I wanted it to be, though. For example, it would generate code for things I didn’t need. But it served my purpose of getting an interface/shell running quickly. (I hear version 2.0 is a lot better, but they haven’t sent MacTutor an upgrade yet.) Anyway, I decided to test Prototyper™ out on graphic research question--Yahtzee (relaxation is important to mental health).

Well, after a bit, I had it up and running. I took it home and stuck it in my Mac for my recently married bride to look at. She took the mouse and started playing the game. Not as skilled in the mouse as I, whenever she went to click the checkbox beside each die to re-roll, she kept on missing or resetting it.

She asked me why she couldn’t just click on the dice themselves instead of those little, tiny boxes. I was about to say that they weren’t controls when I thought, “Why not? The user is always right.” And so I went on thinking about the problem. CDEFs sounded like a lot of work, but they weren’t for what I wanted. I just wanted a variation of the checkboxes. I decided just to alter the drawing routine of my checkboxes so that they just put a rounded rectangle around the die picture when selected. I found that this was quite easy to do and wrote up a small demonstration.

Figure 1. Designer CDEF

The Demo

The demo puts up five altered buttons (figure 1). The one in the middle is an altered checkbox made to look like a light switch. It is used to deactivate the controls on the left or right side. There are three radio buttons on the left which take on the appearance of a traffic light. The last button on the right is an altered button that cycles through the faces on a die (pictures taken from my Yahtzee application).

The CDEF

A CDEF is called through a function of the form:

{1}

function myCDEFProc(varCode : integer;
 theControl : ControlHandle;
 message : integer;
 param : longint) : longint;

It returns a longint telling what part of the control was pressed or zero if not pressed. The parameter varCode contains the variation code of the control. It lets you write one CDEF for a variety of controls. I chose though to use the RefCon field of the control, theControl, to switch between routines. The message parameter tells the CDEF function what it needs to do. The last parameter, param, varies in meaning depending on message.

The unit that held my designer CDEF is called “myCDEF”. A CDEF is supposed to handle a lot of tasks. It must take care of drawing the control according to it’s value and hilighting, as well as determining if the control was actually pressed. Therefore the main routine of our CDEF function is one where we check the message parameter that was passed, and do one of three routines: drawing, testing for a hit, and calculating the region. Other routines such as initializing or dragging the indicator are either done for us or not needed.

calcRgns

One message our altered CDEF needs to handle is calculating the region of the control. Param for this message is interpreted as a handle to a region. This is quite simple to do if your control is rectangular, you just make a call to RectRgn passing the region handle and the control’s rectangle. To be honest, a rounded button is not really a strict rectangle, but the corners are generally too small to really matter.

testCntl

The next message we need to handle is whether or not the user pressed the mouse button while in our control. We first check to see if our control is active and then whether or not it was in the indicator (we have none). Finally we call PtinRect on param, typecasted now to be a point, to see if we are actually in the control.

If we are in the control’s rectangle, we switch on contrlRfCon to see which type of control was pressed. Then we might want to do some further testing to see what part of the control was pressed, such as the page up or page down regions. Our CDEF has only one region so we send back the message inButton, if it is an altered button, or inCheckbox, if it was an altered checkbox or radio button.

drawCntl

I saved the largest routine for last. When we respond to a drawCntl message, we must draw the control with the appropriate value and hilighting. When we come in, we first check to see if the control is visible (no need to draw something that is invisible). Then we switch off the contrlRfCon field to handle each control type separately.

The Button

A normal button only shows it’s state when pressed, i.e. hilighted. Then is goes back to normal. In my demo, I alter the button to not draw the title and draw a dark or light border around the control depending on whether it was hilighted or not. Then I dim the control if it is deactivated.

You may ask yourself, where are the faces of the die? They are not handled by the CDEF. I did this for two reasons. The first was to make a semi-generic control that put up a dark outline when pressed and a lighter one when not. The second reason was to show the effects of the picture when the control is deactivated.

The Checkbox

This simple drawing routine puts up the control’s title and the On/Off title, in my case Left/Right. I might want to mention a nice routine, TextBox. If TextEdit is initialized, this routine saves the hastle of left/center/right justifying by passing it the title, the rectangle the title is to be drawn in, and the justification (teJustLeft, teJustCenter, teJustRight). Next, I see if the checkbox is on or off and draw the switch in that position with a thick pen or thin depending whether or not it is hilighted.

The Radio Controls

Although the radio controls are one type of control, each is drawn in a slightly different way. I first put up the title and then switch on contrlRfCon again to draw the traffic light box and set up the shade of the light. Then I draw the light according to the shade or override it with white if the control is not set. Then I dim the control if inactive.

You will notice that there is not a hilighted state, other than inactive. You do not need to put one in if you do not feel it is necessary. For that matter, there is no reason why you need to deactivate your control by dimming it. You could dim just part, dim it with a different pattern, or even draw something entirely different. Just remember not to go overboard and try to stick to the standard interface (I might have drawn a thicker circle). But if it seems natural to draw it in a nonstandard way, go ahead; that is after all the purpose to this article and all those little hooks.

Attaching Your Routine

The code to override the standard definition with yours is quite simple. Make sure your window is invisible to start off with so that you can attach your drawing routine before QuickDraw draws something. Then follow the example:

{2}

MyWindow := GetNewWindow(WindowID, NIL, Pointer(-1);
CDEFHandle := NewHandle(0); {Get temporary control handle}
CDEFHandle := Ptr(@myCDEFProc); {Point it to our routine}
CtrlHdl := GetNewControl(ButtonID, MyWindow);
HLock(Handle(CtrlHdl));
CtrlHdl^^.contrlDefProc := CDEFHandle; {Set to our proc}
HUnLock(Handle(CtrlHdl));
Show(MyWindow); {make it visible}
SelectWindow(MyWindow); {bring to front}
SetPort(MyWindow); {set the port to our window}

Further Notes

The die pictures are done by changing the min/max of the button to 0/5. When the button is pressed, the value is set accordingly, and the button’s rectangle is invalidated. Then during the update event, the appropriate picture is retrieved according to the button’s value and drawn. Then the controls are drawn, dimming the die face if inactive.

There are a couple notes of warning that you should be aware of. The first is that you must call DisposeWindow to dispose of your controls. Don’t just quit, or you’ll crash. The second has to do with debugging.

I worked this out in Lightspeed Pascal 2.0. Now I usually like to put a few writeln statements to the text window while developing. And I did so in my CDEF to trace it being called. Nothing appeared in my window. My tracing showed that I was indeed going where I should be with all the right values. What was wrong? Well it was those debugging statements. I figured that the writeln statements were setting the port to the text window and not resetting the port. Therefore my control drawing routines were being directed to the wrong port.

That’s about it. Good luck!

Figure 2. LSP Project


UNIT myCDEF;

INTERFACE

 FUNCTION DesignerButtonProc (varCode : integer;
 theControl : ControlHandle;
 message : integer;
 param : longint) : longint;

IMPLEMENTATION

 FUNCTION DesignerButtonProc; {}
{Custom controls for our controls}
 CONST
 inactive = 255;
 indicator = 254;
 regbutton = 3;
 regcheck = 4;
 rStop = 5;
 rCaution = 6;
 rGo = 7;

 PROCEDURE DodrawCntl (theButton : integer;
 ControlHdl : ControlHandle;
 thePart : longint);
 VAR
 cRect, titleRect, designRect, tempRect, dimRect
 onBox, offBox : Rect;
 height, width, curve, start,
 titlewidth : integer;
 titlestr, tempstr : str255;

 PROCEDURE DeactiveButton (theRect : rect);
 {dim the button}
 BEGIN
 PenPat(Gray);
 PenMode(PatBic);
 PaintRect(theRect);
 PenNormal;
 END;

 BEGIN {of main drawing routines}
 IF ControlHdl^^.contrlVis <> 0 THEN {visible?}
 BEGIN
 HLock(Handle(ControlHdl));
 cRect := ControlHdl^^.contrlRect; 
 {get the rectangle of control}
 CASE ControlHdl^^.contrlRfCon OF 
 {switch on button type}
 regbutton :  {regular button}
 BEGIN
 PenSize(2, 2);
 curve := (cRect.bottom - cRect.top) DIV 2;
 IF ControlHdl^^.contrlHilite > 0 THEN
 {hilight button?}
 PenPat(black)
 ELSE
 PenPat(dkgray);
 FrameRoundRect(cRect, curve, curve);
 {draw button}
 PenNormal;
 IF ControlHdl^^.contrlHilite = inactive
 THEN {inactive?}
 BEGIN
 tempRect := cRect;
 InsetRect(tempRect, 2, 2);
 DeactiveButton(tempRect);
 END;
 END;

 regcheck : {checkbox}
 BEGIN
 EraseRect(cRect);
 titleRect := cRect;
 titleRect.top := titleRect.bottom - 12;
 designRect := cRect;
 designRect.bottom := designRect.bottom - 12;
 width := titleRect.right -
 titleRect.left;
 height := designRect.bottom -
 designRect.top;

 {draw control title}
 TextFont(systemFont); 
 titlewidth := StringWidth(ControlHdl^^
 .contrlTitle);
 titlestr := ControlHdl^^.contrlTitle;
 TextBox(Pointer(ord(@titlestr) + 1),
 length(titlestr), titleRect,
 teJustLeft);

 {draw ON/OFF, or LEFT/RIGHT, titles}
 tempRect := designRect;
 tempRect.left := tempRect.left + 20;
 tempRect.bottom := tempRect.top + 12;
 tempstr := ‘LEFT’;
 TextBox(Pointer(ord(@tempstr) + 1),
 length(tempstr), tempRect,
 teJustRight);
 tempRect.bottom := designRect.bottom;
 tempRect.top := tempRect.bottom - 12;
 tempstr := ‘RIGHT’;
 TextBox(Pointer(ord(@tempstr) + 1),
 length(tempstr), tempRect, 
 teJustRight);
 TextFont(applFont);     

 {start drawing switch}
 tempRect := designRect;
 tempRect.right := tempRect.left + 40;
 WITH tempRect DO {draw Switch}
 BEGIN
 width := right - left;
 height := bottom - top;
 onBox.top := top + (height DIV 2) - 10;
 onBox.bottom := onBox.top + 20;
 onBox.left := left + (width DIV 2) - 10;
 onBox.right := onBox.left + 20;

 IF ControlHdl^^.contrlHilite > 0
 THEN {Hilite?}
 PenSize(2, 2)
 ELSE
 PenSize(1, 1);
 IF ControlHdl^^.contrlValue > 0
 THEN
 BEGIN {draw on}
 FrameArc(onBox, 0, -270);
 MoveTo(left + (width DIV 2),
 onBox.top);
 Line(20, -20);
 Line(10, 10);
 LineTo(onBox.right, top +
 (height DIV 2));
 END
 ELSE
 BEGIN {draw off}
 FrameArc(onBox, 90, -270);
 MoveTo(onBox.right, top +
 (height DIV 2));
 Line(20, 20);
 Line(-10, 10);
 LineTo(left + (width DIV 2),
 onBox.bottom);
 END;
 END; { of with}
 END;

 rStop, rCaution, rGo : {radio button}
 BEGIN
 designRect := cRect;
 titleRect := designRect;
 titleRect.left := titleRect.left + 25;
 titleRect.top := titleRect.top + 3;
 designRect.right := designRect.left + 20;

 {draw title of control}
 TextFont(systemFont);        
 titlestr := ControlHdl^^.contrlTitle;
 TextBox(Pointer(ord(@titlestr) + 1),
 length(titlestr), titleRect, 
 teJustLeft);
 TextFont(applFont);               
 height := designRect.bottom - 
 designRect.top;

{switch on RefCon for radio button: stop, caution, and go  this is for 
radio button specific stuff}

 CASE ControlHdl^^.contrlRfCon OF
 rStop : 
 BEGIN
 {draw box}
 PenSize(2, 2);
 MoveTo(designRect.left,
 designRect.bottom);
 LineTo(designRect.left,
 designRect.top);
 LineTo(designRect.right,
 designRect.top);
 LineTo(designRect.right,
 designRect.bottom);
 PenNormal;
 PenPat(dkgray); {light color}
 END;
 rCaution : 
 BEGIN
 {draw box}
 PenSize(2, 2);
 MoveTo(designRect.left,
 designRect.bottom);
 LineTo(designRect.left,
 designRect.top);
 MoveTo(designRect.right,
 designRect.top);
 LineTo(designRect.right,
 designRect.bottom);
 PenNormal;
 PenPat(ltgray); {light color}
 END;
 rGo : 
 BEGIN
 {draw box}
 PenSize(2, 2);
 MoveTo(designRect.left,
 designRect.top);
 LineTo(designRect.left,
 designRect.bottom);
 LineTo(designRect.right,
 designRect.bottom);
 LineTo(designRect.right,
 designRect.top);
 PenNormal;
 PenPat(gray); {light color}
 END;

 OTHERWISE
 ;
 END; { of case }

 {draw light}
 onBox := designRect;
 InsetRect(onBox, 4, 4);
 onBox.left := onBox.left + 1;
 onBox.right := onBox.right + 1;
 IF ControlHdl^^.contrlValue = 0 THEN
 {override pattern if off}
 PenPat(white);
 PaintOval(onBox);
 PenNormal;
 FrameOval(onBox);

 IF ControlHdl^^.contrlHilite = inactive
 THEN {deactivate control}
 BEGIN
 tempRect := cRect;
 DeactiveButton(tempRect);
 END;
 END;
 END; {of button}

 HUnLock(Handle(ControlHdl));
 END; {of a visible control}
 END;

 FUNCTION DotestCntl (theButton : integer;
 ControlHdl : ControlHandle;
 thePoint : point) : longint;
 {Test what part of control}
 BEGIN
 DotestCntl := 0; {initial value}
 IF ControlHdl^^.contrlHilite <> inactive THEN
 {active control?}
 BEGIN
 IF ControlHdl^^.contrlHilite <> indicator
 THEN {indicator?}
 BEGIN
 IF PtInRect(thePoint, ControlHdl^^
 .contrlRect) THEN {in control’s rect}
 BEGIN
 CASE ControlHdl^^.contrlRfCon OF
 {switch on control type  here is where
  you send a code back as to what type
  of control and what part of that
  control was  pressed.  We only have
  controls with one part, so no further
  testing is needed}
 regbutton : 
 DotestCntl := inButton;
 regcheck, rStop, rCaution, rGo : 
 DotestCntl := inCheckBox;
 OTHERWISE
 ;
 END;
 END;
 END
 ELSE
 DotestCntl := indicator;
 END;
 END;

 PROCEDURE DocalcCRgns (theButton : integer;
 ControlHdl : ControlHandle;
 RegionHdl : RgnHandle);
 {calculate region of control}
 BEGIN
 {easy as pie if rectangular}
 RectRgn(RegionHdl, ControlHdl^^.contrlRect);
 END;

 BEGIN {main proc routine}
 DesignerButtonProc := 0; {initialize the result}

 {switch on what we are to do}
 CASE message OF
 drawCntl : 
 DodrawCntl(varCode, theControl, param); {draw}
 testCntl : 
 DesignerButtonProc := DotestCntl(varCode, 
 theControl, Point(param)); {test}
 calcCRgns : 
 DocalcCRgns(varCode, theControl, 
 RgnHandle(param)); {region}
 OTHERWISE
 ;
 END; {of case}
 END;

END.


PROGRAM DesignerButtons;
{Program name:DesignerButtons.Pas   }
{Function:  This is the main module for this program.  }
{History: 12/19/88 Original by Prototyper.   }
{  Modified 1/6/89                     }

 USES
 AboutDialog, ExampleWindow, InitTheMenus,
 HandleTheMenus;

 CONST
 sleep = 10;
 mBarHeightGlobal = $BAA;
 sBarWidth = 16;
 SuspendEvt = 15;

 VAR    {Main variables}
 myEvent: EventRecord;    {Event record for all events}
 doneFlag: boolean;  {Exit program flag}
 code: integer;    {Determine event type}
 whichWindow, MainWindow: WindowPtr;
 mResult: longint;        
 theMenu, theItem: integer;   
 chCode: integer;    {Key code}
 ch: char;       {Key pressed in Ascii}
 doIt: Boolean;  {Event Loop bolean}
 tempPort: GrafPtr;
 DragArea, screen: rect;
 mBarHeight: integer;
 MemoryPtr: ^Integer;
 HiByte: byte;
 bit0: LongInt;
 sysresult: boolean;
 ResumePeek: WindowPeek;
 SuspendPeek: WindowPeek;

 PROCEDURE crash;
 BEGIN
 ExitToShell;
 END;

BEGIN    {main }
 MoreMasters;            
 InitGraf(@thePort);    {Quickdraw Init}
 InitFonts;             {Font manager init}
 InitWindows;           {Window manager init}
 InitMenus;             {Menu manager init}
 TEInit;                {Text edit init}
 InitDialogs(@crash);   {Dialog manager}
 FlushEvents(everyEvent, 0);         
 InitCursor;             {Make an arrow cursor}
 doneFlag := FALSE;      {Do not exit program yet}

 MemoryPtr := pointer(mBarHeightGlobal); 
 mBarHeight := MemoryPtr^;
 screen := ScreenBits.Bounds; {current screen device}
 SetRect(DragArea, Screen.left + 4, Screen.top +
 mBarHeight + 4, Screen.right - 4, Screen.bottom - 4);

 Init_My_Menus;  {Initialize menu bar}
 Init_ExampleWindow;  {Initialize the window }
 Open_ExampleWindow(MainWindow);  {Open the window }

 REPEAT     {main event loop}
 DoIt := WaitNextEvent(EveryEvent, myEvent, sleep,
  NIL); {no mouse tracking}
 IF DoIt THEN
 BEGIN
 code := FindWindow(myEvent.where, whichWindow); {Get which window the 
event happened in}
 CASE myEvent.what OF

 MouseDown: {Mouse button pressed}
 BEGIN  {Handle the pressed button}
 IF (code = inMenuBar) THEN 
 BEGIN  {Get menu selection }
 mResult := MenuSelect(myEvent.Where);
 theMenu := HiWord(mResult); { menu}
 theItem := LoWord(mResult); {item}
 Handle_My_Menu(doneFlag, theMenu,
  theItem);
 END; {End of inMenuBar}

 IF (code = inContent) THEN 
 BEGIN   {Handle hit inside a window}
 IF (whichWindow <> FrontWindow) THEN
 SelectWindow(whichWindow)
 ELSE   
 BEGIN   {Handle the button}
 SetPort(whichWindow);
 Do_ExampleWindow(myEvent);
 END; {End of else}
 END;  {End of inContent}

 IF (code = inSysWindow) THEN 
 {See if a DA selection}
 SystemClick(myEvent, whichWindow); 

 IF (code = inDrag) THEN
 DragWindow(whichWindow, myEvent.Where,
  DragArea);

 IF (code = inGoAway) THEN
 IF TrackGoAway(whichWindow,
  myEvent.Where) THEN
 BEGIN
 HideWindow(whichWindow);
 doneFlag := true;
 END;
 END;  {End of MouseDown}

 KeyDown, AutoKey:  {Handle key inputs}
 BEGIN   {Get the key and handle it}
 WITH myevent DO  
 BEGIN                   {}
 chCode := BitAnd(message,
  CharCodeMask); {Get character}
 ch := CHR(chCode);    
 {Change to ASCII}
 IF (Odd(modifiers DIV CmdKey)) THEN
 BEGIN               {}
 mResult := MenuKey(ch);
 theMenu := HiWord(mResult);
 theItem := LoWord(mResult);
 IF (theMenu <> 0) THEN 
 {See if a list was selected}
 Handle_My_Menu(doneFlag,
  theMenu, theItem);
 END;                 {}
 END;    {End for with}
 END;        {End for KeyDown,AutoKey}

 UpDateEvt:  {Update event for a window}
 BEGIN     {Handle the update}
 GetPort(tempPort);
 whichWindow := WindowPtr(myEvent.message);
 {Get the window the update is for}
 SetPort(whichWindow);
 BeginUpdate(whichWindow); 
 {Set the clipping to the update area}
 Update_ExampleWindow(whichWindow); 
 {Update this window}
 EndUpdate(whichWindow);   
 {Return to normal clipping area}
 SetPort(tempPort);
 END;   {End of UpDateEvt}

 ActivateEvt:   {Window activated event}
 BEGIN        {Handle the activation}
 whichWindow := WindowPtr(myevent.message);
 {Get the window to be activated}
 IF odd(myEvent.modifiers) THEN 
 {Activate and not DeActivate}
 SelectWindow(whichWindow); 
 {Activate the window by selecting it}
 END;     {End of ActivateEvt}

 SuspendEvt: 
 BEGIN
 bit0 := 31; {convert 68000 to toolbox}
 {check for resume event }
 IF Odd(myEvent.message) THEN
 BEGIN  {resume}
 whichWindow := FrontWindow;
 IF whichWindow = MainWindow THEN
 BEGIN
 Setport(whichWindow);
 InvalRect(whichWindow^.portRect);
 SelectWindow(whichWindow);
 END;
 IF FrontWindow <> NIL THEN
 BEGIN {DA check}
 ResumePeek :=
  WindowPeek(FrontWindow);
 IF ResumePeek^.windowKind < 0
  THEN {DA}
 BEGIN {da}
 myEvent.what := activateEvt;
 BitSet(@myEvent.modifiers,
  bit0);
 sysresult :=
  SystemEvent(myEvent);
 END; {da}
 END; {DA check}
 { end of activate Event}
 END {of resume}
 ELSE
 BEGIN  {suspend}
 {de-activate Event}
 whichWindow := FrontWindow;
 IF whichWindow = MainWindow THEN
 BEGIN
 SetPort(whichWindow);
 InvalRect(whichWindow^.portRect);
 END;
 IF FrontWindow <> NIL THEN
 BEGIN {DA check}
 SuspendPeek :=
  WindowPeek(FrontWindow);
 IF SuspendPeek^.windowKind < 0
  THEN
 BEGIN {da}
 myEvent.what := activateEvt;
 BitClr(@myEvent.modifiers,
  bit0);
 sysresult :=
  SystemEvent(myEvent);
 END; {da}
 END; {DA check}
 END; {suspend}
 END;

 OTHERWISE
 BEGIN
 END;       {End of otherwise}
 END;   {End of case}
 END;   {end of waitNextEvent}
 UNTIL doneFlag;   {End of the event loop}
 DisposeWindow(MainWindow); 
END.    {End of the program}

UNIT InitTheMenus;

INTERFACE

 PROCEDURE Init_My_Menus;

 VAR
 AppleMenu: MenuHandle;
 FileMenu: MenuHandle;

IMPLEMENTATION

 PROCEDURE Init_My_Menus; {Initialize the menus}
 CONST
 Menu1 = 201;   {Apple Menu resource ID}
 Menu2 = 202;   {File Menu resource ID}
 BEGIN              {Start of Init_My_Menus}
 ClearMenuBar;    {Clear any old menu bars}
 AppleMenu := GetMenu(Menu1);  {Get apple menu}
 AddResMenu(AppleMenu, ‘DRVR’); {Add in DAs}
 InsertMenu(AppleMenu, 0); 
 FileMenu := GetMenu(Menu2);      {File menu}
 InsertMenu(FileMenu, 0);   
 DrawMenuBar;   {Draw the menu bar}
 END;      {End of procedure Init_My_Menus}
END.    {End of Unit}

UNIT AboutDialog;

{File name:AboutDialog.Pas   }
{Function: Handle a dialog}

INTERFACE

 PROCEDURE D_AboutDialog;

IMPLEMENTATION

 CONST   {item numbers for controls in Dialog}
 I_OK = 1;
 VAR
 ExitDialog: boolean;  {Flag used to exit Dialog}

 PROCEDURE D_AboutDialog;
 VAR
 GetSelection: DialogPtr; {Name of dialog}
 itemHit: Integer;   {Get selection}
 BEGIN     {Start of dialog handler}
 GetSelection := GetNewDialog(2, NIL, Pointer(-1));
 {Bring in the dialog resource}
 ShowWindow(GetSelection);    {Open a dialog box}
 SelectWindow(GetSelection);  {Lets see it}
 SetPort(GetSelection); 

 ExitDialog := FALSE;   {Do not exit loop yet}
 REPEAT          {Start of dialog handle loop}
 ModalDialog(NIL, itemHit);  
 IF (ItemHit = I_OK) THEN {Handle Button}
 BEGIN
 ExitDialog := TRUE;      {Exit the dialog}
 END;      {End for this item selected}
 UNTIL ExitDialog; {Handle until exit selected}
 DisposDialog(GetSelection);       
 END;    {End of procedure}
END.   {End of unit}

UNIT ExampleWindow;

{File name: ExampleWindow.Pas}
{Function: Handle a Window}

INTERFACE
 USES
 myCDEF;

 PROCEDURE Init_ExampleWindow;
 PROCEDURE Open_ExampleWindow (VAR theWindow: WindowPtr);
 PROCEDURE Update_ExampleWindow (whichWindow: WindowPtr);
 PROCEDURE Do_ExampleWindow (myEvent: EventRecord);

IMPLEMENTATION

 CONST
 I_Buttonx1 = 3;    {Button ID}
 I_Checkboxx2 = 4;  {Checkbox ID}
 I_Radio2 = 6;      {Radio ID}
 I_Radio3 = 7;      {Radio ID}
 I_Radio1 = 5;      {Radio ID}

 VAR
 MyWindow: WindowPtr;     {Window pointer}
 tempRect: Rect; {Temporary rectangle}
 CtrlHandle, buttonHdl: controlhandle;
 sTemp: Str255;  {Get text entered, temp holding}
 R1Control: ARRAY[1..3] OF ControlHandle; 
 { Radio button handles for group 1}

 PROCEDURE Init_ExampleWindow;
 BEGIN
 MyWindow := NIL;  {we are not valid yet}
 END;

  {Update our window, someone uncovered a part of us}
 PROCEDURE UpDate_ExampleWindow;
 CONST
 picBaseID = 144;
 VAR
 SavePort: WindowPtr;  {Place to save the last port}
 pictRect: rect;
 Pic_Handle: PicHandle;
 pictindex: integer;

 BEGIN     {Start of Window update routine}
 IF (MyWindow <> NIL) AND (MyWindow = whichWindow)
  THEN 
 BEGIN
 TextFont(systemFont); 
          {Draw a string of text, Static Text }
 SetRect(tempRect, 266, 100, 312, 116);
 sTemp := ‘Button’;
 TextBox(Pointer(ord(@sTemp) + 1), length(sTemp),
  tempRect, teJustLeft);

        {Draw a string of text, Static Text }
 SetRect(tempRect, 151, 100, 217, 116);
 sTemp := ‘CheckBox’;
 TextBox(Pointer(ord(@sTemp) + 1), length(sTemp),
  tempRect, teJustLeft);

         {Draw a string of text, Static Text }
 SetRect(tempRect, 36, 100, 77, 116);
 sTemp := ‘Radio’;
 TextBox(Pointer(ord(@sTemp) + 1), length(sTemp),
  tempRect, teJustLeft);

        {Draw a string of text, Static Text }
 SetRect(tempRect, 76, 125, 287, 141);
 sTemp := ‘Designer CDEF by Kirk Chase’;
 TextBox(Pointer(ord(@sTemp) + 1), length(sTemp),
  tempRect, teJustLeft);
 TextFont(applFont);  
 pictRect := buttonHdl^^.contrlRect;
 InsetRect(pictRect, 2, 2);
 pictindex := GetCtlValue(buttonHdl);
 Pic_Handle := GetPicture(picBaseID + pictindex);
   {Get Picture into memory}
 IF (Pic_Handle <> NIL) THEN 
 DrawPicture(Pic_Handle, pictRect);
 DrawControls(MyWindow);  {Draw controls}
 END;    {End for if (MyWindow<>nil)}
 END;    {End of procedure}

  {Open our window and draw everything}
 PROCEDURE Open_ExampleWindow;
 VAR
 CDEFHandle: handle;
 chkhdl: controlhandle;

 BEGIN    {Start of Window open routine}
 IF (MyWindow = NIL) THEN     
 BEGIN
 MyWindow := GetNewWindow(1, NIL, Pointer(-1)); 
 {Get the window from the resource file}
 theWindow := MyWindow;

 {get a handle to our CDEF Proc}
 CDEFHandle := NewHandle(0);
 CDEFHandle^ := Ptr(@DesignerButtonProc);

         { Make a button, Button }
 CtrlHandle := GetNewControl(I_Buttonx1,
  MyWindow);
 HLock(Handle(CtrlHandle));
 CtrlHandle^^.contrlDefProc := CDEFHandle;
 HUnLock(Handle(CtrlHandle));
 CtrlHandle^^.contrlHilite := 255;
 buttonHdl := CtrlHandle;

         { Make a checkbox, Checkbox }
 CtrlHandle := GetNewControl(I_Checkboxx2,
  MyWindow); {Make a new checkbox}
 HLock(Handle(CtrlHandle));
 CtrlHandle^^.contrlDefProc := CDEFHandle;
 HUnLock(Handle(CtrlHandle));
 chkhdl := CtrlHandle;

        { Make a radio button, Radio1 }
 R1Control[1] := GetNewControl(I_Radio1,
  MyWindow);
 HLock(Handle(CtrlHandle));
 R1Control[1]^^.contrlDefProc := CDEFHandle;
 HUnLock(Handle(CtrlHandle));

        { Make a radio button, Radio2 }
 R1Control[2] := GetNewControl(I_Radio2,
  MyWindow);
 HLock(Handle(CtrlHandle));
 R1Control[2]^^.contrlDefProc := CDEFHandle;
 HUnLock(Handle(CtrlHandle));

        { Make a radio button, Radio3 }
 R1Control[3] := GetNewControl(I_Radio3,
  MyWindow);
 HLock(Handle(CtrlHandle));
 R1Control[3]^^.contrlDefProc := CDEFHandle;
 HUnLock(Handle(CtrlHandle));

 ShowWindow(MyWindow);
 SelectWindow(MyWindow); {window to front}
 SetPort(MyWindow); {write into our window}

 UpDate_ExampleWindow(MyWindow); 

 END    {End for if (MyWindow<>nil)}
 ELSE
 SelectWindow(MyWindow);      

 END;   {End of procedure}

  {Handle action to our window, like controls}
 PROCEDURE Do_ExampleWindow;
 CONST
 HiliteValue = 10;
 inactive = 255;
 active = 0;
 left = 0;
 right = 1;

 VAR
 RefCon: integer;   {RefCon for controls}
 code: integer;    {Location of event}
 theValue: integer;  {Current value of a control}
 whichWindow: WindowPtr;  {window for event}
 myPt, myPtGlobal: Point;   
 theControl: ControlHandle;   
 badRect: rect;

 PROCEDURE Do_A_Button;  

 BEGIN
 HiliteControl(theControl, HiliteValue);      
 {Darken the button}
 RefCon := GetCRefCon(theControl);   
 {get control refcon}

 CASE RefCon OF  {Select correct button}
 I_Buttonx1:    {Button, button}
 BEGIN        {start for this button}
 theValue := GetCtlValue(theControl);
 theValue := (theValue + 1) MOD 6; 
 SetCtlValue(theControl, theValue); 
 {Set button to new value}
 badRect := buttonhdl^^.contrlRect;
 InvalRect(badRect); 
 END;  {end for this button}

 OTHERWISE {allow other buttons, trap for debug}
 ;
 END;  {end of case}

 HiliteControl(theControl, active);  
 END;   {Handle a button being pressed}


 PROCEDURE Do_A_Checkbox;              
 {Handle a checkbox being pressed}
 VAR
 Index: integer; {Index used for radios}

 PROCEDURE Clear1RadioGroup;           
 {Routine to clear radios in group 1}
 VAR
 Index: integer; {Index used for radios}
 BEGIN    {Start of the clear routine}
 FOR Index := 1 TO 3 DO {Step thru all radios}
 SetCtlValue(R1Control[Index], 0);  
 {Set this radio to zero}
 END;   {End of the clear routine}

 BEGIN    {Handle a checkbox being pressed}
 RefCon := GetCRefCon(theControl);   
 theValue := GetCtlValue(theControl); 
 theValue := (theValue + 1) MOD 2;   {Change value}

 CASE RefCon OF {Select correct button}
 I_Checkboxx2:  {Checkbox, checkbox}
 BEGIN   {start for this button}
 SetCtlValue(theControl, theValue); 
 {Set checkbox to new value}
 badRect := buttonhdl^^.contrlRect;
 InvalRect(badRect);
 CASE theValue OF {left or right controls}
 left: 
 BEGIN
 HiliteControl(buttonHdl, inactive);
 HiliteControl(R1Control[1], active);
 HiliteControl(R1Control[2], active);
 HiliteControl(R1Control[3], active);
 END;
 right: 
 BEGIN
 HiliteControl(buttonHdl, active);
 HiliteControl(R1Control[1], inactive);
 HiliteControl(R1Control[2], inactive);
 HiliteControl(R1Control[3], inactive);
 END;
 OTHERWISE
 ;
 END;
 END;   {end for this checkbox}

 I_Radio1, I_Radio2, I_Radio3:                   
 {radio buttons}
 BEGIN    {start for this radio button}
 Clear1RadioGroup;  
 SetCtlValue(theControl, 1); 
 END; {end for this radio button}
 OTHERWISE
 ;
 END;    {end of case}
 END;   {Handle a checkbox being pressed}

 BEGIN   {Start of Window handler}
 IF (MyWindow <> NIL) THEN           
 BEGIN
 code := FindWindow(myEvent.where, whichWindow); 
 IF (myEvent.what = MouseDown) AND (MyWindow =
  whichWindow) THEN 
 BEGIN  
 myPt := myEvent.where; {Get mouse position}
 myPtGlobal := myPt;
 GlobalToLocal(myPt);
 END;
 IF (MyWindow = whichWindow) AND (code =
  inContent) THEN {for our window}
 BEGIN
 code := FindControl(myPt, whichWindow,
  theControl); {Get type of control}
 IF (code <> 0) THEN  {Check type}
 code := TrackControl(theControl, myPt,
  NIL); {Track the control}
 IF code = inButton THEN
 Do_A_Button;   {Do buttons}
 IF code = inCheckBox THEN
 Do_A_Checkbox;  {Do checkboxes}
 END;  {End for if (MyWindow=whichWindow)}
 END;    {End for if (MyWindow<>nil)}
 END;   {End of procedure}

END.   {End of unit}

UNIT HandleTheMenus;

INTERFACE

 USES
 AboutDialog, ExampleWindow, InitTheMenus;

 PROCEDURE Handle_My_Menu (VAR doneFlag: boolean;
  theMenu, theItem: integer); {Handle menu selection}

IMPLEMENTATION

 PROCEDURE Handle_My_Menu;
 CONST
 L_Apple = 201;  {Menu list}
 C_About = 1;
 L_File = 202;   {Menu list}
 C_Quit = 1;
 VAR
 DNA: integer;   {For opening DAs}
 BoolHolder: boolean;   {For SystemEdit result}
 DAName: Str255;   {For getting DA name}
 SavePort: GrafPtr;  {Save current port}

 BEGIN
 CASE theMenu OF   {Do selected menu list}

 L_Apple: 
 BEGIN
 IF theItem = C_About THEN
 D_AboutDialog   {Call a dialog}
 ELSE              {Handle the DAs}
 BEGIN
 GetPort(SavePort);    {Save port}
 GetItem(AppleMenu, theItem, DAName);
 DNA := OpenDeskAcc(DAName); {Open DA }
 SetPort(SavePort);    {Restore port}
 END;
 END;   {of L_Apple}

 L_File: 
 BEGIN
 IF theItem = C_Quit THEN
 doneFlag := true;
 END;

 OTHERWISE
 BEGIN
 END;
 END;
 HiliteMenu(0);   {Turn menu selection off}
 END;   {End of procedure Handle_My_Menu}

END.    {End of unit}

****************************
*
* RMaker resource file sources.
* File: DesignerButtons.R
* History: 12/19/88 Original by Prototyper.   
*

DesignerButtons.RSRC
????KCBx

Type KCBx = STR 
ID ,0
CDEF Demo \0D© by Kirk Chase \0Dver 19 DEC 1989

* Multifinder Menu for Quit Cmd
Type mstr = STR 
File  ,100
File

* Multifinder Quit name
Type mstr = STR 
Quit  ,101
Quit

Type FREF
CDEF,128
APPL 0

Type BNDL
Bundle,128
KCBx 0
ICN#
0 128
FREF 
0 128

Type SIZE = GNRL
MultiFinder ,-1
.H
4800    ;; $4800 = bits 14 & 11 set
.L
80000 ;; ( recomended)
.L
50000 ;; ( minimum)
.I

Type vers = GNRL
 , 1
.H
01 ;; byte vers # in BCD
10 ;; byte vers part 2 & 3
50 ;; byte release stage $50=release
00 ;; byte stage of non-release
00 00 ;; integer country 0=US
.P
V1.1 (US)
.P
CDEF Demo 1.1, © by Kirk Chase for MacTutor 1989

Type vers = GNRL
 , 2
.H
05 ;; byte vers # in BCD
30 ;; byte vers part 2 & 3
50 ;; byte release stage $50=release
00 ;; byte stage of non-release
00 00 ;; integer country 0=US
.P
V5.3
.P
MacTutor Volume 5 Number 3

* This is the definition for the DIALOG.
*
Type DLOG
About    ,2         ;;Resource ID
About Dialog        ;;Dialog title
186  87  313  411   ;;Top Left Bottom Right
Visible NoGoAway    ;;Visible GoAway 
1                   ;;ProcID, dialog def ID
2                   ;;Refcon, reference value
2                   ;;ID of item list

* This is the DIALOG or ALERT item list.
*
Type DITL
About Items   ,2    ;;Resource ID
3                   ;;Number of controls in list

Button  Enabled     ;;Push button
75  181  111  247   ;;Top Left Bottom Right
OK                  ;;message

StaticText          ;;Static text
40  11  56  297     ;;Top Left Bottom Right
Portions of code developed by Prototyper

StaticText          ;;Static text
15  6  36  307      ;;Top Left Bottom Right
Designer CDEF by Kirk Chase For MacTutor\0D

* This is the definition for the MENU.
*
Type MENU
Apple     ,201    ;;Resource ID
\14               ;;APPLE menu title
About Designer CDEF ...
(-

File     ,202   ;;Resource ID
File            ;;menu title
Quit/Q          ;;item title

* This is the definition for the WINDOW.
*
Type WIND
Kirk Chase    ,1   ;;Resource ID
Example Window     ;;Window title
55  17  210  373   ;;Top Left Bottom Right
InVisible  GoAway  ;;Visible GoAway 
4                  ;;ProcID, Window def ID
1                  ;;Refcon, reference value

* This is the CONTROL item list.
*
Type CNTL
Button   ,3      ;;Resource ID
Button           ;;Title for a Button
5  246  81  332  ;;Top Left Bottom Right
Visible          ;;Initially visible 
0                ;;ProcID (Control definition ID)
3                ;;RefCon (reference value)
0 5 0            ;;Min Max Value

Checkbox   ,4    ;;Resource ID
Deactivate       ;;Title for a Checkbox
5  136  80  221  ;;Top Left Bottom Right
Visible          ;;Initially visible 
1                ;;ProcID (Control definition ID)
4                ;;RefCon (reference value)
0 1 0            ;;Min Max Value

Radio Caution   ,6   ;;Resource ID
Caution                                  
25  21  45  106                        
Visible                                
2                                     
6                                     
0 1 0                                  

Radio Go   ,7    ;;Resource ID
Go                                  
45  21  65  106                         
Visible                                 
2                                       
7                                      
0 1 0                                

Radio Stop  ,5  ;;Resource ID
Stop                                  
5  21  25  106                          
Visible                                 
2                                       
5                                       
0 1 1                                   

* PICTs for button
Type PICT = GNRL
,149
.H
008B 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 0015 0015 0027 0027 0700 0100
0158 5400 2F00 1400 4200 2758 5400 1400
4A00 2700 5D58 5400 2F00 4A00 4200 5D58
5400 4A00 4A00 5D00 5D58 5400 4A00 1400
5D00 2758 A000 8DA0 0083 FF

Type PICT = GNRL
,148
.H
0081 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 004B 0015 005D 0027 0700 0100
0158 5400 4A00 4A00 5D00 5D58 5400 1400
1400 2700 2758 5400 1400 4A00 2700 5D58
5400 2F00 2F00 4200 4258 A000 8DA0 0083
FF

Type PICT = GNRL
,147
.H
0077 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 0015 0015 0027 0027 0700 0100
0158 5400 1400 4A00 2700 5D58 5400 4A00
1400 5D00 2758 5400 4A00 4A00 5D00 5D58
A000 8DA0 0083 FF

Type PICT = GNRL
,146
.H
006D 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 0015 0015 0027 0027 0700 0100
0158 5400 2F00 2F00 4200 4258 5400 4A00
4A00 5D00 5D58 A000 8DA0 0083 FF

Type PICT = GNRL
,145
.H
0063 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 004B 004B 005D 005D 0700 0100
0158 5400 1400 1400 2700 2758 A000 8DA0
0083 FF

Type PICT = GNRL
,144
.H
0059 0007 0007 0068 0068 1101 A000 82A0
008C 0100 0A00 0700 0700 6800 680A 0000
0000 0000 0000 0B00 1B00 1B44 0009 0009
0066 0066 0700 0200 0248 0AFF FFFF FFFF
FFFF FF54 0030 0030 0042 0042 0700 0100
0158 A000 8DA0 0083 FF

Type ICN# = GNRL
  ,128 (0)
.H
include MyIconFile
 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Duplicate Annihilator 5.7.5 - Find and d...
Duplicate Annihilator takes on the time-consuming task of comparing the images in your iPhoto library using effective algorithms to make sure that no duplicate escapes. Duplicate Annihilator... Read more
BusyContacts 1.0.2 - Fast, efficient con...
BusyContacts is a contact manager for OS X that makes creating, finding, and managing contacts faster and more efficient. It brings to contact management the same power, flexibility, and sharing... Read more
Capture One Pro 8.2.0.82 - RAW workflow...
Capture One Pro 8 is a professional RAW converter offering you ultimate image quality with accurate colors and incredible detail from more than 300 high-end cameras -- straight out of the box. It... Read more
Backblaze 4.0.0.872 - Online backup serv...
Backblaze is an online backup service designed from the ground-up for the Mac.With unlimited storage available for $5 per month, as well as a free 15-day trial, peace of mind is within reach with... Read more
Little Snitch 3.5.2 - Alerts you about o...
Little Snitch gives you control over your private outgoing data. Track background activity As soon as your computer connects to the Internet, applications often have permission to send any... Read more
Monolingual 1.6.4 - Remove unwanted OS X...
Monolingual is a program for removing unnecesary language resources from OS X, in order to reclaim several hundred megabytes of disk space. If you use your computer in only one (human) language, you... Read more
CleanApp 5.0 - Application deinstaller a...
CleanApp is an application deinstaller and archiver.... Your hard drive gets fuller day by day, but do you know why? CleanApp 5 provides you with insights how to reclaim disk space. There are... Read more
Fantastical 2.0 - Create calendar events...
Fantastical is the Mac calendar you'll actually enjoy using. Creating an event with Fantastical is quick, easy, and fun: Open Fantastical with a single click or keystroke Type in your event details... Read more
Cocktail 8.2 - General maintenance and o...
Cocktail is a general purpose utility for OS X that lets you clean, repair and optimize your Mac. It is a powerful digital toolset that helps hundreds of thousands of Mac users around the world get... Read more
Direct Mail 4.0.4 - Create and send grea...
Direct Mail is an easy-to-use, fully-featured email marketing app purpose-built for OS X. It lets you create and send great looking email campaigns. Start your newsletter by selecting from a gallery... Read more

These are All the Apple Watch Apps and G...
The Apple Watch is less than a month from hitting store shelves, and once you get your hands on it you're probably going to want some apps and games to install. Fear not! We've compiled a list of all the Apple Watch apps and games we've been able to... | Read more »
Appy to Have Known You - Lee Hamlet Look...
Being at 148Apps these past 2 years has been an awesome experience that has taught me a great deal, and working with such a great team has been a privilege. Thank you to Rob Rich, and to both Rob LeFebvre and Jeff Scott before him, for helping me... | Read more »
Hands-On With Allstar Heroes - A Promisi...
Let’s get this out of the way quickly. Allstar Heroes looks a lot like a certain other recent action RPG release, but it turns out that while it’s not yet available here, Allstar Heroes has been around for much longer than that other title. Now that... | Read more »
Macho Man and Steve Austin Join the Rank...
WWE Immortals, by Warner Bros. Interactive Entertainment and WWE, has gotten a superstar update. You'll now have access to Macho Man Randy Savage and Steve Austin. Both characters have two different versions: Macho Man Randy Savage Renegade or Macho... | Read more »
Fearless Fantasy is Fantastic for the iF...
I actually had my first look at Fearless Fantasy last year at E3, but it was on a PC so there wasn't much for me to talk about. But now that I've been able to play with a pre-release version of the iOS build, there's quite a bit for me to talk... | Read more »
MLB Manager 2015 (Games)
MLB Manager 2015 5.0.14 Device: iOS Universal Category: Games Price: $4.99, Version: 5.0.14 (iTunes) Description: Guide your favorite MLB franchise to glory! MLB Manager 2015, officially licensed by MLB.com and based on the award-... | Read more »
Breath of Light (Games)
Breath of Light 1.0.1421 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0.1421 (iTunes) Description: Hold a quiet moment. Breath of Light is a meditative and beautiful puzzle game with a hypnotic soundtrack by... | Read more »
WWE WrestleMania Tags into the App Store
Are You ready to rumble? The official WWE WrestleMania app, by World Wrestling Entertainment, is now available. Now you can get all your WrestleMania info in one place before anyone else. The app offers details on superstar signings, interactive... | Read more »
Bio Inc's New Expansion is Infectin...
Bio Inc., by DryGin Studios, is the real time strategy game where you infect a human body with the worst virus your evil brain can design. Recently, the game was updated to add a whole lot of new features. Now you can play the new “Lethal”... | Read more »
The Monocular Minion is Here! Despicable...
Despicable Me: Minion Rush, by Gameloft, is introducing a new runner to the mix in their latest update. Now you can play as Carl, the prankster minion. Carl has a few new abilities to play with, including running at a higher speed from the start.... | Read more »

Price Scanner via MacPrices.net

13-inch 2.5GHz MacBook Pro (refurbished) avai...
The Apple Store has Apple Certified Refurbished 13″ 2.5GHz MacBook Pros available for $829, or $270 off the cost of new models. Apple’s one-year warranty is standard, and shipping is free: - 13″ 2.... Read more
Save up to $80 on iPad Air 2s, NY tax only, f...
 B&H Photo has iPad Air 2s on sale for $80 off MSRP including free shipping plus NY sales tax only: - 16GB iPad Air 2 WiFi: $469.99 $30 off - 64GB iPad Air 2 WiFi: $549.99 $50 off - 128GB iPad... Read more
iMacs on sale for up to $205 off MSRP
B&H Photo has 21″ and 27″ iMacs on sale for up to $205 off MSRP including free shipping plus NY sales tax only: - 21″ 1.4GHz iMac: $1019 $80 off - 21″ 2.7GHz iMac: $1189 $110 off - 21″ 2.9GHz... Read more
Färbe Technik Offers iPhone Battery Charge LI...
Färbe Technik, which manufactures and markets of mobile accessories for Apple, Blackberry and Samsung mobile devices, is offering tips on how to keep your iPhone charged while in the field: •... Read more
Electronic Recyclers International CEO Urges...
Citing a recent story on CNBC about concerns some security professionals have about the forthcoming Apple Watch, John Shegerian, Chairman and CEO of Electronic Recyclers International (ERI), the... Read more
Save up to $380 with Apple refurbished iMacs
The Apple Store has Apple Certified Refurbished iMacs available for up to $380 off the cost of new models. Apple’s one-year warranty is standard, and shipping is free: - 27″ 3.5GHz 5K iMac – $2119 $... Read more
Mac minis on sale for up to $75 off, starting...
MacMall has Mac minis on sale for up to $75 off MSRP including free shipping. Their prices are the lowest available for these models from any reseller: - 1.4GHz Mac mini: $459.99 $40 off - 2.6GHz Mac... Read more
College Student Deals: Additional $50 off Mac...
Take an additional $50 off all MacBooks and iMacs at Best Buy Online with their College Students Deals Savings, valid through April 11, 2015. Anyone with a valid .EDU email address can take advantage... Read more
Mac Pros on sale for up to $260 off MSRP
B&H Photo has Mac Pros on sale for up to $260 off MSRP. Shipping is free, and B&H charges sales tax in NY only: - 3.7GHz 4-core Mac Pro: $2799, $200 off MSRP - 3.5GHz 6-core Mac Pro: $3719.99... Read more
13-inch 2.5GHz MacBook Pro on sale for $100 o...
B&H Photo has the 13″ 2.5GHz MacBook Pro on sale for $999 including free shipping plus NY sales tax only. Their price is $100 off MSRP. Read more

Jobs Board

DevOps Software Engineer - *Apple* Pay, iOS...
**Job Summary** Imagine what you could do here. At Apple , great ideas have a way of becoming great products, services, and customer experiences very quickly. Bring 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
Sr. Technical Services Consultant, *Apple*...
**Job Summary** Apple Professional Services (APS) has an opening for a senior technical position that contributes to Apple 's efforts for strategic and transactional Read more
Lead *Apple* Solutions Consultant - Retail...
**Job Summary** Job Summary The Lead ASC is an Apple employee who serves as the Apple business manager and influencer in a hyper-business critical Reseller's store Read more
*Apple* Pay - Site Reliability Engineer - Ap...
**Job Summary** Imagine what you could do here. At Apple , great ideas have a way of becoming great products, services, and customer experiences very quickly. Bring Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.