gui_events.cpp

00001 
00004                 /*
00005                 vdr_remote - A Graphic Remote Control Utility for Klaus Schidinger's vdr (www.cadsoft.de/vdr)
00006 
00007                 Copyright (C)2006 Peter Marquardt p_marquardt@users.sourceforge.net
00008 
00009                 This program is free software; you can redistribute it and/or modify
00010                 it under the terms of the GNU General Public License as published by
00011                 the Free Software Foundation; either version 2 of the License, or
00012                 (at your option) any later version.
00013 
00014                 This program is distributed in the hope that it will be useful,
00015                 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016                 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017                 GNU General Public License for more details.
00018 
00019                 You should have received a copy of the GNU General Public License
00020                 along with this program; if not, write to the Free Software
00021                 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 */
00023                 
00024                 
00025 
00026 #include "vdr_remote.h"
00027                 
00028 extern vdr_remoteFrame * frame;
00029 
00030 void vdr_remoteFrame::ToggleStayOnTop(wxCommandEvent& event) 
00031 {
00034         if (event.IsChecked())
00035         {
00036                 SetWindowStyleFlag( wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxWANTS_CHARS | wxSTAY_ON_TOP);
00037         }
00038         else 
00039         {
00040                 SetWindowStyleFlag(wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxWANTS_CHARS);
00041         }
00042         Refresh();
00043         key_ok->SetFocus();
00044 }
00045  void vdr_remoteFrame::OnIconize(wxIconizeEvent& event) 
00046 {
00047         if (event.Iconized())
00048         {
00049                 frame->Hide();
00050         } 
00051         else
00052         {
00053                 // this is left empty intenionally, if we leave this out Minimize to tray doesnt seem to work reliable on Windows
00054         }
00055         
00056 }
00057 
00058 void vdr_remoteFrame::OnAbout( wxCommandEvent& WXUNUSED( event ) )
00059 {       
00060         wxMessageBox( wxT( "vdr_remote 0.4\nhttp://sourceforge.net/projects/vdr-remote-app\nCopyright (C) 2006 Peter Marquardt p_marquardt@users.sourceforge.net \nvdr_remote comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions." ),
00061                       wxT( "About vdr_remote" ), wxOK | wxICON_INFORMATION, this );
00062 }
00063 
00064 void vdr_remoteFrame::ShowHelpDlg(wxCommandEvent& event)
00065 {
00066         wxMessageBox( wxT(
00067                          "Usage\n"
00068                         "-----------\n"
00069 "You can send the remote control commands to your vdr by\n clicking on a button or by using the corresponding key command.\nKey commands are:\n"
00070                         "* 0-9 for the number keys\n* m for Menu\n* Backspace for Back\n* Return for Ok\n* Shift-Q for Power\n* , (comma) for Channel -\n* . (dot) for Channel +\n* + for Volume +\n* - for Volume -\n* s for Mute\n* F1 for Red\n* F2 for Green\n* F3 for Yellow\n* F4 for Blue\n* k for Play\n* j for Rewind\n* l for Fast Forward\n* Shift+R for Record\n* o for stop\n* u for Pause\n* p for previous\n* n for next\n* Ctrl +1 ... Ctrl + 9 for User Buttons 1-9\n\n"
00071                         "vdr disk status\n"
00072                         "------------------------\n"
00073                         "If \"Show vdr disk status\" doesn´t work or is unreliable please adjust the disk status timeout in the preference dialog to a higher value. The default setting is 750ms. Feel free to experiment with different values."
00074  ),
00075                       wxT( "vdr_remote Usage" ), wxOK | wxICON_INFORMATION, this );
00076 }
00077 void vdr_remoteFrame::OnSpinEvent(wxSpinEvent& event)
00078 {
00079         disk_status_timeout = event.GetPosition();
00080 }

Generated on Sun Nov 5 22:39:02 2006 for vdr_remote by  doxygen 1.4.6