Blender V2.61 - r43446

UI_interface_icons.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  * 
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00032 #ifndef UI_INTERFACE_ICONS_H
00033 #define UI_INTERFACE_ICONS_H
00034 
00035 struct Image;
00036 struct ImBuf;
00037 struct World;
00038 struct Tex;
00039 struct Lamp;
00040 struct Material;
00041 
00042 typedef struct IconFile {
00043     struct IconFile *next, *prev;
00044     char filename[80];  // FILE_MAXFILE size
00045     int index;
00046 } IconFile;
00047 
00048 #define ICON_DEFAULT_HEIGHT 16
00049 #define ICON_DEFAULT_WIDTH  16
00050 
00051 #define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f))
00052 #define ICON_DEFAULT_WIDTH_SCALE  ((int)(UI_UNIT_X * 0.8f))
00053 
00054 #define PREVIEW_DEFAULT_HEIGHT 96
00055 
00056 /*
00057  Resizable Icons for Blender
00058 */
00059 void UI_icons_init(int first_dyn_id);
00060 int UI_icon_get_width(int icon_id);
00061 int UI_icon_get_height(int icon_id);
00062 
00063 void UI_icon_draw(float x, float y, int icon_id);
00064 void UI_icon_draw_preview(float x, float y, int icon_id);
00065 void UI_icon_draw_preview_aspect(float x, float y, int icon_id, float aspect);
00066 void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspect, int size);
00067 
00068 void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
00069 void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
00070 void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
00071 void UI_icons_free(void);
00072 void UI_icons_free_drawinfo(void *drawinfo);
00073 
00074 struct ListBase *UI_iconfile_list(void);
00075 int UI_iconfile_get_index(const char *filename);
00076 
00077 
00078 #endif /*  UI_INTERFACE_ICONS_H */