Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_screen_types.h
| Context not available. | |||||
| void *activedata; /* runtime for panel manipulation */ | void *activedata; /* runtime for panel manipulation */ | ||||
| } Panel; | } Panel; | ||||
campbellbarton: I'll have to comment these better:
* `PanelCategoryDyn` / `ar->panels_category` is a runtime… | |||||
| /* Notes on Panel Catogories: | |||||
| * | |||||
| * ar->panels_category (PanelCategoryDyn) is a runtime only list of categories collected during draw. | |||||
| * | |||||
| * ar->panels_category_active (PanelCategoryAct) is basically a list of strings (category id's). | |||||
| * | |||||
| * Clicking on a tab moves it to the front of ar->panels_category_active, | |||||
| * If the context changes so this tab is no longer displayed, | |||||
| * then the first-most tab in ar->panels_category_active is used. | |||||
| * | |||||
| * This way you can change modes and always have the tab you last clicked on. | |||||
| */ | |||||
| /* region level tabs */ | |||||
| # | |||||
| # | |||||
| typedef struct PanelCategoryDyn { | |||||
| struct PanelCategoryDyn *next, *prev; | |||||
| char idname[64]; | |||||
| rcti rect; | |||||
| } PanelCategoryDyn; | |||||
| /* region stack of active tabs */ | |||||
| typedef struct PanelCategoryAct { | |||||
brechtUnsubmitted Not Done Inline ActionsI'd call this PanelCategoryStack but it's a matter of preference. brecht: I'd call this PanelCategoryStack but it's a matter of preference. | |||||
campbellbartonAuthorUnsubmitted Not Done Inline ActionsThe name is nicer, but imho its not any more correct or descriptive, in fact the way this works is a little confusing and doesnt fit well into some name - since its a list of panels you last clicked on. Am fine with calling it this too though, just saying I dont think its any more correct. campbellbarton: The name is nicer, but imho its not any more correct or descriptive, in fact the way this works… | |||||
| struct PanelCategoryAct *next, *prev; | |||||
| char idname[64]; | |||||
| } PanelCategoryAct; | |||||
| /* uiList dynamic data... */ | /* uiList dynamic data... */ | ||||
| /* These two Lines with # tell makesdna this struct can be excluded. */ | /* These two Lines with # tell makesdna this struct can be excluded. */ | ||||
| # | # | ||||
| Context not available. | |||||
| ListBase uiblocks; /* uiBlock */ | ListBase uiblocks; /* uiBlock */ | ||||
| ListBase panels; /* Panel */ | ListBase panels; /* Panel */ | ||||
| ListBase panels_category_active; /* Stack of panel categories */ | |||||
| ListBase ui_lists; /* uiList */ | ListBase ui_lists; /* uiList */ | ||||
| ListBase handlers; /* wmEventHandler */ | ListBase handlers; /* wmEventHandler */ | ||||
| ListBase panels_category; /* Panel categories runtime */ | |||||
| struct wmTimer *regiontimer; /* blend in/out */ | struct wmTimer *regiontimer; /* blend in/out */ | ||||
| Context not available. | |||||
I'll have to comment these better:
Clicking on a tab moves it to the front of ar->panels_category_active, If the context changes so this tab is no longer displayed, then the first-most tab in ar->panels_category_active is used.
This way you can change modes and always have the tab you last clicked on.