本文整理汇总了C++中ToolBar::Expose方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolBar::Expose方法的具体用法?C++ ToolBar::Expose怎么用?C++ ToolBar::Expose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolBar
的用法示例。
在下文中一共展示了ToolBar::Expose方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Expose
//
// Set the visible/hidden state of a toolbar
//
void ToolDock::Expose( int type, bool show )
{
ToolBar *t = mBars[ type ];
// Maintain the docked array
if( show )
{
if( mDockedBars.Index( t ) == wxNOT_FOUND )
{
mDockedBars.Add( t );
}
}
else
{
if( mDockedBars.Index( t ) != wxNOT_FOUND )
{
mDockedBars.Remove( t );
}
}
// Make it (dis)appear
t->Expose( show );
// Update the layout
LayoutToolBars();
Updated();
}
示例2: Expose
//
// Set the visible/hidden state of a toolbar
//
void ToolManager::Expose( int type, bool show )
{
ToolBar *t = mBars[ type ];
// Handle docked and floaters differently
if( t->IsDocked() )
{
t->GetDock()->Expose( type, show );
}
else
{
t->Expose( show );
}
}
示例3: ShowHide
//
// 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() );
}
}
示例4: ShowHide
//
// 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();
}
示例5: ReadConfig
//.........这里部分代码省略.........
bar->SetSize( sz );
bar->Layout();
}
}
#endif
// Is order within range and unoccupied?
if( ( ord >= 0 ) &&
( ord < ToolBarCount ) &&
( order[ dock - 1 ][ ord ] == NoBarID ) )
{
// Insert at ordered location
order[ dock - 1 ][ ord ] = ndx;
}
else
{
// These must go at the end
unordered[ dock - 1 ].Add( ndx );
}
}
else
{
// Create the bar (with the top dock being temporary parent)
bar->Create( mTopDock );
// Construct a new floater
ToolFrame *f = new ToolFrame( mParent, this, bar, wxPoint( x, y ) );
// Set the width and height
if( width[ ndx ] != -1 && height[ ndx ] != -1 )
{
wxSize sz( width[ ndx ], height[ ndx ] );
f->SetSizeHints( sz );
f->SetSize( sz );
f->Layout();
}
// Show or hide it
bar->Expose( show[ ndx ] );
// Inform toolbar of change
bar->SetDocked( NULL, false );
}
// Change back to the bar root
//gPrefs->SetPath( wxT("..") ); <-- Causes a warning...
// May or may not have gone into a subdirectory,
// so use an absolute path.
gPrefs->SetPath( wxT("/GUI/ToolBars") );
}
// Add all toolbars to their target dock
for( dock = 0; dock < DockCount; dock++ )
{
ToolDock *d = ( dock + 1 == TopDockID ? mTopDock : mBotDock );
// Add all ordered toolbars
for( ord = 0; ord < ToolBarCount; ord++ )
{
ndx = order[ dock ][ ord ];
// Bypass empty slots
if( ndx != NoBarID )
{
ToolBar *t = mBars[ ndx ];
// Dock it
d->Dock( t );
// Hide the bar
if( !show[ t->GetId() ] )
{
d->ShowHide( t->GetId() );
}
}
}
// Add all unordered toolbars
for( ord = 0; ord < (int) unordered[ dock ].GetCount(); ord++ )
{
ToolBar *t = mBars[ unordered[ dock ][ ord ] ];
// Dock it
d->Dock( t );
// Hide the bar
if( !show[ t->GetId() ] )
{
d->ShowHide( t->GetId() );
}
}
}
// Restore original config path
gPrefs->SetPath( oldpath );
#if defined(__WXMAC__)
// Reinstate original transition
wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, mTransition );
#endif
}