|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : DirectoryLocalizerExContainer.h 00004 * Part of : DirectoryLocalizerEx 00005 * Interface : 00006 * Description : Application View class, CDirectoryLocalizerExContainer - 00007 * shows the application state on the screen 00008 * Version : 00009 * 00010 * Copyright (c) 2002-2006 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. 00014 * ============================================================================ 00015 */ 00016 #ifndef BCTEST_TEMPLATECONTAINER_H 00017 #define BCTEST_TEMPLATECONTAINER_H 00018 00019 #include <coecntrl.h> 00020 #include <CDirectoryLocalizer.h> 00021 #include <eikedwin.h> 00022 #include <f32file.h> 00023 #include <w32std.h> 00024 00025 00026 /** 00027 * container class 00028 */ 00029 class CDirectoryLocalizerExContainer: public CCoeControl 00030 { 00031 public: // constructor and destructor 00032 00033 /** 00034 * C++ default constructor. 00035 */ 00036 CDirectoryLocalizerExContainer(); 00037 00038 /** 00039 * Destructor. 00040 */ 00041 virtual ~CDirectoryLocalizerExContainer(); 00042 00043 /** 00044 * Symbian 2nd constructor. 00045 */ 00046 void ConstructL( const TRect& aRect ); 00047 00048 public: // new functions 00049 00050 /** 00051 * Set component control, and container will own the control. 00052 * @param aControl pointer to a control. 00053 */ 00054 void SetControlL( CCoeControl* aControl ); 00055 00056 /** 00057 * Delete control. 00058 */ 00059 void ResetControl(); 00060 00061 /** 00062 * Create a CDirectoryLocalizer instance, and add entries using RSS Id,user can 00063 * use SetFullPath() function by inputting a existing path as param,then the user 00064 * can get the localized name. 00065 */ 00066 void LocalizedFromResIdL(); 00067 00068 /** 00069 * Using a ResourceReader to read directory entries from RSS file, and Construct a 00070 * CDirectoryLocalizer from ResourceReader, user can use SetFullPath() function by 00071 * inputting a existing path as param, then the user can get the localized name. 00072 */ 00073 void SetupFromResRdL(); 00074 00075 /** 00076 * Construct a CDirectoryLocalizer instance from ResourceId, user can use SetFullPath() 00077 * function by inputting a existing path as param, then the user can get the localized 00078 * name. 00079 */ 00080 void SetupFromResIdL(); 00081 00082 /** 00083 * User can use the ExtraData() function after localized succefully to get the extra data from 00084 * resource structrue. 00085 */ 00086 void GetExtraDataL(); 00087 00088 /** 00089 * User can use the Icon() function after localized succefully to get the extra data from 00090 * resource structrue. 00091 */ 00092 void GetIconIndexL(); 00093 00094 00095 00096 public: // from CCoeControl 00097 00098 /** 00099 * Return count of component controls. 00100 */ 00101 TInt CountComponentControls() const; 00102 00103 /** 00104 * Return pointer to component control specified by index. 00105 * @param aIndex a index to specify a component control. 00106 */ 00107 CCoeControl* ComponentControl( TInt aIndex ) const; 00108 00109 private: // from CCoeControl 00110 00111 /** 00112 * From CCoeControl, Draw. 00113 * Fills the window's rectangle. 00114 * @param aRect Region of the control to be (re)drawn. 00115 */ 00116 void Draw( const TRect& aRect ) const; 00117 00118 private: // data 00119 00120 /** 00121 * Pointer to component control. 00122 * Own. 00123 */ 00124 CCoeControl* iControl; 00125 00126 }; 00127 00128 #endif // BCTEST_TEMPLATECONTAINER_H
|
© Nokia 2009 |