当前位置: 首页>>代码示例>>C++>>正文


C++ wxSizeEvent::Skip方法代码示例

本文整理汇总了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();
}
开发者ID:jacklibj,项目名称:r5,代码行数:15,代码来源:statusbar.cpp

示例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();
}
开发者ID:retrography,项目名称:git-import-test,代码行数:15,代码来源:mxDesktopTestGrid.cpp

示例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();
}
开发者ID:jonntd,项目名称:dynamica,代码行数:18,代码来源:notebook_osx.cpp

示例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();
}
开发者ID:Dangr8,项目名称:Cities3D,代码行数:16,代码来源:CoreGLCanvas.cpp

示例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();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:16,代码来源:listbkg.cpp

示例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();
	}
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:16,代码来源:SourcesBox.cpp

示例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();
}
开发者ID:sergiosvieira,项目名称:wxgis,代码行数:16,代码来源:statusbar.cpp

示例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();
}
开发者ID:YY583456235,项目名称:MinFFS,代码行数:16,代码来源:small_dlgs.cpp

示例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();
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:17,代码来源:cbauibook.cpp

示例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());
    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:46,代码来源:choicbkg.cpp

示例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
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:17,代码来源:mdi.cpp

示例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();
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:45,代码来源:splitwindow.cpp

示例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);
		}
	}
}
开发者ID:jonrimmer,项目名称:SLADE,代码行数:21,代码来源:ActionSpecialDialog.cpp

示例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);
    }
}
开发者ID:mheinsen,项目名称:wxWidgets,代码行数:18,代码来源:filectrlg.cpp

示例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);
}
开发者ID:Dangr8,项目名称:Cities3D,代码行数:18,代码来源:ChatWindow.cpp


注:本文中的wxSizeEvent::Skip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。