本文整理汇总了C++中eSize函数的典型用法代码示例。如果您正苦于以下问题:C++ eSize函数的具体用法?C++ eSize怎么用?C++ eSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eSize函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: eLabel
void eButton::gotFocus()
{
#ifndef DISABLE_LCD
if (parent && parent->LCDElement)
{
if (descr)
{
LCDTmp = new eLabel(parent->LCDElement);
LCDTmp->hide();
eSize s = parent->LCDElement->getSize();
LCDTmp->move(ePoint(0,s.height()/2));
LCDTmp->resize(eSize(s.width(), s.height()/2));
LCDTmp->setText(text);
LCDTmp->setBackgroundColor(255);
LCDTmp->show();
tmpDescr = new eLabel(parent->LCDElement);
tmpDescr->hide();
tmpDescr->move(ePoint(0,0));
tmpDescr->resize(eSize(s.width(), s.height()/2));
tmpDescr->setText(descr->getText());
tmpDescr->show();
}
else
parent->LCDElement->setText(text);
}
#endif
setForegroundColor(focusF,false);
setBackgroundColor(focusB);
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:29,代码来源:ebutton.cpp
示例2: eWindow
RunApp::RunApp ():
eWindow (0)
{
//setText(_("Running script"));
printf ("%s is running, please wait\n", Executable);
setText (eString ().sprintf ("%s is running, please wait", Executable));
cmove (ePoint (50, 100));
cresize (eSize (630, 400));
bClose = new eButton (this);
bClose->setText (_("Close"));
bClose->setShortcut ("green");
bClose->setShortcutPixmap ("green");
bClose->move (ePoint (440, 10));
bClose->resize (eSize (170, 40));
bClose->loadDeco ();
bClose->hide ();
CONNECT (bClose->selected, RunApp::accept);
/*
bCancel=new eButton(this);
bCancel->loadDeco();
bCancel->setText(_("abort"));
bCancel->move(ePoint(210, 220));
bCancel->resize(eSize(170, 40));
bCancel->setHelpText(_("ignore changes and return"));
CONNECT( bCancel->selected, RunApp::onCancel );
*/
lState = new eLabel (this);
lState->setName ("state");
lState->move (ePoint (0, 0));
lState->resize (eSize (630, 400));
}
开发者ID:BackupTheBerlios,项目名称:tuxbox-addons,代码行数:34,代码来源:setup_runapp.cpp
示例3: setText
void eTPEditDialog::init_eTPEditDialog()
{
setText(_("Transponder Edit"));
cmove( ePoint( 120, 150 ) );
cresize( eSize( 460, 300 ) );
tpWidget=new eTransponderWidget(this, 1,
eTransponderWidget::deliverySatellite|
eTransponderWidget::flagNoSat|
eTransponderWidget::flagNoInv);
tpWidget->resize( eSize( 460, 130 ) );
tpWidget->load();
tpWidget->setTransponder( tp );
tpWidget->move( ePoint(0,-40) );
save=new eButton( this );
save->setText(_("save"));
save->setShortcut("green");
save->setShortcutPixmap("green");
save->setHelpText(_("save changes and return"));
save->move(ePoint( 10, getClientSize().height()-80) );
save->resize( eSize( 220, 40 ) );
save->loadDeco();
CONNECT( save->selected, eTPEditDialog::savePressed );
eStatusBar *sbar = new eStatusBar(this);
sbar->move( ePoint( 0, getClientSize().height()-30) );
sbar->resize( eSize( getClientSize().width(), 30 ) );
sbar->loadDeco();
setHelpID(63);
}
开发者ID:backtrack2016,项目名称:tdt,代码行数:28,代码来源:tpeditwindow.cpp
示例4: redrawLeftTop
void PluginOffsetScreen::redrawWidget(gPainter *target, const eRect &where)
{
target->setForegroundColor( foreColor );
if ( where.intersects( eRect( ePoint( left, top ), eSize( 100, 100 ) ) ) )
redrawLeftTop( target );
if ( where.intersects( eRect( ePoint( right-3, bottom-100 ), eSize( 3, 100 ) ) ) )
redrawRightBottom( target );
}
开发者ID:ChakaZulu,项目名称:tuxbox_apps,代码行数:8,代码来源:setup_osd.cpp
示例5: eProgress
void eEventDisplay::init_eEventDisplay(const ePtrList<EITEvent>* e)
{
eventlist=0;
events=0;
scrollbar = new eProgress(this);
scrollbar->setName("scrollbar");
scrollbar->setStart(0);
scrollbar->setPerc(100);
descr = new eWidget(this);
descr->setName("epg_description");
eventTime = new eLabel(this);
eventTime->setName("time");
eventDate = new eLabel(this);
eventDate->setName("date");
channel = new eLabel(this);
channel->setName("channel");
timer_icon = new eLabel(this);
timer_icon->setName("timer_icon");
eSkin *skin=eSkin::getActive();
if (skin->build(this, "eventview"))
eFatal("skin load of \"eventview\" failed");
long_description=new eLabel(descr);
long_description->setFlags(RS_WRAP);
// try to recalc long description label... ( no broken text lines.. )
float lineheight=fontRenderClass::getInstance()->getLineHeight( long_description->getFont() );
int lines = (int)(descr->getSize().height() / lineheight);
pageHeight = (int)(lines * lineheight);
descr->resize( eSize( descr->getSize().width(), pageHeight+(int)(lineheight/6)));
long_description->resize(eSize(descr->getSize().width(), pageHeight*16));
#ifndef DISABLE_FILE
addActionToHelpList( &i_epgSelectorActions->addDVRTimerEvent );
#endif
#ifndef DISABLE_NETWORK
addActionToHelpList( &i_epgSelectorActions->addNGRABTimerEvent );
#endif
addActionToHelpList( &i_epgSelectorActions->addSwitchTimerEvent );
addActionToHelpList( &i_epgSelectorActions->removeTimerEvent );
addActionToHelpList( &i_enigmaEventViewActions->close );
if (e)
setList(*e);
else if (evt)
setEvent(evt);
addActionMap( &i_enigmaEventViewActions->map );
addActionMap( &i_epgSelectorActions->map );
setHelpID(11);
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:58,代码来源:enigma_event.cpp
示例6: size
void eListbox::updateScrollBar()
{
if (!m_content || m_scrollbar_mode == showNever )
return;
int entries = m_content->size();
if (m_content_changed)
{
int width = size().width();
int height = size().height();
m_content_changed = false;
if (m_scrollbar_mode == showLeft)
{
int sbarwidth = 20;
m_content->setSize(eSize(width-sbarwidth-5, m_itemheight));
m_scrollbar->move(ePoint(0, 0));
m_scrollbar->resize(eSize(sbarwidth, height));
if (entries > m_items_per_page)
{
m_scrollbar->show();
}
else
{
m_scrollbar->hide();
}
}
else if (entries > m_items_per_page || m_scrollbar_mode == showAlways)
{
int sbarwidth = 20;
m_scrollbar->move(ePoint(width-sbarwidth, 0));
m_scrollbar->resize(eSize(sbarwidth, height));
m_content->setSize(eSize(width-sbarwidth-5, m_itemheight));
m_scrollbar->show();
}
else
{
m_content->setSize(eSize(width, m_itemheight));
m_scrollbar->hide();
}
}
if (m_items_per_page && entries)
{
int curVisiblePage = m_top / m_items_per_page;
if (m_prev_scrollbar_page != curVisiblePage)
{
m_prev_scrollbar_page = curVisiblePage;
int pages = entries / m_items_per_page;
if ((pages*m_items_per_page) < entries)
++pages;
int start=(m_top*100)/(pages*m_items_per_page);
int vis=(m_items_per_page*100+pages*m_items_per_page-1)/(pages*m_items_per_page);
if (vis < 3)
vis=3;
m_scrollbar->setStartEnd(start,start+vis);
}
}
}
开发者ID:MOA-2011,项目名称:enigma2.pli4.0,代码行数:56,代码来源:elistbox.cpp
示例7: height
void eListBoxBase::recalcMaxEntries()
{
// MaxEntries is PER COLUMN
int decoheight=0;
if (deco_selected && have_focus)
{
MaxEntries = crect_selected.height();
decoheight = height() - crect_selected.height();
}
else if (deco)
{
MaxEntries = crect.height();
decoheight = height() - crect.height();
}
else
MaxEntries = height();
int tmp = MaxEntries;
MaxEntries /= item_height;
/*eDebug("height = %d, MaxEntries = %d, item height = %d",
tmp, MaxEntries, item_height);*/
// The code here is really funny times .. but works:)
// Make list boxes are automatically resized to the height,
// Needed so that all entrys are just visible ..
// And no edge remains ..
if ( tmp - ( MaxEntries*item_height ) > 0 )
{
if ( (!removed_height_pixel) || (MaxEntries && !(flags & flagShowPartial)) )
{
removed_height_pixel = height() - ((MaxEntries*item_height) + decoheight);
resize( eSize( size.width(), height()-removed_height_pixel ) );
}
else
{
int newMax = (tmp + removed_height_pixel) / item_height;
if ( newMax > MaxEntries )
{
removed_height_pixel -= (newMax*item_height) - tmp;
resize( eSize( size.width(), newMax*item_height+decoheight ) );
}
else
{
int tmp = height() - ((MaxEntries*item_height) + decoheight);
resize( eSize( size.width(), height() - tmp ) );
removed_height_pixel += tmp;
}
}
}
/* else
eDebug("is ok .. do nothing");*/
}
开发者ID:nx111,项目名称:OpenPLi-1,代码行数:53,代码来源:listbox.cpp
示例8: eWindow
SetupRdg::SetupRdg ():
eWindow (0)
{
SetupRdg::GetCFG ();
int fd = eSkin::getActive ()->queryValue ("fontsize", 16);
int s_y = 130, h_x = 250;
eLabel *l;
setText (dgettext("plisetup", "Radegast setup"));
cmove (ePoint (720 / 2 - h_x, 120));
cresize (eSize (h_x * 2, 380));
ok = new eButton (this);
ok->setText (dgettext("plisetup", "Save"));
ok->setShortcut ("green");
ok->setShortcutPixmap ("green");
ok->move (ePoint (10, 270));
ok->resize (eSize (150, 40));
ok->setHelpText (dgettext("plisetup", "Save changes and return"));
ok->loadDeco ();
CONNECT (ok->selected, SetupRdg::okPressed);
abort = new eButton (this);
abort->setShortcut ("red");
abort->setShortcutPixmap ("red");
abort->loadDeco ();
abort->setText (dgettext("plisetup", "Abort"));
abort->move (ePoint (180, 270));
abort->resize (eSize (150, 40));
abort->setHelpText (dgettext("plisetup", "Ignore changes and return"));
CONNECT (abort->selected, SetupRdg::abortPressed);
defaults = new eButton (this);
defaults->setShortcut ("blue");
defaults->setShortcutPixmap ("blue");
defaults->loadDeco ();
defaults->setText (dgettext("plisetup", "defaults"));
defaults->move (ePoint (180 + 170, 270));
defaults->resize (eSize (150, 40));
defaults->setHelpText (dgettext("plisetup", "Load good defaults for local CS"));
CONNECT (defaults->selected, SetupRdg::defaultsPressed);
statusbar = new eStatusBar (this);
statusbar->move (ePoint (0, clientrect.height () - 60));
statusbar->resize (eSize (clientrect.width (), 50));
statusbar->loadDeco ();
}
开发者ID:GWARDAR,项目名称:OpenPLi-1,代码行数:48,代码来源:setup_rdg.cpp
示例9: ASSERT
void gDC::incrementSpinner()
{
ASSERT(m_spinner_saved);
static int blub;
blub++;
#if 0
int i;
for (i = 0; i < 5; ++i)
{
int x = i * 20 + m_spinner_pos.left();
int y = m_spinner_pos.top();
int col = ((blub - i) * 30) % 256;
m_pixmap->fill(eRect(x, y, 10, 10), gRGB(col, col, col));
}
#endif
m_spinner_temp->blit(*m_spinner_saved, eRect(0, 0, 0, 0), eRect(ePoint(0, 0), m_spinner_pos.size()));
if (m_spinner_pic[m_spinner_i])
m_spinner_temp->blit(*m_spinner_pic[m_spinner_i], eRect(0, 0, 0, 0), eRect(ePoint(0, 0), m_spinner_pos.size()), gPixmap::blitAlphaBlend);
m_pixmap->blit(*m_spinner_temp, eRect(m_spinner_pos.topLeft(), eSize()), gRegion(m_spinner_pos), 0);
m_spinner_i++;
m_spinner_i %= m_spinner_num;
}
开发者ID:Adga52,项目名称:enigma2,代码行数:30,代码来源:grc.cpp
示例10: eSize
void eWidget::resize(eSize size)
{
/* same strategy as with move: we first check if
the size changed at all, and if it did, we
invalidate both the old and new area.
TODO: check if either the old or new area
fits into the other completely, and invalidate
only once. */
eSize old_size = m_size;
eSize old_offset = m_client_offset;
m_client_size = size;
m_client_offset = eSize(0, 0);
event(evtWillChangeSize, &size, &m_client_offset);
if (old_size == m_size)
return;
move(position() - old_offset);
invalidate();
event(evtChangedSize);
if (m_notify_child_on_position_change)
for (ePtrList<eWidget>::iterator i(m_childs.begin()); i != m_childs.end(); ++i)
i->event(evtParentChangedPosition); /* position/size is the same here */
recalcClipRegionsWhenVisible(); invalidate();
}
开发者ID:BananaSamurai,项目名称:Enigma2,代码行数:25,代码来源:ewidget.cpp
示例11: eSize
RESULT eServiceDVD::enableSubtitles(iSubtitleUser *user, SubtitleTrack &track)
{
eSize size = eSize(720, 576);
if (m_subtitle_widget) m_subtitle_widget->destroy();
m_subtitle_widget = user;
int pid = -1;
if (track.pid >= 0)
{
pid = track.pid - 1;
ddvd_set_spu(m_ddvdconfig, pid);
m_event(this, evUser+7);
}
eDebug("[eServiceDVD] enableSubtitles %i", pid);
if (!m_pixmap)
{
m_pixmap = new gPixmap(size, 32, 1); /* allocate accel surface (if possible) */
#ifdef DDVD_SUPPORTS_GET_BLIT_DESTINATION
ddvd_set_lfb_ex(m_ddvdconfig, (unsigned char *)m_pixmap->surface->data, size.width(), size.height(), 4, size.width()*4, 1);
#else
ddvd_set_lfb(m_ddvdconfig, (unsigned char *)m_pixmap->surface->data, size.width(), size.height(), 4, size.width()*4);
#warning please update libdreamdvd for fast scaling
#endif
run(); // start the thread
}
return 0;
}
开发者ID:undertaker01,项目名称:stbgui,代码行数:33,代码来源:servicedvd.cpp
示例12: setText
enigmaCIMMI::enigmaCIMMI( eDVBCI *ci )
:ci(ci)
{
setText(_("Common Interface Module - mmi"));
lText->setText(_("waiting for CI answer..."));
int newHeight = size.height() - getClientSize().height() + lText->getExtend().height() + 10 + 20;
resize( eSize( size.width(), newHeight ) );
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:8,代码来源:enigma_ci.cpp
示例13: eRect
void eWindowStyleSimple::handleNewSize(eWindow *wnd, eSize &size, eSize &offset)
{
// eDebug("handle new size: %d x %d", size.width(), size.height());
eWidget *child = wnd->child();
wnd->m_clip_region = eRect(ePoint(0, 0), size);
child->move(ePoint(m_border_left, m_border_top));
child->resize(eSize(size.width() - m_border_left - m_border_right, size.height() - m_border_top - m_border_bottom));
}
开发者ID:1198s,项目名称:enigma2,代码行数:11,代码来源:ewindowstyle.cpp
示例14: resize
void ParentalLockWindow::init_ParentalLockWindow(const char* windowText, int curNum )
{
resize( eSize( 380, 150 ) );
move( ePoint( 200, 200 ) );
setText(windowText);
lPin = new eLabel(this);
lPin->move( ePoint( 10, 10 ) );
lPin->resize( eSize( width()-20, 30 ) );
lPin->setText(_("please enter pin:"));
lPin->loadDeco();
nPin=new eNumber(this, 4, 0, 9, 1, 0, 0, lPin, 1);
nPin->move( ePoint( 10, 50 ) );
nPin->resize( eSize( 100, 30 ) );
nPin->loadDeco();
nPin->setNumber(curNum);
nPin->setFlags( eNumber::flagHideInput );
CONNECT( nPin->selected, ParentalLockWindow::numEntered );
}
开发者ID:ChakaZulu,项目名称:my_tuxbox_apps,代码行数:20,代码来源:parentallock.cpp
示例15: eLabel
void eListBoxBase::gotFocus()
{
#ifndef DISABLE_LCD
if (parent && parent->LCDElement) // detect if LCD Avail
if (descr)
{
parent->LCDElement->setText("");
LCDTmp = new eLabel(parent->LCDElement);
LCDTmp->hide();
eSize s = parent->LCDElement->getSize();
LCDTmp->move(ePoint(0,s.height()/2));
LCDTmp->resize(eSize(s.width(), s.height()/2));
LCDTmp->show();
tmpDescr = new eLabel(parent->LCDElement);
tmpDescr->hide();
tmpDescr->move(ePoint(0,0));
tmpDescr->resize(eSize(s.width(), s.height()/2));
tmpDescr->setText( descr->getText() );
tmpDescr->show();
}
#endif
++have_focus;
if (entries)
{
if ( newFocus() ) // recalced ?
{
ePtrList<eListBoxEntry>::iterator it = current;
init();
setCurrent(it);
}
else if ( isVisible() )
{
int i=0;
for (ePtrList<eListBoxEntry>::iterator entry(top); entry != bottom; ++i, ++entry)
if (entry == current)
invalidateEntry(i);
}
}
if (flags & flagShowEntryHelp)
setHelpText( current != childs.end() ? current->getHelpText(): eString(" ")); // eString(_("no description available")));
}
开发者ID:nx111,项目名称:OpenPLi-1,代码行数:41,代码来源:listbox.cpp
示例16: recalcSize
void eListbox::recalcSize()
{
m_content_changed=true;
m_prev_scrollbar_page=-1;
if (m_content)
m_content->setSize(eSize(size().width(), m_itemheight));
m_items_per_page = size().height() / m_itemheight;
if (m_items_per_page < 0) /* TODO: whyever - our size could be invalid, or itemheigh could be wrongly specified. */
m_items_per_page = 0;
moveSelection(justCheck);
}
开发者ID:FFTEAM,项目名称:enigma2-5,代码行数:13,代码来源:elistbox.cpp
示例17: setForegroundColor
void PluginOffsetScreen::init_PluginOffsetScreen()
{
foreColor = eSkin::getActive()->queryColor("eWindow.titleBarFont");
setForegroundColor( foreColor );
move(ePoint(0,0));
resize(eSize(768,576));
descr = new eLabel( this );
descr->setFlags( eLabel::flagVCenter|RS_WRAP );
descr->setForegroundColor( foreColor );
descr->resize(eSize(568,300));
descr->move(ePoint(100,100));
descr->setText(_("here you can center the tuxtxt rectangle...\npress red to select the left top edge\npress green to select the right bottom edge\nuse the cursor keys to move the selected edges"));
eSize ext = descr->getExtend();
ext+=eSize(8,4); // the given Size of the Text is okay... but the renderer sucks...
descr->resize( ext );
descr->move( ePoint( (width()/2)-(ext.width()/2) , (height()/2)-(ext.height()/2) ) );
descr->show();
addActionMap(&i_PluginOffsetActions->map);
addActionMap(&i_cursorActions->map);
addActionToHelpList( &i_PluginOffsetActions->leftTop );
addActionToHelpList( &i_PluginOffsetActions->rightBottom );
setHelpID(96);
}
开发者ID:ChakaZulu,项目名称:tuxbox_apps,代码行数:23,代码来源:setup_osd.cpp
示例18: eSize
RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple)
{
delete m_subtitle_widget;
eSize size = eSize(720, 576);
m_subtitle_widget = new eSubtitleWidget(parent);
m_subtitle_widget->resize(parent->size());
int pid = -1;
if ( tuple != Py_None )
{
ePyObject entry;
int tuplesize = PyTuple_Size(tuple);
if (!PyTuple_Check(tuple))
goto error_out;
if (tuplesize < 1)
goto error_out;
entry = PyTuple_GET_ITEM(tuple, 1);
if (!PyInt_Check(entry))
goto error_out;
pid = PyInt_AsLong(entry)-1;
ddvd_set_spu(m_ddvdconfig, pid);
m_event(this, evUser+7);
}
eDebug("eServiceDVD::enableSubtitles %i", pid);
if (!m_pixmap)
{
m_pixmap = new gPixmap(size, 32, 1); /* allocate accel surface (if possible) */
#ifdef DDVD_SUPPORTS_GET_BLIT_DESTINATION
ddvd_set_lfb_ex(m_ddvdconfig, (unsigned char *)m_pixmap->surface->data, size.width(), size.height(), 4, size.width()*4, 1);
#else
ddvd_set_lfb(m_ddvdconfig, (unsigned char *)m_pixmap->surface->data, size.width(), size.height(), 4, size.width()*4);
#warning please update libdreamdvd for fast scaling
#endif
run(); // start the thread
}
m_subtitle_widget->setZPosition(-1);
m_subtitle_widget->show();
return 0;
error_out:
return -1;
}
开发者ID:Caught,项目名称:openpliPC,代码行数:48,代码来源:servicedvd.cpp
示例19: closeEIT
void eChannelInfo::getServiceInfo( const eServiceReferenceDVB& service )
{
closeEIT();
delete eit;
eit=0;
// eService *service=eServiceInterface::getInstance()->addRef(service);
if (!service.path.size())
{
DescriptionForEPGSearch = "";
cdescr.show();
cname.setFlags(RS_FADE);
cname.resize( eSize( clientrect.width()/8*7-4, clientrect.height()/3) );
int opos=service.getDVBNamespace().get()>>16;
if ( eSystemInfo::getInstance()->getFEType() == eSystemInfo::feSatellite )
copos.setText(eString().sprintf("%d.%d\xC2\xB0%c", abs(opos / 10), abs(opos % 10), opos>0?'E':'W') );
EITEvent *e = 0;
e = eEPGCache::getInstance()->lookupEvent(service);
if (e && eListBoxEntryService::nownextEPG)
{
time_t t = e->start_time+e->duration+61;
delete e;
e = eEPGCache::getInstance()->lookupEvent((const eServiceReferenceDVB&)service,t);
}
if (e) // data is in cache...
{
ParseEITInfo(e);
delete e;
}
else // we parse the eit...
{
cname.setText(_("no data for this service avail"));
eDVBServiceController *sapi=eDVB::getInstance()->getServiceAPI();
if (!sapi)
return;
eServiceReferenceDVB &ref = sapi->service;
int type = ((service.getTransportStreamID()==ref.getTransportStreamID())
&& (service.getOriginalNetworkID()==ref.getOriginalNetworkID())) ? EIT::tsActual:EIT::tsOther;
eit = new EIT( EIT::typeNowNext, service.getServiceID().get(), type );
CONNECT( eit->tableReady, eChannelInfo::EITready );
eit->start();
}
} else
开发者ID:ChakaZulu,项目名称:tuxbox_apps,代码行数:47,代码来源:channelinfo.cpp
示例20: size
void eIBitmapOp::_preExecute()
{
// bitmap operators always operate on
// smallest input bitmap operator size
if (getAboveOpCount() > 0)
{
eSize size(eS32_MAX, eS32_MAX);
for (eU32 i=0; i<getAboveOpCount(); i++)
{
const Result &res = ((eIBitmapOp *)getAboveOp(i))->getResult();
size.minComponents(eSize(res.uav->tex->width, res.uav->tex->height));
}
_reallocate(size.x, size.y);
}
}
开发者ID:enigmastudio,项目名称:Enigma-Studio-4,代码行数:17,代码来源:bitmapops.cpp
注:本文中的eSize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论