Ejemplo n.º 1
0
void MyGLCanvas::OnSize(wxSizeEvent& event)
{
    event.Skip();
    
    // If this window is not fully initialized, dismiss this event
    if ( !IsShownOnScreen() )
        return;
    
    if ( !m_oglManager )
    {
        //Now we have a context, retrieve pointers to OGL functions
        if ( !oglInit() )
            return;
        //Some GPUs need an additional forced paint event
        PostSizeEvent();
    }
    
    // This is normally only necessary if there is more than one wxGLCanvas
    // or more than one wxGLContext in the application.
    SetCurrent(*m_oglContext);
    
    // It's up to the application code to update the OpenGL viewport settings.
    m_winHeight = event.GetSize().y;
    m_oglManager->SetViewport(0, 0, event.GetSize().x, m_winHeight);
    
    // Generate paint event without erasing the background.
    Refresh(false);
}
Ejemplo n.º 2
0
void
wxMoColourPanel::OnSize( wxSizeEvent& event ) {

    //wxString s;
    //s.Printf( "w: %i", GetSize().GetWidth() );

    //wxMessageBox( s );

    if (  m_Pattern.GetWidth()!=event.GetSize().GetWidth() ||
          m_Pattern.GetHeight()!=event.GetSize().GetHeight() ) {

      #ifdef __WXMSW__
      m_Pattern.FreeResource();
      #endif

      if (!m_Pattern.Create( event.GetSize().GetWidth(), event.GetSize().GetHeight(), 24 )) {
        wxMessageBox(wxString("wxMoColourPanel error creating pattern bitmap."));
      }

      //SetSize( event );

      ResizeBitmap();
    }

    wxPanel::OnSize( event );

}
Ejemplo n.º 3
0
void ProjectManager::OnSize(wxSizeEvent& evt)
{
   if (!mProjectLoaded)
      return;

   Torque::Engine.resizeWindow(evt.GetSize().GetX(), evt.GetSize().GetY());
}
Ejemplo n.º 4
0
void wxJigsawEditorCanvas::OnSize( wxSizeEvent& event )
{
	m_DoubleBufferDC.SelectObject(wxNullBitmap);
	m_DoubleBufferBitmap = wxBitmap(event.GetSize().GetWidth(), event.GetSize().GetHeight());
	m_DoubleBufferDC.SelectObject(m_DoubleBufferBitmap);
	RefreshBuffer();
}
Ejemplo n.º 5
0
void GlCanvas::OnSize( wxSizeEvent & event )
{
	wxClientDC deviceContext( this );
	wxGetApp().SetTargetGlCanvas( * this );

	m_pViewport->OnSize( event.GetSize().GetWidth(), event.GetSize().GetHeight() );
}
Ejemplo n.º 6
0
/*****************************************************
**
**   SheetWidget   ---   OnSize
**
******************************************************/
void SheetWidget::OnSize( wxSizeEvent &event )
{
	// set dirty only if larger than minimum size
	if ( event.GetSize().x > minxright ) dirty = true;
	SetSize( event.GetSize());
	Refresh();
}
Ejemplo n.º 7
0
void MyCanvas::OnSize(wxSizeEvent& event)
{
	//printf("OnSize\n");
	if (!IsShownOnScreen()) return;
	SetCurrent(*m_glRC);
	resize_callback(event.GetSize().x, event.GetSize().y);
}
Ejemplo n.º 8
0
void wxBuildUI::Size(wxSizeEvent& event)
{
	// Resize the bitmaps.
	if(wxSize(0, 0) != event.GetSize())
	{
		wxSize bitmapSize = event.GetSize() - wxSize(2, 2);

		bitmapSize.x = std::max(bitmapSize.x, 1);
		bitmapSize.y = std::max(bitmapSize.y, 1);

		ColorType color = mBuildBitmap->GetPlayerColor();
		mBuildBitmap->SetPlayerColor(CR_WHITE);
		mEnabledBitmap = mBuildBitmap->GetBitmap(bitmapSize);
		CreateDisabledBitmap();
		mBitmap->SetSize(bitmapSize);

		if(CR_WHITE != color)
		{
			mBuildBitmap->SetPlayerColor(color);
		}

		mEnabledBitmap = mBuildBitmap->GetBitmap(bitmapSize);
		mBitmap->SetBitmaps(mEnabledBitmap, mDisabledBitmap);

		Refresh();
	}
}
Ejemplo n.º 9
0
void frmMain::_onResize(wxSizeEvent& evt)
{
    wxRect rcLogWindow = wxRect(GetPosition(), m_pLogWindow->GetSize());
    rcLogWindow.x += evt.GetSize().GetWidth();
    rcLogWindow.height = evt.GetSize().GetHeight();
    m_pLogWindow->SetSize(rcLogWindow);
    evt.Skip();
}
Ejemplo n.º 10
0
void JMCanvas::OnSize(wxSizeEvent &event) {
	jmlib->setWindowSize((JML_INT32)event.GetSize().x,(JML_INT32)event.GetSize().y);
	if(backBuffer) {
		backBuffer->SetWidth(event.GetSize().x);
		backBuffer->SetHeight(event.GetSize().y);
	}
	event.Skip();
}
Ejemplo n.º 11
0
void dlgFunction::OnChangeSize(wxSizeEvent &ev)
{
	lstArguments->SetSize(wxDefaultCoord, wxDefaultCoord,
	                      ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
	lstVariables->SetSize(wxDefaultCoord, wxDefaultCoord,
	                      ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
	dlgSecurityProperty::OnChangeSize(ev);
}
Ejemplo n.º 12
0
void EEViewPort::OnResized(wxSizeEvent& event)
{
	event.Skip();
	
	
	_glContext->SetCurrent(*this);
	Engine::Instance()->ResizeScreen(Vector2::Create(float(event.GetSize().x), float(event.GetSize().y)));	
}
Ejemplo n.º 13
0
void wxCvPanel::OnSize(wxSizeEvent &event)
{
	cf.panel_width = event.GetSize().GetWidth();
	cf.panel_height = event.GetSize().GetHeight();

	Refresh(false);
	Update();
}
Ejemplo n.º 14
0
void
TstCanvas_t::OnSize(wxSizeEvent &event)
{
    fprintf(stderr, "OnSize(%u, %u)\n",
            event.GetSize().GetWidth(), event.GetSize().GetHeight());
    for (unsigned idx = 0; idx < sizeof(_layers) / sizeof(_layers[0]); ++idx)
        if (_layers[idx]) _layers[idx]->setSize(event.GetSize());
}
Ejemplo n.º 15
0
void GLCanvas::resize( wxSizeEvent& evt )
{
    gravUtil::logVerbose( "GLCanvas::resize: resize callback: to %ix%i\n",
            evt.GetSize().GetWidth(), evt.GetSize().GetHeight() );
    OnSize( evt );
    Refresh( false );
    GLreshape( evt.GetSize().GetWidth(), evt.GetSize().GetHeight() );
}
Ejemplo n.º 16
0
        void SplitterWindow2::OnSize(wxSizeEvent& event) {
            if (IsBeingDeleted()) return;

            updateSashPosition(m_oldSize, event.GetSize());
            sizeWindows();
            m_oldSize = event.GetSize();
            event.Skip();
        }
Ejemplo n.º 17
0
void CGameListCtrl::OnSize(wxSizeEvent& event)
{
	if (lastpos == event.GetSize()) return;
	lastpos = event.GetSize();
	AutomaticColumnWidth();

	event.Skip();
}
Ejemplo n.º 18
0
void wxOwnerDrawFrame::OnSize(wxSizeEvent &event)
{
	mMemBitmap.Create(event.GetSize().GetWidth(), event.GetSize().GetHeight());

	event.Skip();

	Size(event);
}
Ejemplo n.º 19
0
void dlgRole::OnChangeSize(wxSizeEvent &ev)
{
	lstVariables->SetSize(wxDefaultCoord, wxDefaultCoord,
	                      ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
	if (GetAutoLayout())
	{
		Layout();
	}
}
Ejemplo n.º 20
0
void dlgColumn::OnChangeSize(wxSizeEvent &ev)
{
	securityPage->lbPrivileges->SetSize(wxDefaultCoord, wxDefaultCoord,
	                                    ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 550);
	if (GetAutoLayout())
	{
		Layout();
	}
}
Ejemplo n.º 21
0
////////////////////////////////////////////////////////////////////
// Method:	OnSize
// Class:	CCamView
// Purose:	adjust on windows resize
// Input:	reference to size event
// Output:	nothing
////////////////////////////////////////////////////////////////////
void CCamView::OnSize( wxSizeEvent& even )
{
	int nWidth = even.GetSize().GetWidth();
	int nHeight = even.GetSize().GetHeight();

	m_nWidth = nWidth;
	m_nHeight = nHeight;

}
Ejemplo n.º 22
0
void dlgSchedule::OnChangeSize(wxSizeEvent &ev)
{
	lstExceptions->SetSize(wxDefaultCoord, wxDefaultCoord,
	                       ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
	if (GetAutoLayout())
	{
		Layout();
	}
}
Ejemplo n.º 23
0
void dlgIndex::OnChangeSize(wxSizeEvent &ev)
{
	lstColumns->SetSize(wxDefaultCoord, wxDefaultCoord,
	    ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 700);
    if (GetAutoLayout())
    {
        Layout();
    }
}
Ejemplo n.º 24
0
void ViewCanvas::OnSize(wxSizeEvent& e)
{
    if ( e.GetSize().x > 0 && e.GetSize().y > 0 )
    {
        m_Viewport.SetSize( e.GetSize().x, e.GetSize().y );
    }

    Refresh();
}
Ejemplo n.º 25
0
void LWSlider::OnSize( wxSizeEvent & event )
{
   mWidth = event.GetSize().GetX();
   mHeight = event.GetSize().GetY();

   Draw();

   Refresh();
}
Ejemplo n.º 26
0
void dlgTextSearchDictionary::OnChangeSize(wxSizeEvent &ev)
{
    lstOptions->SetSize(wxDefaultCoord, wxDefaultCoord,
                        ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
    if (GetAutoLayout())
    {
        Layout();
    }
}
Ejemplo n.º 27
0
void DisassemblyDialog::onSizeEvent(wxSizeEvent& event)
{
	if (event.GetEventType() == wxEVT_SIZE)
	{
		g_Conf->EmuOptions.Debugger.WindowWidth = event.GetSize().x;
		g_Conf->EmuOptions.Debugger.WindowHeight = event.GetSize().y;
	}

	event.Skip();
}
Ejemplo n.º 28
0
void
Frame3D::OnResize (wxSizeEvent &event){
//this->SetSize(event.GetSize().GetWidth(),event.GetSize().GetHeight());

// _VTKWindow->SetSize(event.GetSize().GetWidth(),
//                           event.GetSize().GetHeight()-(_play->GetSize()).GetHeight()-(_slider->GetSize()).GetHeight());

// this->Refresh();
DEBOUT(("Frame3D::OnResize() Width=%d, Height=%d\n",event.GetSize().GetWidth(),event.GetSize().GetHeight()));
}
Ejemplo n.º 29
0
void
AnimationFrame::OnSize(wxSizeEvent& event)
{
	// HACK: Prevent width and height from growing out of control
	int w = event.GetSize().GetWidth();
	int h = event.GetSize().GetHeight();
	SetConfiguration_AnimationFrameWidth((w > 1200) ? 1200 : w);
	SetConfiguration_AnimationFrameHeight((h > 700) ? 700 : h);
	super::OnSize(event);
}
Ejemplo n.º 30
0
void dlgEditGridOptions::OnChangeSize(wxSizeEvent &ev)
{
    if (lstSortCols)
        lstSortCols->SetSize(wxDefaultCoord, wxDefaultCoord,
                             ev.GetSize().GetWidth(), ev.GetSize().GetHeight() - 350);
    if (GetAutoLayout())
    {
        Layout();
    }
}