• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetBorder函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetBorder函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBorder函数的具体用法?C++ GetBorder怎么用?C++ GetBorder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetBorder函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: block_cpy

bool Widget::IsCollide(int x,int y,Direction dir)
{
    //用拷贝的临时方块做判断
    int temp_block[4][4];
    block_cpy(temp_block,cur_block);
    Border temp_border;
    GetBorder(temp_block,temp_border);
    //先尝试按照某方向走一格
    switch(dir)
    {
    case UP:
        BlockRotate(temp_block);
        GetBorder(temp_block,temp_border); //旋转后要重新计算边界
        break;
    case DOWN:
        y+=1;
        break;
    case LEFT:
        x-=1;
        break;
    case RIGHT:
        x+=1;
        break;
    default:
        break;
    }
    for(int i=temp_border.ubound;i<=temp_border.dbound;i++)
        for(int j=temp_border.lbound;j<=temp_border.rbound;j++)
            if(game_area[y+i][x+j]==2&&temp_block[i][j]==1||x+temp_border.lbound<0||x+temp_border.rbound>AREA_COL-1)
                return true;
    return false;
}
开发者ID:luspohie,项目名称:QtTetris,代码行数:32,代码来源:widget.cpp


示例2: defined

bool wxGenericCollapsiblePane::Create(wxWindow *parent,
                                      wxWindowID id,
                                      const wxString& label,
                                      const wxPoint& pos,
                                      const wxSize& size,
                                      long style,
                                      const wxValidator& val,
                                      const wxString& name)
{
    if ( !wxControl::Create(parent, id, pos, size, style, val, name) )
        return false;

    m_strLabel = label;

#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
    // on Mac we use the disclosure triangle
    // we need a light gray line above and below, lets approximate with the frame
    m_pStaticLine = NULL;
    m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(),
                                         wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER );
    m_pButton->SetBackgroundColour( wxColour( 221, 226, 239 ) );
    m_sz = new wxBoxSizer(wxHORIZONTAL);
    // m_sz->Add(4,4); where shall we put it?
    m_sz->Add( m_pButton, 1);
#else
    // create children and lay them out using a wxBoxSizer
    // (so that we automatically get RTL features)
    m_pButton = new wxButton(this, wxID_ANY, GetBtnLabel(), wxPoint(0, 0),
                             wxDefaultSize, wxBU_EXACTFIT);
    m_pStaticLine = new wxStaticLine(this, wxID_ANY);
    // on other platforms we put the static line and the button horizontally
    m_sz = new wxBoxSizer(wxHORIZONTAL);
    m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder());
    m_sz->Add(m_pStaticLine, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, GetBorder());
#endif

    // FIXME: at least under wxCE and wxGTK1 the background is black if we don't do
    //        this, no idea why...
#if defined(__WXWINCE__) || defined(__WXGTK__)
    SetBackgroundColour(parent->GetBackgroundColour());
#endif

    // do not set sz as our sizers since we handle the pane window without using sizers
    m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                          wxTAB_TRAVERSAL|wxNO_BORDER, wxT("wxCollapsiblePanePane") );

    // start as collapsed:
    m_pPane->Hide();

    return true;
}
开发者ID:jonntd,项目名称:dynamica,代码行数:51,代码来源:collpaneg.cpp


示例3: GetBorder

void WebListBox::ResizeScrollBars(void)
{
	if (mpHScroll)
	{
		WebRect r;
		r.Set(GetMargin() + GetBorder(),
		      Height() - GetMargin() - GetBorder() - miSliderWidth - 1,
		      Width() - (mpVScroll ? miSliderWidth : 0) - GetMargin() - GetBorder() - 1,
		      Height() - GetMargin() - GetBorder() - 1);
		mpHScroll->Move(&r);
		WebRect vr;
		GetOptionsRect(&vr);
		mpHScroll->SetWindow(vr.Width());
		mpHScroll->Invalidate();
	}
	if (mpVScroll)
	{
		WebRect r;
		r.Set(Width() - 1 - GetMargin() - GetBorder() - miSliderWidth,
		      GetMargin() + GetBorder(),
		      Width() - 1 - GetMargin() - GetBorder(),
		      Height() - 1 - (mpHScroll ? miSliderWidth : 0) - GetMargin() - GetBorder());
		mpVScroll->Move(&r);
		WebRect vr;
		GetOptionsRect(&vr);
		mpVScroll->SetWindow(vr.Height());
		mpVScroll->Invalidate();

	}
}
开发者ID:peteratebs,项目名称:webcwebbrowser,代码行数:30,代码来源:wtlist.cpp


示例4: GetLayout

inline bool MtgCard::operator==(const MtgCard& rhs) {
    return GetLayout() == rhs.GetLayout() &&
            GetManacost() == rhs.GetManacost() &&
            GetCmc() == rhs.GetCmc() &&
            CompareStringList(GetColors(), rhs.GetColors()) &&
            type == rhs.type &&
            CompareStringList(GetSupertypes(), rhs.GetSupertypes()) &&
            CompareStringList(GetTypes(), rhs.GetTypes()) &&
            CompareStringList(GetSubtypes(), rhs.GetSubtypes()) &&
            GetRarity() == rhs.GetRarity() &&
            text == rhs.GetText() &&
            GetFlavor() == rhs.GetFlavor() &&
            GetArtist() == rhs.GetArtist() &&
            GetNumber() == rhs.GetNumber() &&
            GetPower() == rhs.GetPower() &&
            GetToughness() == rhs.GetToughness() &&
            GetLoyalty() == rhs.GetLoyalty() &&
            GetMultiverseid() == rhs.GetMultiverseid() &&
            CompareIntList(GetVariations(), rhs.GetVariations()) &&
            GetImageName() == rhs.GetImageName() &&
            GetWatermark() == rhs.GetWatermark() &&
            GetBorder() == rhs.GetBorder() &&
            IsTimeshifted() == rhs.IsTimeshifted() &&
            GetHand() == rhs.GetHand() &&
            GetLife() == rhs.GetLife() &&
            IsReserved() == rhs.IsReserved() &&
            GetReleasedate() == rhs.GetReleasedate() &&
            IsStarter() == rhs.IsStarter() &&
            CompareStringPairList(GetRulings(), rhs.GetRulings()) &&
            CompareStringPairList(GetForeignNames(), rhs.GetForeignNames()) &&
            GetOriginalText() == rhs.GetOriginalText() &&
            GetOriginalType() == rhs.GetOriginalType() &&
            CompareStringPairList(GetLegalities(), rhs.GetLegalities()) &&
            GetEdition() == rhs.GetEdition();
}
开发者ID:Nidhoegger,项目名称:ManageMagic,代码行数:35,代码来源:MtgCard.cpp


示例5: DoDrawBackground

// the event handler executed when the window background must be painted
void wxWindow::OnErase(wxEraseEvent& event)
{
    if ( !m_renderer )
    {
        event.Skip();

        return;
    }

    DoDrawBackground(*event.GetDC());

#if wxUSE_SCROLLBAR
    // if we have both scrollbars, we also have a square in the corner between
    // them which we must paint
    if ( m_scrollbarVert && m_scrollbarHorz )
    {
        wxSize size = GetSize();
        wxRect rectClient = GetClientRect(),
               rectBorder = m_renderer->GetBorderDimensions(GetBorder());

        wxRect rectCorner;
        rectCorner.x = rectClient.GetRight() + 1;
        rectCorner.y = rectClient.GetBottom() + 1;
        rectCorner.SetRight(size.x - rectBorder.width);
        rectCorner.SetBottom(size.y - rectBorder.height);

        if ( GetUpdateRegion().Contains(rectCorner) )
        {
            m_renderer->DrawScrollCorner(*event.GetDC(), rectCorner);
        }
    }
#endif // wxUSE_SCROLLBAR
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:34,代码来源:winuniv.cpp


示例6: oursz

bool wxGenericCollapsiblePane::Layout()
{
#ifdef __WXMAC__
    if (!m_pButton || !m_pPane || !m_sz)
        return false;     // we need to complete the creation first!
#else
    if (!m_pButton || !m_pStaticLine || !m_pPane || !m_sz)
        return false;     // we need to complete the creation first!
#endif

    wxSize oursz(GetSize());

    // move & resize the button and the static line
    m_sz->SetDimension(0, 0, oursz.GetWidth(), m_sz->GetMinSize().GetHeight());
    m_sz->Layout();

    if ( IsExpanded() )
    {
        // move & resize the container window
        int yoffset = m_sz->GetSize().GetHeight() + GetBorder();
        m_pPane->SetSize(0, yoffset,
                        oursz.x, oursz.y - yoffset);

        // this is very important to make the pane window layout show correctly
        m_pPane->Layout();
    }

    return true;
}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:29,代码来源:collpaneg.cpp


示例7: DoSetClientSize

void wxWindow::DoSetClientSize(int width, int height)
{
    // take into account the borders
    wxRect rectBorder = m_renderer->GetBorderDimensions(GetBorder());
    width += rectBorder.x;
    height += rectBorder.y;

    // and the scrollbars (as they may be offset into the border, use the
    // scrollbar position, not size - this supposes that PositionScrollbars()
    // had been called before)
    wxSize size = GetSize();
#if wxUSE_SCROLLBAR
    if ( m_scrollbarVert )
        width += size.x - m_scrollbarVert->GetPosition().x;
#endif // wxUSE_SCROLLBAR
    width += rectBorder.width;

#if wxUSE_SCROLLBAR
    if ( m_scrollbarHorz )
        height += size.y - m_scrollbarHorz->GetPosition().y;
#endif // wxUSE_SCROLLBAR
    height += rectBorder.height;

    wxWindowNative::DoSetClientSize(width, height);
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:25,代码来源:winuniv.cpp


示例8: InitializeCriticalSection

BOOL CRIFFChunkTreeDlg::OnInitDialog() 
{
//	InitializeCriticalSection(&critical_section);
	CResizeableDialog::OnInitDialog();

	InitializeCriticalSection(&cs);
	bChunkTree_stop = false;
//	__int64		qwPos;
//	LISTHEADER		lh;
	
	SendDlgItemMessage(IDOK,WM_SETTEXT,NULL,(LPARAM)LoadString(STR_GEN_OK));
	SendDlgItemMessage(IDCANCEL,WM_SETTEXT,NULL,(LPARAM)LoadString(STR_GEN_CANCEL));
	SendDlgItemMessage(IDC_WAIT_FOR_COMPLETE_TREE, WM_SETTEXT, NULL,
		(LPARAM)LoadString(STR_RIFFDLG_FULL));

	DWORD dwID;
	MAIN_THREAD_DATA_STRUCT* mtds = new MAIN_THREAD_DATA_STRUCT;
	mtds->dlg = this;
	mtds->source = source;
	CreateThread(NULL, 1<<20, MainThread, mtds, NULL, &dwID);


	AttachWindow(*GetDlgItem(IDOK), ATTB_RIGHT, *this, -12);
	AttachWindow(*GetDlgItem(IDC_SAVE), ATTB_RIGHT, *GetDlgItem(IDOK));
	AttachWindow(*GetDlgItem(IDC_SAVE), ATTB_TOP, *GetDlgItem(IDOK), ATTB_BOTTOM, 2);
	AttachWindow(m_WaitButton, ATTB_TOP, *GetDlgItem(IDC_SAVE), ATTB_BOTTOM, 2);
	AttachWindow(m_WaitButton, ATTB_RIGHT, *GetDlgItem(IDOK));
	int border_x, border_y;
	GetBorder(border_x, border_y);

	AttachWindow(m_HexView, ATTB_BOTTOM, *this, -border_y);


	AttachWindow(m_Tree, ATTB_LEFT, *this, 12);
	AttachWindow(m_Tree, ATTB_BOTTOM, m_HexView, ATTB_TOP, -1);
	AttachWindow(m_Tree, ATTB_TOP, *this, border_y + 12);
	AttachWindow(m_Tree, ATTB_RIGHT, *GetDlgItem(IDOK), ATTB_LEFT, -12);

	AttachWindow(m_HexView, ATTB_RIGHT, m_Tree);
	AttachWindow(m_HexView, ATTB_LEFT, m_Tree);

	AttachWindow(*GetDlgItem(IDOK), ATTB_TOP, m_Tree);

	m_HexView.SetRange(16*256);
	m_HexView.SetDataSource(source);
	m_HexView.SetNewStartPos(0);
	m_HexView.SetMode(HWLB_MODE_RIFF);

/*	RECT r;
	GetWindowRect(&r);
	PostMessage(WM_SIZE, 0, (r.right-r.left) | ((r.bottom-r.top)<<16));
*/

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
}
开发者ID:BrunoReX,项目名称:avimuxgui,代码行数:56,代码来源:RIFFChunkTreeDlg.cpp


示例9: MakeFBUmask

	void MakeFBUmask(IplImage *maskrgb, IplImage *&res, int unknownsize) {
		vector<CvPoint> borders;
		GetBorder(maskrgb, borders);
		if (res)
			cvReleaseImage(&res);
		res = cvCloneImage(maskrgb);
		
		for (int i = 0; i < (int)borders.size(); i++)
			if (borders[i].x != -1 && borders[i].y != -1)
				circleit(res, borders[i].x, borders[i].y, unknownsize, C_UNKNOW);
	}
开发者ID:Joyhunter,项目名称:shadow_analysis,代码行数:11,代码来源:MakeFBUmask.cpp


示例10: GetColor

void GUIControl::Draw()
{
	if(IsVisible())
	{
		if(GetTexture())
		{	
			COLOR4 c = GetColor();
			glColor4ub(c.r, c.g, c.b, c.a);

			if(GetCurrentPattern() == 0)
			{
				DrawTexture(GetX(), GetY(),
					0, 0,
					GetWidth(), GetHeight(),
					GetTexture(),
					false, false, 100, 100);
			}
			else
			{
				DrawTexture(GetX(), GetY(),
					GetCurrentPattern() * GetWidth(),
					0,
					GetCurrentPattern() * GetWidth() + GetWidth(),
					GetHeight(),
					GetTexture(),
					false, false, 100, 100);
			}
		}

		if(GetCaption() && GetCaptionFont())
		{
			COLOR4 c = GetCurrentCaptionColor();
			glColor4ub(c.r, c.g, c.b, c.a);

			PrintText(GetCaption(),
				GetCaptionFont(),
				GetX() + GetCaptionX(),
				GetY() + GetCaptionY());
		}

		if(GetBorder())
		{
			if(GetBorderType() == btAlways)
			{
				Box(GetX(), GetY(), GetWidth(), GetHeight());
			}
			else if(GetBorderType() == btOnMouseMove)
			{
				if(_draw_border)
					Box(GetX(), GetY(), GetWidth(), GetHeight());
			}
		}
	}
}
开发者ID:lightsgoout,项目名称:interview,代码行数:54,代码来源:gui_control.cpp


示例11: GetBorder

void wxWindow::DoDrawBorder(wxDC& dc, const wxRect& rect)
{
    // draw outline unless the update region is enitrely inside it in which
    // case we don't need to do it
#if 0 // doesn't seem to work, why?
    if ( wxRegion(rect).Contains(GetUpdateRegion().GetBox()) != wxInRegion )
#endif
    {
        m_renderer->DrawBorder(dc, GetBorder(), rect, GetStateFlags());
    }
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:11,代码来源:winuniv.cpp


示例12: GetClientAreaOrigin

wxPoint wxWindow::GetClientAreaOrigin() const
{
    wxPoint pt = wxWindowBase::GetClientAreaOrigin();

#if wxUSE_TWO_WINDOWS
#else
    if ( m_renderer )
        pt += m_renderer->GetBorderDimensions(GetBorder()).GetPosition();
#endif

    return pt;
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:12,代码来源:winuniv.cpp


示例13: borderSquare

void Border::CreateBorder()
{
    const int CONST_SQUARE_SIDE = 12,
              CONST_NUM_SQUARES = Game::GetFieldWidth()/CONST_SQUARE_SIDE,
              CONST_POSITION_EXTENSION = 24;// see Game CONST_TOP_BAR_L variable

    for(int i = 0; i < (CONST_NUM_SQUARES - 1); i++)
    {
        //top
        sf::RectangleShape borderSquare(sf::Vector2f(11.0, 11.0));
        borderSquare.setFillColor(sf::Color(102, 0, 0));//this is the brown color
        borderSquare.setOrigin(borderSquare.getLocalBounds().left - 1.0, borderSquare.getLocalBounds().top - 1.0);
        borderSquare.setPosition(i * 12, CONST_POSITION_EXTENSION);
        GetBorder().push_back(borderSquare);

        //right side
        sf::RectangleShape borderSquare_2(sf::Vector2f(11.0, 11.0));
        borderSquare_2.setFillColor(sf::Color(102, 0, 0));//this is the brown color
        borderSquare_2.setOrigin(borderSquare_2.getLocalBounds().left - 1.0, borderSquare_2.getLocalBounds().top - 1.0);
        borderSquare_2.setPosition((CONST_NUM_SQUARES - 1) * CONST_SQUARE_SIDE, i * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);
        GetBorder().push_back(borderSquare_2);

        //bottom
        sf::RectangleShape borderSquare_3(sf::Vector2f(11.0, 11.0));
        borderSquare_3.setFillColor(sf::Color(102, 0, 0));//this is the brown color
        borderSquare_3.setOrigin(borderSquare_3.getLocalBounds().left - 1.0, borderSquare_3.getLocalBounds().top - 1.0);
        borderSquare_3.setPosition( (i + 1) * CONST_SQUARE_SIDE, (CONST_NUM_SQUARES - 1) * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);
        GetBorder().push_back(borderSquare_3);

        //left side
        sf::RectangleShape borderSquare_4(sf::Vector2f(11.0, 11.0));
        borderSquare_4.setFillColor(sf::Color(102, 0, 0));//this is the brown color
        borderSquare_4.setOrigin(borderSquare_4.getLocalBounds().left - 1.0, borderSquare_4.getLocalBounds().top - 1.0);
        borderSquare_4.setPosition(0.0, (i + 1) * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);
        GetBorder().push_back(borderSquare_4);

    }


}
开发者ID:killerartist95,项目名称:Snake-Game,代码行数:40,代码来源:Border.cpp


示例14: dc

wxSize wxStaticText::DoGetBestSize() const
{
    wxClientDC dc(const_cast<wxStaticText *>(this));
    wxFont font(GetFont());
    if (!font.Ok())
        font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);

    dc.SetFont(font);

    wxCoord widthTextMax, heightTextTotal;
    dc.GetMultiLineTextExtent(GetLabelText(), &widthTextMax, &heightTextTotal);

#ifdef __WXWINCE__
    if ( widthTextMax )
        widthTextMax += 2;
#endif // __WXWINCE__

    // border takes extra space
    //
    // TODO: this is probably not wxStaticText-specific and should be moved
    wxCoord border;
    switch ( GetBorder() )
    {
        case wxBORDER_STATIC:
        case wxBORDER_SIMPLE:
            border = 1;
            break;

        case wxBORDER_SUNKEN:
            border = 2;
            break;

        case wxBORDER_RAISED:
        case wxBORDER_DOUBLE:
            border = 3;
            break;

        default:
            wxFAIL_MSG( _T("unknown border style") );
            // fall through

        case wxBORDER_NONE:
            border = 0;
    }

    widthTextMax += 2*border;
    heightTextTotal += 2*border;

    wxSize best(widthTextMax, heightTextTotal);
    CacheBestSize(best);
    return best;
}
开发者ID:jonntd,项目名称:dynamica,代码行数:52,代码来源:stattext.cpp


示例15: GetBorder

FVector2D SButton::ComputeDesiredSize(float LayoutScaleMultiplier) const
{
	// When there is no widget in the button, it sizes itself based on
	// the border image specified by the style.
	if (ChildSlot.GetWidget() == SNullWidget::NullWidget)
	{
		return GetBorder()->ImageSize;
	}
	else
	{
		return SBorder::ComputeDesiredSize(LayoutScaleMultiplier);
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:13,代码来源:SButton.cpp


示例16: DoGetClientSize

void wxWindow::DoGetClientSize(int *width, int *height) const
{
    // if it is a native window, we assume it handles the scrollbars itself
    // too - and if it doesn't, there is not much we can do
    if ( !m_renderer )
    {
        wxWindowNative::DoGetClientSize(width, height);

        return;
    }

    int w, h;
    wxWindowNative::DoGetClientSize(&w, &h);

    // we assume that the scrollbars are positioned correctly (by a previous
    // call to PositionScrollbars()) here

    wxRect rectBorder;
    if ( m_renderer )
        rectBorder = m_renderer->GetBorderDimensions(GetBorder());

    if ( width )
    {
#if wxUSE_SCROLLBAR
        // in any case, take account of the scrollbar
        if ( m_scrollbarVert )
            w -= m_scrollbarVert->GetSize().x;
#endif // wxUSE_SCROLLBAR

        // account for the left and right borders
        *width = w - rectBorder.x - rectBorder.width;

        // we shouldn't return invalid width
        if ( *width < 0 )
            *width = 0;
    }

    if ( height )
    {
#if wxUSE_SCROLLBAR
        if ( m_scrollbarHorz )
            h -= m_scrollbarHorz->GetSize().y;
#endif // wxUSE_SCROLLBAR

        *height = h - rectBorder.y - rectBorder.height;

        // we shouldn't return invalid height
        if ( *height < 0 )
            *height = 0;
    }
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:51,代码来源:winuniv.cpp


示例17: GetSize

void wxWindow::PositionScrollbars()
{
#if wxUSE_SCROLLBAR
    // do not use GetClientSize/Rect as it relies on the scrollbars being
    // correctly positioned

    wxSize size = GetSize();
    wxBorder border = GetBorder();
    wxRect rectBorder = m_renderer->GetBorderDimensions(border);
    bool inside = m_renderer->AreScrollbarsInsideBorder();

    int height = m_scrollbarHorz ? m_scrollbarHorz->GetSize().y : 0;
    int width = m_scrollbarVert ? m_scrollbarVert->GetSize().x : 0;

    wxRect rectBar;
    if ( m_scrollbarVert )
    {
        rectBar.x = size.x - width;
        if ( inside )
           rectBar.x -= rectBorder.width;
        rectBar.width = width;
        rectBar.y = 0;
        if ( inside )
            rectBar.y += rectBorder.y;
        rectBar.height = size.y - height;
        if ( inside )
            rectBar.height -= rectBorder.y + rectBorder.height;

        m_scrollbarVert->SetSize(rectBar, wxSIZE_NO_ADJUSTMENTS);
    }

    if ( m_scrollbarHorz )
    {
        rectBar.y = size.y - height;
        if ( inside )
            rectBar.y -= rectBorder.height;
        rectBar.height = height;
        rectBar.x = 0;
        if ( inside )
            rectBar.x += rectBorder.x;
        rectBar.width = size.x - width;
        if ( inside )
            rectBar.width -= rectBorder.x + rectBorder.width;

        m_scrollbarHorz->SetSize(rectBar, wxSIZE_NO_ADJUSTMENTS);
    }

    RefreshScrollbars();
#endif // wxUSE_SCROLLBAR
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:50,代码来源:winuniv.cpp


示例18: GetBorder

wxSize wxGenericCollapsiblePane::DoGetBestSize() const
{
    // NB: do not use GetSize() but rather GetMinSize()
    wxSize sz = m_sz->GetMinSize();

    // when expanded, we need more vertical space
    if ( IsExpanded() )
    {
        sz.SetWidth(wxMax( sz.GetWidth(), m_pPane->GetBestSize().x ));
        sz.SetHeight(sz.y + GetBorder() + m_pPane->GetBestSize().y);
    }

    return sz;
}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:14,代码来源:collpaneg.cpp


示例19: GetBorder

NS_IMETHODIMP
nsIFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding)
{
  aBorderAndPadding.SizeTo(0, 0, 0, 0);
  nsresult rv = GetBorder(aBorderAndPadding);
  if (NS_FAILED(rv))
    return rv;

  nsMargin padding;
  rv = GetPadding(padding);
  if (NS_FAILED(rv))
    return rv;

  aBorderAndPadding += padding;

  return rv;
}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:17,代码来源:nsBox.cpp


示例20: GetRenderer

void wxListBox::DoSetSize(int x, int y,
                          int width, int height,
                          int sizeFlags)
{
    if ( GetWindowStyle() & wxLB_INT_HEIGHT )
    {
        // we must round up the height to an entire number of rows

        // the client area must contain an int number of rows, so take borders
        // into account
        wxRect rectBorders = GetRenderer()->GetBorderDimensions(GetBorder());
        wxCoord hBorders = rectBorders.y + rectBorders.height;

        wxCoord hLine = GetLineHeight();
        height = ((height - hBorders + hLine - 1) / hLine)*hLine + hBorders;
    }

    wxListBoxBase::DoSetSize(x, y, width, height, sizeFlags);
}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:19,代码来源:listbox.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetBorderSize函数代码示例发布时间:2022-05-30
下一篇:
C++ GetBoolFromConfig函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap