本文整理汇总了C++中wxSizeEvent::Skip方法的典型用法代码示例。如果您正苦于以下问题:C++ wxSizeEvent::Skip方法的具体用法?C++ wxSizeEvent::Skip怎么用?C++ wxSizeEvent::Skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxSizeEvent
的用法示例。
在下文中一共展示了wxSizeEvent::Skip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSize
void wxGISStatusBar::OnSize(wxSizeEvent &event)
{
wxRect r;
if( m_pAni && GetFieldRect(m_AniPos, r) )
{
r.Deflate(2);
m_pAni->SetSize(r);
}
//if( m_pProgressBar && GetFieldRect(STATUSBAR_PROGRESS, r) )
//{
// m_pProgressBar->SetSize(r);
//}
event.Skip();
}
示例2: OnResize
void mxDesktopTestGrid::OnResize(wxSizeEvent &evt) {
if (created) {
BeginBatch();
int w=evt.GetSize().GetWidth()-GetColSize(0)-GetColSize(1);
double p = double(w)/old_size;
int cols_num=GetNumberCols();
for (int i=PRECOLS;i<cols_num;i++) {
cols_sizes[i-PRECOLS]*=p;
SetColSize(i,int(cols_sizes[i-PRECOLS]));
}
old_size=w;
EndBatch();
}
evt.Skip();
}
示例3: OnSize
// @@@ OnSize() is used for setting the font when it's called for the first
// time because doing it in ::Create() doesn't work (for unknown reasons)
void wxNotebook::OnSize(wxSizeEvent& event)
{
unsigned int nCount = m_pages.Count();
wxRect rect = GetPageRect() ;
for ( unsigned int nPage = 0; nPage < nCount; nPage++ )
{
wxNotebookPage *pPage = m_pages[nPage];
pPage->SetSize(rect);
if ( pPage->GetAutoLayout() )
pPage->Layout();
}
// Processing continues to next OnSize
event.Skip();
}
示例4: OnSize
void wxCoreGLCanvas::OnSize(wxSizeEvent& event)
{
# ifdef __WXGTK__
if(false == mPainted)
{
return;
}
# endif
//this is also necessary to update the context on some platforms
event.Skip();
ResizeGL();
SetDirty();
}
示例5: 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();
list->EnsureVisible(m_selection);
}
event.Skip();
}
示例6: OnSize
void CSourcesBox::OnSize( wxSizeEvent& event )
{
if(m_pPictureBox && m_pPictureBox->IsShown())
{
wxSize s =GetClientSize();
s.SetHeight(s.GetWidth());
m_pPictureBox->SetSizeHints(s,s);
wxSashLayoutWindow::OnSize(event);
m_pPictureBox->Refresh();
}
else
{
//m_pPictureBox->SetSizeHints(0,0);
event.Skip();
}
}
示例7: OnSize
void wxGISStatusBar::OnSize(wxSizeEvent &event)
{
wxRect r;
if( m_pAni && GetFieldRect(m_AniPos, r) )
{
r.Deflate(2);
m_pAni->SetSize(r);
}
if( m_pProgressBar && GetFieldRect(m_ProgressPos, r) )
{
//r.Deflate(2);
m_pProgressBar->SetSize(r);
}
event.Skip();
}
示例8: onResize
void OptionsDlg::onResize(wxSizeEvent& event)
{
const int widthTotal = m_gridCustomCommand->GetGridWindow()->GetClientSize().GetWidth();
if (widthTotal >= 0 && m_gridCustomCommand->GetNumberCols() == 2)
{
const int w0 = widthTotal * 2 / 5; //ratio 2 : 3
const int w1 = widthTotal - w0;
m_gridCustomCommand->SetColSize(0, w0);
m_gridCustomCommand->SetColSize(1, w1);
m_gridCustomCommand->Refresh(); //required on Ubuntu
}
event.Skip();
}
示例9: OnResize
void cbAuiNotebook::OnResize(wxSizeEvent& event)
{
wxAuiTabCtrl* tabCtrl = (wxAuiTabCtrl*)event.GetEventObject();
if (tabCtrl)
{
cbAuiNotebook* nb = (cbAuiNotebook*)tabCtrl->GetParent();
if (nb)
{
if (nb->m_TabCtrlSize != event.GetSize())
{
nb->m_TabCtrlSize = event.GetSize();
nb->MinimizeFreeSpace();
}
}
}
event.Skip();
}
示例10: OnSize
void wxChoicebook::OnSize(wxSizeEvent& event)
{
event.Skip();
if ( !m_choice )
{
// we're not fully created yet
return;
}
// resize the choice control and the page area to fit inside our new size
const wxSize sizeClient = GetClientSize(),
sizeChoice = GetChoiceSize();
wxPoint posChoice;
switch ( GetWindowStyle() & wxCHB_ALIGN_MASK )
{
default:
wxFAIL_MSG( _T("unexpected wxChoicebook alignment") );
// fall through
case wxCHB_TOP:
case wxCHB_LEFT:
// posChoice is already ok
break;
case wxCHB_BOTTOM:
posChoice.y = sizeClient.y - sizeChoice.y;
break;
case wxCHB_RIGHT:
posChoice.x = sizeClient.x - sizeChoice.x;
break;
}
m_choice->Move(posChoice.x, posChoice.y);
m_choice->SetSize(sizeChoice.x, sizeChoice.y);
// resize the currently shown page
if ( m_selection != wxNOT_FOUND )
{
wxWindow *page = m_pages[m_selection];
wxCHECK_RET( page, _T("NULL page in wxChoicebook?") );
page->SetSize(GetPageRect());
}
}
示例11: OnSize
void MyFrame::OnSize(wxSizeEvent& event)
{
int w, h;
GetClientSize(&w, &h);
m_textWindow->SetSize(0, 0, 200, h);
GetClientWindow()->SetSize(200, 0, w - 200, h);
// FIXME: On wxX11, we need the MDI frame to process this
// event, but on other platforms this should not
// be done.
#ifdef __WXUNIVERSAL__
event.Skip();
#else
wxUnusedVar(event);
#endif
}
示例12: OnSize
void wxSplitWindow::OnSize (wxSizeEvent& event)
{
// only process this message if we're not iconized - otherwise iconizing
// and restoring a window containing the splitwindow has a funny side effect
// of changing the splitwindow position!
wxWindow *parent = wxGetTopLevelParent (this);
bool iconized;
wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
if (winTop) {
iconized = winTop->IsIconized();
}else{
wxFAIL_MSG(wxT("should have a top level parent!"));
iconized = false;
}
if (iconized) {
m_lastSize = wxSize(0,0);
event.Skip();
return;
}
if (m_windowOne && m_windowTwo) {
int w, h;
GetClientSize (&w, &h);
int size = m_splitMode == wxSPLIT_VERTICAL? w: h;
int old_size = m_splitMode == wxSPLIT_VERTICAL ? m_lastSize.x : m_lastSize.y;
if (old_size != 0) {
int delta = (int)((size - old_size)*m_sashGravity);
if (delta != 0) {
int newPosition = m_sashPosition + delta;
if (newPosition < m_minimumPaneSize) newPosition = m_minimumPaneSize;
SetSashPositionAndNotify (newPosition);
}
}
//? TODO use correct constants for the values
if (m_sashPosition >= size - 5) SetSashPositionAndNotify (wxMax (10, size - 40));
m_lastSize = wxSize (w,h);
}
SizeWindows();
}
示例13: onSize
/* ArgsPanel::onSize
* Rewrap the descriptions when the panel is resized
*******************************************************************/
void ArgsPanel::onSize(wxSizeEvent& event)
{
event.Skip();
fg_sizer->Layout();
if (fg_sizer->GetColWidths().size() > 1)
{
int available_width = fg_sizer->GetColWidths()[1];
for (int a = 0; a < 5; a++)
{
// Wrap() puts hard newlines in the label, so we need to remove them
wxString label = label_args_desc[a]->GetLabelText();
label.Replace("\n", " ");
label_args_desc[a]->SetLabelText(label);
label_args_desc[a]->Wrap(available_width);
}
}
}
示例14: OnSize
void wxFileListCtrl::OnSize( wxSizeEvent &event )
{
event.Skip();
if ( InReportView() )
{
// In report mode, set name column to use remaining width.
int newNameWidth = GetClientSize().GetWidth();
for ( int i = 1; i < GetColumnCount(); i++ )
{
newNameWidth -= GetColumnWidth(i);
if ( newNameWidth <= 0 )
return;
}
SetColumnWidth(0, newNameWidth);
}
}
示例15: OnSize
void wxChatWindow::OnSize(wxSizeEvent& event)
{
event.Skip();
wxSize size = event.GetSize();
wxInt32 w = size.GetWidth();
wxInt32 h = size.GetHeight();
wxInt32 th = 0;
if(NULL != mpInputText)
{
th = mpInputText->GetSize().GetHeight();
mpInputText->SetSize(0, h - th, w, th);
}
mpHtmlWindow->SetSize(0, 0, w, h - th - 1);
}