NCBI C Toolkit Cross Reference

C/vibrant/imagelst.h


  1 /*  imagelst.h
  2 * ===========================================================================
  3 *
  4 *                            PUBLIC DOMAIN NOTICE                          
  5 *               National Center for Biotechnology Information
  6 *                                                                          
  7 *  This software/database is a "United States Government Work" under the   
  8 *  terms of the United States Copyright Act.  It was written as part of    
  9 *  the author's official duties as a United States Government employee and 
 10 *  thus cannot be copyrighted.  This software/database is freely available 
 11 *  to the public for use. The National Library of Medicine and the U.S.    
 12 *  Government have not placed any restriction on its use or reproduction.  
 13 *                                                                          
 14 *  Although all reasonable efforts have been taken to ensure the accuracy  
 15 *  and reliability of the software and data, the NLM and the U.S.          
 16 *  Government do not and cannot warrant the performance or results that    
 17 *  may be obtained by using this software or data. The NLM and the U.S.    
 18 *  Government disclaim all warranties, express or implied, including       
 19 *  warranties of performance, merchantability or fitness for any particular
 20 *  purpose.                                                                
 21 *                                                                          
 22 *  Please cite the author in any work or product based on this material.   
 23 *
 24 * ===========================================================================
 25 *
 26 * File Name:  imagelst.h
 27 *
 28 * Author:  Vladimir Soussov
 29 *   
 30 * File Description:  Data types for image list
 31 *
 32 *
 33 * $Log: imagelst.h,v $
 34 * Revision 1.1  1998/03/31 21:22:24  sirotkin
 35 * With Vladimir - moved from distrib/internal/taxonomy/tree
 36 *
 37 * Revision 6.0  1997/08/25 18:29:45  madden
 38 * Revision changed to 6.0
 39 *
 40 * Revision 1.1  1997/05/30 16:16:15  soussov
 41 * Set of files for ncbitree library
 42 *
 43 * Revision 1.1  1997/05/29 20:44:24  soussov
 44 * Initial version of tree library
 45 *
 46 *
 47 */
 48 
 49 #ifndef IMAGELST_H_DONE
 50 #define IMAGELST_H_DONE
 51 
 52 #include <ncbi.h>
 53 #include <vibrant.h>
 54 #include "image.h"
 55 
 56 #define NOF_IMG_DEFAULT 16;
 57 
 58 typedef enum {
 59     IMAGE_GIF = 0,
 60     IMAGE_BMP
 61 } ImageFileFormat;
 62 
 63 typedef struct t_ImageList {
 64     Uint2 nof_images;
 65     Uint2 img_size_x, img_size_y;
 66     Image *icon;
 67 } _ImageList, PNTR _ImageListPtr;
 68 
 69 /*****************************************************
 70  * Create new image list
 71  * n - approximate number of images in this list (0 means we don't know)
 72  * size_x, size_y - image size (0 means that the image size can be variable)
 73  */
 74 _ImageListPtr ilst_new(Uint2 n, Uint2 size_x, Uint2 size_y);
 75 
 76 /*****************************************************
 77  * free image list
 78  */
 79 void ilst_free(_ImageListPtr il);
 80 
 81 /*****************************************************
 82  * add image to image list
 83  * this function adds new image to image list using either img or file
 84  */
 85 Uint2 ilst_add(_ImageListPtr il, Image img, CharPtr fileName, ImageFileFormat f);
 86 
 87 /*****************************************************
 88  * replace image in image list
 89  */
 90 Boolean ilst_replace(_ImageListPtr il, Uint2 i_ind, Image img, CharPtr fileName, ImageFileFormat f);
 91 
 92 /*****************************************************
 93  * remove image from the list
 94  */
 95 void ilst_remove(_ImageListPtr il, Uint2 i_ind);
 96 
 97 /*****************************************************
 98  * get image size
 99  */
100 Boolean ilst_size(_ImageListPtr il, Uint2 i_ind, Uint2Ptr w, Uint2Ptr h);
101 
102 /*****************************************************
103  * draw image
104  */
105 Boolean ilst_draw(_ImageListPtr il, Uint2 i_ind, Int2 x, Int2 y);
106 
107 
108 #endif
109 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.