gui_setup.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 #include "vdr_remote.h"
00024 #include "buttons.h"
00025 void  vdr_remoteFrame::AddNumberButtons(wxFlexGridSizer* numeric_box)
00026 {
00027 //      wxFlexGridSizer numeric_box = new wxFlexGridSizer(3,4,2);
00028 // #ifndef __WXMSW___
00029 //      wxImage  temp = (button_1);
00030 //      temp.Scale(32,14);
00031 // #endif
00032         wxBitmapButton *key_chdo = new wxBitmapButton(main_panel,Button_ChDo,wxBitmap(button_chdo),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00033         key_chdo->SetToolTip(_("Channel Down (,)"));
00034         wxBitmapButton *key_chup = new wxBitmapButton(main_panel,Button_ChUp,wxBitmap(button_chup),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00035         key_chup->SetToolTip(_("Channel Up (.)"));
00036         wxBitmapButton *key_one = new wxBitmapButton (main_panel, Button_1,wxBitmap(button_1), wxDefaultPosition, wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00037         //wxBitmapButton *key_one = new wxBitmapButton (main_panel, Button_1,wxBitmap(temp), wxDefaultPosition, wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT),wxNO_3D);
00038         wxBitmapButton *key_two = new wxBitmapButton (main_panel, Button_2,wxBitmap(button_2),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00039         wxBitmapButton *key_three = new wxBitmapButton (main_panel, Button_3,wxBitmap(button_3),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00040         wxBitmapButton *key_four = new wxBitmapButton (main_panel, Button_4,wxBitmap(button_4),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00041         wxBitmapButton *key_five = new wxBitmapButton (main_panel,Button_5,wxBitmap(button_5),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00042         wxBitmapButton *key_six= new wxBitmapButton (main_panel, Button_6,wxBitmap(button_6),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00043         wxBitmapButton *key_seven= new wxBitmapButton (main_panel, Button_7,wxBitmap(button_7),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00044         wxBitmapButton *key_eight = new wxBitmapButton (main_panel, Button_8,wxBitmap(button_8),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00045         wxBitmapButton *key_nine = new wxBitmapButton (main_panel, Button_9,wxBitmap(button_9),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00046         wxBitmapButton *key_zero= new wxBitmapButton (main_panel, Button_0,wxBitmap(button_0),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00047         wxBitmapButton *key_prefs= new wxBitmapButton (main_panel, wxID_PREFERENCES,wxBitmap(button_preferences),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00048         wxBitmapButton *key_power = new wxBitmapButton(main_panel,Button_Power,wxBitmap(button_power),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00049         key_power->SetToolTip(_("Power (Shift + Q)"));
00050         numeric_box->Add(key_prefs);
00051         numeric_box->AddStretchSpacer();
00052         numeric_box->Add(key_power);    
00053         
00054         numeric_box->AddStretchSpacer();
00055         numeric_box->AddStretchSpacer();
00056         numeric_box->AddStretchSpacer();
00057         
00058         numeric_box->Add(key_one);
00059         numeric_box->Add(key_two);      
00060         numeric_box->Add(key_three);    
00061         
00062         numeric_box->Add(key_four);     
00063         numeric_box->Add(key_five);     
00064         numeric_box->Add(key_six);      
00065         
00066         numeric_box->Add(key_seven);    
00067         numeric_box->Add(key_eight);    
00068         numeric_box->Add(key_nine);     
00069         
00070         numeric_box->Add(key_chdo);     
00071         numeric_box->Add(key_zero);     
00072         numeric_box->Add(key_chup);     
00073         
00074         return;
00075 }
00076 
00077 void  vdr_remoteFrame::AddUserButtons(wxFlexGridSizer* userbuttons_box)
00078 {
00079         wxBitmapButton *key_user1= new wxBitmapButton (main_panel, Button_User1,wxBitmap(button_u1),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00080         key_user1->SetToolTip(my_user_button_titles[1] + _(" (Ctrl + 1)"));
00081         wxBitmapButton *key_user2= new wxBitmapButton (main_panel, Button_User2,wxBitmap(button_u2),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00082         key_user2->SetToolTip(my_user_button_titles[2] + _(" (Ctrl + 2)"));
00083         wxBitmapButton *key_user3= new wxBitmapButton (main_panel, Button_User3,wxBitmap(button_u3),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00084         key_user3->SetToolTip(my_user_button_titles[3] + _(" (Ctrl + 3)"));
00085         wxBitmapButton *key_user4= new wxBitmapButton (main_panel, Button_User4,wxBitmap(button_u4),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00086         key_user4->SetToolTip(my_user_button_titles[4] + _(" (Ctrl + 4)"));
00087         wxBitmapButton *key_user5= new wxBitmapButton (main_panel, Button_User5,wxBitmap(button_u5),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00088         key_user5->SetToolTip(my_user_button_titles[5] + _(" (Ctrl + 5)"));
00089         wxBitmapButton *key_user6= new wxBitmapButton (main_panel, Button_User6,wxBitmap(button_u6),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00090         key_user6->SetToolTip(my_user_button_titles[6] + _("(Ctrl + 6)"));
00091         wxBitmapButton *key_user7= new wxBitmapButton (main_panel, Button_User7,wxBitmap(button_u7),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00092         key_user7->SetToolTip(my_user_button_titles[7] + _(" (Ctrl + 7)"));
00093         wxBitmapButton *key_user8= new wxBitmapButton (main_panel, Button_User8,wxBitmap(button_u8),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00094         key_user8->SetToolTip(my_user_button_titles[8] + _(" (Ctrl + 8)"));
00095         wxBitmapButton *key_user9= new wxBitmapButton (main_panel, Button_User9,wxBitmap(button_u9),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00096         key_user9->SetToolTip(my_user_button_titles[9] + _(" (Ctrl + 9)"));
00097         userbuttons_box->Add(key_user1);
00098         userbuttons_box->Add(key_user2);
00099         userbuttons_box->Add(key_user3);
00100         userbuttons_box->Add(key_user4);
00101         userbuttons_box->Add(key_user5);
00102         userbuttons_box->Add(key_user6);
00103         userbuttons_box->Add(key_user7);
00104         userbuttons_box->Add(key_user8);
00105         userbuttons_box->Add(key_user9);
00106         return;
00107 }
00108 
00109 void  vdr_remoteFrame::AddExtendedButtons(wxFlexGridSizer* extended_keys_box)
00110 {
00111         wxBitmapButton *key_schedule= new wxBitmapButton (main_panel, Button_Schedule,wxBitmap(button_schedule),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00112         key_schedule->SetToolTip(_("Schedule"));
00113         wxBitmapButton *key_audio= new wxBitmapButton (main_panel, Button_Audio,wxBitmap(button_audio),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00114         key_audio->SetToolTip(_("Audio"));
00115         wxBitmapButton *key_info= new wxBitmapButton (main_panel, Button_Info,wxBitmap(button_info),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00116         key_info->SetToolTip(_("Info"));
00117         wxBitmapButton *key_recordings= new wxBitmapButton (main_panel, Button_Recordings,wxBitmap(button_recordings),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00118         key_recordings->SetToolTip(_("Recordings"));
00119         wxBitmapButton *key_timers= new wxBitmapButton (main_panel, Button_Timers,wxBitmap(button_timers),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00120         key_timers->SetToolTip(_("Timers"));
00121         wxBitmapButton *key_commands= new wxBitmapButton (main_panel, Button_Commands,wxBitmap(button_commands),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00122         key_commands->SetToolTip(_("Commands"));
00123         wxBitmapButton *key_setup= new wxBitmapButton (main_panel, Button_Setup,wxBitmap(button_setup),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00124         key_setup->SetToolTip(_("Setup"));
00125         wxBitmapButton *key_channels= new wxBitmapButton (main_panel, Button_Channels,wxBitmap(button_channels),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00126         key_channels->SetToolTip(_("Channels"));
00127         
00128         extended_keys_box->Add(key_channels);
00129         extended_keys_box->Add(key_schedule);
00130         extended_keys_box->Add(key_info);
00131         extended_keys_box->Add(key_audio);
00132         
00133         extended_keys_box->Add(key_recordings);
00134         extended_keys_box->Add(key_timers);
00135         extended_keys_box->Add(key_commands);
00136         extended_keys_box->Add(key_setup);
00137         return;
00138 }
00139 
00140 void  vdr_remoteFrame::AddPlayerButtons(wxFlexGridSizer* player_box)
00141 {
00142         wxBitmapButton *key_play= new wxBitmapButton (main_panel, Button_Play,wxBitmap(button_play),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00143         key_play->SetToolTip(_("Play (K)"));
00144         wxBitmapButton *key_pause= new wxBitmapButton (main_panel, Button_Pause,wxBitmap(button_pause),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00145         key_pause->SetToolTip(_("Pause (U)"));
00146         wxBitmapButton *key_ffwd= new wxBitmapButton (main_panel, Button_Ffwd,wxBitmap(button_ffwd),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00147         key_ffwd->SetToolTip(_("Fast Forward (L)"));
00148         wxBitmapButton *key_rew= new wxBitmapButton (main_panel, Button_Rew,wxBitmap(button_rew),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00149         key_rew->SetToolTip(_("Rewind (J)"));
00150         wxBitmapButton *key_rec= new wxBitmapButton (main_panel, Button_Rec,wxBitmap(button_rec),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00151         key_rec->SetToolTip(_("Record (Shift + R)"));
00152         wxBitmapButton *key_stop= new wxBitmapButton (main_panel, Button_Stop,wxBitmap(button_stop),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00153         key_stop->SetToolTip(_("Stop (O)"));
00154         wxBitmapButton *key_next= new wxBitmapButton (main_panel, Button_Next,wxBitmap(button_next),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00155         key_next->SetToolTip(_("Next (N)"));
00156         wxBitmapButton *key_prev= new wxBitmapButton (main_panel, Button_Prev,wxBitmap(button_prev),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH, NORMAL_BUTTON_HEIGHT));
00157         key_prev->SetToolTip(_("Previous (P)"));
00158                 
00159         player_box->Add(key_rew);
00160         player_box->Add(key_pause);
00161         player_box->Add(key_play);
00162         player_box->Add(key_ffwd);
00163                 
00164         player_box->Add(key_prev);
00165         player_box->Add(key_stop);
00166         player_box->Add(key_rec);
00167         player_box->Add(key_next);
00168         return;                                 
00169 }
00170 
00171 void  vdr_remoteFrame::AddColourButtons(wxFlexGridSizer* col_box)
00172 {
00173         wxBitmapButton *key_red = new wxBitmapButton(main_panel,Button_Red,wxBitmap(button_red),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00174         key_red->SetToolTip(_("Red (F1)"));
00175         wxBitmapButton *key_green = new wxBitmapButton(main_panel,Button_Green,wxBitmap(button_green),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00176         key_green->SetToolTip(_("Green (F2)"));
00177         wxBitmapButton *key_yellow = new wxBitmapButton(main_panel,Button_Yellow,wxBitmap(button_yellow),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00178         key_yellow->SetToolTip(_("Yellow (F3)"));
00179         wxBitmapButton *key_blue = new wxBitmapButton(main_panel,Button_Blue,wxBitmap(button_blue),wxDefaultPosition,wxSize(SMALL_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00180         key_blue->SetToolTip(_("Blue (F4)"));
00181         col_box->Add(key_red);
00182         col_box->Add(key_green);
00183         col_box->Add(key_yellow);
00184         col_box->Add(key_blue);
00185         return;
00186 }
00187 void  vdr_remoteFrame::AddMenuButtons(wxFlexGridSizer* menu_box)
00188 {
00189         wxBitmapButton *key_menu = new wxBitmapButton(main_panel,Button_Menu,wxBitmap(button_menu),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00190         key_menu->SetToolTip(_("Menu (M)"));
00191         key_ok = new wxBitmapButton(main_panel,Button_OK,wxBitmap(button_ok),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00192         key_ok->SetToolTip(_("OK (Return)"));
00193         wxBitmapButton *key_volup = new wxBitmapButton(main_panel,Button_Volup,wxBitmap(button_volup),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00194         key_volup->SetToolTip(_("Volume Up (+)"));
00195         wxBitmapButton *key_voldown = new wxBitmapButton(main_panel,Button_Voldown,wxBitmap(button_voldo),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00196         key_voldown->SetToolTip(_("Volume Down (-)"));
00197 
00198         wxBitmapButton *key_mute = new wxBitmapButton(main_panel,Button_Mute,wxBitmap(button_mute),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00199         key_mute->SetToolTip(_("Mute (S)"));
00200         wxBitmapButton *key_back = new wxBitmapButton(main_panel,Button_Back,wxBitmap(button_back),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00201         key_back->SetToolTip(_("Back (Backspace)"));
00202         wxBitmapButton *key_up = new wxBitmapButton(main_panel,Button_Up,wxBitmap(button_up),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00203         wxBitmapButton *key_left = new wxBitmapButton(main_panel,Button_Left,wxBitmap(button_left),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00204         wxBitmapButton *key_right = new wxBitmapButton(main_panel,Button_Right,wxBitmap(button_right),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00205         wxBitmapButton *key_down = new wxBitmapButton(main_panel,Button_Down,wxBitmap(button_down),wxDefaultPosition,wxSize(LARGE_BUTTON_WIDTH,NORMAL_BUTTON_HEIGHT));
00206 
00207         menu_box->AddStretchSpacer();
00208         menu_box->Add(key_up);
00209         menu_box->AddStretchSpacer();
00210         
00211         menu_box->Add(key_left);
00212         menu_box->Add(key_ok);
00213         menu_box->Add(key_right);
00214         
00215         menu_box->AddStretchSpacer();
00216         menu_box->Add(key_down);
00217         menu_box->AddStretchSpacer();
00218         
00219         menu_box->Add(key_menu);
00220         menu_box->AddStretchSpacer();
00221         menu_box->Add(key_back);
00222         
00223         menu_box->AddStretchSpacer();   
00224         menu_box->AddStretchSpacer();
00225         menu_box->AddStretchSpacer();
00226                 
00227         menu_box->Add(key_voldown);
00228         menu_box->Add(key_mute);
00229         menu_box->Add(key_volup);
00230         return;
00231 }

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