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


C++ drawChildren函数代码示例

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


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

示例1: getWidth

void Windowiki::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    g->drawImageRect(0, 0, getWidth(), getHeight(), borderiki);

    // Draw title
    if (mShowTitle)
    {
        graphics->setFont(getFont());
        graphics->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
    }

    g->drawImage(sagustImage, getWidth() - sagustImage->getWidth(),
            0);
    if (mCloseButton)
    {
        g->drawImage(closeImage,
            getWidth() - closeImage->getWidth(),
            0
        );
    }
    g->drawImage(solustImage, 0,0);

    g->drawImage(sagaltImage, getWidth() - sagaltImage->getWidth(),
            getHeight() - sagaltImage->getHeight());
    g->drawImage(solaltImage, 0,getHeight() - solaltImage->getHeight() );
    drawChildren(graphics);
}
开发者ID:mekolat,项目名称:elektrogamesvn,代码行数:29,代码来源:window_iki.cpp

示例2: BLOCK_START

void ConnectionDialog::draw(gcn::Graphics *graphics)
{
    BLOCK_START("ConnectionDialog::draw")
    // Don't draw the window background, only draw the children
    drawChildren(graphics);
    BLOCK_END("ConnectionDialog::draw")
}
开发者ID:sangohan,项目名称:tmw-manaplus-client,代码行数:7,代码来源:connectiondialog.cpp

示例3: drawBackground

    void ScrollArea::draw(Graphics *graphics)
    {
        drawBackground(graphics);

        if (mVBarVisible)
        {
            drawUpButton(graphics);
            drawDownButton(graphics);
            drawVBar(graphics);
            drawVMarker(graphics);
        }

        if (mHBarVisible)
        {
            drawLeftButton(graphics);
            drawRightButton(graphics);
            drawHBar(graphics);
            drawHMarker(graphics);
        }

        if (mHBarVisible && mVBarVisible)
        {
            graphics->setColor(getBaseColor());
            graphics->fillRectangle(Rectangle(getWidth() - mScrollbarWidth,
                                              getHeight() - mScrollbarWidth,
                                              mScrollbarWidth,
                                              mScrollbarWidth));
        }

        drawChildren(graphics);
    }
开发者ID:bombpersons,项目名称:Dokuro2,代码行数:31,代码来源:scrollarea.cpp

示例4: drawChildren

void TabbedArea::draw(gcn::Graphics *graphics)
{
    if (mTabs.empty())
        return;

    drawChildren(graphics);
}
开发者ID:B-Rich,项目名称:mana,代码行数:7,代码来源:tabbedarea.cpp

示例5: drawSelf

void UIWidget::draw(const Rect& visibleRect, Fw::DrawPane drawPane)
{
    Rect oldClipRect;
    if(m_clipping) {
        oldClipRect = g_painter->getClipRect();
        g_painter->setClipRect(visibleRect);
    }

    if(m_rotation != 0.0f) {
        g_painter->pushTransformMatrix();
        g_painter->rotate(m_rect.center(), m_rotation * (Fw::pi / 180.0));
    }

    drawSelf(drawPane);

    if(m_children.size() > 0) {
        if(m_clipping)
            g_painter->setClipRect(visibleRect.intersection(getPaddingRect()));

        drawChildren(visibleRect, drawPane);
    }

    if(m_rotation != 0.0f)
        g_painter->popTransformMatrix();

    if(m_clipping) {
        g_painter->setClipRect(oldClipRect);
    }
}
开发者ID:Pucker,项目名称:otclient,代码行数:29,代码来源:uiwidget.cpp

示例6: drawItem

void GUIListGadget::draw()
{
    if (!isVisible_ || isValidated_ || !setupClipping())
        return;
    
    GlbRenderSys->draw2DRectangle(Rect_, Color_);
    
    /* Draw all item entries */
    s32 ItemPos = 0;
    for (std::list<GUIListItem*>::iterator it = ItemList_.begin(); it != ItemList_.end(); ++it)
    {
        drawItem(*it, ItemPos);
        ItemPos += (*it)->getItemSize();
    }
    
    /* Draw all column entries */
    s32 ColumnPos = 0;
    for (std::list<GUIListColumn*>::iterator it = ColumnList_.begin(); it != ColumnList_.end(); ++it)
    {
        drawColumn(*it, ColumnPos);
        ColumnPos += (*it)->getColumnSize();
    }
    
    /* Update scrollbar ranges */
    HorzScroll_.setRange(ColumnPos);
    VertScroll_.setRange(ItemPos + COLUMN_HEIGHT);
    
    drawChildren();
    
    GlbRenderSys->setClipping(true, dim::point2di(VisRect_.Left, VisRect_.Top), VisRect_.getSize());
    
    drawFrame(Rect_, 0, false);
}
开发者ID:bekasov,项目名称:SoftPixelEngine,代码行数:33,代码来源:spGUIListGadget.cpp

示例7: getWidth

void Window::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    g->drawImageRect(0, 0, getWidth(), getHeight(), mSkin->getBorder());

    // Draw title
    if (mShowTitle)
    {
        g->setColor(Theme::getThemeColor(Theme::TEXT));
        g->setFont(getFont());
        g->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
    }

    // Draw Close Button
    if (mCloseButton)
    {
        g->drawImage(mSkin->getCloseImage(),
            getWidth() - mSkin->getCloseImage()->getWidth() - getPadding(),
            getPadding());
    }

    // Draw Sticky Button
    if (mStickyButton)
    {
        Image *button = mSkin->getStickyImage(mSticky);
        int x = getWidth() - button->getWidth() - getPadding();
        if (mCloseButton)
            x -= mSkin->getCloseImage()->getWidth();

        g->drawImage(button, x, getPadding());
    }

    drawChildren(graphics);
}
开发者ID:Ablu,项目名称:invertika,代码行数:35,代码来源:window.cpp

示例8: drawChildren

void xmlgui::Container::draw() {
	if(bgImage!=NULL) {
		bgImage->draw(x, y, width, height);

	}
	drawChildren();
}
开发者ID:danielmorena,项目名称:ofxmarek,代码行数:7,代码来源:Container.cpp

示例9: drawBackground

void NodeControl::drawBody(GlInterface &gl)
{
	drawBackground(gl);

	//Draw connectors underneath selection outline
	drawChildren(gl);

	if(selected)
	{
		Color col = (isInFocus() ? Color(0.3f, 1.0f, 0.3f, 1.0f) : Color(0.1f, 0.75f, 0.75f, 1.0f));

		std::vector<TVertex> points;
		points.reserve(5);

		points.push_back(TVertex(APoint(0, 0), col));
		points.push_back(TVertex(APoint(0, size.y), col));
		points.push_back(TVertex(size, col));
		points.push_back(TVertex(APoint(size.x, 0), col));
		points.push_back(TVertex(APoint(0, 0), col));

		gl.drawShape(GL_LINE_STRIP, points);
	}

	//TODO: rest of body design (title, description, colors, etc)
}
开发者ID:skothr,项目名称:SoundSandbox,代码行数:25,代码来源:NodeGraphDisplay.cpp

示例10: getTransform

void SceneNode::draw(sf::RenderTarget & target, sf::RenderStates states) const
{
	states.transform *= getTransform();

	drawCurrent(target, states);
	drawChildren(target, states);
}
开发者ID:Blake-Lead,项目名称:SFML-Project,代码行数:7,代码来源:scenenode.cpp

示例11: if

void Tab::draw(gcn::Graphics *graphics)
{
    int mode = TAB_STANDARD;

    // check which type of tab to draw
    if (mTabbedArea)
    {
        mLabel->setForegroundColor(*mTabColor);
        if (mTabbedArea->isTabSelected(this))
        {
            mode = TAB_SELECTED;
            // if tab is selected, it doesnt need to highlight activity
            mFlash = false;
        }
        else if (mHasMouse)
        {
            mode = TAB_HIGHLIGHTED;
        }
        if (mFlash)
        {
            mLabel->setForegroundColor(Theme::getThemeColor(Theme::TAB_FLASH));
        }
    }

    updateAlpha();

    // draw tab
    static_cast<Graphics*>(graphics)->
        drawImageRect(0, 0, getWidth(), getHeight(), tabImg[mode]);

    // draw label
    drawChildren(graphics);
}
开发者ID:TonyRice,项目名称:mana,代码行数:33,代码来源:tab.cpp

示例12: glPushMatrix

void Renderable::render() {
    glPushMatrix();
    setMatrix();
    drawChildren();

    if (vertexColors && colorBuffer != NULL) {
        glEnableClientState(GL_COLOR_ARRAY);
        glColorPointer(4, GL_FLOAT, 0, colorBuffer);
    } else {
        glColor4f(objectColor.r, objectColor.g, objectColor.b, objectColor.a);
    }
    if (nFaces > 0) {
//		__android_log_print(ANDROID_LOG_DEBUG,"Renderable","rendering self. nFaces = %d", nFaces);
        glEnableClientState(GL_VERTEX_ARRAY);
        glVertexPointer(3, GL_FLOAT, 0, vertexBuffer);
        if (vertexNormalBuffer != NULL) {
//			__android_log_print(ANDROID_LOG_DEBUG,"Renderable","vertexNormal enabled");
            glEnableClientState(GL_NORMAL_ARRAY);
            glNormalPointer(GL_FLOAT, 0, vertexNormalBuffer);
        }
        glDrawElements(GL_TRIANGLES, nFaces, GL_UNSIGNED_SHORT, faceBuffer);
        glDisableClientState(GL_VERTEX_ARRAY);
        glDisableClientState(GL_NORMAL_ARRAY);
    }
    if (vertexColors) {
        glDisableClientState(GL_COLOR_ARRAY);
    }
    glPopMatrix();
//	__android_log_print(ANDROID_LOG_DEBUG,"Renderable","rendering finished");
}
开发者ID:TeamBrainStorm,项目名称:Cell-Tools,代码行数:30,代码来源:Renderable.cpp

示例13: drawChildren

void MiniStatusWindow::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    drawChildren(graphics);
    drawIcons(g);
}
开发者ID:jurkan,项目名称:mana,代码行数:7,代码来源:ministatuswindow.cpp

示例14: drawChildren

void Canvas::draw()
{
    g_fb->setFg(128, 128, 128);
    g_fb->fillRect(&m_rect);
    drawChildren();
    g_fb->update(&m_rect, false);
}
开发者ID:juilyoon,项目名称:OcherBook,代码行数:7,代码来源:Widgets.cpp

示例15: getWidth

void DecoratedContainer::draw(gcn::Graphics* graphics)
{
    if (isOpaque())
    {
        graphics->setColor(getBackgroundColor());
        graphics->fillRectangle(gcn::Rectangle(2, 2, getWidth() - 4, getHeight() - 4));
    }

    int i;
    for (i = 5; i < getHeight()-10; i+=5)
    {
	    graphics->drawImage(mVertical, 0, i);
	    graphics->drawImage(mVertical, getWidth()-4, i);
    }
    graphics->drawImage(mVertical, 0, 0, 0, i, 4, getHeight()-5-i);
    graphics->drawImage(mVertical, 0, 0, getWidth()-4, i, 4, getHeight()-5-i);

    for (i = 5; i < getWidth()-10; i+=5)
    {
	    graphics->drawImage(mHorizontal, i, 0);
	    graphics->drawImage(mHorizontal, i, getHeight()-4);
    }
    graphics->drawImage(mHorizontal, 0, 0, i, 0, getWidth()-5-i, 4);
    graphics->drawImage(mHorizontal, 0, 0, i, getHeight()-4, getWidth()-5-i, 4);

    graphics->drawImage(mCornerUL, 0, 0);
    graphics->drawImage(mCornerUR, getWidth()-5, 0);
    graphics->drawImage(mCornerDL, 0, getHeight()-5);
    graphics->drawImage(mCornerDR, getWidth()-5, getHeight()-5);

    drawChildren(graphics);
}
开发者ID:olofn,项目名称:db_public,代码行数:32,代码来源:decoratedcontainer.cpp


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