diff options
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 109ccc27d79..3a984fdc4d2 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -377,6 +377,7 @@ typedef struct wmNotifier { #define NS_EDITMODE_ARMATURE (8<<8) #define NS_MODE_POSE (9<<8) #define NS_MODE_PARTICLE (10<<8) +#define NS_MODE_HAIR (11<<8) /* subtype 3d view editing */ #define NS_VIEW3D_GPU (16<<8) @@ -669,6 +670,59 @@ typedef struct wmDropBox { } wmDropBox; + +/* WidgetGroups store and manage groups of widgets. + * They are responsible for drawing necessary widgets and updating their state and position. + * Also they */ +typedef struct wmWidget wmWidget; +typedef struct wmWidgetGroup wmWidgetGroup; +typedef struct wmWidgetMapType wmWidgetMapType; + +/* factory class for a widgetgroup type, gets called every time a new area is spawned */ +typedef struct wmWidgetGroupType { + struct wmWidgetGroupType *next, *prev; + + char idname[64]; + + /* poll if widgetmap should be active */ + int (*poll)(const struct bContext *C, struct wmWidgetGroupType *wgrouptype) ATTR_WARN_UNUSED_RESULT; + + /* update widgets, called right before drawing */ + void (*draw)(const struct bContext *C, struct wmWidgetGroup *wgroup); + + /* rna for properties */ + struct StructRNA *srna; + + /* RNA integration */ + ExtensionRNA ext; + + /* general flag */ + int flag; + + /* if type is spawned from operator this is set here */ + void *op; + + /* same as widgetmaps, so registering/unregistering goes to the correct region */ + short spaceid, regionid; + char mapidname[64]; + bool is_3d; +} wmWidgetGroupType; + +typedef struct wmWidgetMap { + struct wmWidgetMap *next, *prev; + + struct wmWidgetMapType *type; + ListBase widgetgroups; + + /* highlighted widget for this map. We redraw the widgetmap when this changes */ + struct wmWidget *highlighted_widget; + /* active widget for this map. User has clicked currently this widget and it gets all input */ + struct wmWidget *active_widget; + + /* active group is overriding all other widgets while active */ + struct wmWidgetGroup *activegroup; +} wmWidgetMap; + /* *************** migrated stuff, clean later? ************** */ typedef struct RecentFile { |