本文整理汇总了C++中wxSizeEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxSizeEvent类的具体用法?C++ wxSizeEvent怎么用?C++ wxSizeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxSizeEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OnSize
void MyFrame::OnSize(wxSizeEvent& event)
{
if ( m_treeCtrl
#if wxUSE_LOG
&& m_textCtrl
#endif // wxUSE_LOG
)
{
Resize();
}
event.Skip();
}
开发者ID:nealey,项目名称:vera,代码行数:13,代码来源:treetest.cpp
示例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();
}
开发者ID:AndresPozo,项目名称:phd2,代码行数:13,代码来源:aui_controls.cpp
示例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);
*/
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:13,代码来源:dropdown.cpp
示例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();
}
开发者ID:janfrs,项目名称:kwc-ros-pkg,代码行数:23,代码来源:wx_ogre_render_window.cpp
示例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();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:13,代码来源:vstest.cpp
示例6: OnSize
void wxSkinFrame::OnSize(wxSizeEvent& e)
{
if( CreateFrame(GetClientSize()))
{ SetWindowShape(m_bmpSkin);
}
/*if(m_sizeMode == 0)
{*/
Refresh();
Layout();
//}
e.Skip();
}
开发者ID:juliocesarperezfranco,项目名称:wxSkin,代码行数:13,代码来源:wxSkinFrame.cpp
示例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();
}
}
开发者ID:butilities,项目名称:3D-Lecture-2,代码行数:16,代码来源:PropertyWindow.cpp
示例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();
}
}
开发者ID:BraginWoW,项目名称:obs-studio,代码行数:13,代码来源:window-basic-main.cpp
示例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();
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:13,代码来源:window_state_manager.cpp
示例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();
}
开发者ID:Glought,项目名称:MultiMC4,代码行数:14,代码来源:instancectrl.cpp
示例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();
}
开发者ID:hejiero,项目名称:BeyondEngine,代码行数:13,代码来源:TexturePreviewDialog.cpp
示例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();
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:13,代码来源:combobox.cpp
示例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();
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:13,代码来源:listbkg.cpp
示例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();
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:38,代码来源:mapview.cpp
示例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();
}
开发者ID:asarium,项目名称:PCS2,代码行数:38,代码来源:wxGL_PMFCanvas.cpp
示例16: OnSize
void GLCanvas::OnSize(wxSizeEvent &event)
{
// set GL viewport
wxSize size = event.GetSize();
if (_GLRC)
{
SetCurrent(*_GLRC);
glViewport(0, 0, GLint(size.x), GLint(size.y));
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, double(size.x) / double(size.y), 0.1, 100.0);
glMatrixMode(GL_MODELVIEW);
}
开发者ID:JochenKempfle,项目名称:MoCap,代码行数:14,代码来源:GLCanvas.cpp
示例17: OnSize
void wxFrame::OnSize(wxSizeEvent& event)
{
#if wxUSE_MENUS
PositionMenuBar();
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
PositionStatusBar();
#endif // wxUSE_STATUSBAR
#if wxUSE_TOOLBAR
PositionToolBar();
#endif // wxUSE_TOOLBAR
event.Skip();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:14,代码来源:framuniv.cpp
示例18: onNotebookResize
void DIALOG_TEMPLATE_SELECTOR::onNotebookResize(wxSizeEvent& event)
{
for ( size_t i=0; i < m_notebook->GetPageCount(); i++ )
{
m_panels[i]->SetSize( m_notebook->GetSize().GetWidth() - 6, 140 );
m_panels[i]->m_SizerBase->FitInside( m_panels[i] );
m_panels[i]->m_scrolledWindow1->SetSize( m_panels[i]->GetSize().GetWidth() - 6,
m_panels[i]->GetSize().GetHeight() - 6 );
m_panels[i]->m_SizerChoice->FitInside( m_panels[i]->m_scrolledWindow1 );
}
m_notebook->Refresh();
event.Skip();
}
开发者ID:james-sakalaukus,项目名称:kicad,代码行数:14,代码来源:dialog_template_selector.cpp
示例19:
void WIZARD_3DSHAPE_LIBS_DOWNLOADER::OnGridLibReviewSize( wxSizeEvent& event )
{
// Adjust the width of the column 1 afo m_gridLibReview (library names) to the
// max available width.
int gridwidth = m_gridLibReview->GetClientSize().x;
gridwidth -= m_gridLibReview->GetColSize( 0 ) + m_gridLibReview->GetColLabelSize();
if( gridwidth < 200 )
gridwidth = 200;
m_gridLibReview->SetColSize( 1, gridwidth );
event.Skip();
}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:14,代码来源:wizard_3DShape_Libs_downloader.cpp
示例20: OnSize
void CFCEditorGLWindow::OnSize(wxSizeEvent& event)
{
if ( IsShownOnScreen() )
{
SetCurrent(*m_glRC);
}
kmVec2 kmVecSize;
wxSize size = event.GetSize();
kmVecSize.x = size.GetWidth();
kmVecSize.y = size.GetHeight();
CRenderManager::GetInstance()->SetWindowSize(kmVecSize.x, kmVecSize.y);
m_pCamera->SetWidth(size.GetWidth());
m_pCamera->SetHeight(size.GetHeight());
}
开发者ID:nobitalwm,项目名称:FCEngine,代码行数:14,代码来源:FCEditorGLWindow.cpp
注:本文中的wxSizeEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论