本文整理汇总了C++中wxSizeEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxSizeEvent类的具体用法?C++ wxSizeEvent怎么用?C++ wxSizeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxSizeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSize
void MyFrame::OnSize(wxSizeEvent& event)
{
if ( m_treeCtrl
#if wxUSE_LOG
&& m_textCtrl
#endif // wxUSE_LOG
)
{
Resize();
}
event.Skip();
}
示例2: OnSize
void PHDStatusBar::OnSize(wxSizeEvent& event)
{
wxRect fldRect;
GetFieldRect(0, fldRect);
int fldWidth = fldRect.GetWidth();
m_ctrlPanel->SetSize(fldWidth - 1, fldRect.GetHeight());
m_Msg1->SetPosition(wxPoint(2, 3));
m_StarIndicators->PositionControls();
m_GuideIndicators->PositionControls();
m_StateIndicators->PositionControls();
event.Skip();
}
示例3: OnSize
void DropDownBase::OnSize( wxSizeEvent& event )
{
event.Skip();
/*
if (!m_dropdownButton) return;
wxSize size = GetClientSize();
wxPrintf(wxT("DropDownBase %d %d\n"), size.x, size.y);
wxSize dropSize = m_dropdownButton->GetSize();
m_dropdownButton->SetSize(size.x-dropSize.x, 0, dropSize.x, size.y);
*/
}
示例4: onSize
//------------------------------------------------------------------------------
void wxOgreRenderWindow::onSize (wxSizeEvent &evt)
{
if (render_window_)
{
// Setting new size;
int width;
int height;
wxSize size = evt.GetSize ();
width = size.GetWidth ();
height = size.GetHeight ();
render_window_->resize (width, height);
// Letting Ogre know the window has been resized;
render_window_->windowMovedOrResized ();
setCameraAspectRatio();
Refresh();
}
evt.Skip();
}
示例5: OnSize
void OnSize(wxSizeEvent& event)
{
// show current size in the status bar
#if wxUSE_STATUSBAR
if ( m_frameStatusBar )
{
wxSize sz = GetClientSize();
SetStatusText(wxString::Format(_T("%dx%d"), sz.x, sz.y), 1);
}
#endif // wxUSE_STATUSBAR
event.Skip();
}
示例6: OnSize
void wxSkinFrame::OnSize(wxSizeEvent& e)
{
if( CreateFrame(GetClientSize()))
{ SetWindowShape(m_bmpSkin);
}
/*if(m_sizeMode == 0)
{*/
Refresh();
Layout();
//}
e.Skip();
}
示例7: OnSize
/**
@brief Resize Event Handler
*/
void CPropertyWindow::OnSize(wxSizeEvent& event)
{
if (GetParent() != (void*)GetFrame())
{
const wxRect r = GetParent()->GetSize();
SetSize(r);
RecalculatePositions(r.width-20, r.height-20);
}
else
{
event.Skip();
}
}
示例8: OnResizePreview
void OBSBasic::OnResizePreview(wxSizeEvent &event)
{
event.Skip();
wxSize newSize = previewPanel->GetClientSize();
graphics_t graphics = obs_graphics();
if (graphics) {
gs_entercontext(graphics);
gs_resize(newSize.x, newSize.y);
gs_leavecontext();
}
}
示例9: OnSize
void CWindowStateManager::OnSize(wxSizeEvent& event)
{
if (!m_pWindow->IsIconized())
{
m_lastMaximized = m_pWindow->IsMaximized();
if (!m_lastMaximized)
{
m_lastWindowPosition = m_pWindow->GetPosition();
m_lastWindowSize = m_pWindow->GetClientSize();
}
}
event.Skip();
}
示例10: OnSize
/// Sizing
void InstanceCtrl::OnSize(wxSizeEvent& event)
{
int old_rows = GetItemsPerRow();
int new_rows = CalculateItemsPerRow();
if (old_rows != new_rows)
{
SetItemsPerRow(new_rows);
ReflowAll();
}
SetupScrollbars();
RecreateBuffer();
event.Skip();
}
示例11: OnSize
void CTexturePreviewDialog::OnSize(wxSizeEvent& event)
{
wxSizer* pSizer = GetSizer();
pSizer->DeleteWindows();
InitCtrls();
InsertTextureToListCtrl();
if (m_nCurrentIndex != INVALID_DATA)
{
m_pListCtrl->SetItemState(m_nCurrentIndex, 1, wxLIST_STATE_SELECTED);
ShowTextureInfo(m_nCurrentIndex);
}
event.Skip();
}
示例12: OnSize
void wxComboBox::OnSize( wxSizeEvent &event )
{
// NB: In some situations (e.g. on non-first page of a wizard, if the
// size used is default size), GtkCombo widget is resized correctly,
// but it's look is not updated, it's rendered as if it was much wider.
// No other widgets are affected, so it looks like a bug in GTK+.
// Manually requesting resize calculation (as gtk_pizza_set_size does)
// fixes it.
if (GTK_WIDGET_VISIBLE(m_widget))
gtk_widget_queue_resize(m_widget);
event.Skip();
}
示例13: OnSize
void wxListbook::OnSize(wxSizeEvent& event)
{
// arrange the icons before calling SetClientSize(), otherwise it wouldn't
// account for the scrollbars the list control might need and, at least
// under MSW, we'd finish with an ugly looking list control with both
// vertical and horizontal scrollbar (with one of them being added because
// the other one is not accounted for in client size computations)
wxListView * const list = GetListView();
if ( list )
list->Arrange();
event.Skip();
}
示例14: OnSize
void wxGISMapView::OnSize(wxSizeEvent & event)
{
if(m_PrevSize == event.GetSize())
return;
//event.Skip(false);
DestroyDrawThread();
wxRect rc = GetClientRect();
if(IsShownOnScreen())
{
if(m_nDrawingState == enumGISMapZooming)
{
wxClientDC CDC(this);
if(m_pGISDisplay)
m_pGISDisplay->ZoomingDraw(GetClientRect(), &CDC);
}
else
{
//start zooming action
m_nDrawingState = enumGISMapZooming;
if(m_pGISDisplay)
m_pGISDisplay->SetDeviceFrame(rc);
m_timer.Start(TM_ZOOMING);
}
}
else
{
if(m_pGISDisplay)
m_pGISDisplay->SetDeviceFrame(rc);
}
UpdateFrameCenter();
//wxWakeUpIdle();
m_PrevSize = event.GetSize();
}
示例15: OnSize
void wxGL_PMFCanvas::OnSize(wxSizeEvent& event)
{
if (FreezeRender) // this is a no-no if we're froze
return;
this->SetCurrent();
// Tell openGL
glViewport(0, 0, (GLsizei)event.GetSize().GetWidth(), (GLsizei)event.GetSize().GetHeight());
// Select & reset the Projection Matrix
//the render function does all of this already
/*
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Calculate aspect ratio
if(event.GetSize().GetHeight()){
//more division by zero-Bobboau
float asp = (float)event.GetSize().GetWidth()/(float)event.GetSize().GetHeight();
if(proj_mode == PROJ_ORTHO){
glOrtho(asp*position.z+position.x, -asp*position.z+position.x, 1.0f*position.z+position.y, -1.0f*position.z+position.y, 0.0, 50000.0);
}else{
gluPerspective( 75.0f, asp, 1.0f, 25000.0f );
}
}
// Select & reset the Modelview Matrix
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
*/
Render();
}