diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-08 22:29:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-08 22:29:02 +0400 |
commit | 81255ca8ce5339910b3ab9de2878bfc470e714da (patch) | |
tree | 541825eec23612f17a4eee5cc01c0522b3166fd4 /source/blender/editors/interface | |
parent | f605679515bad2f9ebbe8c5cf5bd833219fcbbff (diff) |
style cleanup: gpencil & metaball
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface.c | 18 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 96 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 18 |
3 files changed, 66 insertions, 66 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index c7fb523dcba..0c13b5de02e 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -509,9 +509,9 @@ static void ui_draw_linkline(uiLinkLine *line, int hilightActiveLines) rect.xmax = (line->to->x1 + line->to->x2) / 2.0f; rect.ymax = (line->to->y1 + line->to->y2) / 2.0f; - if(line->flag & UI_SELECT) - glColor3ub(100,100,100); - else if(hilightActiveLines && ((line->from->flag & UI_ACTIVE) || (line->to->flag & UI_ACTIVE))) + if (line->flag & UI_SELECT) + glColor3ub(100, 100, 100); + else if (hilightActiveLines && ((line->from->flag & UI_ACTIVE) || (line->to->flag & UI_ACTIVE))) UI_ThemeColor(TH_TEXT_HI); else glColor3ub(0, 0, 0); @@ -528,9 +528,9 @@ static void ui_draw_links(uiBlock *block) // As we go, remember if we see any active or selected lines. int foundselectline = 0; int foundactiveline = 0; - for (but=block->buttons.first; but; but=but->next) { - if(but->type==LINK && but->link) { - for (line=but->link->lines.first; line; line=line->next) { + for (but = block->buttons.first; but; but = but->next) { + if (but->type == LINK && but->link) { + for (line = but->link->lines.first; line; line = line->next) { if (!(line->from->flag & UI_ACTIVE) && !(line->to->flag & UI_ACTIVE)) ui_draw_linkline(line, 0); else @@ -545,9 +545,9 @@ static void ui_draw_links(uiBlock *block) // Draw any active lines (lines with either button being hovered over). // Do this last so they appear on top of inactive lines. if (foundactiveline) { - for (but=block->buttons.first; but; but=but->next) { - if(but->type==LINK && but->link) { - for (line=but->link->lines.first; line; line=line->next) { + for (but = block->buttons.first; but; but = but->next) { + if (but->type == LINK && but->link) { + for (line = but->link->lines.first; line; line = line->next) { if ((line->from->flag & UI_ACTIVE) || (line->to->flag & UI_ACTIVE)) ui_draw_linkline(line, !foundselectline); } diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index a0935e7abdd..9e073055fc3 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -99,48 +99,48 @@ typedef enum { } uiWidgetTypeEnum; /* panel limits */ -#define UI_PANEL_MINX 100 -#define UI_PANEL_MINY 70 +#define UI_PANEL_MINX 100 +#define UI_PANEL_MINY 70 /* uiBut->flag */ -#define UI_SELECT 1 /* use when the button is pressed */ -#define UI_SCROLLED 2 /* temp hidden, scrolled away */ -#define UI_ACTIVE 4 -#define UI_HAS_ICON 8 -#define UI_TEXTINPUT 16 -#define UI_HIDDEN 32 +#define UI_SELECT 1 /* use when the button is pressed */ +#define UI_SCROLLED 2 /* temp hidden, scrolled away */ +#define UI_ACTIVE 4 +#define UI_HAS_ICON 8 +#define UI_TEXTINPUT 16 +#define UI_HIDDEN 32 /* warn: rest of uiBut->flag in UI_interface.h */ /* internal panel drawing defines */ -#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */ -#define PNL_HEADER (UI_UNIT_Y + 4) /* 24 default */ +#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */ +#define PNL_HEADER (UI_UNIT_Y + 4) /* 24 default */ /* panel->flag */ -#define PNL_SELECT 1 -#define PNL_CLOSEDX 2 -#define PNL_CLOSEDY 4 -#define PNL_CLOSED 6 +#define PNL_SELECT 1 +#define PNL_CLOSEDX 2 +#define PNL_CLOSEDY 4 +#define PNL_CLOSED 6 /*#define PNL_TABBED 8*/ /*UNUSED*/ -#define PNL_OVERLAP 16 +#define PNL_OVERLAP 16 /* Button text selection: * extension direction, selextend, inside ui_do_but_TEX */ -#define EXTEND_LEFT 1 -#define EXTEND_RIGHT 2 +#define EXTEND_LEFT 1 +#define EXTEND_RIGHT 2 /* for scope resize zone */ -#define SCOPE_RESIZE_PAD 9 +#define SCOPE_RESIZE_PAD 9 -typedef struct uiLinkLine { /* only for draw/edit */ +typedef struct uiLinkLine { /* only for draw/edit */ struct uiLinkLine *next, *prev; struct uiBut *from, *to; short flag, pad; } uiLinkLine; typedef struct { - void **poin; /* pointer to original pointer */ - void ***ppoin; /* pointer to original pointer-array */ - short *totlink; /* if pointer-array, here is the total */ + void **poin; /* pointer to original pointer */ + void ***ppoin; /* pointer to original pointer-array */ + short *totlink; /* if pointer-array, here is the total */ short maxlink, pad; short fromcode, tocode; @@ -178,8 +178,8 @@ struct uiBut { /* not ysed yet, was used in 2.4x for ui_draw_pulldown_round & friends */ #if 0 - void (*embossfunc)(int , int , float, float, float, float, float, int); - void (*sliderfunc)(int , float, float, float, float, float, float, int); + void (*embossfunc)(int, int, float, float, float, float, float, int); + void (*sliderfunc)(int, float, float, float, float, float, float, int); #endif uiButCompleteFunc autocomplete_func; @@ -245,7 +245,7 @@ struct uiBut { void *editcoba; void *editcumap; - /* pointer back */ + /* pointer back */ uiBlock *block; }; @@ -268,7 +268,7 @@ struct uiBlock { float minx, miny, maxx, maxy; float aspect; - int puphash; // popup menu hash for memory + int puphash; /* popup menu hash for memory */ uiButHandleFunc func; void *func_arg1; @@ -303,27 +303,27 @@ struct uiBlock { const char *lockstr; char lock; - char active; // to keep blocks while drawing and free them afterwards - char tooltipdisabled; // to avoid tooltip after click - char endblock; // uiEndBlock done? + char active; // to keep blocks while drawing and free them afterwards + char tooltipdisabled; // to avoid tooltip after click + char endblock; // uiEndBlock done? - float xofs, yofs; // offset to parent button - int dobounds, mx, my; // for doing delayed - int bounds, minbounds; // for doing delayed + float xofs, yofs; // offset to parent button + int dobounds, mx, my; // for doing delayed + int bounds, minbounds; // for doing delayed - rctf safety; // pulldowns, to detect outside, can differ per case how it is created - ListBase saferct; // uiSafetyRct list + rctf safety; // pulldowns, to detect outside, can differ per case how it is created + ListBase saferct; // uiSafetyRct list - uiPopupBlockHandle *handle; // handle + uiPopupBlockHandle *handle; // handle - struct wmOperator *ui_operator;// use so presets can find the operator, - // across menus and from nested popups which fail for operator context. + struct wmOperator *ui_operator; // use so presets can find the operator, + // across menus and from nested popups which fail for operator context. - void *evil_C; // XXX hack for dynamic operator enums + void *evil_C; // XXX hack for dynamic operator enums - struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time. - float _hsv[3]; // XXX, only access via ui_block_hsv_get() - char color_profile; // color profile for correcting linear colors for display + struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time. + float _hsv[3]; // XXX, only access via ui_block_hsv_get() + char color_profile; // color profile for correcting linear colors for display }; typedef struct uiSafetyRct { @@ -425,12 +425,12 @@ void ui_searchbox_apply(uiBut *but, struct ARegion *ar); void ui_searchbox_free(struct bContext *C, struct ARegion *ar); void ui_but_search_test(uiBut *but); -typedef uiBlock* (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1); +typedef uiBlock * (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1); uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, - uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg); + uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg); uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but, - uiMenuCreateFunc create_func, void *arg, char *str); + uiMenuCreateFunc create_func, void *arg, char *str); void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle); @@ -466,14 +466,14 @@ extern int ui_button_is_active(struct ARegion *ar); void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad); void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect); -uiWidgetColors* ui_tooltip_get_theme(void); -void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *block, rcti *rect); +uiWidgetColors *ui_tooltip_get_theme(void); +void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock * block, rcti * rect); void ui_draw_search_back(struct uiStyle *style, uiBlock *block, rcti *rect); -int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol); +int ui_link_bezier_points(rcti * rect, float coord_array[][2], int resol); void ui_draw_link_bezier(rcti *rect); extern void ui_draw_but(const struct bContext *C, ARegion *ar, struct uiStyle *style, uiBut *but, rcti *rect); - /* theme color init */ +/* theme color init */ struct ThemeUI; void ui_widget_color_init(struct ThemeUI *tui); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3c913b26dec..28ceabdd344 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -857,7 +857,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char PointerRNA ptr; PropertyRNA *prop; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); @@ -888,7 +888,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char EnumPropertyItem *item; int value, free; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); @@ -926,7 +926,7 @@ void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *op wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_boolean_set(&ptr, propname, value); @@ -939,7 +939,7 @@ void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_int_set(&ptr, propname, value); @@ -952,7 +952,7 @@ void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opna wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_float_set(&ptr, propname, value); @@ -965,7 +965,7 @@ void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opn wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_string_set(&ptr, propname, value); @@ -1611,7 +1611,7 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname, wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ MenuItemLevel *lvl; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); if (!ot->srna) { ui_item_disabled(layout, opname); @@ -2726,8 +2726,8 @@ void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *p void uiLayoutContextCopy(uiLayout *layout, bContextStore *context) { - uiBlock *block= layout->root->block; - layout->context= CTX_store_add_all(&block->contexts, context); + uiBlock *block = layout->root->block; + layout->context = CTX_store_add_all(&block->contexts, context); } |