mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Conflicts:
src/gui/audioplayer.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 197dfd1c41
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-18 (Sun, 18 Jun 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -160,8 +160,8 @@ audioplayer.add_loc Lokale Radioliste
|
|||||||
audioplayer.add_sc SHOUTcast
|
audioplayer.add_sc SHOUTcast
|
||||||
audioplayer.artist_title Interpret, Titel
|
audioplayer.artist_title Interpret, Titel
|
||||||
audioplayer.building_search_index Erstelle Suchindex
|
audioplayer.building_search_index Erstelle Suchindex
|
||||||
audioplayer.button_select_title_by_id Suche n. ID
|
audioplayer.button_select_title_by_id Suche nach ID
|
||||||
audioplayer.button_select_title_by_name Suche n. Name
|
audioplayer.button_select_title_by_name Suche nach Name
|
||||||
audioplayer.defdir Start-Verzeichnis
|
audioplayer.defdir Start-Verzeichnis
|
||||||
audioplayer.delete Entfernen
|
audioplayer.delete Entfernen
|
||||||
audioplayer.deleteall Alle entfernen
|
audioplayer.deleteall Alle entfernen
|
||||||
|
@@ -50,7 +50,7 @@ static void clear_queue();
|
|||||||
int dvbsub_init() {
|
int dvbsub_init() {
|
||||||
int trc;
|
int trc;
|
||||||
|
|
||||||
sub_debug.set_level(2);
|
sub_debug.set_level(3);
|
||||||
|
|
||||||
reader_running = true;
|
reader_running = true;
|
||||||
dvbsub_stopped = 1;
|
dvbsub_stopped = 1;
|
||||||
@@ -103,11 +103,7 @@ int dvbsub_start(int pid)
|
|||||||
pid_change_req = 1;
|
pid_change_req = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
printf("[dvb-sub] ***************************************** start, stopped %d pid %x\n", dvbsub_stopped, dvbsub_pid);
|
|
||||||
while(!dvbsub_stopped)
|
|
||||||
usleep(10);
|
|
||||||
#endif
|
|
||||||
if(dvbsub_pid > 0) {
|
if(dvbsub_pid > 0) {
|
||||||
dvbsub_stopped = 0;
|
dvbsub_stopped = 0;
|
||||||
dvbsub_paused = false;
|
dvbsub_paused = false;
|
||||||
@@ -248,11 +244,8 @@ static void* reader_thread(void * /*arg*/)
|
|||||||
set_threadname("dvbsub:reader");
|
set_threadname("dvbsub:reader");
|
||||||
|
|
||||||
dmx = new cDemux(0);
|
dmx = new cDemux(0);
|
||||||
#if HAVE_TRIPLEDRAGON
|
|
||||||
dmx->Open(DMX_PES_CHANNEL, NULL, 16*1024);
|
|
||||||
#else
|
|
||||||
dmx->Open(DMX_PES_CHANNEL, NULL, 64*1024);
|
dmx->Open(DMX_PES_CHANNEL, NULL, 64*1024);
|
||||||
#endif
|
|
||||||
while (reader_running) {
|
while (reader_running) {
|
||||||
if(dvbsub_stopped /*dvbsub_paused*/) {
|
if(dvbsub_stopped /*dvbsub_paused*/) {
|
||||||
sub_debug.print(Debug::VERBOSE, "%s stopped\n", __FUNCTION__);
|
sub_debug.print(Debug::VERBOSE, "%s stopped\n", __FUNCTION__);
|
||||||
@@ -310,17 +303,6 @@ static void* reader_thread(void * /*arg*/)
|
|||||||
count += len;
|
count += len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
for(int i = 6; i < packlen - 4; i++) {
|
|
||||||
if(!memcmp(&buf[i], "\x00\x00\x01\xbd", 4)) {
|
|
||||||
int plen = getbits(&buf[i], 4*8, 16) + 6;
|
|
||||||
sub_debug.print(Debug::VERBOSE, "[subtitles] ******************* PES header at %d ?! *******************\n", i);
|
|
||||||
sub_debug.print(Debug::VERBOSE, "[subtitles] start code: %02x%02x%02x%02x len %d\n", buf[i+0], buf[i+1], buf[i+2], buf[i+3], plen);
|
|
||||||
free(buf);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(!dvbsub_stopped /*!dvbsub_paused*/) {
|
if(!dvbsub_stopped /*!dvbsub_paused*/) {
|
||||||
sub_debug.print(Debug::VERBOSE, "[subtitles] *** new packet, len %d buf 0x%x pts-stc diff %lld ***\n", count, buf, get_pts_stc_delta(get_pts(buf)));
|
sub_debug.print(Debug::VERBOSE, "[subtitles] *** new packet, len %d buf 0x%x pts-stc diff %lld ***\n", count, buf, get_pts_stc_delta(get_pts(buf)));
|
||||||
@@ -400,11 +382,6 @@ static void* dvbsub_thread(void* /*arg*/)
|
|||||||
dataoffset = packet[8] + 8 + 1;
|
dataoffset = packet[8] + 8 + 1;
|
||||||
if (packet[dataoffset] != 0x20) {
|
if (packet[dataoffset] != 0x20) {
|
||||||
sub_debug.print(Debug::VERBOSE, "Not a dvb subtitle packet, discard it (len %d)\n", packlen);
|
sub_debug.print(Debug::VERBOSE, "Not a dvb subtitle packet, discard it (len %d)\n", packlen);
|
||||||
#if 0
|
|
||||||
for(int i = 0; i < packlen; i++)
|
|
||||||
printf("%02X ", packet[i]);
|
|
||||||
printf("\n");
|
|
||||||
#endif
|
|
||||||
goto next_round;
|
goto next_round;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,8 +36,6 @@ static bool DebugConverter = true;
|
|||||||
|
|
||||||
#define dbgconverter(a...) if (DebugConverter) sub_debug.print(Debug::VERBOSE, a)
|
#define dbgconverter(a...) if (DebugConverter) sub_debug.print(Debug::VERBOSE, a)
|
||||||
|
|
||||||
// --- cDvbSubtitleBitmaps ---------------------------------------------------
|
|
||||||
|
|
||||||
class cDvbSubtitleBitmaps : public cListObject
|
class cDvbSubtitleBitmaps : public cListObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -88,16 +86,7 @@ fb_pixel_t * simple_resize32(uint8_t * orgin, uint32_t * colors, int nb_colors,
|
|||||||
fb_pixel_t *cr,*l;
|
fb_pixel_t *cr,*l;
|
||||||
int i,j,k,ip;
|
int i,j,k,ip;
|
||||||
|
|
||||||
#ifndef HAVE_SPARK_HARDWARE
|
|
||||||
cr = (fb_pixel_t *) malloc(dx*dy*sizeof(fb_pixel_t));
|
|
||||||
|
|
||||||
if(cr == NULL) {
|
|
||||||
printf("Error: malloc\n");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
cr = CFrameBuffer::getInstance()->getBackBufferPointer();
|
cr = CFrameBuffer::getInstance()->getBackBufferPointer();
|
||||||
#endif
|
|
||||||
l = cr;
|
l = cr;
|
||||||
|
|
||||||
for(j = 0; j < dy; j++, l += dx)
|
for(j = 0; j < dy; j++, l += dx)
|
||||||
@@ -116,29 +105,8 @@ fb_pixel_t * simple_resize32(uint8_t * orgin, uint32_t * colors, int nb_colors,
|
|||||||
void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#ifndef HAVE_SPARK_HARDWARE
|
|
||||||
int stride = CFrameBuffer::getInstance()->getScreenWidth(true);
|
|
||||||
#if 0
|
|
||||||
int wd = CFrameBuffer::getInstance()->getScreenWidth();
|
|
||||||
int xstart = CFrameBuffer::getInstance()->getScreenX();
|
|
||||||
int yend = CFrameBuffer::getInstance()->getScreenY() + CFrameBuffer::getInstance()->getScreenHeight();
|
|
||||||
int ystart = CFrameBuffer::getInstance()->getScreenY();
|
|
||||||
#endif
|
|
||||||
uint32_t *sublfb = CFrameBuffer::getInstance()->getFrameBufferPointer();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
dbgconverter("cDvbSubtitleBitmaps::Draw: %d bitmaps, x= %d, width= %d yend=%d stride %d\n", Count(), xstart, wd, yend, stride);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int sw = CFrameBuffer::getInstance()->getScreenWidth(true);
|
int sw = CFrameBuffer::getInstance()->getScreenWidth(true);
|
||||||
int sh = CFrameBuffer::getInstance()->getScreenHeight(true);
|
int sh = CFrameBuffer::getInstance()->getScreenHeight(true);
|
||||||
#if 0
|
|
||||||
double xc = (double) CFrameBuffer::getInstance()->getScreenWidth(true)/(double) 720;
|
|
||||||
double yc = (double) CFrameBuffer::getInstance()->getScreenHeight(true)/(double) 576;
|
|
||||||
xc = yc; //FIXME should we scale also to full width ?
|
|
||||||
int xf = int(xc * (double) 720);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < Count(); i++) {
|
for (i = 0; i < Count(); i++) {
|
||||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 5, 0)
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 5, 0)
|
||||||
@@ -150,26 +118,13 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
|||||||
int height = sub.rects[i]->h;
|
int height = sub.rects[i]->h;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
|
|
||||||
#if 0
|
|
||||||
int nw = int(width == 1280 ? ((double) width / xc) : ((double) width * xc));
|
|
||||||
int nh = int((double) height * yc);
|
|
||||||
|
|
||||||
int xdiff = (wd > xf) ? ((wd - xf) / 2) : 0;
|
|
||||||
xoff = int(sub.rects[i]->x*xc + xstart + xdiff);
|
|
||||||
if(sub.rects[i]->y < 576/2) {
|
|
||||||
yoff = int(ystart + sub.rects[i]->y*yc);
|
|
||||||
} else {
|
|
||||||
yoff = int(yend - ((width == 1280 ? 704:576) - (double) (sub.rects[i]->y + height))*yc - nh);
|
|
||||||
if(yoff < ystart)
|
|
||||||
yoff = ystart;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
int h2 = 576;
|
int h2 = 576;
|
||||||
switch (width)
|
switch (width)
|
||||||
{
|
{
|
||||||
case 1280: h2 = 720; break;
|
case 1280: h2 = 720; break;
|
||||||
case 1920: h2 = 1080; break;
|
case 1920: h2 = 1080; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
xoff = sub.rects[i]->x * sw / width;
|
xoff = sub.rects[i]->x * sw / width;
|
||||||
yoff = sub.rects[i]->y * sh / h2;
|
yoff = sub.rects[i]->y * sh / h2;
|
||||||
int nw = width * sw / width;
|
int nw = width * sw / width;
|
||||||
@@ -184,18 +139,8 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
|||||||
fb_pixel_t * newdata = simple_resize32 (sub.rects[i]->data[0], colors, sub.rects[i]->nb_colors, width, height, nw, nh);
|
fb_pixel_t * newdata = simple_resize32 (sub.rects[i]->data[0], colors, sub.rects[i]->nb_colors, width, height, nw, nh);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SPARK_HARDWARE
|
|
||||||
// CFrameBuffer::getInstance()->waitForIdle();
|
|
||||||
CFrameBuffer::getInstance()->blit2FB(newdata, nw, nh, xoff, yoff, 0, 0);
|
CFrameBuffer::getInstance()->blit2FB(newdata, nw, nh, xoff, yoff, 0, 0);
|
||||||
#else
|
|
||||||
fb_pixel_t * ptr = newdata;
|
|
||||||
for (int y2 = 0; y2 < nh; y2++) {
|
|
||||||
int y = (yoff + y2) * stride;
|
|
||||||
for (int x2 = 0; x2 < nw; x2++)
|
|
||||||
*(sublfb + xoff + x2 + y) = *ptr++;
|
|
||||||
}
|
|
||||||
free(newdata);
|
free(newdata);
|
||||||
#endif
|
|
||||||
|
|
||||||
if(min_x > xoff)
|
if(min_x > xoff)
|
||||||
min_x = xoff;
|
min_x = xoff;
|
||||||
@@ -213,7 +158,6 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int screen_w, screen_h, screen_x, screen_y;
|
static int screen_w, screen_h, screen_x, screen_y;
|
||||||
// --- cDvbSubtitleConverter -------------------------------------------------
|
|
||||||
|
|
||||||
cDvbSubtitleConverter::cDvbSubtitleConverter(void)
|
cDvbSubtitleConverter::cDvbSubtitleConverter(void)
|
||||||
{
|
{
|
||||||
@@ -262,12 +206,12 @@ cDvbSubtitleConverter::~cDvbSubtitleConverter()
|
|||||||
|
|
||||||
void cDvbSubtitleConverter::Lock(void)
|
void cDvbSubtitleConverter::Lock(void)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&mutex);
|
pthread_mutex_lock(&mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbSubtitleConverter::Unlock(void)
|
void cDvbSubtitleConverter::Unlock(void)
|
||||||
{
|
{
|
||||||
pthread_mutex_unlock(&mutex);
|
pthread_mutex_unlock(&mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbSubtitleConverter::Pause(bool pause)
|
void cDvbSubtitleConverter::Pause(bool pause)
|
||||||
@@ -280,24 +224,21 @@ void cDvbSubtitleConverter::Pause(bool pause)
|
|||||||
Clear();
|
Clear();
|
||||||
running = false;
|
running = false;
|
||||||
Unlock();
|
Unlock();
|
||||||
//Reset();
|
|
||||||
} else {
|
} else {
|
||||||
//Reset();
|
|
||||||
running = true;
|
running = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDvbSubtitleConverter::Clear(void)
|
void cDvbSubtitleConverter::Clear(void)
|
||||||
{
|
{
|
||||||
dbgconverter("cDvbSubtitleConverter::Clear: x=% d y= %d, w= %d, h= %d\n", min_x, min_y, max_x-min_x, max_y-min_y);
|
|
||||||
if(running && (max_x-min_x > 0) && (max_y-min_y > 0)) {
|
if(running && (max_x-min_x > 0) && (max_y-min_y > 0)) {
|
||||||
|
dbgconverter("cDvbSubtitleConverter::Clear: x=% d y= %d, w= %d, h= %d\n", min_x, min_y, max_x-min_x, max_y-min_y);
|
||||||
CFrameBuffer::getInstance()->paintBackgroundBoxRel (min_x, min_y, max_x-min_x, max_y-min_y);
|
CFrameBuffer::getInstance()->paintBackgroundBoxRel (min_x, min_y, max_x-min_x, max_y-min_y);
|
||||||
/* reset area to clear */
|
/* reset area to clear */
|
||||||
min_x = screen_w;
|
min_x = screen_w;
|
||||||
min_y = screen_h;
|
min_y = screen_h;
|
||||||
max_x = screen_x;
|
max_x = screen_x;
|
||||||
max_y = screen_h;
|
max_y = screen_y;
|
||||||
//CFrameBuffer::getInstance()->paintBackground();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,7 +272,6 @@ int cDvbSubtitleConverter::Convert(const uchar *Data, int Length, int64_t pts)
|
|||||||
avpkt.size = Length;
|
avpkt.size = Length;
|
||||||
|
|
||||||
dbgconverter("cDvbSubtitleConverter::Convert: sub %x pkt %x pts %lld\n", sub, &avpkt, pts);
|
dbgconverter("cDvbSubtitleConverter::Convert: sub %x pkt %x pts %lld\n", sub, &avpkt, pts);
|
||||||
//avctx->sub_id = (anc_page << 16) | comp_page; //FIXME not patched ffmpeg needs this !
|
|
||||||
|
|
||||||
avcodec_decode_subtitle2(avctx, sub, &got_subtitle, &avpkt);
|
avcodec_decode_subtitle2(avctx, sub, &got_subtitle, &avpkt);
|
||||||
dbgconverter("cDvbSubtitleConverter::Convert: pts %lld subs ? %s, %d bitmaps\n", pts, got_subtitle? "yes" : "no", sub->num_rects);
|
dbgconverter("cDvbSubtitleConverter::Convert: pts %lld subs ? %s, %d bitmaps\n", pts, got_subtitle? "yes" : "no", sub->num_rects);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,33 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
$Id: audioplayer.h,v 1.24 2009/10/03 10:36:29 seife Exp $
|
Neutrino-GUI - DBoxII-Project
|
||||||
Neutrino-GUI - DBoxII-Project
|
|
||||||
|
|
||||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
Homepage: http://dbox.cyberphoria.org/
|
Copyright (C) 2009 Stefan Seyfried
|
||||||
|
Copyright (C) 2017 Sven Hoefer
|
||||||
|
|
||||||
Kommentar:
|
License: GPL
|
||||||
|
|
||||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
This program is free software; you can redistribute it and/or modify
|
||||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
it under the terms of the GNU General Public License as published by
|
||||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
License: GPL
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __audioplayergui__
|
#ifndef __audioplayergui__
|
||||||
@@ -55,212 +46,208 @@ typedef std::pair<unsigned char, CPosList> CTitle2PosItem;
|
|||||||
class CFrameBuffer;
|
class CFrameBuffer;
|
||||||
class CAudiofileExt : public CAudiofile
|
class CAudiofileExt : public CAudiofile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
CAudiofileExt();
|
||||||
|
|
||||||
CAudiofileExt();
|
CAudiofileExt(std::string name, CFile::FileType type);
|
||||||
|
|
||||||
CAudiofileExt(std::string name, CFile::FileType type);
|
CAudiofileExt(const CAudiofileExt& src);
|
||||||
|
|
||||||
CAudiofileExt(const CAudiofileExt& src);
|
void operator=(const CAudiofileExt& src);
|
||||||
|
|
||||||
void operator=(const CAudiofileExt& src);
|
char firstChar;
|
||||||
|
|
||||||
|
|
||||||
char firstChar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<CAudiofileExt> CAudioPlayList;
|
typedef std::vector<CAudiofileExt> CAudioPlayList;
|
||||||
|
|
||||||
class RandomNumber
|
class RandomNumber
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RandomNumber()
|
RandomNumber() { std::srand(time(0)); }
|
||||||
{
|
|
||||||
std::srand(time(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
int operator()(int n){
|
int operator()(int n) { return std::rand() / (1.0 + RAND_MAX) * n; }
|
||||||
return std::rand() / (1.0 + RAND_MAX) * n;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CAudioPlayerGui : public CMenuTarget
|
class CAudioPlayerGui : public CMenuTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum State
|
enum State
|
||||||
{
|
{
|
||||||
PLAY=0,
|
PLAY=0,
|
||||||
STOP,
|
STOP,
|
||||||
PAUSE,
|
PAUSE,
|
||||||
FF,
|
FF,
|
||||||
REV
|
REV
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DisplayOrder {ARTIST_TITLE = 0, TITLE_ARTIST=1};
|
enum DisplayOrder
|
||||||
|
{
|
||||||
|
ARTIST_TITLE = 0,
|
||||||
|
TITLE_ARTIST=1
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init(void);
|
void Init(void);
|
||||||
CFrameBuffer * m_frameBuffer;
|
CFrameBuffer * m_frameBuffer;
|
||||||
unsigned int m_selected;
|
unsigned int m_selected;
|
||||||
int m_current;
|
int m_current;
|
||||||
unsigned int m_liststart;
|
unsigned int m_liststart;
|
||||||
unsigned int m_listmaxshow;
|
unsigned int m_listmaxshow;
|
||||||
int m_fheight; // Fonthoehe Playlist-Inhalt
|
int m_item_height;
|
||||||
int m_theight; // Fonthoehe Playlist-Titel
|
int m_header_height;
|
||||||
int m_sheight; // Fonthoehe MP Info
|
int m_meta_height;
|
||||||
int m_buttonHeight;
|
int m_button_height;
|
||||||
int m_title_height;
|
int m_title_height;
|
||||||
int m_info_height;
|
int m_info_height;
|
||||||
int m_key_level;
|
int m_key_level;
|
||||||
bool m_visible;
|
bool m_visible;
|
||||||
State m_state;
|
State m_state;
|
||||||
time_t m_time_total;
|
time_t m_time_total;
|
||||||
time_t m_time_played;
|
time_t m_time_played;
|
||||||
std::string m_metainfo;
|
std::string m_metainfo;
|
||||||
bool m_select_title_by_name;
|
bool m_select_title_by_name;
|
||||||
bool m_show_playlist;
|
bool m_show_playlist;
|
||||||
|
bool m_playlistHasChanged;
|
||||||
|
|
||||||
bool m_playlistHasChanged;
|
CAudioPlayList m_playlist;
|
||||||
|
CAudioPlayList m_radiolist;
|
||||||
|
CAudioPlayList m_filelist;
|
||||||
|
CTitle2Pos m_title2Pos;
|
||||||
|
CAudiofileExt m_curr_audiofile;
|
||||||
|
std::string m_Path;
|
||||||
|
|
||||||
CAudioPlayList m_playlist;
|
int m_width;
|
||||||
CAudioPlayList m_radiolist;
|
int m_height;
|
||||||
CAudioPlayList m_filelist;
|
int m_x;
|
||||||
CTitle2Pos m_title2Pos;
|
int m_y;
|
||||||
CAudiofileExt m_curr_audiofile;
|
int m_title_w;
|
||||||
std::string m_Path;
|
|
||||||
|
|
||||||
int m_width;
|
int m_LastMode;
|
||||||
int m_height;
|
int m_idletime;
|
||||||
int m_x;
|
bool m_screensaver;
|
||||||
int m_y;
|
bool m_inetmode;
|
||||||
int m_title_w;
|
CComponentsDetailsLine *m_detailsline;
|
||||||
|
CComponentsInfoBox *m_infobox;
|
||||||
|
|
||||||
int m_LastMode;
|
SMSKeyInput m_SMSKeyInput;
|
||||||
int m_idletime;
|
|
||||||
bool m_screensaver;
|
|
||||||
bool m_inetmode;
|
|
||||||
CComponentsDetailsLine *dline;
|
|
||||||
CComponentsInfoBox *ibox;
|
|
||||||
|
|
||||||
SMSKeyInput m_SMSKeyInput;
|
void paintItem(int pos);
|
||||||
|
void paint();
|
||||||
|
void paintHead();
|
||||||
|
void paintFoot();
|
||||||
|
void paintTitleBox();
|
||||||
|
void paintCover();
|
||||||
|
void paintLCD();
|
||||||
|
void paintDetailsLine(int pos);
|
||||||
|
void clearDetailsLine();
|
||||||
|
void hide();
|
||||||
|
|
||||||
void paintItem(int pos);
|
void get_id3(CAudiofileExt * audiofile);
|
||||||
void paint();
|
void get_mp3info(CAudiofileExt * audiofile);
|
||||||
void paintHead();
|
CFileFilter audiofilefilter;
|
||||||
void paintFoot();
|
void ff(unsigned int seconds=0);
|
||||||
void paintInfo();
|
void rev(unsigned int seconds=0);
|
||||||
void paintCover();
|
int getNext();
|
||||||
void paintLCD();
|
void GetMetaData(CAudiofileExt &File);
|
||||||
void hide();
|
void updateMetaData();
|
||||||
|
void updateTimes(const bool force = false);
|
||||||
|
void showMetaData();
|
||||||
|
void screensaver(bool on);
|
||||||
|
bool getNumericInput(neutrino_msg_t& msg, int& val);
|
||||||
|
|
||||||
void get_id3(CAudiofileExt * audiofile);
|
void addToPlaylist(CAudiofileExt &file);
|
||||||
void get_mp3info(CAudiofileExt * audiofile);
|
void removeFromPlaylist(long pos);
|
||||||
CFileFilter audiofilefilter;
|
|
||||||
void paintItemID3DetailsLine (int pos);
|
|
||||||
void clearItemID3DetailsLine ();
|
|
||||||
void ff(unsigned int seconds=0);
|
|
||||||
void rev(unsigned int seconds=0);
|
|
||||||
int getNext();
|
|
||||||
void GetMetaData(CAudiofileExt &File);
|
|
||||||
void updateMetaData();
|
|
||||||
void updateTimes(const bool force = false);
|
|
||||||
void showMetaData();
|
|
||||||
void screensaver(bool on);
|
|
||||||
bool getNumericInput(neutrino_msg_t& msg,int& val);
|
|
||||||
|
|
||||||
void addToPlaylist(CAudiofileExt &file);
|
/**
|
||||||
void removeFromPlaylist(long pos);
|
* Adds an url (shoutcast, ...) to the to the audioplayer playlist
|
||||||
|
*/
|
||||||
|
void addUrl2Playlist(const char *url, const char *name = NULL, const time_t bitrate = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an url (shoutcast, ...) to the to the audioplayer playlist
|
* Adds a url which points to an .m3u format (playlist, ...) to the audioplayer playlist
|
||||||
*/
|
*/
|
||||||
void addUrl2Playlist(const char *url, const char *name = NULL, const time_t bitrate = 0);
|
void processPlaylistUrl(const char *url, const char *name = NULL, const time_t bitrate = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a url which points to an .m3u format (playlist, ...) to the audioplayer playlist
|
* Loads a given XML file of internet audiostreams or playlists and processes them
|
||||||
*/
|
*/
|
||||||
void processPlaylistUrl(const char *url, const char *name = NULL, const time_t bitrate = 0);
|
void scanXmlFile(std::string filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a given XML file of internet audiostreams or playlists and processes them
|
* Processes a loaded XML file/data of internet audiostreams or playlists
|
||||||
*/
|
*/
|
||||||
void scanXmlFile(std::string filename);
|
void scanXmlData(xmlDocPtr answer_parser, const char *nametag, const char *urltag, const char *bitratetag = NULL, bool usechild = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes a loaded XML file/data of internet audiostreams or playlists
|
* Reads the icecast directory (XML file) and calls scanXmlData
|
||||||
*/
|
*/
|
||||||
void scanXmlData(xmlDocPtr answer_parser, const char *nametag, const char *urltag, const char *bitratetag = NULL, bool usechild = false);
|
void readDir_ic(void);
|
||||||
|
|
||||||
/**
|
void selectTitle(unsigned char selectionChar);
|
||||||
* Reads the icecast directory (XML file) and calls scanXmlData
|
|
||||||
*/
|
|
||||||
void readDir_ic(void);
|
|
||||||
|
|
||||||
void selectTitle(unsigned char selectionChar);
|
/**
|
||||||
/**
|
* Appends the file information to the given string.
|
||||||
* Appends the file information to the given string.
|
* @param fileInfo a string where the file information will be appended
|
||||||
* @param fileInfo a string where the file information will be appended
|
* @param file the file to return the information for
|
||||||
* @param file the file to return the information for
|
*/
|
||||||
*/
|
void getFileInfoToDisplay(std::string& fileInfo, CAudiofileExt &file);
|
||||||
void getFileInfoToDisplay(std::string& fileInfo, CAudiofileExt &file);
|
|
||||||
|
|
||||||
void printSearchTree();
|
void printSearchTree();
|
||||||
|
|
||||||
void buildSearchTree();
|
void buildSearchTree();
|
||||||
|
|
||||||
unsigned char getFirstChar(CAudiofileExt &file);
|
unsigned char getFirstChar(CAudiofileExt &file);
|
||||||
|
|
||||||
void printTimevalDiff(timeval &start, timeval &end);
|
void printTimevalDiff(timeval &start, timeval &end);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the current playlist into a .m3u playlist file.
|
* Saves the current playlist into a .m3u playlist file.
|
||||||
*/
|
*/
|
||||||
void savePlaylist();
|
void savePlaylist();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an absolute filename to a relative one
|
* Converts an absolute filename to a relative one
|
||||||
* as seen from a file in fromDir.
|
* as seen from a file in fromDir.
|
||||||
* Example:
|
* Example:
|
||||||
* absFilename: /mnt/audio/A/abc.mp3
|
* absFilename: /mnt/audio/A/abc.mp3
|
||||||
* fromDir: /mnt/audio/B
|
* fromDir: /mnt/audio/B
|
||||||
* => ../A/abc.mp3 will be returned
|
* => ../A/abc.mp3 will be returned
|
||||||
* @param fromDir the directory from where we want to
|
* @param fromDir the directory from where we want to
|
||||||
* access the file
|
* access the file
|
||||||
* @param absFilename the file we want to access in a
|
* @param absFilename the file we want to access in a
|
||||||
* relative way from fromDir (given as an absolute path)
|
* relative way from fromDir (given as an absolute path)
|
||||||
* @return the location of absFilename as seen from fromDir
|
* @return the location of absFilename as seen from fromDir
|
||||||
* (relative path)
|
* (relative path)
|
||||||
*/
|
*/
|
||||||
std::string absPath2Rel(const std::string& fromDir,
|
std::string absPath2Rel(const std::string& fromDir, const std::string& absFilename);
|
||||||
const std::string& absFilename);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asks the user if the file filename should be overwritten or not
|
* Asks the user if the file filename should be overwritten or not
|
||||||
* @param filename the name of the file
|
* @param filename the name of the file
|
||||||
* @return true if file should be overwritten, false otherwise
|
* @return true if file should be overwritten, false otherwise
|
||||||
*/
|
*/
|
||||||
bool askToOverwriteFile(const std::string& filename);
|
bool askToOverwriteFile(const std::string& filename);
|
||||||
bool openFilebrowser(void);
|
|
||||||
bool openSCbrowser(void);
|
|
||||||
bool clearPlaylist(void);
|
|
||||||
bool shufflePlaylist(void);
|
|
||||||
|
|
||||||
bool pictureviewer;
|
bool openFilebrowser(void);
|
||||||
|
bool openSCbrowser(void);
|
||||||
|
bool clearPlaylist(void);
|
||||||
|
bool shufflePlaylist(void);
|
||||||
|
|
||||||
public:
|
bool pictureviewer;
|
||||||
CAudioPlayerGui(bool inetmode = false);
|
|
||||||
~CAudioPlayerGui();
|
|
||||||
int show();
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
|
||||||
|
|
||||||
void wantNextPlay();
|
public:
|
||||||
void pause();
|
CAudioPlayerGui(bool inetmode = false);
|
||||||
void play(unsigned int pos);
|
~CAudioPlayerGui();
|
||||||
void stop();
|
int show();
|
||||||
bool playNext(bool allow_rotate = false);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
bool playPrev(bool allow_rotate = false);
|
|
||||||
int getAudioPlayerM_current() {return m_current;}
|
void wantNextPlay();
|
||||||
|
void pause();
|
||||||
|
void play(unsigned int pos);
|
||||||
|
void stop();
|
||||||
|
bool playNext(bool allow_rotate = false);
|
||||||
|
bool playPrev(bool allow_rotate = false);
|
||||||
|
int getAudioPlayerM_current() { return m_current; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -156,17 +156,10 @@ int COsdHelpers::isVideoSystem1080(int res)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
|
|
||||||
int COsdHelpers::getVideoSystem()
|
int COsdHelpers::getVideoSystem()
|
||||||
{
|
{
|
||||||
return videoDecoder->GetVideoSystem();
|
return videoDecoder->GetVideoSystem();
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
int COsdHelpers::getVideoSystem()
|
|
||||||
{
|
|
||||||
return g_settings.video_Mode;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32_t COsdHelpers::getOsdResolution()
|
uint32_t COsdHelpers::getOsdResolution()
|
||||||
{
|
{
|
||||||
|
@@ -1556,61 +1556,50 @@ void CMenuWidget::setFooter(const struct button_label *_fbutton_labels, const in
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const neutrino_locale_t Name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const neutrino_locale_t Name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value,
|
const int min_value, const int max_value,
|
||||||
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
||||||
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
name = Name;
|
init(Name, "", OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
|
||||||
optionValue = OptionValue;
|
|
||||||
|
|
||||||
lower_bound = min_value;
|
|
||||||
upper_bound = max_value;
|
|
||||||
|
|
||||||
display_offset = print_offset;
|
|
||||||
|
|
||||||
localized_value = special_value;
|
|
||||||
localized_value_name = special_value_name;
|
|
||||||
|
|
||||||
display_offset = print_offset;
|
|
||||||
nameString = "";
|
|
||||||
numberFormat = "%d";
|
|
||||||
numberFormatFunction = NULL;
|
|
||||||
observ = Observ;
|
|
||||||
slider_on = sliderOn;
|
|
||||||
|
|
||||||
numeric_input = false;
|
|
||||||
|
|
||||||
directKeyOK = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionNumberChooser::CMenuOptionNumberChooser(const std::string &Name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser::CMenuOptionNumberChooser( const std::string &Name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value,
|
const int min_value, const int max_value,
|
||||||
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName,
|
||||||
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
const int print_offset, const int special_value, const neutrino_locale_t special_value_name, bool sliderOn)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
name = NONEXISTANT_LOCALE;
|
init(NONEXISTANT_LOCALE, Name, OptionValue, min_value, max_value, print_offset, special_value, special_value_name, Observ, sliderOn);
|
||||||
optionValue = OptionValue;
|
}
|
||||||
|
|
||||||
lower_bound = min_value;
|
void CMenuOptionNumberChooser::init( const neutrino_locale_t& lName,
|
||||||
upper_bound = max_value;
|
const std::string &sName,
|
||||||
|
int* const Option_Value,
|
||||||
|
const int& min_value,
|
||||||
|
const int& max_value,
|
||||||
|
const int& print_offset,
|
||||||
|
const int& special_value,
|
||||||
|
const neutrino_locale_t& special_value_name,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool sliderOn)
|
||||||
|
{
|
||||||
|
name = lName;
|
||||||
|
nameString = sName;
|
||||||
|
optionValue = Option_Value;
|
||||||
|
lower_bound = min_value;
|
||||||
|
upper_bound = max_value;
|
||||||
|
display_offset = print_offset;
|
||||||
|
localized_value = special_value;
|
||||||
|
localized_value_name = special_value_name;
|
||||||
|
observ = Observ;
|
||||||
|
slider_on = sliderOn;
|
||||||
|
|
||||||
display_offset = print_offset;
|
numberFormat = "%d";
|
||||||
|
numberFormatFunction = NULL;
|
||||||
localized_value = special_value;
|
directKeyOK = false;
|
||||||
localized_value_name = special_value_name;
|
numeric_input = false;
|
||||||
|
|
||||||
nameString = Name;
|
|
||||||
numberFormat = "%d";
|
|
||||||
numberFormatFunction = NULL;
|
|
||||||
observ = Observ;
|
|
||||||
slider_on = sliderOn;
|
|
||||||
|
|
||||||
numeric_input = false;
|
|
||||||
|
|
||||||
directKeyOK = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMenuOptionNumberChooser::exec(CMenuTarget*)
|
int CMenuOptionNumberChooser::exec(CMenuTarget*)
|
||||||
@@ -1734,104 +1723,52 @@ int CMenuOptionNumberChooser::getWidth(void)
|
|||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options,
|
CMenuOptionChooser::CMenuOptionChooser( const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const size_t Number_Of_Options,
|
||||||
const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const bool Active, CChangeObserver * const Observ,
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = "";
|
init("", OptionName, OptionValue, Options, NULL, NULL, Number_Of_Options, Observ, Pulldown, OptionsSort);
|
||||||
name = OptionName;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
|
||||||
{
|
|
||||||
struct keyval_ext opt;
|
|
||||||
opt = Options[i];
|
|
||||||
options.push_back(opt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options,
|
CMenuOptionChooser::CMenuOptionChooser( const std::string &OptionName, int * const OptionValue, const struct keyval * const Options, const size_t Number_Of_Options,
|
||||||
const bool Active, CChangeObserver * const Observ, const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const bool Active, CChangeObserver * const Observ,
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = OptionName;
|
init(OptionName, NONEXISTANT_LOCALE, OptionValue, Options, NULL, NULL, Number_Of_Options, Observ, Pulldown, OptionsSort);
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
|
||||||
{
|
|
||||||
struct keyval_ext opt;
|
|
||||||
opt = Options[i];
|
|
||||||
options.push_back(opt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser::CMenuOptionChooser( const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval_ext * const Options, const size_t Number_Of_Options,
|
||||||
const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ,
|
const bool Active, CChangeObserver * const Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = "";
|
init("", OptionName, OptionValue, NULL, Options, NULL, Number_Of_Options, Observ, Pulldown, OptionsSort);
|
||||||
name = OptionName;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
|
||||||
options.push_back(Options[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser::CMenuOptionChooser( const std::string &OptionName, int * const OptionValue, const struct keyval_ext * const Options, const size_t Number_Of_Options,
|
||||||
const unsigned Number_Of_Options, const bool Active, CChangeObserver * const Observ,
|
const bool Active, CChangeObserver * const Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = OptionName;
|
init(OptionName, NONEXISTANT_LOCALE, OptionValue, NULL, Options, NULL, Number_Of_Options, Observ, Pulldown, OptionsSort);
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
number_of_options = Number_Of_Options;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
for (unsigned int i = 0; i < number_of_options; i++)
|
|
||||||
options.push_back(Options[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, std::vector<keyval_ext> &Options,
|
CMenuOptionChooser::CMenuOptionChooser( const neutrino_locale_t OptionName, int * const OptionValue, std::vector<keyval_ext> &Options,
|
||||||
const bool Active, CChangeObserver * const Observ,
|
const bool Active, CChangeObserver * const Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = "";
|
init("", OptionName, OptionValue, NULL, NULL, &Options, Options.size(), Observ, Pulldown, OptionsSort);
|
||||||
name = OptionName;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
options = Options;
|
|
||||||
number_of_options = options.size();
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, std::vector<keyval_ext> &Options,
|
CMenuOptionChooser::CMenuOptionChooser(const std::string &OptionName, int * const OptionValue, std::vector<keyval_ext> &Options,
|
||||||
const bool Active, CChangeObserver * const Observ,
|
const bool Active, CChangeObserver * const Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown, bool OptionsSort)
|
||||||
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
: CAbstractMenuOptionChooser(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = OptionName;
|
init(OptionName, NONEXISTANT_LOCALE, OptionValue, NULL, NULL, &Options, Options.size(), Observ, Pulldown, OptionsSort);
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
optionValue = OptionValue;
|
|
||||||
options = Options;
|
|
||||||
number_of_options = options.size();
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
optionsSort = OptionsSort;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionChooser::~CMenuOptionChooser()
|
CMenuOptionChooser::~CMenuOptionChooser()
|
||||||
@@ -1839,26 +1776,48 @@ CMenuOptionChooser::~CMenuOptionChooser()
|
|||||||
clearChooserOptions();
|
clearChooserOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuOptionChooser::initVarOptionChooser( const std::string &OptionName,
|
void CMenuOptionChooser::init( const std::string &OptionName,
|
||||||
const neutrino_locale_t Name,
|
const neutrino_locale_t Name,
|
||||||
int * const OptionValue,
|
int * const OptionValue,
|
||||||
const bool Active,
|
const struct keyval * const Options,
|
||||||
CChangeObserver * const Observ,
|
const struct keyval_ext * const OptionsExt,
|
||||||
neutrino_msg_t DirectKey,
|
std::vector<keyval_ext> * v_Options,
|
||||||
const char * IconName,
|
const size_t Number_Of_Options,
|
||||||
bool Pulldown,
|
CChangeObserver * const Observ,
|
||||||
bool OptionsSort)
|
bool Pulldown,
|
||||||
|
bool OptionsSort)
|
||||||
{
|
{
|
||||||
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||||
nameString = OptionName;
|
nameString = OptionName;
|
||||||
name = Name;
|
name = Name;
|
||||||
optionValue = OptionValue;
|
optionValue = OptionValue;
|
||||||
active = Active;
|
number_of_options = Number_Of_Options;
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
directKey = DirectKey;
|
|
||||||
iconName = IconName;
|
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
optionsSort = OptionsSort;
|
optionsSort = OptionsSort;
|
||||||
|
|
||||||
|
if (Options || OptionsExt)
|
||||||
|
{
|
||||||
|
if (Options)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
|
{
|
||||||
|
struct keyval_ext opt;
|
||||||
|
opt = Options[i];
|
||||||
|
options.push_back(opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OptionsExt)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < number_of_options; i++)
|
||||||
|
options.push_back(OptionsExt[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (v_Options)
|
||||||
|
options = *v_Options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenuOptionChooser::clearChooserOptions()
|
void CMenuOptionChooser::clearChooserOptions()
|
||||||
@@ -2061,24 +2020,29 @@ int CMenuOptionChooser::getWidth(void)
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const neutrino_locale_t OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
CMenuOptionStringChooser::CMenuOptionStringChooser( const neutrino_locale_t OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
||||||
: CMenuItem(Active, DirectKey, IconName)
|
: CMenuItem(Active, DirectKey, IconName)
|
||||||
{
|
{
|
||||||
nameString = "";
|
init("", OptionName, OptionValue, Observ, Pulldown);
|
||||||
name = OptionName;
|
|
||||||
optionValuePtr = OptionValue ? OptionValue : &optionValue;
|
|
||||||
observ = Observ;
|
|
||||||
pulldown = Pulldown;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuOptionStringChooser::CMenuOptionStringChooser(const std::string &OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
CMenuOptionStringChooser::CMenuOptionStringChooser( const std::string &OptionName, std::string* OptionValue, bool Active, CChangeObserver* Observ,
|
||||||
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
const neutrino_msg_t DirectKey, const char * const IconName, bool Pulldown)
|
||||||
: CMenuItem(Active, DirectKey, IconName)
|
: CMenuItem(Active, DirectKey, IconName)
|
||||||
|
{
|
||||||
|
init(OptionName, NONEXISTANT_LOCALE, OptionValue, Observ, Pulldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuOptionStringChooser::init( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
std::string* pOptionValue,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool Pulldown)
|
||||||
{
|
{
|
||||||
nameString = OptionName;
|
nameString = OptionName;
|
||||||
name = NONEXISTANT_LOCALE;
|
name = Name;
|
||||||
optionValuePtr = OptionValue ? OptionValue : &optionValue;
|
optionValuePtr = pOptionValue ? pOptionValue : &optionValue;
|
||||||
observ = Observ;
|
observ = Observ;
|
||||||
pulldown = Pulldown;
|
pulldown = Pulldown;
|
||||||
}
|
}
|
||||||
@@ -2183,48 +2147,52 @@ int CMenuOptionStringChooser::paint( bool selected )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey,
|
CMenuForwarder::CMenuForwarder( const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey,
|
||||||
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
||||||
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
||||||
{
|
{
|
||||||
option_string_ptr = &Option;
|
init("", Text, Option, NULL, Target, ActionKey);
|
||||||
name = Text;
|
|
||||||
nameString = "";
|
|
||||||
jumpTarget = Target;
|
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey,
|
CMenuForwarder::CMenuForwarder( const std::string& Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey,
|
||||||
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
||||||
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
||||||
|
{
|
||||||
|
init(Text, NONEXISTANT_LOCALE, Option, NULL, Target, ActionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
CMenuForwarder::CMenuForwarder( const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
||||||
|
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
||||||
|
{
|
||||||
|
init("", Text, "", Option, Target, ActionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
CMenuForwarder::CMenuForwarder( const std::string& Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey,
|
||||||
|
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
||||||
|
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
||||||
|
{
|
||||||
|
init(Text, NONEXISTANT_LOCALE, "", Option, Target, ActionKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMenuForwarder::init( const std::string &Text,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
const std::string &sOption,
|
||||||
|
const char * const cOption,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey)
|
||||||
{
|
{
|
||||||
option_string_ptr = &Option;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
nameString = Text;
|
||||||
jumpTarget = Target;
|
name = Name;
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey,
|
if (sOption.empty())
|
||||||
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
{
|
||||||
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
option_string = cOption ? cOption : "";
|
||||||
{
|
option_string_ptr = &option_string;
|
||||||
option_string = Option ? Option : "";
|
}
|
||||||
option_string_ptr = &option_string;
|
else
|
||||||
name = Text;
|
option_string_ptr = &sOption;
|
||||||
nameString = "";
|
|
||||||
jumpTarget = Target;
|
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const std::string& Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey,
|
|
||||||
neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right, bool IsStatic)
|
|
||||||
: CMenuItem(Active, DirectKey, IconName, IconName_Info_right, IsStatic)
|
|
||||||
{
|
|
||||||
option_string = Option ? Option : "";
|
|
||||||
option_string_ptr = &option_string;
|
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
|
||||||
jumpTarget = Target;
|
jumpTarget = Target;
|
||||||
actionKey = ActionKey ? ActionKey : "";
|
actionKey = ActionKey ? ActionKey : "";
|
||||||
}
|
}
|
||||||
@@ -2294,18 +2262,20 @@ int CMenuForwarder::paint(bool selected)
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
|
CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
|
||||||
{
|
{
|
||||||
type = Type;
|
init(Type, Text, "");
|
||||||
name = Text;
|
|
||||||
nameString = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuSeparator::CMenuSeparator(const int Type, const std::string &Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
|
CMenuSeparator::CMenuSeparator(const int Type, const std::string &Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic)
|
||||||
{
|
{
|
||||||
type = Type;
|
init(Type, NONEXISTANT_LOCALE, Text);
|
||||||
name = NONEXISTANT_LOCALE;
|
|
||||||
nameString = Text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMenuSeparator::init(const int& Type, const neutrino_locale_t& lText, const std::string &sText)
|
||||||
|
{
|
||||||
|
type = Type;
|
||||||
|
name = lText;
|
||||||
|
nameString = sText;
|
||||||
|
}
|
||||||
|
|
||||||
int CMenuSeparator::getHeight(void)
|
int CMenuSeparator::getHeight(void)
|
||||||
{
|
{
|
||||||
|
@@ -205,6 +205,9 @@ class CMenuItem : public CComponentsSignals
|
|||||||
class CMenuSeparator : public CMenuItem
|
class CMenuSeparator : public CMenuItem
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
void init( const int& Type,
|
||||||
|
const neutrino_locale_t& lText,
|
||||||
|
const std::string& sText);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -234,6 +237,12 @@ class CMenuSeparator : public CMenuItem
|
|||||||
class CMenuForwarder : public CMenuItem
|
class CMenuForwarder : public CMenuItem
|
||||||
{
|
{
|
||||||
std::string actionKey;
|
std::string actionKey;
|
||||||
|
void init( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
const std::string &sOption,
|
||||||
|
const char * const cOption,
|
||||||
|
CMenuTarget* Target,
|
||||||
|
const char * const ActionKey);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string option_string;
|
std::string option_string;
|
||||||
@@ -322,6 +331,17 @@ private:
|
|||||||
std::string numberFormat;
|
std::string numberFormat;
|
||||||
std::string (*numberFormatFunction)(int num);
|
std::string (*numberFormatFunction)(int num);
|
||||||
|
|
||||||
|
void init( const neutrino_locale_t& lName,
|
||||||
|
const std::string &sName,
|
||||||
|
int* const Option_Value,
|
||||||
|
const int& min_value,
|
||||||
|
const int& max_value,
|
||||||
|
const int& print_offset,
|
||||||
|
const int& special_value,
|
||||||
|
const neutrino_locale_t& special_value_name,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool sliderOn);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
|
CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active,
|
||||||
const int min_value, const int max_value, CChangeObserver * const Observ = NULL,
|
const int min_value, const int max_value, CChangeObserver * const Observ = NULL,
|
||||||
@@ -389,39 +409,40 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
|||||||
private:
|
private:
|
||||||
std::vector<keyval_ext> options;
|
std::vector<keyval_ext> options;
|
||||||
std::vector<CMenuOptionChooserOptions*> option_chooser_options_v;
|
std::vector<CMenuOptionChooserOptions*> option_chooser_options_v;
|
||||||
unsigned number_of_options;
|
size_t number_of_options;
|
||||||
CChangeObserver * observ;
|
CChangeObserver * observ;
|
||||||
bool pulldown;
|
bool pulldown;
|
||||||
bool optionsSort;
|
bool optionsSort;
|
||||||
|
|
||||||
void clearChooserOptions();
|
void clearChooserOptions();
|
||||||
void initVarOptionChooser( const std::string &OptionName,
|
void init( const std::string &OptionName,
|
||||||
const neutrino_locale_t Name,
|
const neutrino_locale_t Name,
|
||||||
int * const OptionValue,
|
int * const OptionValue,
|
||||||
const bool Active,
|
const struct keyval * const Options,
|
||||||
|
const struct keyval_ext * const OptionsExt,
|
||||||
|
std::vector<keyval_ext> * v_Options,
|
||||||
|
const size_t Number_Of_Options,
|
||||||
CChangeObserver * const Observ,
|
CChangeObserver * const Observ,
|
||||||
neutrino_msg_t DirectKey,
|
|
||||||
const char * IconName,
|
|
||||||
bool Pulldown,
|
bool Pulldown,
|
||||||
bool OptionsSort
|
bool OptionsSort
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval * const Options,
|
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval * const Options,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool Pulldown = false, bool OptionsSort = false);
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, const struct keyval_ext * const Options,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool Pulldown = false, bool OptionsSort = false);
|
||||||
CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval * const Options,
|
CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval * const Options,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool size_t = false, bool OptionsSort = false);
|
||||||
CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval_ext * const Options,
|
CMenuOptionChooser(const std::string &Name, int * const OptionValue, const struct keyval_ext * const Options,
|
||||||
const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
const size_t Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool Pulldown = false, bool OptionsSort = false);
|
||||||
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, std::vector<keyval_ext> &Options,
|
CMenuOptionChooser(const neutrino_locale_t Name, int * const OptionValue, std::vector<keyval_ext> &Options,
|
||||||
@@ -432,6 +453,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser
|
|||||||
const bool Active = false, CChangeObserver * const Observ = NULL,
|
const bool Active = false, CChangeObserver * const Observ = NULL,
|
||||||
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL,
|
||||||
bool Pulldown = false, bool OptionsSort = false);
|
bool Pulldown = false, bool OptionsSort = false);
|
||||||
|
|
||||||
~CMenuOptionChooser();
|
~CMenuOptionChooser();
|
||||||
|
|
||||||
void setOption(const int newvalue);
|
void setOption(const int newvalue);
|
||||||
@@ -454,6 +476,11 @@ class CMenuOptionStringChooser : public CMenuItem
|
|||||||
std::vector<std::string> options;
|
std::vector<std::string> options;
|
||||||
CChangeObserver * observ;
|
CChangeObserver * observ;
|
||||||
bool pulldown;
|
bool pulldown;
|
||||||
|
void init( const std::string &OptionName,
|
||||||
|
const neutrino_locale_t Name,
|
||||||
|
std::string* pOptionValue,
|
||||||
|
CChangeObserver * const Observ,
|
||||||
|
bool Pulldown );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false,
|
CMenuOptionStringChooser(const neutrino_locale_t Name, std::string* OptionValue, bool Active = false,
|
||||||
|
Reference in New Issue
Block a user