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


C++ TopWindow类代码示例

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


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


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