mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
* neutrino: GUI Painting of Vol. Mute and Clock (Part3)
- Use new class for volumebar - Numeric display added for volumebar (switchable) - Display of volumebar, mute icon and info clock optimized (top right) - Volumebar better scalable git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2153 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
65
src/driver/volume.h
Normal file
65
src/driver/volume.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
volume bar - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011-2012 M. Liebmann (micha-bbg)
|
||||
|
||||
License: GPL
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CVOLUME__
|
||||
#define __CVOLUME__
|
||||
|
||||
#define ROUNDED g_settings.rounded_corners ? vbar_h/2 : 0
|
||||
|
||||
class CVolume
|
||||
{
|
||||
private:
|
||||
void refreshVolumebar(int current_volume);
|
||||
|
||||
int x, y, sy, sw, sh;
|
||||
int mute_ax, mute_ay, mute_dy, mute_ay_old;
|
||||
int mute_icon_dx, mute_icon_dy;
|
||||
int icon_w, icon_h, icon_x, icon_y;
|
||||
int vbar_w, vbar_h;
|
||||
int progress_w, progress_h, progress_x, progress_y, pB;
|
||||
int digit_w, digit_h, digit_offset, digit_x, digit_y, digit_b_x, digit_b_w;
|
||||
int VolumeFont, colShadow, colBar, colFrame, colContent;
|
||||
int ShadowOffset;
|
||||
int rounded;
|
||||
bool paintShadow, paintDigits, MuteIconFrame;
|
||||
|
||||
public:
|
||||
CVolume();
|
||||
~CVolume();
|
||||
static CVolume* getInstance();
|
||||
|
||||
int spacer, mute_dx;
|
||||
void Init();
|
||||
void AudioMute(int newValue, bool isEvent= false);
|
||||
void setvol(int vol);
|
||||
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
|
||||
int getStartPosTop(){ return sy; }
|
||||
int getEndPosRight(){ return sw; }
|
||||
};
|
||||
|
||||
|
||||
#endif // __CVOLUME__
|
Reference in New Issue
Block a user