Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
commitaf02a0aa4e0b80c3c1154e7be095f4a387f81179 (patch)
tree3f714e683c96929cc4e44962570860ab0f635bc9 /source/blender/blenkernel/BKE_screen.h
parent643d59bb9bf3bdd46f41a0b8c79384146629f9c8 (diff)
UI
* Headers and menus can now be created in python. * Replaced the uiMenuItem functions to create menus with equivalent uiItem functions using a layout, removing duplicated code. * More uiItem functions are now exposed to python. * The text editor header, panels and one of its menus are now created in space_text.py. * Buttons window data context icon new changes depending on active object. Issues * Icons are not wrapped yet, hardcoded ints at the moment. * The ID browse template is unfinished.
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r--source/blender/blenkernel/BKE_screen.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 8ac3b4b0b51..4797616a471 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -38,6 +38,7 @@ struct bScreen;
struct ListBase;
struct Panel;
struct Header;
+struct Menu;
struct ScrArea;
struct SpaceType;
struct wmNotifier;
@@ -136,6 +137,9 @@ typedef struct ARegionType {
/* header type definitions */
ListBase headertypes;
+ /* menu type definitions */
+ ListBase menutypes;
+
/* hardcoded constraints, smaller than these values region is not visible */
int minsizex, minsizey;
/* default keymaps to add */
@@ -183,6 +187,27 @@ typedef struct HeaderType {
void (*py_free)(void *py_data);
} HeaderType;
+/* menu types */
+
+typedef struct MenuType {
+ struct MenuType *next, *prev;
+
+ char idname[BKE_ST_MAXNAME]; /* unique name */
+ char label[BKE_ST_MAXNAME]; /* for button text */
+ int space_type;
+
+ /* verify if the menu should draw or not */
+ int (*poll)(const struct bContext *, struct MenuType *);
+ /* draw entirely, view changes should be handled here */
+ void (*draw)(const struct bContext *, struct Menu *);
+
+ /* python integration */
+ void *py_data;
+ struct StructRNA *py_srna;
+ int (*py_call)(struct PointerRNA *, struct FunctionRNA *, struct ParameterList *);
+ void (*py_free)(void *py_data);
+} MenuType;
+
/* spacetypes */
struct SpaceType *BKE_spacetype_from_id(int spaceid);
struct ARegionType *BKE_regiontype_from_id(struct SpaceType *st, int regionid);