本文整理汇总了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();
}
示例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;
}
}
}
示例3: UpdateLayout
void Pane::UpdateLayout()
{
Pane* ppane;
for(ppane = Child(); ppane != NULL; ppane = ppane->Next()) {
ppane->UpdateLayout();
}
}
示例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();
}
示例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 ()));
}
示例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;
}
}
示例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());
}
示例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 );
}
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
示例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();
}