Exemplo n.º 1
0
void LocalsWnd::OnShow(wxShowEvent& evt)
{
    if (evt.IsShown())
        updateState();

    evt.Skip();
}
Exemplo n.º 2
0
void CslPanelSearch::OnShow(wxShowEvent& event)
{
    if (event.IsShown())
        m_search_ctrl->SetFocus();

    event.Skip();
}
Exemplo n.º 3
0
// Note: according to documentation, this event is only available under wxMSW, wxGTK, and wxOS2
void CCManager::OnAutocompleteHide(wxShowEvent& event)
{
    event.Skip();
    DoHidePopup();
    wxObject* evtObj = event.GetEventObject();
    if (evtObj)
        static_cast<wxWindow*>(evtObj)->Disconnect(wxEVT_SHOW, wxShowEventHandler(CCManager::OnAutocompleteHide), nullptr, this);
    if (m_CallTipActive != wxSCI_INVALID_POSITION && !m_AutoLaunchTimer.IsRunning())
        m_CallTipTimer.Start(CALLTIP_REFRESH_DELAY, wxTIMER_ONE_SHOT);
}
Exemplo n.º 4
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();
}
Exemplo n.º 5
0
void OOPLyric::OnParentShow(wxShowEvent &e) {
    if (IsOk()) {
        if (!e.IsShown()) {
            m_timer.Stop();
        } else {
            UpdateProgress(NULL);
            Start();

            VdkDC dc(m_Window, GetAbsoluteRect(), NULL);
            Draw(dc);
        }
    }

    e.Skip(true);
}
Exemplo n.º 6
0
void GameSettings::OnShow(wxShowEvent& event)
{
    if (event.IsShown()) {
        readConfiguration();
        return;
    }
}
Exemplo n.º 7
0
/*
void MerryFrame::OnActivateEvent(wxActivateEvent& e)
{
#ifndef DEBUG_ALWAYS_SHOW
	if (!e.GetActive() && !this->IsShownOnScreen())
		this->Hide();
#endif
}
*/
void MerryFrame::OnShowEvent(wxShowEvent& e)
{
	MerryTextCtrl* textCtrl = m_mainPanel->GetTextCtrl();
	assert(textCtrl);
	if (e.IsShown())
	{
		if (g_config->get(PlayPopupNotify))//ÊÇ·ñ²¥·ÅÌáʾÒô
			wxSound("Popup.wav").Play();
		textCtrl->ChangeValue(wxT(""));
		this->CentreOnce();
		m_listBoxPanel->Dismiss();
		this->Raise();
		g_controller->SetWindowPos(this->GetHWND(),HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
		ActiveWindow(this->GetHWND());
//		textCtrl->SetFocus();
#ifdef __WXMSW__
		textCtrl->SetEnInputMode();
#endif
		if (g_config->get(AutoPopup))
			textCtrl->AppendText(wxT(""));
	}
	else
		textCtrl->ChangeValue(wxT(""));

	textCtrl->EnterArgs = 0;
}
Exemplo n.º 8
0
void CommandOptions::OnShow(wxShowEvent& event)
{
    if (event.IsShown()) {
        readOptions();
        return;
    }
    storeOptions();
}
Exemplo n.º 9
0
void GEUIDialog::OnShow(wxShowEvent& event)
{
      LogDebugMessage(_T("GE plugin - OnShow event"));
      if(m_ballowStart)
            GEInitialize();
      SetToolbarItemState(m_toolbar_item_id, IsShown());
      
      event.Skip();
}
Exemplo n.º 10
0
// -----------------------------------------------------------------------------
// Called when the panel is shown or hidden
// -----------------------------------------------------------------------------
void TextureXEditor::onShow(wxShowEvent& e)
{
	if (!e.IsShown())
	{
		showTextureMenu(false);
		return;
	}
	else
		theMainWindow->undoHistoryPanel()->setManager(undo_manager_.get());
	updateMenuStatus();
}
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"));
}
Exemplo n.º 12
0
// -----------------------------------------------------------------------------
// Called when the control is shown
// -----------------------------------------------------------------------------
void SCallTip::onShow(wxShowEvent& e)
{
	if (e.IsShown())
	{
		// Get screen bounds and window bounds
		int       index = wxDisplay::GetFromWindow(this->GetParent());
		wxDisplay display((unsigned)index);
		auto      screen_area = display.GetClientArea();
		auto      ct_area     = GetScreenRect();

		// Check if calltip extends off the right of the screen
		if (ct_area.GetRight() > screen_area.GetRight())
		{
			// Move back so we're within the screen
			int offset = ct_area.GetRight() - screen_area.GetRight();
			SetPosition(wxPoint(GetPosition().x - offset, GetPosition().y));
		}
	}

	e.Skip();
}
Exemplo n.º 13
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();
}
Exemplo n.º 14
0
void DialogProgress::OnShow(wxShowEvent& evt) {
    if (!evt.IsShown()) return;

    // Restore the cancel button in case it was previously switched to a close
    // button
    Bind(wxEVT_BUTTON, &DialogProgress::OnCancel, this, wxID_CANCEL);
    Bind(wxEVT_IDLE, &DialogProgress::OnIdle, this);
    cancel_button->SetLabelText(_("Cancel"));
    cancel_button->Enable();

    wxSizer *sizer = GetSizer();
    if (sizer->IsShown(log_output)) {
        sizer->Hide(log_output);
        Layout();
        sizer->Fit(this);
        log_output->Clear();
    }
}
Exemplo n.º 15
0
/* SDialog::onShow
 * Called when the dialog is shown
 *******************************************************************/
void SDialog::onShow(wxShowEvent& e)
{
	if (e.IsShown())
		CenterOnParent();
	e.Skip();
}
Exemplo n.º 16
0
void wxIFMFloatingWindowBase::OnShow(wxShowEvent &event)
{
    m_component->Show(event.GetShow(), true);
}
Exemplo n.º 17
0
void Panels::BaseSelectorPanel::OnShow(wxShowEvent& evt)
{
	evt.Skip();
	if( !evt.GetShow() ) return;
	OnShown();
}
Exemplo n.º 18
0
void Canvas::OnShow(wxShowEvent& event)
{
    e_Show.Raise( event.IsShown() );
}
void wxSciterControl::OnShow(wxShowEvent& evt)
{
#ifdef __WINDOWS__
  ShowWindow(m_hwnd, evt.IsShown() ? SW_SHOW : SW_HIDE);
#endif
}
Exemplo n.º 20
0
void Simple::OnShow (wxShowEvent& event)
{
  csPrintf("got show %d\n", (int) event.GetShow ());
}
Exemplo n.º 21
0
void HistoryWindow::OnShow(wxShowEvent & event)
{
   if (event.GetShow())
      UpdateDisplay();
}
Exemplo n.º 22
0
void Panels::BaseSelectorPanel::OnShow(wxShowEvent& evt)
{
	evt.Skip();
	if( evt.IsShown() )
		OnShown();
}