TweetFollow Us on Twitter

June 94 - Displaying Hierarchical Lists

Displaying Hierarchical Lists


[IMAGE 058-078_Minow_REV1.GIF]

Much of the data you manage on a Macintosh has a hierarchical nature. This article shows how your application can provide a clear, coherent data organization with a user-controlled display by using classic linked lists, storing the list data in handles, and displaying it with the List Manager. A triangular button mechanism, similar to that used in the Finder to open and close folders in list views, lets the user decide how much data to view on the screen.

If your application makes its hierarchical data accessible but not overwhelming, it will have an advantage over applications that provide only two alternatives -- "throw it all on the screen" or "hide everything." You can find many examples of flexible organization: The Finder presents file and folder information in a variety of display formats revealing more or less information according to the user's own desires. Document-based applications such as NewsWatcher provide a hierarchy of text information. The JMP statistical application provides buttons that reveal more detailed information about an analysis. Programming languages such as Frontier allow the programmer to display as much of a module's code as is needed.

This article shows how to do the following:

  • store hierarchical data in a linked list along with the information needed to display it properly
  • extend the List Manager by storing a button object in a List Manager cell that controls how the data hierarchy is displayed
  • build the data hierarchy and display it
  • let the user manipulate the buttons to view more or less of the data

The accompanying code on this issue's CD includes a sample library that stores data, displays it, and manages the buttons, and a simple application that uses the library. The techniques described in the article are appropriate for displaying and organizing moderate amounts of data; they're less useful for static data or large amounts of data and are inefficient with small amounts of data.

Figure 1 shows a Finder-like window that was created with this library; the files displayed are from the sample library. I've called the libraryTwistDown to emphasize how the display acts when you click the buttons. The Finder development team calls the buttonstriangular buttons .

[IMAGE 058-078_Minow_REV2.GIF]

Figure 1. Window created with TwistDown library


There isn't much in this article on linked lists or handles; I assume you struggled with "classical" list processing when you learned to program and have done enough programming on the Macintosh to understand how handle-based storage operates. Keep in mind that two kinds of lists are discussed here: linked lists and Macintosh List Manager display lists. To keep confusion to a minimum,element refers to a component of a linked list andcell refers to a component of a List Manager list. Note also that linked lists contain the data, while the List Manager list only controls the appearance of that data. A good understanding of the List Manager is needed to follow the code examples later in the article. (For details on the List Manager, seeInside Macintosh: More Macintosh Toolbox , or Inside Macintosh Volume IV.)

In the context of this article, a list element is a chunk of data, a few flags, and two linkages. This section discusses the linkages, which connect list elements into sequences and hierarchies, and the creation and disposal of list elements. The flags, which simplify formatting the data, are discussed later in the section "Controlling Data Appearance."

Figure 2 illustrates the linkages that connect list elements. The important thing to remember about the hierarchical linked lists we're using is that any element may have asuccessor -- the sibling element that follows it -- and adescendant -- a child element that begins a lower level of the hierarchy. For example, a document outline has a sequence of chapters (siblings) and each chapter has, as its descendants, a sequence of sections.

In the sample code, each list element is stored in a handle. This allows the Memory Manager to reorganize memory to store data efficiently. However, don't forget that the application program is responsible for disposing of data that's no longer needed.

Two library functions manage the list elements: MakeTwistDownElement creates an element and connects it to the list hierarchy and DisposeTwistDownElement deletes an element along with its descendants and successors.

[IMAGE 058-078_Minow_REV3.GIF]

Figure 2. List element organization

Listing 1 shows the definition of our element structure, TwistDownRecord. Each field of this structure will be explained as it's encountered in the sample code.

Listing 1. TwistDownRecord

struct TwistDownRecord {
  struct TwistDownRecord  **nextElement; /* -> successor element  */
  struct TwistDownRecord  **subElement;  /* -> descendant element */
  short                   indentLevel;   /* Indentation depth */
  unsigned short          flag;          /* Control flags */
  unsigned short          dataLength;    /* Actual data length */
  unsigned char           data[1];       /* Data to display */
typedef struct TwistDownRecord  TwistDownRecord,
        *TwistDownPtr, **TwistDownHandle;

MakeTwistDownElement (Listing 2) is called with the data to store in the element and a handle to its predecessor. The predecessor is either NULL or the previous (elder) sibling element. For example, when creating element 3 in the list shown in Figure 2, the previous element is element 1.

TwistDownRecord is a variable-length structure and NewHandle creates an instance that's large enough to hold the caller's data record. The structure definition, however, contains one bit of trickery that's required by the ANSI C standard -- it must specify at least one byte for the data [] placeholder. This is why the parameter to NewHandle adjusts the handle size to eliminate the extra byte.

The DisposeTwistDownHandle function disposes of a list element and then disposes of its descendant and successor lists. To dispose of an entire list, call this function with the first list element.

A simplified version of DisposeTwistDownHandle is shown in Listing 3. The library implementation allows the application developer to specify a function that's called when disposing of each element in the list. This is needed if an application has to store complex structures -- themselves containing Ptr or Handle references -- in a TwistDownHandle.

Listing 2. MakeTwistDownElement

OSErr MakeTwistDownElement(TwistDownHandle  previousElement,
                           short            indentLevel,
                           unsigned short   dataLength,
                           Ptr              dataPtr,
                           TwistDownHandle  *result)
    TwistDownHandle twistDownHandle;

    twistDownHandle =
        (TwistDownHandle) NewHandle(sizeof(TwistDownRecord) 
                        - sizeof(unsigned char) + dataLength);
    *result = twistDownHandle;
    if (twistDownHandle != NULL) {
        if (previousElement != NULL)
            (**previousElement).nextElement = twistDownHandle;
        (**twistDownHandle).nextElement = NULL;
        (**twistDownHandle).subElement = NULL;
        (**twistDownHandle).indentLevel = indentLevel;
        (**twistDownHandle).flag = 0;
        (**twistDownHandle).dataLength = dataLength;
        if (dataPtr != NULL)
            BlockMove(dataPtr, (**twistDownHandle).data, dataLength);
    return (MemError());

Listing 3. DisposeTwistDownHandle

void DisposeTwistDownHandle(TwistDownHandle twistDownHandle)
    TwistDownHandle nextElement, subElement;

    while (twistDownHandle != NULL) {
        nextElement = (**twistDownHandle).nextElement;
        subElement = (**twistDownHandle).subElement;
        DisposeHandle((Handle) twistDownHandle);
        if (subElement != NULL)
        twistDownHandle = nextElement;

Note that DisposeTwistDownHandle is a recursive function; it calls itself to dispose of the descendants of a hierarchy. If it's called with the list shown in Figure 2, it disposes of elements in the order 1, 2, and 3.

Using recursion simplifies the list-management algorithms in the TwistDown function library. However, it's not without its pitfalls in the real world. Each time a function such as DisposeTwistDownHandle encounters a subelement list, it calls itself to dispose of that list, and each of these calls uses stack space. While this isn't usually a problem for applications, you should avoid recursive algorithms in device drivers or other nonapplication code segments because they must work within the constraints of some other application's stack.*


Once the data is organized as a hierarchical list, the application could simply display the whole list by just storing handles to the list elements in List Manager cells. However, if your application lets the user control how much of the data is displayed, there must be a way for the user to browse through the data and to specify which elements are visible and which are hidden.

A familiar mechanism for doing this exists in the Finder, where small buttons indicate which cells have subhierarchies and whether the subhierarchy is visible. These triangular buttons have two stable states: one for closed (invisible) hierarchies and one for open (visible) hierarchies. There are also three transient states: an intermediate button is displayed briefly when the user clicks a triangular button to change between the open and closed states; and the closed and open buttons are drawn filled when a mouse-down event is located on the button. To manage these buttons and the display of visible data, each list element needs a few flags and an indentation variable. These are stored in the TwistDownRecord structure.

The indentation variable -- indentLevel -- specifies the hierarchical depth of an element and is used to display sublists so that the data for an element appears under its parent, but indented to show its place in the hierarchy.

The bits in the flag field are used to record the record's state and to communicate between the application and the List Manager's list definition function (LDEF):

/* These are the values that can appear in the flag word. */
#define kHasTwistDown      0x0001  /* This element has a sublist */
#define kShowSublist       0x0002  /* Display the sublist content */
#define kOldShowSublist    0x0004  /* Saved kShowSublist state */
#define kSelectedElement   0x0008  /* Copy "selected" from list */
#define kDrawButtonFilled  0x0010  /* Signal "mouseDown" in button */
#define kOnlyRedrawButton  0x0020  /* Signal "tracking mouse" */
#define kDrawIntermediate  0x0040  /* Draw the animation polygon */
#define kEraseButtonArea   0x0080  /* Need complete button redraw */

The flag field is defined as an unsigned short with explicitly defined bits rather than as a bitfield, which would have made the program slightly easier to read. However, the ANSI C standard doesn't specify how the bits in a bitfield are arranged, and different compilers are free to choose their own organization of the bits. This means that if you write parts of your code using several compilers, or distribute modules in object form for others to use, you may cause a debugging nightmare. This is especially true if you use bitfields to construct data records that are sent in network messages between different systems. The flag bits could have been defined as an enum, but this can also cause portability problems. Using explicit bit definitions will also make it easier to convert your code to run on the Power Macintosh. *

The first four flag bits have the following meanings:

  • kHasTwistDown is set if the element should have a triangular button when it's drawn. While you might assume that the existence of a non-null subElement pointer would be sufficient, the Finder illustrates a better design: it displays triangular buttons for all folders, even if there are no files in a folder. This immediately tells the user that the line on the display represents a folder, rather than a file.
  • kShowSublist is set if the sublist should be displayed. This is normally controlled by the user clicking a triangular button, which changes the kShowSublist state.
  • kOldShowSublist is used to save the old kShowSublist setting in case you need to temporarily change the display hierarchy. This lets you undo a display state change or provide a Show All Hierarchies command. It's not used in the sample code.
  • kSelectedElement records the selection state of the list cell. It's needed to properly retain the selection status of visible cells.

The other flag bits are needed to handle mouse events. They're set by the mouse-down event handler and the LDEF references them to control its actions:

  • kDrawButtonFilled is set when the user presses a button (the cursor is over a triangular button while the user has the mouse buttton held down). It causes the LDEF to fill the triangular button to indicate that the user is pressing it.
  • kOnlyRedrawButton is set to constrain the LDEF so that the entire display line doesn't blink when the user presses a button. As the user moves the cursor in and out of the button, the drawing procedure must redraw the button to show whether the user is pressing the button. However, there's no need to redraw the actual data contents. This flag tells the LDEF to redraw only the button.
  • kDrawIntermediate is set when the user releases the mouse button within the button area: the button state changes from closed to open or vice versa. To indicate this change, the LDEF draws the button in an intermediate state, delays for an instant, and then draws the button in its new, stable state.
  • kEraseButtonArea is set to erase the button area before it's drawn. If not set, the button is redrawn in its new form, but not erased; this eliminates unnecessary button flicker.

The TwistDown library uses the following four macros internally to access the flag word:

#define SetTDFlag(tdHandle, mask)      ((**tdHandle).flag |= (mask))
#define ClearTDFlag(tdHandle, mask)    ((**tdHandle).flag &= ~(mask))
#define InvertTDFlag(tdHandle, mask)   ((**tdHandle).flag ^= (mask))
#define TestTDFlag(tdHandle, mask) (((**tdHandle).flag &(mask)) != 0)


When you first look at the List Manager, it may appear to be the solution to all your display needs. Unfortunately, it has a number of characteristics that restrict its usefulness. It's designed to store limited amounts of data, and performance slows appreciably as you increase the number of cells or the amount of data stored in the cells. Also, if your list cells are not all the same size or your application needs fine control over scrolling, you'll probably find life simpler if you create your own function library. For example, both MacApp and the THINK Class Library offer flexible libraries for displaying and managing structured data. However, the List Manager serves well for straightforward lists of a small number of items -- and with the addition of the triangular buttons it becomes a very useful tool.

The TwistDown subroutine library creates a one-column list with a vertical scroll bar. The code has only two unusual features:

  • NewTwistDownList stores a small amount of private information in a handle that's stored in the userHandle field of the list record. This includes a pointer to a user-defined drawing function, the display font and font size, and a flag that signals whether clicking on cell data should highlight the cell contents.
  • It establishes a private LDEF that manages the visual display. Normally, the LDEF is stored in a resource. In the sample code, however, it's linked into the application and a stub resource is created for the benefit of the List Manager. This stub, a three-instruction procedure that the List Manager calls, jumps to the twist- down LDEF. This is not necessary for this library -- it could have been separately compiled -- but is useful for debugging and for LDEF procedures that need to access application globals.

When you recompile this program to run on a Power Macintosh as a "native" application (rather than in 680x0-compatibility mode), you'll have to redo this sequence slightly. The time to worry about conversion is now, before your customers are tapping you on the shoulder asking, "Not today? How about next Tuesday?" There's more on converting for Power Macintosh at the end of this article. *

Note that there are two separate drawing procedures: the twist-down LDEF manages the buttons and drawing for simple text displays, while the application program can specify its own drawing function to draw more complex data.

The twist-down LDEF requires a small amount of global information to properly process the list. This is stored in a handle-based structure defined as shown in Listin g 4. Two Boolean variables in this record haven't been described: canHiliteSelection and isLeftJustify. The canHiliteSelection field controls whether the LDEF highlights selected cells. The isLeftJustify flag is set for left-to-right languages (such as English) and cleared for languages such as Arabic and Hebrew. This flag isn't used in the code shown in this article, but the TwistDown library on the CD shows how an application might handle a right-to-left language.

The triangular buttons are defined as QuickDraw polygons, rather than as bitmaps, with the advantage that the function is independent of the list cell size and script direction. This is useful for localization or for programs used by people who are visually impaired or have diminished motor skills: the program will display larger buttons if the application or user chooses a large font. It also lets the program draw the closed and intermediate buttons pointing in the proper direction for right- to-left script systems such as Arabic and Hebrew. Figure 3 illustrates an expanded view of the triangular buttons. As an example, the code in Listing 5 shows how you would create the polygons for a left-to-right script. See the sample on the CD for more general code, which accounts for the writing direction of the script.

Listing 4. TwistDownPrivateRecord

struct TwistDownPrivateRecord {
  TwistDownDrawProc   drawProc;   /* User-defined drawing function */
  PolyHandle          openTriangle;         /* The expanded button */
  PolyHandle          closedTriangle;         /* The closed button */
  PolyHandle          intermediateTriangle;   /* Animation */
  short               tabIndent;              /* Child indentation */
  short               fontSize;               /* For TextSize */
  short               fontNumber;             /* For TextFont */
  Boolean             canHiliteSelection;     /* Highlight cell OK? */
  Boolean             isLeftJustify;          /* GetSystJust value */
  short               triangleWidth;          /* Button width */
typedef struct TwistDownPrivateRecord   TwistDownPrivateRecord,
        *TwistDownPrivatePtr, **TwistDownPrivateHandle;

[IMAGE 058-078_Minow_REV10.GIF]

Figure 3. The triangular buttons


After creating the List Manager list, the application builds its hierarchical structure (the linked list). List elements are created by the MakeTwistDownElement function. As described earlier in "Creating a List Element," MakeTwistDownElement obtains the necessary (handle) storage, initializes all flags, and stores the application data in the list element. It also links the new element to the previous (elder sibling) element in the list.

Normally, a twist-down list is built by a recursive function such as the one shown in Listing 6, MyBuildHierarchy. MyBuildHierarchy calls a function named MyGetInfo that stores a small amountof data into a structure called MyInfoRecord. Neither of these is defined here: they're application specific.


After you've built the data hierarchy, the next step is to determine which elements are visible initially and build the visible list. The CreateVisibleList function constructs a new visible display given the head of a hierarchical list and a List Manager handle. It stores the head in the first cell (cell [0, 0]) and calls BuildVisibleList to store the visible elements in the subsequent cells.

Listing 5. Creating triangular button polygons

buttonSize = info.ascent;          /* The button height */
buttonSize &= ~1;              /* Round down to an even number */
halfSize = buttonSize / 2;         /* For 45-degree triangles */
intermediateSize = (buttonSize * 3) / 4;
(**privateHdl).openTriangle = OpenPoly();
    MoveTo(0, halfSize);
    LineTo(buttonSize, halfSize);
    LineTo(halfSize, buttonSize);
    LineTo(0, halfSize);
(**privateHdl).closedTriangle = OpenPoly();
    MoveTo(halfSize, 0);
    LineTo(buttonSize, halfSize);
    LineTo(halfSize, buttonSize);
    LineTo(halfSize, 0);
(**privateHdl).intermediateTriangle = OpenPoly();
    MoveTo(intermediateSize, 0);
    LineTo(intermediateSize, intermediateSize);
    LineTo(0, intermediateSize);
    LineTo(intermediateSize, 0);

Listing 6. Building a twist-down list

TwistDownHandle MyBuildHierarchy(ListHandle theList,
                    short indentLevel)
    OSErr           status;
    TwistDownHandle previousElement, thisElement, firstElement;
    MyInfoRecord    myInfoRecord;
    Boolean         isHierarchy;
    EventRecord     currentEvent;

    firstElement = NULL;
    previousElement = NULL;
    /*** Other initialization here */
    do {
        /*** Call EventAvail here to give time to background tasks.*/
        EventAvail(everyEvent, &currentEvent);
        status = MyGetInfo(&myInfoRecord, &isHierarchy);
        if (status == noErr)
            status = MakeTwistDownElement(previousElement,
                indentLevel, sizeof(MyInfoRecord),
                (Ptr) &myInfoRecord, &thisElement);
        if (status == noErr) {
            /*** Remember the first element in this sibling        */
            /*** sequence;                                         */
            /*** it's needed by our caller.                        */
            if (firstElement == NULL)
                firstElement = thisElement;
            /*** If this data begins a hierarchy, descend by       */
            /*** calling this function recursively. Store the      */
            /*** first element of the new sublist in the           */
            /*** subElement pointer. (flag & kHasTwistDown)    */
            /*** will be TRUE even if the child list is empty.     */
            if (isHierarchy) {
                SetTDFlag(thisElement, kHasTwistDown);
                (**thisElement).subElement =
                        MyBuildHierarchy(theList, indentLevel + 1);
            /*** Set sibling linkage for next element.             */
            previousElement = thisElement;
    } while (status == noErr);
    return (firstElement);

BuildVisibleList is called in two situations: when the application first constructs the list and when the user changes the visual hierarchy by clicking a triangular button. It calls CountVisibleElements to determine the number of cells needed, adjusts the size of the list to the desired number, and calls a recursive function, SetElementsInList, to do the actual storage. SetElementsInList needs what is essentially a global counter to know which cell will receive the current list element.

BuildVisibleList associates list cells with elements in the hierarchical list as follows:

  1. It copies the current selection status of each list cell from the List Manager cell to the associated TwistDownHandle element.
  2. It counts the number of elements that will be displayed and adds or removes rows from the List Manager list as needed.
  3. Finally, it stores references to the visible elements in the list cells, updating the selection status as needed.

The utility functions used in adding and removing elements from the List Manager list aren't shown here but may be examined in the sample library. BuildVisibleList uses several local, recursive functions to process the hierarchical list that all have a similar overall structure. For example, CountVisibleElements (Listing 7) computes the number of list elements that should be displayed.


Now that we have a visible list, we're ready to let the user manipulate the hierarchy by clicking the triangular buttons. When the user presses the mouse button, the application decides whether the cursor is in one of its windows and whether this window might just happen to have a twist-down list. If so, the application calls DoTwistDownClick with the list handle, a pointer to an event record, and a pointer to a Cell structure that identifies the selected cell on exit. DoTwistDownClick returns one of five action states, as shown in Table 1.

Listing 7. CountVisibleElements

short CountVisibleElements(TwistDownHandle twistDownHandle)
    short       result;

    result = 0;
    while (twistDownHandle != NULL) {
        if (TestTDFlag(twistDownHandle, kShowSublist))
            result += 
    return (result);

Table 1
DoTwistDownClick action states

Action StateMeaning
kTwistDownNotInListThe mouse-down event was not in the list area. Your application should handle this event.
kTwistDownNoClickThe user pressed the mouse button in a triangular button but released it outside the button. Your application should ignore this click.
kTwistDownButtonClickThe mouse click was in the triangular button. DoTwistDownClick has handled this, but your application may need to do further processing.
kTwistDownClickThe user clicked, once, on list data. Your application may need to do further processing.
kTwistDownDoubleClick The user double-clicked on list data. Your application may need to do further processing.

The techniques described here for handling mouse events can be used to create lists whose cells contain other kinds of active elements, such as buttons or checkboxes . *

DoTwistDownClick, together with the subroutines it calls, hides a fairly complex process consisting of the following steps; these steps are described further in the following sections and illustrated in the simplified version of DoTwistClick shown in Listing 8.

  1. Check that the mouse-down event is in the list area.
  2. Check that the user pressed a triangular button.
  3. Track the mouse while it's held down.
  4. Take appropriate action when the mouse button is released.

Did the user press in the list rectangle?Get the mouse location in local coordinates and the window rectangle that contains the list and its scroll bar. If the mouse location is not in the list, just return.

Did the user press a triangular button?The user pressed in the list area; is it in a button? The code sample on the CD has a test for left or right alignment (so that you can use the function with Arabic or Hebrew script systems) but that test is ignored here. The central algorithm determines the rectangle that encloses all the cell buttons. If the cursor is in that area, it then checks whether there is a cell under the cursor and, if so, whether this cell actually displays a button.

Track the mouse while it's in the button area.If we get past all that, we know that the user pressed a triangular button. The click-handler sets and clears flag bits that the LDEF references when redrawing the list cell. The LDEF starts by drawing the button in its active (filled) state. Note that each call to LDraw redraws the list cell -- but, as pointed out earlier, the kOnlyRedrawButton flag prevents the entire display line from blinking.

The sequence beginning with "if (StillDown ())" in the code shows how you can track your own visual elements, such as icons, as if they were normal buttons. You can also use this technique to add checkboxes or other button-like objects to list cells.

The user released the mouse button.When the user releases the mouse button in the triangular button area, the application changes the button state (for example, from [IMAGE 058-078_Minow_REV14.GIF] to [IMAGE 058-078_Minow_REV15.GIF] ). This is a two-step process that briefly flashes an intermediate button ( [IMAGE 058-078_Minow_REV16.GIF] ) to give the user the illusion of change. While your application would certainly work without this subtle touch, it wouldn't look as good. Call theExpandOrCollapseTwistDownList function after flashing the intermediate button to redraw the button in its new state. Note that kEraseButtonArea is set so that the intermediate button is drawn properly.

Listing 8. DoTwistDownClick

    DoTwistDownClick(ListHandle          theList,
                     const EventRecord   *eventRecordPtr,
                     Cell                *selectedListCell)
    Cell             theCell;      /* Current list cell            */
    Rect             hitRect;      /* The button area in this cell */
    Boolean          inHitRect;    /* Cursor is in the button area */
    Boolean          newInHitRect; /* Cursor moved into the button */
    short            cellHeight;   /* Height of a list cell        */
    short            visibleTop;   /* Top pixel in the list area   */
    TwistDownHandle  twistDownHandle;/* Current twist-down element */
    TwistDownPrivateHandle  privateHandle;  /* Private data        */
    Point            mousePt;      /* Where the mouse is located   */
    TwistDownClickState  result;   /* Function result              */
    long             finalTicks;   /* For the Delay function       */

    /*** 1. Did the user press in the list rectangle?              */
    mousePt = eventRecordPtr->where;
    GlobalToLocal(&mousePt);     /* Mouse in local coordinates */
    hitRect = (**theList).rView;           /* Here's the list area */
    hitRect.right += kScrollBarWidth;/* Include the scroll bar, too*/
    if (PtInRect(mousePt, &hitRect) == FALSE) {
        result = kTwistDownNotInList;
        return (result);

    /*** 2. Did the user press a triangular button?                */
    privateHdl = (TwistDownPrivateHandle) (**theList).userHandle;
    hitRect.right = (**theList).rView.left + (**theList).indent.h
                        + (**privateHdl).triangleWidth;
    inHitRect = FALSE;
    if (PtInRect(mousePt, &hitRect)) {
        /*** The mouse is in the button area; is there a cell?     */
        cellHeight = (**theList).cellSize.v;
        theCell.h = 0;
        theCell.v = ((mousePt.v - (**theList) / cellHeight
                    + (**theList);
        /*** This is a list cell that should have data. Get the    */
        /*** twistdown element handle. If there's no data, or no   */
        /*** hierarchy, the click will be ignored.                 */
        twistDownHandle = GetTwistDownElementHandle(theList, theCell);
        if ((twistDownHandle != NULL)
         && TestTDFlag(twistDownHandle, kHasTwistDown))
            inHitRect = TRUE;
    if (inHitRect == FALSE) {
        /*** There's no button here, or the user didn't click it.  */
        /*** Just call the normal list click-handler and return    */
        /*** its value.  This is needed to handle scroll bars      */
        /*** correctly.                                            */
        if (LClick(mousePt, eventRecordPtr->modifiers, theList))
            return (kTwistDownDoubleClick);
        else {
            return (kTwistDownClick);

    /*** 3. Track the mouse while it's in the button area.         */
        kDrawButtonFilled | kOnlyRedrawButton);
    LDraw(theCell, theList);
    /*** Set hitRect to the triangular button dimensions.          */ = (theCell.v - (**theList) * cellHeight
                    + (**theList);
    hitRect.bottom = + cellHeight;
    /*** Track the mouse while it's still down: if it moves into   */
    /*** the rectangle, redraw it filled; if it moves out, redraw  */
    /*** it unfilled.                                              */
    if (StillDown()) {
        while (WaitMouseUp()) {
            newInHitRect = PtInRect(mousePt, &hitRect);
            if (newInHitRect != inHitRect) {
                /*** The cursor moved into or out of the triangle. */
                InvertTDFlag(twistDownHandle, kDrawButtonFilled);
                LDraw(theCell, theList);
                inHitRect = newInHitRect;
    /*** 4. The user released the mouse button.                    */
    if (inHitRect == FALSE) {
        /*** The user canceled the operation by releasing the      */
        /*** mouse outside the triangular button area.             */
        /*** drawButtonFilled will normally be clear. It can be    */
        /*** set, however, if the user clicks so briefly that the  */
        /*** StillDown() test above is FALSE                       */
        if (TestTDFlag(twistDownHandle, kDrawButtonFilled)) {
            ClearTDFlag(twistDownHandle), kDrawButtonFilled);
            LDraw(theCell, theList);
        ClearTDFlag(twistDownHandle), kOnlyRedrawButton);
        return (kTwistDownNoClick);
        (kDrawIntermediate | kEraseButtonArea));
    LDraw(theCell, theList);
    Delay(kAnimationDelay, &finalTicks);
        (kDrawIntermediate | kDrawButtonFilled | kEraseButtonArea));
    ExpandOrCollapseTwistDownList(theList, theCell);
    *selectedListCell = theCell;
    ClearTDFlag(twistDownHandle, kOnlyRedrawButton);
    return (kTwistDownButtonClick);

ExpandOrCollapseTwistDownList (Listing 9) is normally called directly by DoTwistDownClick, as shown in the preceding section. It can also be called directly by the application. When called, it inverts the "expansion" state of the designated list cell, redraws the triangular button, and calls BuildVisibleList (described earlier in "Creating the Visible Display") to revise the visible hierarchy. Note that BuildVisibleList will modify the display starting with the current cell: the cells above will not change and thus need not be modified or redrawn.


When the contents of a list cell change or the display requires updating, the List Manager calls the TwistDownLDEF function. This function draws the button in its current state and either draws the list cell (for simple text cells) or calls a user-defined drawing function to draw more complex cells. The code is generally straightforward (again, ignoring right or left considerations). Basically, it examines the state of the kOnlyRedrawButton flag and proceeds as follows: * If the flag is set, "shrink" the display rectangle so that only the button is redrawn. Choose the correct triangular polygon and draw it in its proper state. * If the flag is clear, draw the cell data and the triangular polygon.

Let's look more closely at the TwistDownLDEF drawing code (Listing 10):

  1. First we determine what to draw. To begin drawing the list, we first need the cell content. This is the handle that contains the list element. We also check that userHandle has been set up correctly. Note that we don't use the List Manager's LFind function because the data might not be aligned in the list cell storage. (Actually, the data is aligned, because only handles are stored in the cells, but it doesn't hurt to be suspicious.) If the handle contains a list element, the values of the flags determine what to draw.
  2. Next, we call DrawTriangle to draw the triangular button. The value of theFlag determines the button state and its location.
  3. Finally, after checking to be sure kOnlyRedrawButton is not set and that we have the data, TwistDownLDEF redraws the cell data with the proper indentations. Here's where the code allows you to specify a user-defined drawing function.

Listing 9. ExpandOrCollapseTwistDownList

twistDownHandle = GetTwistDownElementHandle(theList, theCell);
if ((twistDownHandle != NULL)
 && TestTDFlag(twistDownHandle, kHasTwistDown)) {
    InvertTDFlag(twistDownHandle, kShowSublist);
    /*** Redraw the triangular button in its new state.            */
    ClearTDFlag(twistDownHandle, kDrawButtonFilled);
        (kOnlyRedrawButton | kEraseButtonArea));
    LDraw(theCell, theList);
        (kOnlyRedrawButton | kEraseButtonArea));
    /*** If some other part of the list will change, rebuild the   */
    /*** List Manager cells and redraw the list.                   */
    if ((**twistDownHandle).subElement != NULL)
        BuildVisibleList(theList, theCell.v);

Listing 10. TwistDownLDEF drawing code

pascal void TwistDownLDEF(
        short               listMessage,
        Boolean             listSelect,
        Rect                *listRect,
        Cell                listCell,           /* Unused          */
        short               listDataOffset,     /* Unused          */
        short               listDataLen,
        ListHandle          theList
    short           indent;           /* Cell data indentation     */
    TwistDownHandle twistDownHandle;  /* The cell data             */
    TwistDownPtr    twistDownPtr;     /* Cell data (locked handle) */
    short           cellSize;         /* sizeof(TwistDownHandle)   */
    PolyHandle      polyHandle;       /* Button polygon            */
    Point           polyPoint;        /* Where to draw the button  */
    Rect            viewRect;         /* Actual cell drawing area  */
    signed char     elementLockState; /* twistDownHandle lock state*/

    #define TestFlag(flagBit) ((theFlag & (flagBit)) != 0)

    . . . /*** Other LDEF processing isn't shown.                  */

    /*** 1. Determine what to draw.                                */
    cellSize = sizeof twistDownHandle;
    LGetCell(&twistDownHandle, &cellSize, listCell, theList);
    if ((cellSize == sizeof twistDownHandle)
         && twistDownHandle != NULL) {
        /*** There is a list element. (This if statement extends   */
        /*** all the way to the end of the sequence.) Lock the     */
        /*** element in memory and look at the flag values. Set    */
        /*** viewRect to the part of the List Manager cell that    */
        /*** will be drawn.                                        */
        elementLockState = HGetState((Handle) twistDownHandle);
        HLock((Handle) twistDownHandle);
        twistDownPtr = (*twistDownHandle);
        privateHdl = (TwistDownPrivateHandle) (**theList).userHandle;
        viewRect = *listRect;
        theFlag = (*twistDownPtr).flag;
        if (TestFlag(kOnlyRedrawButton)) { 
            /*** Shrink the display area when only the button is   */
            /*** redrawn.                                          */
            viewRect.right = viewRect.left + (**theList).indent.h
                                + (**privateHdl).triangleWidth;
        if (TestFlag(kOnlyRedrawButton) == FALSE 
         || TestFlag(kEraseButtonArea))

        /*** 2. Draw the triangular button.                        */ 
        if (TestFlag(kHasTwistDown)) {
            polyPoint.v = listRect->top + 1;
            polyPoint.h = listRect->left + (**theList).indent.h
                            + kTriangleOutsideGap;
            if (TestFlag(kDrawIntermediate))
                polyHandle = (**privateHdl).intermediateTriangle;
            else if (TestFlag(kShowSublist))
                polyHandle = (**privateHdl).openTriangle;
                polyHandle = (**privateHdl).closedTriangle;
            DrawTriangle(polyHandle, polyPoint,
                         theFlag & kDrawButtonFilled);
        /*** 3. Draw the cell data.                                */
        if (TestFlag(kOnlyRedrawButton) == FALSE
         && (*twistDownPtr).dataLength > 0) {
            /*** Indent the text to show the depth of the          */
            /*** hierarchy. Then build a display rectangle for the */
            /*** cell text and set the pen to the leftmost         */
            /*** position of the text.                             */
            indent = (**theList).indent.h
                    + (**privateHdl).triangleWidth
                    + ((**privateHdl).tabIndent
                       * (*twistDownPtr).indentLevel);
            viewRect = *listRect;
            viewRect.left += indent;
            /*** If the user didn't provide a drawing procedure,   */
            /*** draw a text string. Otherwise, call the user's    */
            /*** procedure.                                        */
            if ((**privateHdl).drawProc == NULL) {
                    + (**theList).indent.v);
                DrawText((*twistDownPtr).data, 0,
            else {
                /* Call user's drawing function */
                  theList,                     /* The list handle  */
                  (const Ptr) (*twistDownPtr).data,/* Data to draw */
                  (*twistDownPtr).dataLength,  /* Size of the data */
                  &viewRect);              /* Where to draw it */
        }                            /* If we're drawing cell data */
        HSetState((Handle) twistDownHandle, elementLockState);
    }                                      /* If we have cell data */

If you look closely at the triangular buttons on a color or grayscale display, you'll notice that the button is filled with a grayish background color. (The Finder uses the color the user assigned to the file, while we use a light gray color.) The DrawTriangle function called by TwistDownLDEF takes three parameters: the polygon, where it's to be drawn, and a Boolean that specifies whether the user is currently pressing the triangular button. DrawTriangle uses the DeviceLoop procedure, DrawThisTriangle, which calls the actual drawing function for each type of device so that drawing can be optimized for different screen depths. (See Listing 11.)

The DeviceLoop procedure is described in "DeviceLoop Meets the Interface Designer," develop  Issue 13, and in Inside Macintosh  Volume VI.*


The sample program illustrates how you can use twist-down lists to display a directory of all files on a volume. It's a very simple program and you would be well advised not to use it on a huge disk with many folders and files, because there's no protection against storage overflow.

The sample program compiles and runs in five environments: THINK C 6.0, Metrowerks DR1, and MPW 3.2 for the 680x0-based Macintosh; and, for the Power Macintosh, Metrowerks DR1 and the MPW provided in the Macintosh on RISC Software Developer's Kit. Converting the code for Power Macintosh took about one day (it was my lab exercise when I took the Apple Developer University "PowerPC BootCamp" course). To learn more about what I did to accomplish this conversion, see "Converting for Power Macintosh."

When you start up the sample program, it begins enumerating the disk; you can click to stop it at any time. The hierarchical list is built using the algorithm illustrated bythe MyBuildHierarchy function, described in the section "Putting Data Into the List."

Listing 11. DrawTriangle and DrawThisTriangle

typedef struct      TriangleInfo {   /* Passed to DrawThisTriangle */
    PolyHandle      polyHandle;      /* The polygon to draw        */
    Point           polyPoint;       /* Where to draw it         */
} TriangleInfo, *TriangleInfoPtr;

static void DrawTriangle(PolyHandle   polyHandle,
                         Point        polyPoint,
                         Boolean      isSelected
    TriangleInfo        triangleInfo;
    RgnHandle           drawingRgn;
    long                savedA5;

    /*** Refresh A5 so that we can use the current QuickDraw       */
    /*** globals.                                                  */
    savedA5 = SetCurrentA5();
    triangleInfo.polyHandle = polyHandle;      /* Save our drawing */
    triangleInfo.polyPoint = polyPoint;        /*  parameters.     */
    /*** Position the polygon properly on the display.             */
    OffsetPoly(polyHandle, polyPoint.h, polyPoint.v);
    if (isSelected)
        FillPoly(polyHandle, &;
    else {
        /*** Get drawing region and call DeviceLoop to do the work */
        drawingRgn = NewRgn();
            drawingRgn,              /* Region to draw into        */
            (DeviceLoopDrawingProcPtr) DrawThisTriangle,
            (long) &triangleInfo,       /* Drawing parameters  */
            0                        /* DeviceLoop flags (ignored) */
    /*** Frame the button in black and move the polygon back to    */
    /*** its default [0,0] position.                               */
    OffsetPoly(polyHandle, -polyPoint.h, -polyPoint.v);
static pascal void DrawThisTriangle(      /* Called by DeviceLoop  */
        short            depth,           /* Screen pixel depth    */
        short            deviceFlags,     /* Device info (ignored) */
        GDHandle         targetDevice,    /* The display (ignored) */
        TriangleInfoPtr  triangleInfoPtr  /* The data to be drawn  */
    RGBColor                    foreColor;
    RGBColor                    saveForeColor;
    RGBColor                    backColor;
    short                       i;
    Rect                        polyRect;

    polyRect = (**(*triangleInfoPtr).polyHandle).polyBBox;
    LocalToGlobal(& ((Point *) &polyRect)[0]);
    LocalToGlobal(& ((Point *) &polyRect)[1]);
    if (depth > 1) {
        /*** Drawing in color or grays: fill the triangle with a   */
        /*** very light gray.                                      */
        saveForeColor = foreColor;
        /*** This loop sets foreColor to a very light gray.        */
        for (i = 0; i < 8; i++) {
            if (GetGray(GetGDevice(), &backColor,
                    &foreColor) == FALSE)
        FillPoly((*triangleInfoPtr).polyHandle, &;
    else {
        /*** Monochrome: erase the interior of the polygon.        */


Here's a simplified checklist of the kinds of things you'll need to do to convert code for the Power Macintosh, based on what I did to convert my program (see the sample code on the CD, especially TwistDownList.c). I borrowed heavily from the document "Moving Your Source to PowerPC" on the Macintosh on RISC Software Developer's Kit CD.
  • Convert to standard C using the most restrictive environment so that the application runs correctly in THINK C and MPW with no compiler or linker errors or warnings. In THINK C, for example, you would enable the Check Pointer Types and Require Prototypes options and remove the MacHeaders option. In all cases, you should add prototypes and explicit function return types and fix potential trigraph problems.
  • Replace all instances of int and unsigned by explicit short and long declarations. Be very careful about structure definitions that are shared among code modules (or written to files or resources), as the Power Macintosh aligns structures differently from the 680x0-based Macintosh: you may need to add #pragma statements to override the compiler.
  • Create a makefile for the MPW development system. Try to build "fat binaries" that will run native on both the 680x0-based Macintosh and Power Macintosh.
  • If at all possible, convert to the universal interfaces provided in the Software Developer's Kit (and on this issue's CD). In particular, ProcPtr references must be converted to UniversalProcPtr. Also, all low-memory references must be replaced by the access functions provided as part of the universal interfaces.
  • Isolate system and compiler dependencies by using #ifdef statements. For MPW-based compilers, add -d MPW=1 to your makefiles. This lets you add compiler- and system-dependent #pragmas and code sequences without encountering compiler warnings.

#ifdef THINK_C /* THINK C */
#ifdef __powerc /* Power Macintosh */
#ifdef MPW /* MPW: see above */
#ifdef applec /* Apple compilers */
  • Remove or isolate all assembly language and inline statements. You can probably eliminate all assembly language from your Power Macintosh applications.
  • Power Macintosh will not support a number of obsolete system traps; when you convert your program, you may need to rewrite small sections of your code. Of course, you should check new code on both the 680x0-based Macintosh and Power Macintosh.
  • Applications must explicitly allocate space for the QuickDraw globals. Add the following to your application's main program file:

 #ifdef __powerc
  • Avoid storing application-specific data in your application's data fork: the Power Macintosh stores its code there. (You can reserve a fixed amount of space at the beginning of the data fork, if necessary.)
  • Add a 'cfrg' (code fragment) resource to your application's resource fork. This tells the Process Manager that you've built a Power Macintosh native application.

 #ifdef __powerc
#include "CodeFragmentTypes.r"
resource 'cfrg' (0) {
        kNoVersionNum, kNoVersionNum,
        0, 0,
        kIsApp, kOnDiskFlat,
        kZeroOffset, kWholeFork,
  • Make good use of the compatibility built into the Power Macintosh: your application should run native on Power Macintosh and still run correctly on a 680x0-based machine. The user shouldn't notice any difference.
  • In most cases, native Power Macintosh applications will be about the same size as their 680x0 counterparts. Of course, if you use the compatible "fat binary" capability, the application file size will increase.

The above list isn't complete by any means, but, together with the sample code, it should get you started. Also, there are several Developer University courses available to help bring you up to speed quickly.


So, what's this method of displaying data good for? If you have data that's hierarchical, coherent, line-oriented, and not too large, you'll find that the twist-down list functions are both useful and easy to incorporate into your applications. * Hierarchical. If the data doesn't separate into a strict hierarchy, the presence of triangular buttons will only confuse your users: they're expecting your application to operate like the Finder. Also, if the hierarchy is very limited (a single topic with a block of text), you'll probably find some other solution easier to use.
  • Coherent. Your users expect consistency between the parent "title" and child "content" data. Try another technique if clicking a triangular button does something other than reveal a lower-level hierarchy. For example, the JMP statistical package uses standard Macintosh buttons to expand a hierarchy. Clicking a button may reveal a table of data or a graphical element. (JMP hierarchies are also quite shallow.)
  • Line-oriented. Again, the user is expecting Finder-like behavior. If the data is not line-oriented, you'll discover that coaxing the List Manager to deal with your data isn't worth the considerable effort it takes. In particular, avoid varying the height of each line as this makes the triangular buttons look weird (some small, some large) unless you normalize their size.
  • Not too large. This is a restriction of the List Manager. Because of the way it stores data, there's an absolute limit of 32,767 cells in a list, but it becomes very slow and clumsy with more than a few hundred cells.

I wrote the TwistDown library because I wanted to display an AOCE catalog specification that can contain many internal components of varying size and complexity. It offered a friendly interface into a structure that is convoluted, warped, and -- indeed -- twisted.


  • "Standalone Code on PowerPC" by Tim Nichols, develop  Issue 17.
  • "Making the Leap to PowerPC" by Dave Radcliffe, develop   Issue 16.
  • Inside Macintosh: More Macintosh Toolbox  (Addison-Wesley, 1993), Chapter 4, "List Manager," or Inside Macintosh  Volume IV (Addison-Wesley, 1986), Chapter 30, "The List Manager Package."
  • "DeviceLoop Meets the Interface Designer" by John Powers, develop  Issue 13. DeviceLoop is also described in Inside Macintosh  Volume VI (Addison-Wesley, 1991) on page 21-23.

MARTIN MINOW (AppleLink MINOW, Internet is an aged, wrinkled hacker who, having determined that it's far too late to whine about his receding hairline, instead takes perverse delight in informing his young colleagues at excessive length how much better programming was when you had to punch out your programs, one machine word after another, on oily paper tape, back in the good old days when hex digits were KSNJFL, words were 40 bits long, and a supercomputer had 1024 of them. In real life, he works at Apple's Developer Support Center, drinks beer, and runs marathons.*

ACKNOWLEDGMENTS The TwistDown library is generally based on code from the NewsWatcher application by Steve Falkenburg. Steve's code is based on code written by John Norstad, author of Disinfectant. *

Thanks to our technical reviewers Jon Callas, Godfrey DiGiorgi, Steve Falkenburg, Dave Radcliffe, and Dean Yu. And thanks to Richard Clark for the PowerPC BootCamp course. *


Community Search:
MacTech Search:

Software Updates via MacUpdate

TextSoap 8.4.1 - Automate tedious text d...
TextSoap can automatically remove unwanted characters, fix up messed up carriage returns, and do pretty much anything else that we can think of to text. Save time and effort. Be more productive. Stop... Read more
Backblaze - Online backup servi...
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
Numi 3.15 - Menu-bar calculator supports...
Numi is a calculator that magically combines calculations with text, and allows you to freely share your computations. Numi combines text editor and calculator Support plain English. For example, '5... Read more
EtreCheck 3.3.3 - For troubleshooting yo...
EtreCheck is an app that displays the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to... Read more
BusyContacts 1.1.8 - 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
TunnelBear 3.0.14 - Subscription-based p...
TunnelBear is a subscription-based virtual private network (VPN) service and companion app, enabling you to browse the internet privately and securely. Features Browse privately - Secure your data... Read more
Apple Final Cut Pro X 10.3.4 - Professio...
Apple Final Cut Pro X is a professional video editing solution.Completely redesigned from the ground up, Final Cut Pro adds extraordinary speed, quality, and flexibility to every part of the post-... Read more
Hopper Disassembler 4.2.1- - Binary disa...
Hopper Disassembler is a binary disassembler, decompiler, and debugger for 32-bit and 64-bit executables. It will let you disassemble any binary you want, and provide you all the information about... Read more
Slack 2.6.2 - Collaborative communicatio...
Slack is a collaborative communication app that simplifies real-time messaging, archiving, and search for modern working teams. Version 2.6.2: Fixed Inexplicably, context menus and spell-check... Read more
Arq 5.8.5 - Online backup to Google Driv...
Arq is super-easy online backup for Mac and Windows computers. Back up to your own cloud account (Amazon Cloud Drive, Google Drive, Dropbox, OneDrive, Google Cloud Storage, any S3-compatible server... Read more

Latest Forum Discussions

See All

The best new games we played this week
We were quite busy this week. A bunch of big mobile games launched over the past few days, alongside a few teeny surprises. There're lots of quality games to load your phone with. We've gone and picked out five of our favorites for the week. [... | Read more »
Magikarp Jump beginner's guide
Magikarp Jump is a mystifying little game. Part Tamagotchi, part idle clicker, there's not a whole lot of video game there, per se, but for some reason we can't help coming back to it again and again. Your goal is to train up a little Magikarp to... | Read more »
Goat Simulator PAYDAY (Games)
Goat Simulator PAYDAY 1.0 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0 (iTunes) Description: ** IMPORTANT - SUPPORTED DEVICES **iPhone 4S, iPad 2, iPod Touch 5 or better Goat Simulator: Payday is the most... | Read more »
GRID Autosport delayed until autumn
Sorry mobile racing fans -- GRID Autosport has been delayed a few months. The game is now expected to launch this fall on iOS. Feral Interactive announced that they wanted more time to work on the game's UI and overall performance before launching... | Read more »
Zombie Gunship Survival Beginner's...
The much anticipated Zombie Gunship Survival is here. In this latest entry in the Zombie Gunship franchise, you're tasked with supporting ground troops and protecting your base from the zombie horde. There's a lot of rich base building fun, and... | Read more »
Mordheim: Warband Skirmish (Games)
Mordheim: Warband Skirmish 1.2.2 Device: iOS Universal Category: Games Price: $3.99, Version: 1.2.2 (iTunes) Description: Explore the ruins of the City of Mordheim, clash with other scavenging warbands and collect Wyrdstone -... | Read more »
Mordheim: Warband Skirmish brings tablet...
Legendary Games has just launched Mordheim: Warband Skirmish, a new turn-based action game for iOS and Android. | Read more »
Magikarp Jump splashes onto Android worl...
If you're tired ofPokémon GObut still want something to satisfy your mobilePokémon fix,Magikarp Jumpmay just do the trick. It's out now on Android devices the world over. While it looks like a simple arcade jumper, there's quite a bit more to it... | Read more »
Purrfectly charming open-world RPG Cat Q...
Cat Quest, an expansive open-world RPG from former Koei-Tecmo developers, got a new gameplay trailer today. The video showcases the combat and exploration features of this feline-themed RPG. Cat puns abound as you travel across a large map in a... | Read more »
Jaipur: A Card Game of Duels (Games)
Jaipur: A Card Game of Duels 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: ** WARNING: iPad 2, iPad Mini 1 & iPhone 4S are NOT compatible. ** *** Special Launch Price for a limited... | Read more »

Price Scanner via

Memorial Day savings: 13-inch Touch Bar MacBo...
B&H Photo has the 2016 Apple 13″ Touch Bar MacBook Pros in stock today and on sale for up to $150 off MSRP. Shipping is free, and B&H charges NY & NJ sales tax only: - 13″ 2.9GHz/512GB... Read more
Apple refurbished 13-inch MacBook Airs availa...
Apple has Certified Refurbished 2016 13″ MacBook Airs available starting at $849. An Apple one-year warranty is included with each MacBook, and shipping is free: - 13″ 1.6GHz/8GB/128GB MacBook Air: $... Read more
Apple restocks refurbished 11-inch MacBook Ai...
Apple has Certified Refurbished 11″ MacBook Airs (the latest models recently discontinued by Apple), available for up to $170 off original MSRP. An Apple one-year warranty is included with each... Read more
12-inch 1.2GHz Retina MacBooks on sale for up...
B&H has 12″ 1.2GHz Retina MacBooks on sale for up to $150 off MSRP. Shipping is free, and B&H charges NY & NJ sales tax only: - 12″ 1.2GHz Space Gray Retina MacBook: $1449.99 $150 off... Read more
15-inch 2.7GHz Silver Touch Bar MacBook Pro o...
MacMall has the 15-inch 2.7GHz Silver Touch Bar MacBook Pro (MLW82LL/A) on sale for $2569 as part of their Memorial Day sale. Shipping is free. Their price is $230 off MSRP. Read more
Free Tread Wisely Mobile App Endorsed By Fath...
Just in time for the summer driving season, Cooper Tire & Rubber Company has announced the launch of a new Tread Wisely mobile app. Designed to promote tire and vehicle safety among teens and... Read more
Commercial Notebooks And Detachable Tablets W...
Worldwide shipments of personal computing devices (PCDs), comprised of traditional PCs (a combination of desktop, notebook, and workstations) and tablets (slates and detachables), are forecast to... Read more
Best value this Memorial Day weekend: Touch B...
Apple has Certified Refurbished 2016 15″ and 13″ MacBook Pros available for $230 to $420 off original MSRP. An Apple one-year warranty is included with each model, and shipping is free: - 15″ 2.6GHz... Read more
13-inch MacBook Airs on sale for up to $130 o... has 13″ MacBook Airs on sale for up to $130 off MSRP including free shipping: - 13″ 1.6GHz/128GB MacBook Air (sku MMGF2LL/A): $869.99 $130 off MSRP - 13″ 1.6GHz/256GB MacBook Air (sku... Read more
2.8GHz Mac mini available for $973 with free...
Adorama has the 2.8GHz Mac mini available for $973, $16 off MSRP, including a free copy of Apple’s 3-Year AppleCare Protection Plan. Shipping is free, and Adorama charges sales tax in NY & NJ... Read more

Jobs Board

*Apple* Media Products - Commerce Engineerin...
Apple Media Products - Commerce Engineering Manager Job Number: 57037480 Santa Clara Valley, California, United States Posted: Apr. 18, 2017 Weekly Hours: 40.00 Job Read more
Best Buy *Apple* Computing Master - Best Bu...
**509643BR** **Job Title:** Best Buy Apple Computing Master **Location Number:** 001482- Apple Valley-Store **Job Description:** **What does a Best Buy Apple Read more
*Apple* Media Products - Commerce Engineerin...
Apple Media Products - Commerce Engineering Manager Job Number: 57037480 Santa Clara Valley, California, United States Posted: Apr. 18, 2017 Weekly Hours: 40.00 Job Read more
*Apple* Mac and Mobility Engineer - Infogrou...
Title: Apple Mac and Mobility Engineer Location: Portland, OR Area Type: 12 month contract Job: 17412 Here's a chance to take your skills to the limit, learn new Read more
*Apple* Retail - Multiple Positions, White P...
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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.