00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <avkon.hrh>
00033 #include <aknnotewrappers.h>
00034 #include <stringloader.h>
00035 #include <GfxWorkbench.rsg>
00036 #include <f32file.h>
00037 #include <s32file.h>
00038
00039 #include "GfxWorkbench.pan"
00040 #include "GfxWorkbenchAppUi.h"
00041 #include "GfxWorkbenchAppView.h"
00042 #include "GfxWorkbench.hrh"
00043 #include "GfxVideoPlayer.h"
00044 #include "GfxDirectScreenView.h"
00045 #include "GfxDirectScreenBitmapView.h"
00046 #include "GfxBitBlitView.h"
00047 #include "GfxIclview.h"
00048
00049 _LIT( KFileName, "C:\\private\\E2E23815\\GfxWorkbench.txt" );
00050 _LIT( KText, "GFX Demo");
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 void CGfxWorkbenchAppUi::ConstructL()
00061 {
00062
00063 BaseConstructL(CAknAppUi::EAknEnableSkin);
00064
00065
00066 iAppView = CGfxWorkbenchAppView::NewL( ClientRect() );
00067 }
00068
00069
00070
00071
00072
00073 CGfxWorkbenchAppUi::CGfxWorkbenchAppUi()
00074 {
00075
00076 }
00077
00078
00079
00080
00081
00082
00083 CGfxWorkbenchAppUi::~CGfxWorkbenchAppUi()
00084 {
00085 ClearView();
00086
00087 delete iAppView,iAppView = NULL;
00088
00089 }
00090
00091
00092
00093
00094
00095
00096 void CGfxWorkbenchAppUi::HandleCommandL( TInt aCommand )
00097 {
00098 switch( aCommand )
00099 {
00100 case EEikCmdExit:
00101 case EAknSoftkeyExit:
00102 Exit();
00103 break;
00104
00105 case ECommand1:
00106 {
00107 CmdDirectScreenL();
00108 }
00109 break;
00110 case ECommand2:
00111 {
00112 CmdDirectScreenBitmapL();
00113 }
00114 break;
00115 case ECommand3:
00116 {
00117 CmdPlayVideoL();
00118 }
00119 break;
00120 case ECommand4:
00121 CmdProfileBitBlitL();
00122 break;
00123 case ECommand5:
00124 CmdIclL();
00125 break;
00126 case ECommand6:
00127 CmdDirectScreenGcL();
00128 break;
00129
00130 default:
00131 Panic( EGfxWorkbenchUi );
00132 break;
00133 }
00134 }
00135
00136 void CGfxWorkbenchAppUi::CmdPlayVideoL()
00137 {
00138 SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
00139
00140 ClearView();
00141 iVideoControl = CVideoPlayerControl::NewL(ClientRect());
00142 iVideoControl->StartL();
00143 }
00144
00145 void CGfxWorkbenchAppUi::CmdDirectScreenL()
00146 {
00147 ClearView();
00148 iDirectScreenView = CGfxDirectScreenView::NewL(ClientRect());
00149 iDirectScreenView->StartL(EFalse);
00150 }
00151
00152 void CGfxWorkbenchAppUi::CmdDirectScreenGcL()
00153 {
00154 ClearView();
00155 iDirectScreenView = CGfxDirectScreenView::NewL(ClientRect());
00156 iDirectScreenView->StartL(ETrue);
00157 }
00158
00159 void CGfxWorkbenchAppUi::CmdDirectScreenBitmapL()
00160 {
00161 ClearView();
00162 iDirectBitmapView = CGfxDirectScreenBitmapView::NewL(ClientRect());
00163 iDirectBitmapView->StartL();
00164 }
00165
00166 void CGfxWorkbenchAppUi::ClearView()
00167 {
00168 delete iDirectBitmapView,iDirectBitmapView=NULL;
00169 delete iDirectScreenView, iDirectScreenView=NULL;
00170 delete iVideoControl, iVideoControl=NULL;
00171 delete iBitBlitView, iBitBlitView=NULL;
00172 delete iIclView, iIclView=NULL;
00173 }
00174
00175 void CGfxWorkbenchAppUi::CmdProfileBitBlitL()
00176 {
00177 ClearView();
00178 iBitBlitView = CGfxBitBlitView::NewL(ClientRect());
00179 iBitBlitView->StartL();
00180 }
00181
00182 void CGfxWorkbenchAppUi::CmdIclL()
00183 {
00184 ClearView();
00185 iIclView = CGfxIclView::NewL(ClientRect());
00186 iIclView->StartL();
00187 }
00188
00189
00190
00191
00192
00193
00194
00195
00196 void CGfxWorkbenchAppUi::HandleStatusPaneSizeChange()
00197 {
00198 iAppView->SetRect( ClientRect() );
00199 }
00200
00201