Here are a couple of additional refinements that will make it into the 1.1 final build.
As many of you are aware 1.1 will contain the beginnings of an actual engine for skinning and theming application elements. Previously the theming ability of NBB was limited to hue adjustment controlled by the application controller. Already I have enhanced the theming to handle 3 additional adjustments, handle presets, and dictate font and font color.
the next step will be to upgrade the way in which themes are applied. In the beginning all theme-able controls simply listened for a global notification that told them to update their theme. it was up to the individual instances to ask for the needed information and then apply it to themselves. In 1.0 I improved it so that the window controller was responsible for notifying its windows contents, but would only do so just before its window was displayed and only if it was needed.
now in 1.1 there are 2 more major enhancements to how controls will update. first the theme controller will cache images for controls and invalidate and update the cache when the theme changes. this means that it is no longer necessary for each individual slider to apply the same theme adjustments (an expensive process) that the last identical control just made.
second major change will be that the responsibility for the actual theming is no longer the responsibility of the control class and instead all the control class has to do is fetch its updated image from the skin controller before drawing.
the bottom line for those non technical people is that the new theming engine will be much faster, use less memory, do more, and becomes much easier to add extensions to in the future. I will only need to extend the skin controller class instead of each individual control class.
Edit: please note that NSButton and its subclasses will not be cached due to the fact that most buttons have a unique image. In the next version of the theme controller I may add the ability for cacheing based on instance in addition to class; this would only be useful for buttons like the home and options button that are used multiple times throughout the app and its modules



LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks