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


C++ Pane类代码示例

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


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

示例1:

editor::Buffer *BufferWidget::bufferAt(int i) const
{
	Pane *pane = dynamic_cast<Pane *>(tabWidget->widget(i));
	if(pane == nullptr)
		return nullptr;
	return pane->getBuffer();
}
开发者ID:CmdrMoozy,项目名称:qompose,代码行数:7,代码来源:BufferWidget.cpp

示例2: reinit_dataitem

void ComponentInterface::
reinit_dataitem( DataItem *a, OP_Init op, void **addr, 
	     int strd, int cap) throw (COM_exception)
{
  int aid = a->id();

  if ( a->location()=='w') 
    // Initialize CI window dataitems in dummy pane
    ((Pane_friend&)_dummy).reinit_dataitem( aid, op, addr, strd, cap);
  else {
    // Initialize other dataitems in regular panes
    Pane *pn = a->pane();
    if ( pn->id()>0)
      ((Pane_friend*)pn)->reinit_dataitem( aid, op, addr, strd, cap);
    else {
      if ( aid == COM_ALL || aid == COM_DATA)
	((Pane_friend&)_dummy).reinit_dataitem( aid, op, addr, strd, cap);

      COM_assertion( op != Pane::OP_SET && op != Pane::OP_SET_CONST );
      // Loop through the panes to initialize each pane
      for (Pane_map::iterator it=_pane_map.begin(), iend=_pane_map.end();
	   it != iend; ++it) {
	((Pane_friend*)it->second)->reinit_dataitem( aid, op, NULL, strd, cap);
      }
      if ( addr) *addr= NULL; // Do not return any address.
      return;
    }
  }
}
开发者ID:xyuan,项目名称:IMPACT,代码行数:29,代码来源:ComponentInterface.C

示例3: UpdateLayout

void Pane::UpdateLayout()
{
    Pane* ppane;
    for(ppane = Child(); ppane != NULL; ppane = ppane->Next()) {
        ppane->UpdateLayout();
    }
}
开发者ID:BackTrak,项目名称:Allegiance-R4-Engine,代码行数:7,代码来源:pane.cpp

示例4: TestWin

		TestWin(int w, int h, const char* title)
			: Fl_Double_Window(w, h, title),
			m_menuBar(0, 0, w, 25),
			m_pane(0),
			m_scroll(0),
			m_fullScreenImage(false)
		{
			m_menuBar.menu(mainMenu);
			m_menuBar.box(FL_THIN_UP_BOX);
			m_pane = new Pane(0, m_menuBar.h(), w, h - m_menuBar.h(), 0.2);

//			Fl_Pack* pack = new Fl_Pack(0, 0, 1, 1);
//			pack->type(FL_VERTICAL);
			Fl_Browser* browser = new Fl_Select_Browser(0, 0, 1, 100);
			browser->add("blah.tif");
			browser->add("blah1.tif");
			browser->add("blah2.tif");
			browser->add("blah3.tif");
			browser->box(FL_THIN_DOWN_BOX);
			m_pane->add1(browser);
//				pack->resizable(browser);
//			pack->end();
//			m_pane->add1(pack);

			m_scroll = new CenterScroll(0, m_menuBar.h(), w, h - m_menuBar.h());
			m_pane->add2(m_scroll);

			resizable(m_pane);
			end();
		}
开发者ID:UIKit0,项目名称:aqsis,代码行数:30,代码来源:main.cpp

示例5: Other

			void TabWidget::handleUploadRequested (const QString& str)
			{
				Pane *other = Other (static_cast<Pane*> (sender ()));
				if (other->IsLocal ())
					return;
				Core::Instance ().Add (str, QUrl (other->GetString ()));
			}
开发者ID:Akon32,项目名称:leechcraft,代码行数:7,代码来源:tabwidget.cpp

示例6: Paint

////////////////////////////////////////////////////////////////////////////////////////////////////
// PaintAll()
// Paint this panes surface, then paint any children.
// Note: the function ::Paint(), is overloaded by any class derived from Pane.
// Added: pass the clip rect round, as with the others, pass by copy, as this can then be modified
// and passed to child panes.
////////////////////////////////////////////////////////////////////////////////////////////////////
void Pane::PaintAll(	Surface * psurface )
{
	// Clipping test - TBD: reinstate.
/*	if( ( rectClip.XMax() <= rectClip.XMin() ) ||
		( rectClip.YMax() <= rectClip.YMin() ) ||
		( rectClip.XMax() < 0 ) ||
		( rectClip.YMax() < 0 ) )
	{
		return;
	}*/

    if( !m_bHidden )
	{
		Paint( psurface );

        for(Pane* ppane = m_pchild; ppane != NULL; ppane = ppane->m_pnext) 
		{
            WinRect rectClipOld = psurface->GetClipRect();
            psurface->Offset(ppane->m_offset);
            psurface->SetClipRect(WinRect(WinPoint(0, 0), ppane->GetSize()));

 			D3DVIEWPORT9 newViewport, oldViewport;
			CD3DDevice9::Get()->GetViewport( &oldViewport );
			WinRect surfClip = psurface->GetClipRect();
			WinPoint surfOffset = psurface->GetOffset();

			newViewport.X = surfClip.XMin() + surfOffset.X();
			newViewport.Y = surfClip.YMin() + surfOffset.Y();
			newViewport.Width = surfClip.XMax() - surfClip.XMin();
			newViewport.Height = surfClip.YMax() - surfClip.YMin();
			newViewport.MinZ = oldViewport.MinZ;
			newViewport.MaxZ = oldViewport.MaxZ;

			newViewport.X = (int) newViewport.X < 0 ? 0 : newViewport.X;
			newViewport.Y = (int) newViewport.Y < 0 ? 0 : newViewport.Y;
			newViewport.Width = (int) newViewport.Width < 0 ? 0 : newViewport.Width;
			newViewport.Height = (int) newViewport.Height < 0 ? 0 : newViewport.Height;

			if( ( newViewport.Width > 0 ) &&
				( newViewport.Height > 0 ) )
			{
				CD3DDevice9::Get()->SetViewport( &newViewport );			
				ppane->PaintAll( psurface );
			}

			psurface->Offset(-ppane->m_offset);
            psurface->RestoreClipRect(rectClipOld);

			if( ( newViewport.Width > 0 ) &&
				( newViewport.Height > 0 ) )
			{
				CD3DDevice9::Get()->SetViewport( &oldViewport );
			}
       }
        m_bNeedPaint = false;
        m_bPaintAll  = false;
    }
}
开发者ID:AllegianceZone,项目名称:Allegiance,代码行数:65,代码来源:pane.cpp

示例7: moveBuffer

void BufferWidget::moveBuffer(int f, int t)
{
	Pane *p = dynamic_cast<Pane *>(tabWidget->widget(f));
	if(p == nullptr)
		return;

	tabWidget->removeTab(f);
	tabWidget->insertTab(t, p, p->getBuffer()->getTitle());
}
开发者ID:CmdrMoozy,项目名称:qompose,代码行数:9,代码来源:BufferWidget.cpp

示例8: gprintf

void SystemMenuResource::SetPaneVisible( Layout *layout, const char* paneName, bool visible )
{
	Pane *pane;
	if( (pane = layout->FindPane( paneName ) ) )
	{
		pane->SetVisible( visible );
	}
	else
	{
		gprintf( "SystemMenuResource::SetPaneVisible(): \"%s\" not found\n", paneName );
	}
}
开发者ID:giantpune,项目名称:wii-system-menu-player,代码行数:12,代码来源:systemmenuresource.cpp

示例9:

std::vector<Transformation*> PaneScene::GetTransformationPointers()
{
    std::vector<Transformation*> txs;
    for (std::vector<Pane*>::iterator it = m_panes.begin();
        it != m_panes.end();
        ++it)
    {
        Pane* pP = *it;
        if (pP == NULL)
            continue;
        txs.push_back(pP->GetTransformationPointer());
    }
    return txs;
}
开发者ID:chansonyan,项目名称:RiftRay,代码行数:14,代码来源:PaneScene.cpp

示例10: ResetTransformation

void PaneScene::ResetTransformation()
{
    if (m_bDraw == false)
        return;

    for (std::vector<Pane*>::iterator it = m_panes.begin();
        it != m_panes.end();
        ++it)
    {
        Pane* pP = *it;
        if (pP == NULL)
            continue;
        pP->ResetTransformation();
    }
}
开发者ID:chansonyan,项目名称:RiftRay,代码行数:15,代码来源:PaneScene.cpp

示例11: SendHmdTap

void PaneScene::SendHmdTap()
{
    if (m_bDraw == false)
        return;

    for (std::vector<Pane*>::iterator it = m_panes.begin();
        it != m_panes.end();
        ++it)
    {
        Pane* pP = *it;
        if (pP == NULL)
            continue;
        pP->OnHmdTap();
    }
}
开发者ID:chansonyan,项目名称:RiftRay,代码行数:15,代码来源:PaneScene.cpp

示例12: SendMouseClick

void PaneScene::SendMouseClick(int state)
{
    if (m_bDraw == false)
        return;

    for (std::vector<Pane*>::iterator it = m_panes.begin();
        it != m_panes.end();
        ++it)
    {
        Pane* pP = *it;
        if (pP == NULL)
            continue;
        pP->OnMouseClick(state, 0, 0);
    }
}
开发者ID:chansonyan,项目名称:RiftRay,代码行数:15,代码来源:PaneScene.cpp

示例13: WinPoint

bool Pane::CalcPaint()
{
    if (m_bHidden) {
        m_paintOffset = WinPoint(0, 0);
        m_paintSize   = WinPoint(0, 0);
        m_bNeedPaint  = false;
        m_bPaintAll   = false;

        if (m_bHiddenPaint != m_bHidden) {
            m_bHiddenPaint = m_bHidden;
            return true;
        }

        return false;
    }

    bool bAnyChildSized = false;

    for(Pane* ppane = m_pchild; ppane != NULL; ppane = ppane->m_pnext) {
        bAnyChildSized |= ppane->CalcPaint();
        if (ppane->m_bNeedPaint) {
            m_bNeedPaint = true;
        }
    }

    if (bAnyChildSized) {
        m_bNeedPaint = true;
        m_bPaintAll = true;
    }

    if (
           m_paintOffset  != m_offset 
        || m_paintSize    != m_size
        || m_bHiddenPaint != m_bHidden
    ) {
        m_bNeedPaint = true;
        m_bPaintAll  = true;

        m_paintOffset  = m_offset;
        m_paintSize    = m_size;
        m_bHiddenPaint = m_bHidden;

        return true;
    } else {
        return false;
    }
}
开发者ID:BackTrak,项目名称:Allegiance-R4-Engine,代码行数:47,代码来源:pane.cpp

示例14: _theme

Popup::Popup(Theme &theme) :
	_theme(theme), // init theme before anything else :)
	_pCapture(NULL),
	_pFocus(NULL),
	_pPane(NULL),
	_pHover(NULL),
	_bInternal(false)
{
	Pane *pPane = new Pane(0, _theme, eDown);
	pPane->setWeight(eDown, 1);
	//pPane->watch(this);
	//pPane->setDesktop(this);

	Fill *pFill = new Fill(0, _theme);
	pPane->Add(pFill, 0, 2048, 1);
	setPane(pPane);
}
开发者ID:Unitrunker,项目名称:Tile,代码行数:17,代码来源:Popup.cpp

示例15: layout

 virtual void layout(Point size_)
  {
   size=size_;
   
   field=Pane(size.x/4,size.y/4,size.x/2,size.y/2);
   
   for(ulen i=0,len=dots.getLen(); i<len ;i++) dots_based[i]=dots[i]-field.getBase();
  }
开发者ID:SergeyStrukov,项目名称:CCore,代码行数:8,代码来源:test4.cpp


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