Blender  V2.59
rna_ui_api.c
Go to the documentation of this file.
00001 /*
00002  * $Id: rna_ui_api.c 36577 2011-05-09 16:31:54Z campbellbarton $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version. 
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2009 Blender Foundation.
00021  * All rights reserved.
00022  *
00023  * 
00024  * Contributor(s): Blender Foundation
00025  *
00026  * ***** END GPL LICENSE BLOCK *****
00027  */
00028 
00034 #include <stdlib.h>
00035 #include <stdio.h>
00036 
00037 #include "RNA_define.h"
00038 
00039 #include "UI_resources.h"
00040 
00041 #ifdef RNA_RUNTIME
00042 
00043 static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, int icon, int expand, int slider, int toggle, int icon_only, int event, int full_event, int emboss, int index)
00044 {
00045         PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
00046         int flag= 0;
00047 
00048         if(!prop) {
00049                 RNA_warning("rna_uiItemR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
00050                 return;
00051         }
00052 
00053         flag |= (slider)? UI_ITEM_R_SLIDER: 0;
00054         flag |= (expand)? UI_ITEM_R_EXPAND: 0;
00055         flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
00056         flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0;
00057         flag |= (event)? UI_ITEM_R_EVENT: 0;
00058         flag |= (full_event)? UI_ITEM_R_FULL_EVENT: 0;
00059         flag |= (emboss)? 0: UI_ITEM_R_NO_BG;
00060 
00061         uiItemFullR(layout, ptr, prop, index, 0, flag, name, icon);
00062 }
00063 
00064 static PointerRNA rna_uiItemO(uiLayout *layout, const char *opname, const char *name, int icon, int emboss)
00065 {
00066         int flag= UI_ITEM_O_RETURN_PROPS;
00067         flag |= (emboss)? 0: UI_ITEM_R_NO_BG;
00068         return uiItemFullO(layout, opname, name, icon, NULL, uiLayoutGetOperatorContext(layout), flag);
00069 }
00070 
00071 #else
00072 
00073 #define DEF_ICON_BLANK_SKIP
00074 #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
00075 #define DEF_VICO(name) {VICO_##name, (#name), 0, (#name), ""},
00076 static EnumPropertyItem icon_items[] = {
00077 #include "UI_icons.h"
00078                 {0, NULL, 0, NULL, NULL}};
00079 #undef DEF_ICON_BLANK_SKIP
00080 #undef DEF_ICON
00081 #undef DEF_VICO
00082 
00083 static void api_ui_item_common(FunctionRNA *func)
00084 {
00085         PropertyRNA *prop;
00086 
00087         RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item.");
00088 
00089         prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
00090         RNA_def_property_enum_items(prop, icon_items);
00091         RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item");
00092 
00093 }
00094 
00095 static void api_ui_item_op(FunctionRNA *func)
00096 {
00097         PropertyRNA *parm;
00098         parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
00099         RNA_def_property_flag(parm, PROP_REQUIRED);
00100 }
00101 
00102 static void api_ui_item_op_common(FunctionRNA *func)
00103 {
00104         api_ui_item_op(func);
00105         api_ui_item_common(func);
00106 }
00107 
00108 static void api_ui_item_rna_common(FunctionRNA *func)
00109 {
00110         PropertyRNA *parm;
00111 
00112         parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
00113         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00114         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
00115         RNA_def_property_flag(parm, PROP_REQUIRED);
00116 }
00117 
00118 void RNA_api_ui_layout(StructRNA *srna)
00119 {
00120         FunctionRNA *func;
00121         PropertyRNA *parm;
00122 
00123         static EnumPropertyItem curve_type_items[] = {
00124                 {0, "NONE", 0, "None", ""},
00125                 {'v', "VECTOR", 0, "Vector", ""},
00126                 {'c', "COLOR", 0, "Color", ""},
00127                 {0, NULL, 0, NULL, NULL}};
00128         
00129         static EnumPropertyItem list_type_items[] = {
00130                 {0, "DEFAULT", 0, "None", ""},
00131                 {'c', "COMPACT", 0, "Compact", ""},
00132                 {'i', "ICONS", 0, "Icons", ""},
00133                 {0, NULL, 0, NULL, NULL}};
00134 
00135         /* simple layout specifiers */
00136         func= RNA_def_function(srna, "row", "uiLayoutRow");
00137         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00138         RNA_def_function_return(func, parm);
00139         RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed next to each other in a row.");
00140         RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
00141         
00142         func= RNA_def_function(srna, "column", "uiLayoutColumn");
00143         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00144         RNA_def_function_return(func, parm);
00145         RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed under each other in a column.");
00146         RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
00147 
00148         func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
00149         RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX);
00150         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00151         RNA_def_function_return(func, parm);
00152         RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
00153 
00154         /* box layout */
00155         func= RNA_def_function(srna, "box", "uiLayoutBox");
00156         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00157         RNA_def_function_return(func, parm);
00158         RNA_def_function_ui_description(func, "Sublayout. Items placed in this sublayout are placed under each other in a column and are surrounded by a box.");
00159         
00160         /* split layout */
00161         func= RNA_def_function(srna, "split", "uiLayoutSplit");
00162         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00163         RNA_def_function_return(func, parm);
00164         RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
00165         RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
00166 
00167         /* items */
00168         func= RNA_def_function(srna, "prop", "rna_uiItemR");
00169         RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout.");
00170         api_ui_item_rna_common(func);
00171         api_ui_item_common(func);
00172         RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
00173         RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
00174         RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
00175         RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text.");
00176         RNA_def_boolean(func, "event", 0, "", "Use button to input key events.");
00177         RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers.");
00178         RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text.");
00179         RNA_def_int(func, "index", -1, -2, INT_MAX, "", "The index of this button, when set a single member of an array can be accessed, when set to -1 all array members are used.", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
00180 
00181         func= RNA_def_function(srna, "props_enum", "uiItemsEnumR");
00182         api_ui_item_rna_common(func);
00183 
00184         func= RNA_def_function(srna, "prop_menu_enum", "uiItemMenuEnumR");
00185         api_ui_item_rna_common(func);
00186         api_ui_item_common(func);
00187 
00188         func= RNA_def_function(srna, "prop_enum", "uiItemEnumR_string");
00189         api_ui_item_rna_common(func);
00190         parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
00191         RNA_def_property_flag(parm, PROP_REQUIRED);
00192         api_ui_item_common(func);
00193 
00194         func= RNA_def_function(srna, "prop_search", "uiItemPointerR");
00195         api_ui_item_rna_common(func);
00196         parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in.");
00197         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00198         parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property.");
00199         RNA_def_property_flag(parm, PROP_REQUIRED);
00200         api_ui_item_common(func);
00201 
00202         func= RNA_def_function(srna, "operator", "rna_uiItemO");
00203         api_ui_item_op_common(func);
00204         RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text.");
00205         parm= RNA_def_pointer(func, "properties", "OperatorProperties", "", "Operator properties to fill in, return when 'properties' is set to true.");
00206         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
00207         RNA_def_function_return(func, parm);
00208         RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator.");
00209 
00210 /*      func= RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string");
00211         api_ui_item_op_common(func);
00212         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00213         RNA_def_property_flag(parm, PROP_REQUIRED);
00214         parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
00215         RNA_def_property_flag(parm, PROP_REQUIRED); */
00216 
00217         func= RNA_def_function(srna, "operator_enum", "uiItemsEnumO");
00218         parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
00219         RNA_def_property_flag(parm, PROP_REQUIRED);
00220         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00221         RNA_def_property_flag(parm, PROP_REQUIRED);
00222 
00223         func= RNA_def_function(srna, "operator_menu_enum", "uiItemMenuEnumO");
00224         api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */
00225         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00226         RNA_def_property_flag(parm, PROP_REQUIRED);
00227         api_ui_item_common(func);
00228 
00229 /*      func= RNA_def_function(srna, "operator_boolean", "uiItemBooleanO");
00230         api_ui_item_op_common(func);
00231         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00232         RNA_def_property_flag(parm, PROP_REQUIRED);
00233         parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with.");
00234         RNA_def_property_flag(parm, PROP_REQUIRED); */
00235 
00236 /*      func= RNA_def_function(srna, "operator_int", "uiItemIntO");
00237         api_ui_item_op_common(func);
00238         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00239         RNA_def_property_flag(parm, PROP_REQUIRED);
00240         parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", "Value of the property to call the operator with.", INT_MIN, INT_MAX);
00241         RNA_def_property_flag(parm, PROP_REQUIRED); */
00242 
00243 /*      func= RNA_def_function(srna, "operator_float", "uiItemFloatO");
00244         api_ui_item_op_common(func);
00245         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00246         RNA_def_property_flag(parm, PROP_REQUIRED);
00247         parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", "Value of the property to call the operator with.", -FLT_MAX, FLT_MAX);
00248         RNA_def_property_flag(parm, PROP_REQUIRED); */
00249 
00250 /*      func= RNA_def_function(srna, "operator_string", "uiItemStringO");
00251         api_ui_item_op_common(func);
00252         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
00253         RNA_def_property_flag(parm, PROP_REQUIRED);
00254         parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with.");
00255         RNA_def_property_flag(parm, PROP_REQUIRED); */
00256 
00257         func= RNA_def_function(srna, "label", "uiItemL");
00258         RNA_def_function_ui_description(func, "Item. Display text in the layout.");
00259         api_ui_item_common(func);
00260 
00261         func= RNA_def_function(srna, "menu", "uiItemM");
00262         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00263         parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu.");
00264         api_ui_item_common(func);
00265         RNA_def_property_flag(parm, PROP_REQUIRED);
00266 
00267         func= RNA_def_function(srna, "separator", "uiItemS");
00268         RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items.");
00269 
00270         /* context */
00271         func= RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer");
00272         parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context.");
00273         RNA_def_property_flag(parm, PROP_REQUIRED);
00274         parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context.");
00275         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
00276         
00277         /* templates */
00278         func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
00279         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00280         RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander.");
00281 
00282         func= RNA_def_function(srna, "template_ID", "uiTemplateID");
00283         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00284         api_ui_item_rna_common(func);
00285         RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
00286         RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
00287         RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
00288         
00289         func= RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
00290         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00291         api_ui_item_rna_common(func);
00292         RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
00293         RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
00294         RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
00295         RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX);
00296         RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
00297         
00298         func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
00299         parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
00300         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00301         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
00302         RNA_def_property_flag(parm, PROP_REQUIRED);
00303         parm= RNA_def_string(func, "type_property", "", 0, "", "Identifier of property in data giving the type of the ID-blocks to use.");
00304         RNA_def_property_flag(parm, PROP_REQUIRED);
00305         RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
00306         
00307         func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
00308         parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
00309         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00310         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
00311         RNA_def_property_flag(parm, PROP_REQUIRED);
00312         parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from.");
00313         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
00314         RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
00315         
00316         func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
00317         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00318         RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers.");
00319         parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data.");
00320         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00321         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00322         RNA_def_function_return(func, parm);
00323 
00324         func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
00325         RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints.");
00326         parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data.");
00327         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00328         parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
00329         RNA_def_function_return(func, parm);
00330 
00331         func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
00332         RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc.");
00333         parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
00334         RNA_def_property_flag(parm, PROP_REQUIRED);
00335         RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
00336         RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
00337         RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
00338 
00339         func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
00340         RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps.");
00341         api_ui_item_rna_common(func);
00342         RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display.");
00343         RNA_def_boolean(func, "levels", 0, "", "Show black/white levels.");
00344         RNA_def_boolean(func, "brush", 0, "", "Show brush options.");
00345 
00346         func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
00347         RNA_def_function_ui_description(func, "Item. A color ramp widget.");
00348         api_ui_item_rna_common(func);
00349         RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
00350         
00351         func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
00352         RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data.");
00353         api_ui_item_rna_common(func);
00354         
00355         func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
00356         RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data.");
00357         api_ui_item_rna_common(func);
00358         
00359         func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
00360         RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data.");
00361         api_ui_item_rna_common(func);
00362         
00363         func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
00364         api_ui_item_rna_common(func);
00365         parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property.");
00366         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
00367         parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data.");
00368         RNA_def_property_flag(parm, PROP_REQUIRED);
00369         parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
00370         RNA_def_property_flag(parm, PROP_REQUIRED);
00371         
00372         func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
00373         RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors.");
00374         api_ui_item_rna_common(func);
00375         RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
00376         RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to value 1.0 regardless of actual color");
00377         RNA_def_boolean(func, "lock_luminosity", 0, "", "Keep the color at its original vector length");
00378         RNA_def_boolean(func, "cubic", 1, "", "Cubic saturation for picking values close to white");
00379 
00380         func= RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers");
00381         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00382         parm= RNA_def_pointer(func, "image", "Image", "", "");
00383         RNA_def_property_flag(parm, PROP_REQUIRED);
00384         parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
00385         RNA_def_property_flag(parm, PROP_REQUIRED);
00386 
00387         func= RNA_def_function(srna, "template_image", "uiTemplateImage");
00388         RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths.");
00389         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00390         api_ui_item_rna_common(func);
00391         parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
00392         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00393         RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
00394 
00395         func= RNA_def_function(srna, "template_list", "uiTemplateList");
00396         RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups.");
00397         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00398         parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
00399         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
00400         parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
00401         RNA_def_property_flag(parm, PROP_REQUIRED);
00402         parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
00403         RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
00404         parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");
00405         RNA_def_property_flag(parm, PROP_REQUIRED);
00406         RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
00407         RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display.", 0, INT_MAX);
00408         RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
00409 
00410         func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
00411         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00412 
00413         RNA_def_function(srna, "template_operator_search", "uiTemplateOperatorSearch");
00414 
00415         func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
00416         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00417 
00418         func= RNA_def_function(srna, "template_edit_mode_selection", "uiTemplateEditModeSelection");
00419         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00420         
00421         func= RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner");
00422         RNA_def_function_flag(func, FUNC_USE_CONTEXT);
00423 
00424         func= RNA_def_function(srna, "introspect", "uiLayoutIntrospect");
00425         parm= RNA_def_string(func, "string", "", 1024*1024, "Descr", "DESCR");
00426         RNA_def_function_return(func, parm);
00427 }
00428 #endif
00429