|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <LandmarksContainerBase.h>
Inheritance diagram for CLandmarksContainerBase:

Public Member Functions | |
| ~CLandmarksContainerBase () | |
| TBool | IsItemSelected () |
| TInt | CountComponentControls () const |
| CCoeControl * | ComponentControl (TInt aIndex) const |
| void | SizeChanged () |
| void | HandleResourceChange (TInt aType) |
| void | NotifyDbEventL (TPosLmEvent &aEvent, TInt aErrorCode)=0 |
| void | NotifyOperationProgressL (TOperation aOperation, TInt aProgress, TInt aErrorCode)=0 |
Protected Member Functions | |
| CLandmarksContainerBase (CAknView &aView, CLandmarksApplicationEngine &aEngine) | |
| void | ConstructL (const TRect &aRect) |
Protected Attributes | |
| CLandmarksListBox * | iListBox |
| the control used to display icons and descriptors. | |
| CAknSearchField * | iFindBox |
| the control used to display a search field. | |
| CAknView & | iView |
| parent view | |
| CLandmarksApplicationEngine & | iEngine |
| the application engine used for accessing landmarks | |
| HBufC * | iOldFilter |
| a buffer containing the last descriptor in the find box. | |
Private Member Functions | |
| void | CreateFindBoxL () |
| void | CreateListBoxL () |
Definition at line 36 of file LandmarksContainerBase.h.
|
|
Destructor Definition at line 59 of file LandmarksContainerBase.cpp. References iFindBox, iListBox, and iOldFilter. 00060 { 00061 delete iListBox; 00062 delete iFindBox; 00063 delete iOldFilter; 00064 }
|
|
||||||||||||
|
C++ default constructor.
Definition at line 35 of file LandmarksContainerBase.cpp.
|
|
|
Indicates whether a listbox item is selected or not. Definition at line 72 of file LandmarksContainerBase.cpp. References iListBox. 00073 { 00074 return (iListBox->CurrentItemIndex() >= 0); 00075 }
|
|
|
Gets the number of controls contained in a compound control
Definition at line 83 of file LandmarksContainerBase.cpp. References iFindBox, and iListBox. 00084 { 00085 TInt count = 0; 00086 if (iListBox) 00087 { 00088 count++; 00089 } 00090 if (iFindBox) 00091 { 00092 count++; 00093 } 00094 00095 return count; // Return the number of controls inside this container. 00096 }
|
|
|
Gets the specified component
Definition at line 104 of file LandmarksContainerBase.cpp. References iFindBox, and iListBox. 00105 { 00106 switch (aIndex) 00107 { 00108 case 0: 00109 return iListBox; // Returns the pointer to listbox object. 00110 case 1: 00111 return iFindBox; // Returns the pointer to findbox object. 00112 default: 00113 return NULL; // Exception : Returns NULL. 00114 } 00115 }
|
|
|
Called by framework when the view size is changed. Definition at line 167 of file LandmarksContainerBase.cpp. References iFindBox, and iListBox. 00168 { 00169 // Set list box size. 00170 //iListBox->SetRect(Rect()); 00171 iListBox->SizeChanged(); 00172 00173 // Set find box size. 00174 AknFind::HandleFixedFindSizeChanged(this, iListBox, iFindBox); 00175 }
|
|
|
Reacts to screen size change Definition at line 183 of file LandmarksContainerBase.cpp. References iView. 00184 { 00185 CCoeControl::HandleResourceChange(aType); 00186 if ( aType == KEikDynamicLayoutVariantSwitch ) 00187 { 00188 SetRect(iView.ClientRect()); 00189 } 00190 }
|
|
||||||||||||
|
Notifies that an event has occurred in the default landmark database.
Implements MLandmarksDbObserver. Implemented in CLandmarksCategoriesContainer, and CLandmarksContainer. |
|
||||||||||||||||
|
Notifies the progress and status of an asynchronous operation.
Implements MLandmarksOperationObserver. Implemented in CLandmarksCategoriesContainer, and CLandmarksContainer. |
|
|
Performs the second phase construction of a CLandmarksContainerBase object. Should be called by subclasses.
Reimplemented in CLandmarksCategoriesContainer, and CLandmarksContainer. Definition at line 47 of file LandmarksContainerBase.cpp. References CreateFindBoxL(), and CreateListBoxL(). 00048 { 00049 CreateWindowL(); 00050 00051 CreateListBoxL(); 00052 CreateFindBoxL(); 00053 00054 SetRect(aRect); 00055 ActivateL(); 00056 }
|
|
|
Creates the find box. Definition at line 123 of file LandmarksContainerBase.cpp. References iFindBox, iListBox, iOldFilter, and CLandmarksListBox::Model(). 00124 { 00125 // Sets style of findbox. 00126 CAknSearchField::TSearchFieldStyle style(CAknSearchField::ESearch); 00127 00128 // Creates FindBox. 00129 CGulIcon* defaultIcon = NULL; 00130 iFindBox = CAknSearchField::NewL( 00131 *this, style, defaultIcon, KPosLmMaxTextFieldLength); 00132 00133 // Creates a filter (CAknListBoxFilterItems instance). This filter is not 00134 // used in this app but the CAknSearchField class MUST have a filter 00135 // anyway. The filter is bypassed by the CLandmarksListBoxModel class. 00136 iListBox->Model()->CreateFilterL(iListBox, iFindBox); 00137 00138 // Initialize filter buffer 00139 iOldFilter = HBufC::NewL(0); 00140 }
|
|
|
Creates the listbox. Definition at line 148 of file LandmarksContainerBase.cpp. References CLandmarksListBox::ConstructL(), and iListBox. 00149 { 00150 // Create a control to display a list of descriptors 00151 iListBox = new (ELeave) CLandmarksListBox(); 00152 iListBox->SetContainerWindowL(*this); 00153 iListBox->ConstructL(this, CEikListBox::ELoopScrolling); 00154 00155 // Create scrollbars 00156 CEikScrollBarFrame* scrollBar = iListBox->CreateScrollBarFrameL(ETrue); 00157 scrollBar->SetScrollBarVisibilityL( 00158 CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); 00159 }
|
|
© Nokia 2006 |