Blender V2.61 - r43446
|
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) 2008 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * 00022 * Contributor(s): Blender Foundation 00023 * 00024 * ***** END GPL LICENSE BLOCK ***** 00025 */ 00026 00031 #ifndef ED_BUTTONS_INTERN_H 00032 #define ED_BUTTONS_INTERN_H 00033 00034 #include "DNA_listBase.h" 00035 #include "RNA_types.h" 00036 00037 struct ARegion; 00038 struct ARegionType; 00039 struct ID; 00040 struct SpaceButs; 00041 struct Tex; 00042 struct bContext; 00043 struct bContextDataResult; 00044 struct bNode; 00045 struct bNodeTree; 00046 struct uiLayout; 00047 struct wmOperatorType; 00048 00049 /* buts->scaflag */ 00050 #define BUTS_SENS_SEL 1 00051 #define BUTS_SENS_ACT 2 00052 #define BUTS_SENS_LINK 4 00053 #define BUTS_CONT_SEL 8 00054 #define BUTS_CONT_ACT 16 00055 #define BUTS_CONT_LINK 32 00056 #define BUTS_ACT_SEL 64 00057 #define BUTS_ACT_ACT 128 00058 #define BUTS_ACT_LINK 256 00059 #define BUTS_SENS_STATE 512 00060 #define BUTS_ACT_STATE 1024 00061 00062 /* context data */ 00063 00064 typedef struct ButsContextPath { 00065 PointerRNA ptr[8]; 00066 int len; 00067 int flag; 00068 int tex_ctx; 00069 } ButsContextPath; 00070 00071 typedef struct ButsTextureUser { 00072 struct ButsTextureUser *next, *prev; 00073 00074 struct ID *id; 00075 00076 PointerRNA ptr; 00077 PropertyRNA *prop; 00078 00079 struct bNodeTree *ntree; 00080 struct bNode *node; 00081 00082 const char *category; 00083 int icon; 00084 const char *name; 00085 00086 int index; 00087 } ButsTextureUser; 00088 00089 typedef struct ButsContextTexture { 00090 ListBase users; 00091 00092 struct Tex *texture; 00093 00094 struct ButsTextureUser *user; 00095 int index; 00096 } ButsContextTexture; 00097 00098 /* internal exports only */ 00099 00100 /* buttons_header.c */ 00101 void buttons_header_buttons(const struct bContext *C, struct ARegion *ar); 00102 00103 /* buttons_context.c */ 00104 void buttons_context_compute(const struct bContext *C, struct SpaceButs *sbuts); 00105 int buttons_context(const struct bContext *C, const char *member, struct bContextDataResult *result); 00106 void buttons_context_draw(const struct bContext *C, struct uiLayout *layout); 00107 void buttons_context_register(struct ARegionType *art); 00108 struct ID *buttons_context_id_path(const struct bContext *C); 00109 00110 extern const char *buttons_context_dir[]; /* doc access */ 00111 00112 /* buttons_texture.c */ 00113 void buttons_texture_context_compute(const struct bContext *C, struct SpaceButs *sbuts); 00114 00115 /* buttons_ops.c */ 00116 void BUTTONS_OT_file_browse(struct wmOperatorType *ot); 00117 void BUTTONS_OT_directory_browse(struct wmOperatorType *ot); 00118 void BUTTONS_OT_toolbox(struct wmOperatorType *ot); 00119 00120 #endif /* ED_BUTTONS_INTERN_H */ 00121