Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CE32FrodoAppUi Class Reference

#include <e32frodo.h>

Collaboration diagram for CE32FrodoAppUi:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void ConstructL ()
 CE32FrodoAppUi ()
 ~CE32FrodoAppUi ()
void SetPauseState ()
CE32FrodoDocumentE32FrodoDocPtr ()
void ViewToolbar (TBool aView)

Public Attributes

CE32FrodoAppViewiAppView
int keystate [256]
TUint8 rev_matrix [8]
TUint8 key_matrix [8]
TUint8 iJoyKey
TBuf8< 256 > iCurrentFile
 contains the filename (e.g. snapshot, prefs, d64, etc)

TSnapShotState iSnapState
 contains the state of snap shotting (idle, load, save)


Private Member Functions

virtual void DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
virtual void SetEmphasis (CCoeControl *aMenuControl, TBool aEmphasis)
virtual void HandleForegroundEventL (TBool aForeground)
virtual void HandleCommandL (TInt aCommand)
void SetFullScreenModeL (TBool aFullScreenMode)
virtual void OpenFileL (const TDesC &aFileName)
virtual TBool ProcessCommandParametersL (TApaCommand aCommand, TFileName &aDocumentName, const TDesC8 &)
void HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
void StartHelpL ()
void StopHelpL ()

Private Attributes

TInt iLastC64KeyBuf [KKeyBufSize]
TInt iLastC64KeyBufIx
TInt iLastCommand
 last command that was handled

TInt iMoveRate
 number of pixels to move the screen


Detailed Description

CE32FrodoAppUi - this class handles the input

Definition at line 127 of file e32frodo.h.


Constructor & Destructor Documentation

CE32FrodoAppUi::CE32FrodoAppUi  ) 
 

Constructor

Definition at line 197 of file e32frodo.cpp.

CE32FrodoAppUi::~CE32FrodoAppUi  ) 
 

Dtor

Definition at line 246 of file e32frodo.cpp.

References DTOR, iAppView, and StopHelpL().


Member Function Documentation

void CE32FrodoAppUi::ConstructL  ) 
 

safe constructor

Todo:
check why we do this

check why we do this

move to ctor init list

Definition at line 206 of file e32frodo.cpp.

References CE32FrodoAppView::ConstructL(), CTOR, E32FrodoDocPtr(), CE32FrodoDocument::FrodoPtr(), iAppView, CE32FrodoAppView::iFullScreenMode, iJoyKey, iLastC64KeyBufIx, Prefs::iShowToolbar, Frodo::TheC64, C64::ThePrefs, and ViewToolbar().

void CE32FrodoAppUi::DynInitMenuPaneL TInt  aResourceId,
CEikMenuPane *  aMenuPane
[private, virtual]
 

Dynamically initialises a menu pane. The Uikon framework calls this function, if it is implemented in a menus observer, immediately before the menu pane is activated. Typically this function should inquire the value of application data, and initialise menu items accordingly. This includes dimming menu items, changing their text, setting the state of checked items and radio buttons and dynamically adding items to a menu.

Parameters:
aResourceId Resource ID identifying the main menu pane to initialise.
aMenuPane In/out. Pointer to the menu pane.

Definition at line 259 of file e32frodo.cpp.

References iAppView, CE32FrodoAppView::iFullScreenMode, CE32FrodoAppView::iIsC64ScreenStretched, CE32FrodoAppView::iIsC64ScreenZoomed, CE32FrodoAppView::iPauseFromUi, and SetPauseState().

CE32FrodoDocument* CE32FrodoAppUi::E32FrodoDocPtr  )  [inline]
 

Definition at line 154 of file e32frodo.h.

Referenced by ConstructL(), HandleCommandL(), SetFullScreenModeL(), and SetPauseState().

void CE32FrodoAppUi::HandleCommandL TInt  aCommand  )  [private, virtual]
 

Handle commands from the Toolbar (prefs, pause, reset, limit, ...)

pre

handle the command now

post

Definition at line 352 of file e32frodo.cpp.

References _LIT(), DISPLAY_Y, E32FrodoDocPtr(), ELOG, ELOG2, ELOG3, ESnapShotLoad, ESnapShotSave, CE32FrodoDocument::FrodoPtr(), iAppView, iCurrentFile, CE32FrodoAppView::iFullScreenMode, CE32FrodoAppView::iIsC64ScreenStretched, CE32FrodoAppView::iIsC64ScreenZoomed, iLastCommand, iMoveRate, CE32FrodoAppView::iNormalScreenOffset, CE32FrodoAppView::iOffset, CE32FrodoAppView::iPause, CE32FrodoAppView::iPauseFromUi, CE32FrodoAppView::iScreenSize, iSnapState, CE32FrodoAppView::iStretchedScreenOffset, CE32FrodoAppView::iZoomedScreenOffset, KCmdLiteralTable, Prefs::LimitSpeed, OFFSET_X, C64::Quit(), C64::Reset(), SetFullScreenModeL(), SetPauseState(), StartHelpL(), Frodo::TheC64, C64::ThePrefs, and CE32FrodoAppView::UpdateDrawPositions().

void CE32FrodoAppUi::HandleForegroundEventL TBool  aForeground  )  [private, virtual]
 

Handle a foreground event

Definition at line 311 of file e32frodo.cpp.

References iAppView, CE32FrodoAppView::iPauseFromUi, and SetPauseState().

void CE32FrodoAppUi::HandleKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[private]
 

Handle a key event

Todo:
simplify this function a bit

Definition at line 740 of file e32frodo.cpp.

References iAppView, CE32FrodoAppView::iBgUpdate, iJoyKey, iLastC64KeyBuf, iLastC64KeyBufIx, key_matrix, keystate, KKeyBufSize, rev_matrix, and C64Display::VirtKey2C64().

void CE32FrodoAppUi::OpenFileL const TDesC &  aFileName  )  [private, virtual]
 

called by EIKON framework when user taps on e.g. Frodo snapshot files we could handle more types here if we want, for example prefs files, .d64 .d64.gz .t64 .t64.gz etc...

Definition at line 666 of file e32frodo.cpp.

References ELOG2, ESnapShotLoad, iCurrentFile, and iSnapState.

TBool CE32FrodoAppUi::ProcessCommandParametersL TApaCommand  aCommand,
TFileName &  aDocumentName,
const TDesC8 & 
[private, virtual]
 

called by EIKON framework during application startup. The variable aDocumentName contains the name of the file that the user tapped on in shell.

Some helpful info here:

http://www2.epocworld.com/kbcppf.nsf/ce9a3a52e9d969788025670e00429dbd/df4f1b9d4146e6d3802569f3005eabf4?OpenDocument

Headline: Why does CMyAppUi::ProcessCommandParametersL() not seem to get called on V6 of the Symbian Platform? Category: Application architecture EPOC Release: ER6 KeyWords: Application architecture, Porting, ProcessCommandParametersL, Document, File names Report: Why does CMyAppUi::ProcessCommandParametersL() not seem to get called on V6 of the Symbian Platform? Answer:

This can often catch you out when porting code from ER5 to V6. The function:

TBool CMyAppUi::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aDocumentName,const TDesC&)

on ER5 must be coded as:

TBool CMyAppUi::ProcessCommandParametersL(TApaCommand aCommand,TFileName& aDocumentName,const TDesC8& )

on V6 otherwise it will not get called.

Definition at line 685 of file e32frodo.cpp.

References ELOG3, ESnapShotLoad, iCurrentFile, and iSnapState.

void CE32FrodoAppUi::SetEmphasis CCoeControl *  aMenuControl,
TBool  aEmphasis
[private, virtual]
 

called by Eikon when exiting menu (?)

Definition at line 301 of file e32frodo.cpp.

References iAppView, CE32FrodoAppView::iPauseFromUi, and SetPauseState().

void CE32FrodoAppUi::SetFullScreenModeL TBool  aFullScreenMode  )  [private]
 

Set the full screen mode

Definition at line 643 of file e32frodo.cpp.

References E32FrodoDocPtr(), CE32FrodoDocument::FrodoPtr(), iAppView, CE32FrodoAppView::iFullScreenMode, Prefs::iShowToolbar, Frodo::TheC64, C64::ThePrefs, and ViewToolbar().

Referenced by HandleCommandL().

void CE32FrodoAppUi::SetPauseState  ) 
 

set the pause state of the emulation

Definition at line 892 of file e32frodo.cpp.

References E32FrodoDocPtr(), CE32FrodoDocument::FrodoPtr(), iAppView, CE32FrodoAppView::iPause, CE32FrodoAppView::iPauseFromUi, C64::Paused(), Frodo::TheC64, and C64::TogglePause().

Referenced by DynInitMenuPaneL(), HandleCommandL(), HandleForegroundEventL(), and SetEmphasis().

void CE32FrodoAppUi::StartHelpL  )  [private]
 

Definition at line 916 of file e32frodo.cpp.

Referenced by HandleCommandL().

void CE32FrodoAppUi::StopHelpL  )  [private]
 

Definition at line 960 of file e32frodo.cpp.

Referenced by ~CE32FrodoAppUi().

void CE32FrodoAppUi::ViewToolbar TBool  aView  ) 
 

set toolbar visible or not

Definition at line 1003 of file e32frodo.cpp.

References iAppView.

Referenced by ConstructL(), and SetFullScreenModeL().


Member Data Documentation

CE32FrodoAppView* CE32FrodoAppUi::iAppView
 

Definition at line 156 of file e32frodo.h.

Referenced by ConstructL(), DynInitMenuPaneL(), HandleCommandL(), HandleForegroundEventL(), HandleKeyEventL(), DigitalRenderer::reset_sync(), SetEmphasis(), SetFullScreenModeL(), SetPauseState(), ViewToolbar(), and ~CE32FrodoAppUi().

TBuf8<256> CE32FrodoAppUi::iCurrentFile
 

contains the filename (e.g. snapshot, prefs, d64, etc)

Definition at line 166 of file e32frodo.h.

Referenced by HandleCommandL(), OpenFileL(), and ProcessCommandParametersL().

TUint8 CE32FrodoAppUi::iJoyKey
 

Definition at line 164 of file e32frodo.h.

Referenced by ConstructL(), and HandleKeyEventL().

TInt CE32FrodoAppUi::iLastC64KeyBuf[KKeyBufSize] [private]
 

Definition at line 172 of file e32frodo.h.

Referenced by HandleKeyEventL().

TInt CE32FrodoAppUi::iLastC64KeyBufIx [private]
 

Definition at line 173 of file e32frodo.h.

Referenced by ConstructL(), and HandleKeyEventL().

TInt CE32FrodoAppUi::iLastCommand [private]
 

last command that was handled

Definition at line 174 of file e32frodo.h.

Referenced by HandleCommandL().

TInt CE32FrodoAppUi::iMoveRate [private]
 

number of pixels to move the screen

Definition at line 175 of file e32frodo.h.

Referenced by HandleCommandL().

TSnapShotState CE32FrodoAppUi::iSnapState
 

contains the state of snap shotting (idle, load, save)

Definition at line 167 of file e32frodo.h.

Referenced by HandleCommandL(), OpenFileL(), and ProcessCommandParametersL().

TUint8 CE32FrodoAppUi::key_matrix[8]
 

Definition at line 163 of file e32frodo.h.

Referenced by HandleKeyEventL(), and C64Display::ResetKeyboardState().

int CE32FrodoAppUi::keystate[256]
 

Definition at line 161 of file e32frodo.h.

Referenced by HandleKeyEventL(), and C64Display::ResetKeyboardState().

TUint8 CE32FrodoAppUi::rev_matrix[8]
 

Definition at line 162 of file e32frodo.h.

Referenced by HandleKeyEventL(), and C64Display::ResetKeyboardState().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:11:39 2005 for E32frodo by doxygen 1.3.3