Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Show First 20 Lines • Show All 2,586 Lines • ▼ Show 20 Lines | static void ed_panel_draw(const bContext *C, | ||||
| strncpy(block_name, pt->idname, BKE_ST_MAXNAME); | strncpy(block_name, pt->idname, BKE_ST_MAXNAME); | ||||
| if (unique_panel_str != NULL) { | if (unique_panel_str != NULL) { | ||||
| /* Instanced panels should have already been added at this point. */ | /* Instanced panels should have already been added at this point. */ | ||||
| strncat(block_name, unique_panel_str, LIST_PANEL_UNIQUE_STR_LEN); | strncat(block_name, unique_panel_str, LIST_PANEL_UNIQUE_STR_LEN); | ||||
| } | } | ||||
| uiBlock *block = UI_block_begin(C, region, block_name, UI_EMBOSS); | uiBlock *block = UI_block_begin(C, region, block_name, UI_EMBOSS); | ||||
| bool open; | bool open; | ||||
| panel = UI_panel_begin(area, region, lb, block, pt, panel, &open); | panel = UI_panel_begin(region, lb, block, pt, panel, &open); | ||||
| /* bad fixed values */ | /* bad fixed values */ | ||||
| int xco, yco, h = 0; | int xco, yco, h = 0; | ||||
| int headerend = w - UI_UNIT_X; | int headerend = w - UI_UNIT_X; | ||||
| if (pt->draw_header_preset && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) { | if (pt->draw_header_preset && !(pt->flag & PNL_NO_HEADER) && (open || vertical)) { | ||||
| /* for preset menu */ | /* for preset menu */ | ||||
| panel->layout = UI_block_layout(block, | panel->layout = UI_block_layout(block, | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (LinkData *, link, &pt->children) { | ||||
| w, | w, | ||||
| em, | em, | ||||
| vertical, | vertical, | ||||
| unique_panel_str); | unique_panel_str); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| UI_panel_end(area, region, block, w, h, open); | UI_panel_end(region, block, w, h, open); | ||||
| } | } | ||||
| /** | /** | ||||
| * \param contexts: A NULL terminated array of context strings to match against. | * \param contexts: A NULL terminated array of context strings to match against. | ||||
| * Matching against any of these strings will draw the panel. | * Matching against any of these strings will draw the panel. | ||||
| * Can be NULL to skip context checks. | * Can be NULL to skip context checks. | ||||
| */ | */ | ||||
| void ED_region_panels_layout_ex(const bContext *C, | void ED_region_panels_layout_ex(const bContext *C, | ||||
| ▲ Show 20 Lines • Show All 1,182 Lines • Show Last 20 Lines | |||||