Example #1
0
void DialogCropVolume::OnShow( wxShowEvent& event )
{
  static bool bShowFrames = true;
  MainWindow* mainwnd = MainWindow::GetMainWindowPointer();
  RenderView3D* view = (RenderView3D*)mainwnd->GetRenderView( 3 );

//#if wxCHECK_VERSION(2,9,0)
#if wxVERSION_NUMBER > 2900
  if ( event.IsShown() )
#else
  if ( event.GetShow() )
#endif
  {
    if ( view )
    {
      bShowFrames = view->GetShowSliceFrames();
      view->SetShowSliceFrames( false );
    }
    
    wxConfigBase* config = wxConfigBase::Get();
    if ( config )
    {
      int x = config->Read( _T("/ToolWindowCropVolume/PosX"), 0L );
      int y = config->Read( _T("/ToolWindowCropVolume/PosY"), 0L );
      if ( x == 0 && y == 0 )
        Center();
      else
        Move( x, y );
    }
  }
  else
  {
    if ( view )
      view->SetShowSliceFrames( bShowFrames );
    if ( mainwnd->GetVolumeCropper() )
      mainwnd->GetVolumeCropper()->Show( false );
    if ( mainwnd->IsShown() )
      mainwnd->SetMode( 0 );
    
    wxConfigBase* config = wxConfigBase::Get();
    if ( config )
    {
      int x, y;
      GetPosition( &x, &y );
      config->Write( _T("/ToolWindowCropVolume/PosX"), (long) x );
      config->Write( _T("/ToolWindowCropVolume/PosY"), (long) y );
    }
  }
  
  event.Skip();
}
void CDlgMessages::OnShow(wxShowEvent& event) {
    wxLogTrace(wxT("Function Start/End"), wxT("CDlgMessages::OnShow - Function Begin"));
    static bool bAlreadyRunning = false;

    if ((event.GetEventObject() == this) && !bAlreadyRunning) {
        bAlreadyRunning = true;

        wxLogTrace(wxT("Function Status"), wxT("CDlgMessages::OnShow - Show/Hide Event for CAdvancedFrame detected"));
        if (event.GetShow()) {
            RestoreWindowDimensions();
        } else {
            SaveWindowDimensions();
        }

        bAlreadyRunning = false;
    } else {
        event.Skip();
    }

    wxLogTrace(wxT("Function Start/End"), wxT("CDlgMessages::OnShow - Function End"));
}
Example #3
0
void ToolWindowEdit::OnShow( wxShowEvent& event )
{
//#if wxCHECK_VERSION(2,9,0)
#if wxVERSION_NUMBER > 2900  
  if ( event.IsShown() )
#else
  if ( event.GetShow() )
#endif
  {
    wxConfigBase* config = wxConfigBase::Get();
    if ( config )
    {
      int x = config->Read( _T("/ToolWindowEdit/PosX"), 0L );
      int y = config->Read( _T("/ToolWindowEdit/PosY"), 0L );
      if ( x == 0 && y == 0 )
        Center();
      else
        Move( x, y );
    }
    for ( int i = 0; i < 3; i++ )
    {
      RenderView2D* view = ( RenderView2D* )MainWindow::GetMainWindowPointer()->GetRenderView( i );
      view->GetContour2D()->AddListener( this );
    }
  }
  else
  {
    wxConfigBase* config = wxConfigBase::Get();
    if ( config )
    {
      int x, y;
      GetPosition( &x, &y );
      config->Write( _T("/ToolWindowEdit/PosX"), (long) x );
      config->Write( _T("/ToolWindowEdit/PosY"), (long) y );
    } 
  }
  MainWindow::GetMainWindowPointer()->SetFocus();
}
Example #4
0
void wxIFMFloatingWindowBase::OnShow(wxShowEvent &event)
{
    m_component->Show(event.GetShow(), true);
}
void Panels::BaseSelectorPanel::OnShow(wxShowEvent& evt)
{
	evt.Skip();
	if( !evt.GetShow() ) return;
	OnShown();
}
Example #6
0
void HistoryWindow::OnShow(wxShowEvent & event)
{
   if (event.GetShow())
      UpdateDisplay();
}
Example #7
0
void Simple::OnShow (wxShowEvent& event)
{
  csPrintf("got show %d\n", (int) event.GetShow ());
}