Oh, and
RHINO_SDK_FUNCTION
bool HideToolBars(int nDockState=0, bool bRedraw=true);
RHINO_SDK_FUNCTION
bool RestoreToolBars(bool bRedraw=true);
Oh, and
RHINO_SDK_FUNCTION
bool HideToolBars(int nDockState=0, bool bRedraw=true);
RHINO_SDK_FUNCTION
bool RestoreToolBars(bool bRedraw=true);
It seem to useful.
Now, I meet a problem.
I use those SDK funcctions in the skin ? or plugIn (OnLoadPlugIn())?
I put it in EventWatcher::OnInitRhino( CRhinoApp& app ) for the time being.
When Command line hided, I want it visible so that I run the function ,
RestoreControlBars();
But, it still hide.
try this macro:
“-_commandprompt _show _toggle _enter”
Thank you! Jordy.
I still try to set those interface, menu, tool bar… , in my SKIN.
But, It seem to be difficult for me.
I think whether I should change those Keys before launching skin.
Oke if you want to hide the toolbars do something like this:
For i = 0 To Rhino.RhinoApp.ToolbarFiles.Count - 1
Rhino.RhinoApp.ToolbarFiles(0).Close(False)
Next
Next. For loading your toolbar:
Rhino.RhinoApp.ToolbarFiles.Open("C:\....\mytoolbar.RUI")
Some helpful macros
//toggle commandprompt
"-_commandprompt _show _toggle_enter"
//Toggle menu show/hide
"-_menu"
Hiding all panels:
For Each panel In Rhino.UI.Panels.GetOpenPanelIds
Rhino.UI.Panels.ClosePanel(panel)
Next
This should bring you close to what you want I guess xD
Thank you for help.
I can feel your enthusiasm.
But you know, I develop this plugin through MFC.
I should to learn C# in the future.
C++? Don’t know what MFC is
MFC == Microsoft Foundation Classes - it is C++
Right !
You don’t need to know what MFC is, but you only know “don’t touch it”. XD
Isn’t it that with C++ more is possible than vb.NET or C#? So the things that I explained above is possible in C++?
@menno probably knows xD
Oke well C++ is out of my reach ^^ anyone else can translate it too C++?
Something like this should work:
#include "/Program Files (x86)/Rhino 5.0 x64 SDK/inc/RhinoSdkUiFile.h"
void HideRhinoStuff()
{
CRhinoAppAppearanceSettings settings = RhinoApp().AppSettings().AppearanceSettings();
settings.m_show_menu = false;
settings.m_cmdprompt_position = CRhinoAppAppearanceSettings::command_prompt_hidden;
RhinoApp().AppSettings().SetAppearanceSettings(settings);
const int file_count = CRhinoUiFile::FileCount();
for (int index = 0; index < file_count; index++)
{
ON_UUID file_id = CRhinoUiFile::FileID(index);
CRhinoUiFile::FileClose(file_id);
}
}
Hi! Dale.
Where should I put it ? May I put it in Skin ?
I have three positions, SkinApp() constructor, OnLoadplugIn() and eventwatcher::OnInitRhino().
I had tried to put those positions, but those results were different for each position.
BTW, the file_count always is zero.
Three posiotion:
CSkinApp::CSkinApp(){}
BOOL CDockbarPlugIn::OnLoadPlugIn(){}
void CEventWatcher::OnInitRhino( CRhinoApp& app ){}
Below it my result.
OnLoadPlugIn() is always a good place to put this kind of stuff…
Dale,I had done it, but the command view is still showed,not be hidden.
Any solution about that?
Once upon a time there was a danish dude that made something like this…
If i remember correctly: Ufuboceros (http://ufuboceros.blogspot.dk/)
I believe the one plugin you might want to try out is this one:
http://ufuboceros.blogspot.dk/2012/05/window-bars-toolbar-v21-fixed.html
Which is basically fast-switch buttons for different menu/viewport setups.
Good luck!
The following code is my test and it works fine.
BOOL CmySkinPlugIn::OnLoadPlugIn()
{
CRhinoAppAppearanceSettings settings = RhinoApp().AppSettings().AppearanceSettings();
settings.m_show_menu = false; // hide menu
settings.m_show_statusbar =false; // hide statusbar
RhinoApp().AppSettings().SetAppearanceSettings(settings);
}
void CmySkinPlugIn_EventWatcher::OnInitRhino(CRhinoApp& app)
{
CRhinoAppAppearanceSettings settings = RhinoApp().AppSettings().AppearanceSettings();
settings.m_cmdprompt_position = CRhinoAppAppearanceSettings::command_prompt_hidden; //hide command prompt
RhinoApp().AppSettings().SetAppearanceSettings(settings);
CRhinoUiFile::ShowSidebar(false,false); // hide Side bar
// close all toolbar
while (CRhinoUiFile::FileCount() > 0)
{
int file_count = CRhinoUiFile::FileCount();
for (int index = 0; index < file_count; index++)
{
ON_UUID file_id = CRhinoUiFile::FileID(index);
ON_wString FileName=CRhinoUiFile::FileName(file_id);
CRhinoUiFile::FileClose(file_id);
}
}
}