{

              
            
               ͻ ͻ ͻ    ͻ ͻ
                    ˼ ͹ ͼ ͹     ͻ
                   ͼ          ͼ ͼ

  The MAX Graphics GUI Kit is Copyright 1995-Current Larry L. Athey (LA-Soft).
  Color Averaging procedures are courtesy of Sean Price (Rude Dog Software).
}
{$I DEFINES.INC}
UNIT GUI_ICON;

INTERFACE

{Icon File Structures}
{                                                                            }
{  TYPE Icon16x16 = RECORD                                                   }
{       Matrix    : ARRAY[1..16,1..16] OF BYTE;                              }
{       END;                                                                 }
{                                                                            }
{  TYPE Icon30x30 = RECORD                                                   }
{       Matrix    : ARRAY[1..30,1..30] OF BYTE;                              }
{       END;                                                                 }
{                                                                            }
{  TYPE Icon60x60 = RECORD                                                   }
{       Matrix    : ARRAY[1..60,1..60] OF BYTE;                              }
{       END;                                                                 }
{                                                                            }
{  The bytes in these records store the color for each pixel of the icon.    }
{  Color #255 is considered transparent (in icons only) by the GUI kit. All  }
{  icon libraries are a 100 record file and all procedures in the GUI kit    }
{  consider these records to be zero based [0..99]...                        }
{                                                                            }
{}

{Icon Drawing/Effects}
{  All flipping icons used by the GUI are handled within a pointer array.    }
{  This pointer array is nil until the first call to the Flip_Icon procedure }
{  in a window. As soon as the window is killed or a new window is drawn,    }
{  this array is DISPOSE'd. It will be NEW'ed again automatically if the     }
{  previous window has any flipping icons in it, and those variables will be }
{  restored automatically as well. Absolutely do not attempt to access any   }
{  IconFlip^[X].Variables if there are no flipping icons active or you will  }
{  experience an Runtime Error. You are also limited to a maximum of 128     }
{  flipping icons per window. All flipping icons are numbered 1..128 and     }
{  NFlips reflects the total active flipping icons.                          }
{                                                                            }
PROCEDURE Flip_Icon(X,Y : WORD ; Icon1,Icon2,Icon3,Icon4,ISize : BYTE);
{^ This procedure is used to plot a sequence of flipping icons. These icons  }
{  are drawn over and over again at one location and synchronized with your  }
{  system clock. X and Y determine the upper left corner of the icons. The   }
{  Icon1..Icon4 variables are record positions of the icons in the currently }
{  selected icon library. ISize determines the size of the icons to draw,    }
{  1=16x16, 2=30x30, and 3=60x60.                                            }
PROCEDURE AnimateIcon(XStart,YStart,XEnd,YEnd,Speed,IconSize,Icon : INTEGER);
{^ This procedure animates an icon from one point on the screen to another.  }
{  The XStart and YStart parameters determine the starting coodinates of the }
{  icon, XEnd and YEnd determine where the icon will stop. The Speed variable}
{  determines the number of milliseconds between animation steps, a value of }
{  zero tells this procedure to synchronize the steps with the beginning of  }
{  the vertical retrace scan. IconSize is the same as ISize in the previous  }
{  procedure, and Icon is the record variable of the icon to animate. You'll }
{  want to keep in mind that an icon synchronized with the vertical retrace  }
{  will have less flicker if it is kept as close to the bottom of the screen }
{  as possible. This is because the WaitForRetrace procedure will actually   }
{  release the program when the retrace starts, which as you know is at the  }
{  bottom of the screen, and as the retrace reaches the top of the screen it }
{  is actually no longer in sync with this procedure.                        }
PROCEDURE PutIcon16(X,Y,I,E : WORD);
{^ This procedure plots a 16x16 pixel icon at X/Y coordinates on the screen. }
{  the I variable is the record of the icon to display, and E is the effect  }
{  to draw the icon with. Valid values for E are:                            }
{                                                                            }
{  0 - No effect.                                                            }
{  1 - Drip down effect.                                                     }
{  2 - Drip up effect.                                                       }
{  3 - Horizontal weave effect.                                              }
{  4 - Vertical weave effect.                                                }
{                                                                            }
PROCEDURE PutIcon30(X,Y,I,E : WORD);
{^ This plots a 30x30 pixel icon, see PutIcon16 for more information.        }
PROCEDURE PutIcon60(X,Y,I,E : WORD);
{^ This plots a 60x60 pixel icon, see PutIcon16 for more information.        }
{}
