Hi David,

Not a solution for all your problems, but may you can get some ideas from 
my "How to make TW5 readonly" guide [1]

Cheers,

Ton


On Sunday, October 5, 2014 9:41:09 AM UTC+2, David Jade wrote:
>
> I'm working on putting together a custom edition of TW5, ones that 
> contains a few custom tiddlers, plugins, etc... This is a very customized 
> sort of edition, one that is only meant to be hosted inside a new host 
> container (meaning, not a general purpose web browser). To be more 
> specific, I'm working on hosting Wikis inside of MS Visual Studio via a VS 
> custom extension so that they can be used as project documentation. This 
> custom container would have UI chrome to handle things like file saving, 
> printing, copy/paste, etc...
>
> One thing I would like to be able to do is, suppress certain Core UI, 
> tiddlers and bits of Core code based on some run time state, perhaps wiki 
> via a plugin wikimethod. When I say "suppress" I general mean to 
> hide/disable them but not necessary remove them from this custom edition. 
> My thought is, when these wikis are hosted within a non-web browser host 
> (i.e. VS) they should have different UI functionality but that 
> functionality should be preserved in the wiki in case they are later loaded 
> into a regular stand-alone web browser (i.e. allows wiki files to be loaded 
> in custom VS host and in a web browser as needed).
>
> Here's some of the things that I would like to be able to programatically 
> suppress. 
>
>    - The Save button - I would like to hide it from the UI as well as the 
>    ability to show/hide it from the Tools menu. All of the built in save UI 
>    should be completely hidden when the wiki is hosted in the custom host.*
>    - Several section of the control panel like the Save option tab and 
>    most of the Settings tab should never been shown since there will not be a 
>    standard saver module in play, an address bar, etc... in my custom host.
>    - Hide parts of the Toolbar options so that buttons that don't make 
>    sense can't be made to show up - it shouldn't even be an option to change 
>    their state - it should be like they don't even exist.
>    
> My idea is that my plugin would have a wikimethod that the host container 
> calls into to notify the wiki to suppress these items. That way the host 
> can notify the wiki that it is being hosted in something other than a 
> stand-alone web browser and the wiki can adjust it's UI accordingly at run 
> time. 
>
> The goal here is to find a way to hide certain bits of UI dynamically only 
> when the wiki is loaded into a non-standard web browser host. I'm just not 
> sure what the best approach would be though to dynamically suppress these 
> Core items at run time. I can easily call into a wikimethod from the 
> external host to trigger this behavior - I'm just not sure what the best 
> way to dynamically hide certain parts of the UI at run time is. 
>
> Does anyone have any ideas? One thing to keep in mind is, when suppressing 
> these bits of UI I don't want the suppression state written into the wiki's 
> state when the wiki is saved - this might prevent that UI from showing if 
> the wiki file were to be then loaded into a regular web browser later on. 
> The idea is to just suppress UI at run time given some external signal via 
> my host & plugin.
>
> I hope this makes sense.
>
> thanks,
> David
>
> * In case you're wondering, wiki saving is still possible in my custom 
> edition but it happens via the host handling the save - I have plugin 
> methods that facilitate sending the data to be saved back to the host so 
> that it handles all save UI and file operations on behalf of the wiki.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to