?? sdl_bar.h
字號:
/* * Copyright (C) 2005-2008 gulikoza, mtrooper * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//* $Id$ */#ifndef SDLBAR_H#define SDLBAR_Hclass SDL_bar {private: bool rec, stereo, channelSurfing; CStr titlebar, channel, aspect, deint; int chnum, volume; char audio_mode;public: SDL_bar():rec(false),channelSurfing(false),volume(100) { aspect = "AR: auto"; deint = "Weave"; audio_mode = 'S'; } void UpdateTitleBar(void) { titlebar.Format(PACKAGE_NAME " - Channel %d: %s, Volume %d%% [%c], %s, %s%s%s", chnum, channel.c_str(), volume, audio_mode, aspect.c_str(), deint.c_str(), rec ? " [Recording]" : "", channelSurfing ? " [Channel Surfing]" : "");#ifdef WIN32 if(sdl.winfast) SDL_WM_SetCaption("Leadtek WinFastDVD", NULL); else#endif SDL_WM_SetCaption(titlebar, NULL); } void SetStereo(int s) { stereo = s; } void SetVolume(int v, char m) { volume = v; switch(m) { case 0: if(stereo) audio_mode='S'; else audio_mode='M'; break; case 1: audio_mode='L'; break; case 2: audio_mode='R'; break; } UpdateTitleBar(); } void SetChannel(int n, CStr& ch) { channel = ch; chnum = n; UpdateTitleBar(); } void SetAspect(int a) { switch(a) { case 0: aspect = "AR: auto"; break; case 1: aspect = "AR: 16:9"; break; case 2: aspect = "AR: crop to 16:9"; break; case 3: aspect = "AR: crop to 16:10"; break; case 4: aspect = "AR: 4:3"; break; } UpdateTitleBar(); } void SetDeinterlace(int d) { switch(d) { case 0: deint = "Weave"; break; case 1: deint = "Discard"; break; case 2: deint = "Mean"; break; case 3: deint = "Blend"; break; } UpdateTitleBar(); } void SetRec(bool r) { rec = r; UpdateTitleBar(); } void SetChannelSurfing(bool c) { channelSurfing = c; UpdateTitleBar(); }};#endif // SDLBAR_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -