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

C++ TopWindow类代码示例

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

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



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

示例1: show

void WindowManager::show( TopWindow &rWindow ) const
{
    rWindow.show();

    if( isOpacityNeeded() )
        rWindow.setOpacity( m_alpha );
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:7,代码来源:window_manager.cpp


示例2: GuiPackageResolver

bool GuiPackageResolver(const String& error, const String& path, int line)
{
prompt:
	switch(Prompt(Ctrl::GetAppName(), CtrlImg::exclamation(),
	              error + "&while parsing package " + DeQtf(path),
		          "Edit \\& Retry", "Ignore",  "Stop")) {
	case 0:
		if(!PromptYesNo("Ignoring will damage package. Everything past the "
			            "point of error will be lost.&Do you want to continue ?"))
			goto prompt;
		return false;
	case 1: {
			TopWindow win;
			LineEdit edit;
			edit.Set(LoadFile(path));
			edit.SetCursor(edit.GetPos(line));
			win.Title(path);
			win.Add(edit.SizePos());
			win.Run();
			SaveFile(path, edit.Get());
		}
		return true;;
	case -1:
		exit(1);
	}
	return false;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:27,代码来源:Util.cpp


示例3: AddGUILayout

	void AddGUILayout()
	{
		String name;

		TopWindow dlg;
		dlg.Title(t_("New layout"));
		dlg.SetRect( GetWorkArea().CenterRect(300, 80) );
		EditString s;
		Button ok, cancel;
		ok.SetLabel(t_("Add"));
		ok <<= dlg.Acceptor(IDOK);
		cancel <<= dlg.Rejector(IDCANCEL);
		cancel.SetLabel(t_("Cancel"));
		dlg.ToolWindow();
		dlg.Add( s.HSizePosZ(8, 8).TopPosZ(8, 18) );
		dlg.Add( ok.RightPosZ(80, 65).BottomPosZ(8, 25) );
		dlg.Add( cancel.RightPosZ(8, 65).BottomPosZ(8, 25) );
		if (dlg.Execute() == IDCANCEL)
			return;
		name = (~s).ToString();
		if (name.IsEmpty())
			name = t_("User Interface");

		name = " " + name;
		SaveLayout(name);
		DeleteFile(ConfigFile("Layouts.bin"));
		StoreToFile(*this, ConfigFile("Layouts.bin"));
		LoadGUILayouts();
		_GUILayouts <<= _GUILayouts.GetKey( _GUILayouts.GetCount() - 1 );
		UpdateTools();
	}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:31,代码来源:FormEdit.hpp


示例4: getWindow

void GenericLayout::refreshRect( int x, int y, int width, int height )
{
    // Do nothing if the layout is hidden
    if( !m_visible )
        return;

    // update the transparency global mask
    m_pImage->clear( x, y, width, height );

    // Draw all the controls of the layout
    std::list<LayeredControl>::const_iterator iter;
    for( iter = m_controlList.begin(); iter != m_controlList.end(); ++iter )
    {
        CtrlGeneric *pCtrl = (*iter).m_pControl;
        if( pCtrl->isVisible() )
        {
            pCtrl->draw( *m_pImage, x, y, width, height );
        }
    }

    // Refresh the associated window
    TopWindow *pWindow = getWindow();
    if( pWindow )
    {
        // first apply new shape to the window
        pWindow->updateShape();
        pWindow->invalidateRect( x, y, width, height );
    }
}
开发者ID:mstorsjo,项目名称:vlc,代码行数:29,代码来源:generic_layout.cpp


示例5: msg_Dbg

void Theme::saveConfig()
{
    msg_Dbg( getIntf(), "saving theme configuration");

    map<string, TopWindowPtr>::const_iterator itWin;
    map<string, GenericLayoutPtr>::const_iterator itLay;
    ostringstream outStream;
    for( itWin = m_windows.begin(); itWin != m_windows.end(); itWin++ )
    {
        TopWindow *pWin = itWin->second.get();

        // Find the layout id for this window
        string layoutId;
        const GenericLayout *pLayout = &pWin->getActiveLayout();
        for( itLay = m_layouts.begin(); itLay != m_layouts.end(); itLay++ )
        {
            if( itLay->second.get() == pLayout )
            {
                layoutId = itLay->first;
            }
        }

        outStream << '[' << itWin->first << ' ' << layoutId << ' '
                  << pWin->getLeft() << ' ' << pWin->getTop() << ' '
                  << pLayout->getWidth() << ' ' << pLayout->getHeight() << ' '
                  << (pWin->getVisibleVar().get() ? 1 : 0) << ']';
    }

    // Save config to file
    config_PutPsz( getIntf(), "skins2-config", outStream.str().c_str() );
}
开发者ID:,项目名称:,代码行数:31,代码来源:


示例6: getIntf

void GenericLayout::resize( int width, int height )
{
    // Update the window size
    m_width = width;
    m_height = height;

    // Recreate a new image
    if( m_pImage )
    {
        delete m_pImage;
        OSFactory *pOsFactory = OSFactory::instance( getIntf() );
        m_pImage = pOsFactory->createOSGraphics( width, height );
    }

    // Notify all the controls that the size has changed and redraw them
    list<LayeredControl>::const_iterator iter;
    for( iter = m_controlList.begin(); iter != m_controlList.end(); iter++ )
    {
        iter->m_pControl->onResize();
    }

    // Resize and refresh the associated window
    TopWindow *pWindow = getWindow();
    if( pWindow )
    {
        // Resize the window
        pWindow->resize( width, height );
        refreshAll();
        // Change the shape of the window and redraw it
        pWindow->updateShape();
        refreshAll();
    }
}
开发者ID:,项目名称:,代码行数:33,代码来源:


示例7: SyncTopWindows

void Ctrl::SyncTopWindows()
{
	for(int i = 0; i < topctrl.GetCount(); i++) {
		TopWindow *w = dynamic_cast<TopWindow *>(topctrl[i]);
		if(w)
			w->SyncRect();
	}
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:8,代码来源:Wnd.cpp


示例8: GetTopWindow

void Pdb::ToForeground()
{
	TopWindow *w = GetTopWindow();
	if(w && !w->IsForeground()) {
		LLOG("Setting theide as foreground");
		w->SetForeground();
	}
}
开发者ID:Sly14,项目名称:upp-mirror,代码行数:8,代码来源:Debug.cpp


示例9: CursorImage

Image SizeGrip::CursorImage(Point p, dword)
{
	if(GuiPlatformHasSizeGrip()) {
		TopWindow *q = dynamic_cast<TopWindow *>(GetTopCtrl());
		if(q && !q->IsMaximized() && q->IsSizeable())
			return Image::SizeBottomRight();
	}
	return Image::Arrow();
}
开发者ID:pedia,项目名称:raidget,代码行数:9,代码来源:ScrollBar.cpp


示例10: getWindow

void CtrlGeneric::notifyTooltipChange() const
{
    TopWindow *pWin = getWindow();
    if( pWin )
    {
        // Notify the window
        pWin->onTooltipChange( *this );
    }
}
开发者ID:banketree,项目名称:faplayer,代码行数:9,代码来源:ctrl_generic.cpp


示例11:

void Ctrl::WndSetPos0(const Rect& rect)
{
	GuiLock __;
	TopWindow *w = dynamic_cast<TopWindow *>(this);
	if(w)
		w->SyncFrameRect(rect);
	invalid.Add(GetRect());
	SetWndRect(rect);
	invalid.Add(rect);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:10,代码来源:Wnd.cpp


示例12: sExecutePrompt

void sExecutePrompt(PromptDlgWnd__ *dlg, int *result)
{
	dlg->Open();
	Vector<Ctrl *> wins = Ctrl::GetTopWindows();
	for(int i = 0; i < wins.GetCount(); i++) {
		TopWindow *w = dynamic_cast<TopWindow *>(wins[i]);
		if(w && w->IsTopMost()) {
			dlg->TopMost();
			break;
		}
	}
	*result = dlg->RunAppModal();
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:13,代码来源:Prompt.cpp


示例13: GetSize

void SizeGrip::Paint(Draw& w)
{
	Size sz = GetSize();
	if(!IsTransparent())
	    w.DrawRect(sz, SColorFace);
	if(GuiPlatformHasSizeGrip()) {
		TopWindow *q = dynamic_cast<TopWindow *>(GetTopCtrl());
		if(q && !q->IsMaximized() && q->IsSizeable()) {
			Size isz = CtrlsImg::SizeGrip().GetSize();
			w.DrawImage(sz.cx - isz.cx, sz.cy - isz.cy, CtrlsImg::SizeGrip());
		}
    }
}
开发者ID:pedia,项目名称:raidget,代码行数:13,代码来源:ScrollBar.cpp


示例14: GetMainWindow

void TopWindow::FixIcons()
{
	TopWindow *q = GetMainWindow();
	if(q) {
		if(IsNull(icon)) {
			icon = q->GetIcon();
			SyncCaption();
		}
		if(IsNull(largeicon)) {
			largeicon = q->GetIcon();
			SyncCaption();
		}
	}
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:14,代码来源:TopWindow.cpp


示例15: main

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    TopWindow window;

    QTime midnight(0, 0, 0);
    qsrand(midnight.secsTo(QTime::currentTime()));

    window.setAlgorithm(new Johnson());
    window.setWindowTitle(QString::fromUtf8("MPD - projekt 1"));
    window.setMinimumSize(640, 400);
    window.show();
    return app.exec();
}
开发者ID:behemot,项目名称:johnson-scheduling,代码行数:14,代码来源:main.cpp


示例16: WindowsMenu

void WindowsMenu(Bar& bar)
{
	Vector<Ctrl *> w = Ctrl::GetTopWindows();
	int p = 1;
	for(int i = 0; i < w.GetCount() && p < 10; i++) {
		TopWindow *q = dynamic_cast<TopWindow *>(w[i]);
		if(q && !q->GetOwner() && p < 10) {
			bar.Add(Format("&%d ", p++) + FromUnicode(q->GetTitle(), CHARSET_DEFAULT),
			        callback1(PutForeground, Ptr<Ctrl>(q)))
			   .Check(q->IsForeground())
			   .Help(t_("Activate this window"));
		}
	}
	if(p >= 10)
		bar.Add(t_("More windows.."), callback(WindowsList));
}
开发者ID:koz4k,项目名称:soccer,代码行数:16,代码来源:Windows.cpp


示例17: setActiveLayout

void WindowManager::setActiveLayout( TopWindow &rWindow,
                                     GenericLayout &rLayout )
{
    rWindow.setActiveLayout( &rLayout );
    // Rebuild the dependencies
    stopMove();
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:7,代码来源:window_manager.cpp


示例18: move

void WindowManager::move( TopWindow &rWindow, int left, int top ) const
{
    // Compute the real move offset
    int xOffset = left - rWindow.getLeft();
    int yOffset = top - rWindow.getTop();

    // Check anchoring; this can change the values of xOffset and yOffset
    checkAnchors( &rWindow, xOffset, yOffset );

    // Move all the windows
    WinSet_t::const_iterator it;
    for( it = m_movingWindows.begin(); it != m_movingWindows.end(); ++it )
    {
        (*it)->move( (*it)->getLeft() + xOffset, (*it)->getTop() + yOffset );
    }
}
开发者ID:371816210,项目名称:vlc_vlc,代码行数:16,代码来源:window_manager.cpp


示例19: getResizeFactors

void CtrlSliderBg::handleEvent( EvtGeneric &rEvent )
{
    if( rEvent.getAsString().find( "mouse:left:down" ) != string::npos )
    {
        // Compute the resize factors
        float factorX, factorY;
        getResizeFactors( factorX, factorY );

        // Get the position of the control
        const Position *pPos = getPosition();

        // Get the value corresponding to the position of the mouse
        EvtMouse &rEvtMouse = (EvtMouse&)rEvent;
        int x = rEvtMouse.getXPos();
        int y = rEvtMouse.getYPos();
        m_rVariable.set( m_rCurve.getNearestPercent(
                            (int)((x - pPos->getLeft()) / factorX),
                            (int)((y - pPos->getTop()) / factorY) ) );

        // Forward the clic to the cursor
        EvtMouse evt( getIntf(), x, y, EvtMouse::kLeft, EvtMouse::kDown );
        TopWindow *pWin = getWindow();
        if( pWin && m_pCursor )
        {
            EvtEnter evtEnter( getIntf() );
            // XXX It was not supposed to be implemented like that !!
            pWin->forwardEvent( evtEnter, *m_pCursor );
            pWin->forwardEvent( evt, *m_pCursor );
        }
    }
    else if( rEvent.getAsString().find( "scroll" ) != string::npos )
    {
        int direction = ((EvtScroll&)rEvent).getDirection();

        float percentage = m_rVariable.get();
        if( direction == EvtScroll::kUp )
        {
            percentage += SCROLL_STEP;
        }
        else
        {
            percentage -= SCROLL_STEP;
        }

        m_rVariable.set( percentage );
    }
}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:47,代码来源:ctrl_slider.cpp


示例20: main

int main(int argc, char **argv)
{
	XInitThreads();

	QApplication app(argc, argv);

	/*QGLFormat glf = QGLFormat::defaultFormat();
	glf.setAlpha( true );
	glf.setSampleBuffers( true );
	glf.setSamples( 4 );
	QGLFormat::setDefaultFormat( glf );*/

	TopWindow *tw = new TopWindow();
	tw->show();

	return app.exec();
}
开发者ID:hftom,项目名称:MachinTruc,代码行数:17,代码来源:main.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ TopWindowStyle类代码示例发布时间:2022-05-31
下一篇:
C++ TopTools_MapOfShape类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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