Exemplo n.º 1
0
CMoviePlayerMenue::CMoviePlayerMenue()
{
	moviePlayerSetup = new CMoviePlayerSetup(&toNotify);

	width = w_max (500, 100);
	selected = -1;
}
Exemplo n.º 2
0
CAdZapMenu::CAdZapMenu()
{
    if (azm)
	return;

    azm = this;
    frameBuffer = CFrameBuffer::getInstance();
    width = w_max (40, 10);
    hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
    mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
    height = hheight + 13 * mheight + 10;

    x = (((g_settings.screen_EndX - g_settings.screen_StartX) -
	  width) / 2) + g_settings.screen_StartX;
    y = (((g_settings.screen_EndY - g_settings.screen_StartY) -
	  height) / 2) + g_settings.screen_StartY;

    sem_init(&sem, 0, 0);
    if (pthread_create(&thrAdZap, 0, CAdZapMenu::Run, NULL) != 0) {
	fprintf(stderr, "ERROR: pthread_create(CAdZapMenu::CAdZapMenu)\n");
	running = false;
    } else
	running = true;
    channelId = -1;
    armed = false;
    monitor = false;
    alerted = false;
}
Exemplo n.º 3
0
void CEpgData::start()
{
	// dimension
	ox  = w_max ( (frameBuffer->getScreenWidth() / 20 * 17), (frameBuffer->getScreenWidth() / 20 ));
	oy = h_max ( (frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20));
	
	sx = (((g_settings.screen_EndX - g_settings.screen_StartX) - ox) / 2) + g_settings.screen_StartX;

	//top
	topheight     = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight();
	topboxheight  = topheight + 6;

	//bottom
	botheight     = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
	botboxheight  = botheight + 6;
	
	//epg text fenster
	medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight();
	medlinecount  = (oy - topboxheight - botboxheight)/medlineheight;
	
	// this is the text box height - and the height of the scroll bar
	sb = medlinecount * medlineheight;

	oy = botboxheight + medlinecount*medlineheight; // recalculate //FIXME
	
	//
	int icon_w;
	int icon_h;
	
	frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icon_w, &icon_h);

	int fheight = std::max(icon_h, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()) + 6;
	sy = (((g_settings.screen_EndY - g_settings.screen_StartY) - (oy - topboxheight + fheight) ) / 2) + g_settings.screen_StartY; //30:buttonbar
	toph = topboxheight;
}
Exemplo n.º 4
0
void CTestMenu::testCListBoxDetailsTitleInfo()
{
	CListBox * listBox = new CListBox("listBoxDetailsTitleInfo", w_max ( (CFrameBuffer::getInstance()->getScreenWidth() / 20 * 17), (CFrameBuffer::getInstance()->getScreenWidth() / 20 )), h_max ( (CFrameBuffer::getInstance()->getScreenHeight() / 20 * 16), (CFrameBuffer::getInstance()->getScreenHeight() / 20)), true, true, true);
	
	listBox->exec(NULL, "");
	delete listBox;
}
Exemplo n.º 5
0
CWebTVSetup::CWebTVSetup()
{
	width = w_max (40, 10);
	selected = -1;
	item_offset = 0;
	changed = false;
}
Exemplo n.º 6
0
// construktor
CSysInfoWidget::CSysInfoWidget(int m)
{
	frameBuffer = CFrameBuffer::getInstance();
	
	selected = 0;
	
	// windows size
	width  = w_max ( (frameBuffer->getScreenWidth() / 20 * 17), (frameBuffer->getScreenWidth() / 20 ));
	height = h_max ( (frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20));
	
	//head height
	frameBuffer->getIconSize(NEUTRINO_ICON_SETTINGS, &icon_head_w, &icon_head_h);
	theight = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(), icon_head_h) + 6;
       
	//foot height
	frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icon_foot_w, &icon_foot_h);
	ButtonHeight = std::max(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(), icon_foot_h) + 6;
	
	// item height
	fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight();
	listmaxshow = (height - theight)/fheight;
	
	// recalculate height
	height = theight + listmaxshow*fheight; // recalc height
	
	// coordinate
	x = (((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
	y = (((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;
	
	//
	liststart = 0;
	state = beDefault;
	mode = m;
}
Exemplo n.º 7
0
void CEpgData::start()
{
	ox = w_max (768, 70);
	oy = h_max (576, 50 + 30); // 30 for the bottom button box.
	
	sx = (((g_settings.screen_EndX - g_settings.screen_StartX) -ox) / 2) + g_settings.screen_StartX;

	//top
	topheight     = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]->getHeight();
	topboxheight  = topheight + 6;

	if(topboxheight < PIC_H) 
		topboxheight = PIC_H;

	//bottom
	botheight     = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
	botboxheight  = botheight + 6;
	
	//epg text fenster
	medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight();
	//medlinecount  = (oy - botboxheight)/medlineheight;
	medlinecount  = (oy - topboxheight - botboxheight)/medlineheight;
	
	//sb = oy - topboxheight - botboxheight;
	/* this is the text box height - and the height of the scroll bar */
	sb = medlinecount * medlineheight;

	oy = botboxheight + medlinecount*medlineheight; // recalculate //FIXME
	
	sy = (((g_settings.screen_EndY-g_settings.screen_StartY)-(oy- topboxheight) ) / 2) + g_settings.screen_StartY;
	toph = topboxheight;
}
Exemplo n.º 8
0
CAudioSetup::CAudioSetup(bool wizard_mode)
{
	is_wizard = wizard_mode;

	width = w_max (40, 10);
	selected = -1;
}
void CTimerList::updateEvents(void)
{
	timerlist.clear();
	Timer->getTimerList (timerlist);
	sort(timerlist.begin(), timerlist.end());

	theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	//get footerHeight from paintButtons
	footerHeight = ::paintButtons(TimerListButtons, TimerListButtonsCount, 0, 0, 0, 0, 0, false);

	width = w_max(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth()*56, 20);
	height = frameBuffer->getScreenHeight() - (2*theight);	// max height

	listmaxshow = (height-theight)/(fheight*2);
	height = theight+listmaxshow*fheight*2+footerHeight;	// recalc height

	if (timerlist.size() < listmaxshow)
	{
		listmaxshow=timerlist.size();
		height = theight+listmaxshow*fheight*2+footerHeight;	// recalc height
	}

	if (selected==timerlist.size() && !(timerlist.empty()))
	{
		selected=timerlist.size()-1;
		liststart = (selected/listmaxshow)*listmaxshow;
	}

	x = getScreenStartX(width);
	y = getScreenStartY(height);
}
CUserMenuSetup::CUserMenuSetup(neutrino_locale_t menue_title, int menue_button)
{
	local = menue_title;
	button = menue_button;
	max_char = 24;
	width = w_max (40, 10);
	if (menue_button < (int) g_settings.usermenu.size())
		pref_name = g_settings.usermenu[button]->title; //set current button name as prefered name
	forwarder = NULL;

	for (int i = 0; usermenu_items[i].key != SNeutrinoSettings::ITEM_MAX; i++) {
		const char *loc = g_Locale->getText(usermenu_items[i].value);
		if (usermenu_items[i].show)
			options.push_back(loc);
		keys[loc] = to_string(usermenu_items[i].key);
		vals[keys[loc]] = loc;
	}

	int number_of_plugins = g_PluginList->getNumberOfPlugins();
	for (int count = 0; count < number_of_plugins; count++) {
		const char *loc = g_PluginList->getName(count);
		const char *key = g_PluginList->getFileName(count);
		if (loc && *loc && key && *key) {
			options.push_back(loc);
			keys[loc] = key;
			vals[keys[loc]] = loc;
		}
	}
	std::sort(options.begin(), options.end());
}
Exemplo n.º 11
0
CThemes::CThemes()
: themefile('\t')
{
	width 	= w_max (40, 10);
	notifier = NULL;
	hasThemeChanged = false;
}
Exemplo n.º 12
0
CScanSetup::CScanSetup()
{
	width = w_max (500, 100);
	selected = -1;
	sat_list_size = 0;
	provider_list_size = 0;
}
Exemplo n.º 13
0
COsdLangSetup::COsdLangSetup(bool wizard_mode)
{
	is_wizard = wizard_mode;

	width = w_max (45, 10);
	tzNotifier = NULL;
}
int CBEChannelSelectWidget::exec(CMenuTarget* parent, const std::string & actionKey)
{
    //width  = w_max (500, 0);
    //height = h_max (440, 50);
    int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
    int fh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
    width  = w_max (64 * fw, 20);
    height = h_max (20 * fh, 50);

    listmaxshow = (height-theight-0)/fheight;
    height = theight+0+listmaxshow*fheight; // recalc height
    x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2;
    y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - height) / 2;

    bouquetChannels = mode == CZapitClient::MODE_TV ? &(g_bouquetManager->Bouquets[bouquet]->tvChannels) : &(g_bouquetManager->Bouquets[bouquet]->radioChannels);

    Channels.clear();
    if (mode == CZapitClient::MODE_RADIO) {
        for (tallchans_iterator it = allchans.begin(); it != allchans.end(); it++)
            if (it->second.getServiceType() == ST_DIGITAL_RADIO_SOUND_SERVICE)
                Channels.push_back(&(it->second));
    } else {
        for (tallchans_iterator it = allchans.begin(); it != allchans.end(); it++)
            if (it->second.getServiceType() != ST_DIGITAL_RADIO_SOUND_SERVICE)
                Channels.push_back(&(it->second));
    }
    sort(Channels.begin(), Channels.end(), CmpChannelByChName());

    return CListBox::exec(parent, actionKey);
}
Exemplo n.º 15
0
CDriverBootSetup::CDriverBootSetup(const neutrino_locale_t title, const char * const IconName)
{
	menue_title = title;
	menue_icon = IconName;

	width = w_max (500, 100);
	selected = -1;
}
Exemplo n.º 16
0
CPluginList::CPluginList(const neutrino_locale_t Title, const uint32_t listtype)
{
	title = Title;
	pluginlisttype = listtype;
	width = w_max (40, 10);
	selected = -1;
	number = -1;
}
Exemplo n.º 17
0
CFlashUpdate::CFlashUpdate()
	:CProgressWindow()
{
	width = w_max (40, 10); 
	setTitle(LOCALE_FLASHUPDATE_HEAD);
	sysfs = CMTDInfo::getInstance()->findMTDsystem();
	printf("Mtd partition to update: %s\n", sysfs.c_str());
}
Exemplo n.º 18
0
CMiscMenue::CMiscMenue(const neutrino_locale_t title, const char * const IconName)
{
	menue_title = title;
	menue_icon = IconName;

	width = w_max (500, 100);
	selected = -1;
}
Exemplo n.º 19
0
CUserMenuSetup::CUserMenuSetup(neutrino_locale_t menue_title, int menue_button)
{
	local = menue_title;
	button = menue_button;

	width = w_max (500, 100);
	selected = -1;
}
Exemplo n.º 20
0
CProxySetup::CProxySetup(const neutrino_locale_t title, const char * const IconName )
{
	menue_title = title != NONEXISTANT_LOCALE ? title : LOCALE_FLASHUPDATE_PROXYSERVER_SEP;
	menue_icon = IconName != NEUTRINO_ICON_SETTINGS ? IconName : NEUTRINO_ICON_SETTINGS;

	width = w_max (500, 100);
	selected = -1;
}
Exemplo n.º 21
0
CMediaPlayerMenu::CMediaPlayerMenu()
{
	setMenuTitel();

	width = w_max (40, 10); //%
	
	audioPlayer 	= NULL;
	inetPlayer 	= NULL;
}
CMiscMenue::CMiscMenue()
{
	width = w_max (40, 10);

	epg_save = NULL;
	epg_save_standby = NULL;
	epg_save_frequently = NULL;
	epg_read = NULL;
	epg_dir = NULL;
}
Exemplo n.º 23
0
CNetworkSetup::CNetworkSetup(bool wizard_mode)
{
	networkConfig = CNetworkConfig::getInstance();

	is_wizard = wizard_mode;

	width = w_max (40, 10);

	//readNetworkSettings();
}
Exemplo n.º 24
0
COsdLangSetup::COsdLangSetup()
{
	frameBuffer = CFrameBuffer::getInstance();

	width = w_max (500, 100);
	hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	height 	= hheight+13*mheight+ 10;
	x	= getScreenStartX (width);
	y	= getScreenStartY (height);
}
Exemplo n.º 25
0
CRecordSetup::CRecordSetup()
{
	frameBuffer = CFrameBuffer::getInstance();

	width = w_max (500, 100);
	hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	height = hheight+13*mheight+ 10;
	x=(((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
	y=(((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;
}
Exemplo n.º 26
0
CStreamInfo::CStreamInfo()
{
	frameBuffer = CFrameBuffer::getInstance();
	hheight     = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	mheight     = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	width       = w_max (400, 50);
	height      = h_max (hheight + 14 * mheight + 10, 0);

	x = getScreenStartX (width);
	y = getScreenStartY (height);
}
Exemplo n.º 27
0
CVideoSetup::CVideoSetup()
{
	SyncControlerForwarder = NULL;
	VcrVideoOutSignalOptionChooser = NULL;

	width = w_max (500, 100);
	selected = -1;

	video_out_signal = g_Controld->getVideoOutput();
	vcr_video_out_signal = g_Controld->getVCROutput();
}
Exemplo n.º 28
0
CPersonalizeGui::CPersonalizeGui()
: configfile('\t')
{
	frameBuffer = CFrameBuffer::getInstance();
	width = w_max (710, 100);
	hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	height = hheight+13*mheight+ 10;
	x=(((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
	y=(((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;

}
Exemplo n.º 29
0
CThemes::CThemes(const neutrino_locale_t title, const char * const IconName)
: themefile('\t')
{
	colorSetupNotifier = new CColorSetupNotifier();

	menue_title = title;
	menue_icon = IconName;

	width = w_max (500, 100);
	selected = -1;

	hasThemeChanged = false;
}
Exemplo n.º 30
0
CThemes::CThemes()
: themefile('\t')
{
	frameBuffer = CFrameBuffer::getInstance();
	width 	= w_max (500, 100);
	hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
	mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
	height = hheight+13*mheight+ 10;
	x	= getScreenStartX (width);
	y	= getScreenStartY (height);

	hasThemeChanged = false;
}