Exemple #1
0
//
// Toggles the visible/hidden state of a toolbar
//
void ToolDock::ShowHide( int type )
{
   ToolBar *t = mBars[ type ];

   // Maintain the docked array
   if( t->IsVisible() )
   {
      mDockedBars.Remove( t );
   }
   else
   {
      mDockedBars.Add( t );
   }

   // Make it (dis)appear
   t->Expose( !t->IsVisible() );

   // Update the layout
   LayoutToolBars();
   Updated();
}
Exemple #2
0
//
// Toggles the visible/hidden state of a toolbar
//
void ToolManager::ShowHide( int type )
{
   ToolBar *t = mBars[ type ];

   // Handle docked and floaters differently
   if( t->IsDocked() )
   {
      t->GetDock()->ShowHide( type );
   }
   else
   {
      t->Expose( !t->IsVisible() );
   }
}
//
// Returns the visibility of the specified toolbar
//
bool ToolManager::IsVisible( int type )
{
   ToolBar *t = mBars[ type ];

   return t->IsVisible();

   // If toolbar is floating
   if( !t->IsDocked() )
   {
      // Must return state of floater window
      return t->GetParent()->IsShown();
   }

   // Return state of docked toolbar
   return t->IsShown();
}