# How to see the 'source code' of DockedCells? ALT: How to 'show expression' of DockedCell?

Here is a CDF file with the dockedcells toolbar (at the top). I'm trying to see how he created and positioned the logo, the formatting buttons, table of contents, etc, through a source code of it, but I can't select it like a cell and say 'show expression'.

Primary Questions: How to see the 'source code' of DockedCells? Can you do this in a FreeCDF as well as a Notebook? What is the difference between the two formats in regard to seeing source code?

Secondary question: How can I see what differs from third party notebooks compared to default mathematica settings? So far I know that Option Inspector and Edit->Preferences and Edit Stylesheet show you most stuff, as well as view expressions in cells, but all of this still didn't show me anything about the dockedcells!

-
Welcome at Mathematica.SE! Enjoy your stay here. If I may give you a tip: your question consists of many sub-questions that are mostly unrelated to each other. To get optimal responses it would be better if you could separate those into different posts. Another thing: many of us here would appreciate it if you could personalize your user name somewhat. –  Sjoerd C. de Vries Aug 29 '12 at 9:28
ok I will work on all that –  Luke Allen Aug 29 '12 at 9:58
Just in case you haven't seen them, you can find out more about how these were developed, from the developer (Eric Schulz): wolfram.com/cdf/information-kit/… and wolfram.com/events/technology-conference/2011/… –  cormullion Aug 29 '12 at 9:59
@cormullion thanks. one thing he didn't talk about in the video (just showed that he did it) was how he made the sections/cells clickable to expand without having to click the tiny grey arrows. I was able to replicate this by changing wholecellgroupopen to true in the options inspector but he didn't appear to do it this way, can't figure out what he did, any idea? –  Luke Allen Aug 29 '12 at 10:02
Luke Allen: Don't forget the "@name" thing in comments if you want to notify a specific commenter (I've done that for you here). Without "@name" notifications only go to the author of the Q or A above the comment. –  Sjoerd C. de Vries Aug 29 '12 at 10:42

Import the CDF:

cdf = Import[
"http://www.wolfram.com/cdf/uses-examples/BriggsCochraneCalculus/BriggsCochraneCalculus.cdf"];


If you like, display it in a notebook:

NotebookPut@cdf;


Find the docked cells:

dc= Cases[cdf, _[___, DockedCells, ___], Infinity]


Examine some of its structure:

Shallow[dc // FullForm, {15, 30}]


-
thanks a lot really indepth. I did exactly as you said and have found out a lot already but it won't let me click or edit anything in the notebook created from the cdf. ??? is it supposed to be locked up like that? SOLVED: it was in deployed mode had to go to options inspector to disable it edit: cell properties is greyed out it's like it's in a read only mode but I checked the desktop icon (right click properties) and it's not –  Luke Allen Aug 29 '12 at 10:07
@LukeAllen Thanks for the accept. It isn't really necessary to do that so quickly, though. Most people give it a few hours or even days before doing that as unaccepted answers will draw more potential answerers than accepted ones. –  Sjoerd C. de Vries Aug 29 '12 at 10:39

You could copy the docked cells into an ordinary notebook using something like:

CellPrint[DockedCells /. Options@NotebookOpen["BriggsCochraneCalculus.cdf"]]


The cells created will not be docked, so you can select the cell bracket and do a Show Expression.

-
thank you, although I couldn't use this because I don't understand how to make it see the directory the cdf is in, so the import option below is more noob friendly –  Luke Allen Aug 29 '12 at 9:57