53 void Set(TInt aValue); |
53 void Set(TInt aValue); |
54 bool Modified() const{return mFlags.mModified;} |
54 bool Modified() const{return mFlags.mModified;} |
55 void SetModified(bool aModified){mFlags.mModified = aModified;} |
55 void SetModified(bool aModified){mFlags.mModified = aModified;} |
56 bool Valid() const{return mFlags.mValid;} |
56 bool Valid() const{return mFlags.mValid;} |
57 void SetValid(bool aValid){mFlags.mValid = aValid;} |
57 void SetValid(bool aValid){mFlags.mValid = aValid;} |
|
58 bool IsNullAction() const{return mFlags.mNullAction;} |
|
59 void SetNullAction(bool aNull){mFlags.mNullAction = aNull;} |
58 TType Type() const{return mType;} |
60 TType Type() const{return mType;} |
59 void SetType(TType aType){mType = aType;} |
61 void SetType(TType aType){mType = aType;} |
60 private: |
62 private: |
61 TType mType; |
63 TType mType; |
62 union { |
64 union { |
63 TInt mInt; |
65 TInt mInt; |
64 HBufC *mString; |
66 HBufC *mString; |
65 } mValue; |
67 } mValue; |
66 struct { |
68 struct { |
|
69 bool mNullAction:1; // marks action (button) null |
67 bool mValid:1; // property value has has been set |
70 bool mValid:1; // property value has has been set |
68 bool mModified:1; // property has been modified |
71 bool mModified:1; // property has been modified |
69 } mFlags; |
72 } mFlags; |
70 }; |
73 }; |
71 |
74 |
73 { |
76 { |
74 public: |
77 public: |
75 enum TPropertyId { |
78 enum TPropertyId { |
76 EFirstIntProperty, |
79 EFirstIntProperty, |
77 EType = EFirstIntProperty, |
80 EType = EFirstIntProperty, |
78 EIconAlignment, |
|
79 EIconVisible, |
81 EIconVisible, |
80 ETimeout, |
82 ETimeout, |
81 EDismissPolicy, |
83 EDismissPolicy, |
82 EAcceptNull, |
84 ELastIntProperty = EDismissPolicy, |
83 ERejectNull, |
|
84 ELastIntProperty = ERejectNull, |
|
85 EFirstStringProperty, |
85 EFirstStringProperty, |
86 EText = EFirstStringProperty, |
86 EText = EFirstStringProperty, |
87 EIconName, |
87 EIconName, |
88 EAcceptText, |
88 EAcceptText, |
89 ERejectText, |
89 ERejectText, |
90 EAnimationDefinition, |
90 EAnimationDefinition, |
91 ELastStringProperty = EAnimationDefinition, |
91 ELastStringProperty = EAnimationDefinition, |
92 ENumProperties |
92 ENumProperties |
93 }; |
93 }; |
94 |
|
95 void ConstructL(CHbDeviceMessageBoxSymbian::TType aType, |
94 void ConstructL(CHbDeviceMessageBoxSymbian::TType aType, |
96 MHbDeviceMessageBoxObserver *aObserver); |
95 MHbDeviceMessageBoxObserver *aObserver); |
97 ~CHbDeviceMessageBoxPrivate(); |
96 ~CHbDeviceMessageBoxPrivate(); |
98 void InitProperties(CHbDeviceMessageBoxSymbian::TType aType); |
97 void InitProperties(CHbDeviceMessageBoxSymbian::TType aType); |
99 bool PropertiesModified(TInt aIgnoreMask) const; |
98 bool PropertiesModified(TInt aIgnoreMask) const; |
104 void SendToServerL(bool aShow = false); |
103 void SendToServerL(bool aShow = false); |
105 void Close(); |
104 void Close(); |
106 bool WaitForClosed(); |
105 bool WaitForClosed(); |
107 static const TPtrC PropertyName(TPropertyId aId); |
106 static const TPtrC PropertyName(TPropertyId aId); |
108 static TPropertyId ButtonPropertyId(TPropertyId aId, CHbDeviceMessageBoxSymbian::TButtonId aButtonId); |
107 static TPropertyId ButtonPropertyId(TPropertyId aId, CHbDeviceMessageBoxSymbian::TButtonId aButtonId); |
|
108 static HBufC *CreateActionDataLC(TBool aNull, const TDesC &text); |
109 |
109 |
110 public: // MHbDeviceDialogObserver |
110 public: // MHbDeviceDialogObserver |
111 void DataReceived(CHbSymbianVariantMap& aData); |
111 void DataReceived(CHbSymbianVariantMap& aData); |
112 void DeviceDialogClosed(TInt aCompletionCode); |
112 void DeviceDialogClosed(TInt aCompletionCode); |
113 |
113 |
244 TMessageBoxProperty::EStringProperty : TMessageBoxProperty::EIntProperty); |
245 TMessageBoxProperty::EStringProperty : TMessageBoxProperty::EIntProperty); |
245 } |
246 } |
246 |
247 |
247 // Set properties to default values |
248 // Set properties to default values |
248 mProperties[EType].Set(aType); |
249 mProperties[EType].Set(aType); |
249 const TInt alignCenter = 0x0080 | 0x0004; // Qt::AlignCenter |
|
250 mProperties[EIconAlignment].Set(alignCenter); |
|
251 mProperties[EIconVisible].Set(ETrue); |
250 mProperties[EIconVisible].Set(ETrue); |
252 |
251 |
253 switch(aType) { |
252 switch(aType) { |
254 case CHbDeviceMessageBoxSymbian::EInformation: |
253 case CHbDeviceMessageBoxSymbian::EInformation: |
255 case CHbDeviceMessageBoxSymbian::EWarning: { |
254 case CHbDeviceMessageBoxSymbian::EWarning: { |
256 const TInt KStandardTimeout = 3000; // 3s |
255 const TInt KStandardTimeout = 3000; // 3s |
257 mProperties[ETimeout].Set(KStandardTimeout); |
256 mProperties[ETimeout].Set(KStandardTimeout); |
258 const TInt KTapAnywhere = 0x03; // HbPopup::TapAnywhere |
257 const TInt KTapAnywhere = 0x03; // HbPopup::TapAnywhere |
259 mProperties[EDismissPolicy].Set(KTapAnywhere); |
258 mProperties[EDismissPolicy].Set(KTapAnywhere); |
260 |
259 |
261 // Plugin sets accept button by default |
260 // Plugin has accept button by default |
262 mProperties[ERejectNull].Set(true); |
261 mProperties[ERejectText].SetNullAction(true); |
263 mProperties[ERejectNull].SetModified(false); |
|
264 mProperties[ERejectNull].SetValid(false); |
|
265 break; |
262 break; |
266 } |
263 } |
267 case CHbDeviceMessageBoxSymbian::EQuestion: { |
264 case CHbDeviceMessageBoxSymbian::EQuestion: { |
268 const TInt KNoTimeout = 0; |
265 const TInt KNoTimeout = 0; |
269 mProperties[ETimeout].Set(KNoTimeout); |
266 mProperties[ETimeout].Set(KNoTimeout); |
301 |
298 |
302 // Set button null property value |
299 // Set button null property value |
303 void CHbDeviceMessageBoxPrivate::SetButtonNull(CHbDeviceMessageBoxSymbian::TButtonId aButtonId, |
300 void CHbDeviceMessageBoxPrivate::SetButtonNull(CHbDeviceMessageBoxSymbian::TButtonId aButtonId, |
304 bool aValue) |
301 bool aValue) |
305 { |
302 { |
306 TPropertyId id = ButtonPropertyId(EAcceptNull, aButtonId); |
303 TPropertyId id = ButtonPropertyId(EAcceptText, aButtonId); |
307 mProperties[id].Set(aValue); |
304 mProperties[id].SetNullAction(aValue); |
|
305 mProperties[id].SetValid(true); |
|
306 mProperties[id].SetModified(true); |
308 } |
307 } |
309 |
308 |
310 // Set button text property |
309 // Set button text property |
311 void CHbDeviceMessageBoxPrivate::SetButtonTextL( |
310 void CHbDeviceMessageBoxPrivate::SetButtonTextL( |
312 CHbDeviceMessageBoxSymbian::TButtonId aButtonId, const TDesC &aValue) |
311 CHbDeviceMessageBoxSymbian::TButtonId aButtonId, const TDesC &aValue) |
321 // If this is update but ShowL() has not been called, return. |
320 // If this is update but ShowL() has not been called, return. |
322 if (!aShow && !mShowCalled) { |
321 if (!aShow && !mShowCalled) { |
323 return; |
322 return; |
324 } |
323 } |
325 |
324 |
326 // Accept and reject button exists property gates sending button text. |
|
327 // If button exists but button text is not sent, the plugin uses a default |
|
328 // button. |
|
329 int ignoreMask = mProperties[EAcceptNull].IntValue() ? (1 << EAcceptText) : 0; |
|
330 ignoreMask |= mProperties[ERejectNull].IntValue() ? (1 << ERejectText) : 0; |
|
331 |
|
332 |
|
333 // If this is update but no properties have been mofified, return |
325 // If this is update but no properties have been mofified, return |
|
326 const TInt ignoreMask = 0; |
334 if (!aShow && !PropertiesModified(ignoreMask)) { |
327 if (!aShow && !PropertiesModified(ignoreMask)) { |
335 return; |
328 return; |
336 } |
329 } |
337 |
330 |
338 CHbSymbianVariantMap *parameters = CHbSymbianVariantMap::NewL(); |
331 CHbSymbianVariantMap *parameters = CHbSymbianVariantMap::NewL(); |
340 |
333 |
341 for(int i = 0; i < ENumProperties; i++) { |
334 for(int i = 0; i < ENumProperties; i++) { |
342 TMessageBoxProperty &property = mProperties[i]; |
335 TMessageBoxProperty &property = mProperties[i]; |
343 // ShowL() send all valid properties. Update only sends modified properties. |
336 // ShowL() send all valid properties. Update only sends modified properties. |
344 bool sendProperty = aShow ? property.Valid() : property.Modified(); |
337 bool sendProperty = aShow ? property.Valid() : property.Modified(); |
345 if (sendProperty && (ignoreMask & 1) == 0) { |
338 if (sendProperty) { |
346 CHbSymbianVariant* parameter; |
339 CHbSymbianVariant* parameter; |
347 if (property.Type() == TMessageBoxProperty::EIntProperty) { |
340 if (i == EAcceptText || i == ERejectText) { |
|
341 HBufC *actionData = CreateActionDataLC(property.IsNullAction(), property.StringValue()); |
|
342 parameter = CHbSymbianVariant::NewL(actionData, CHbSymbianVariant::EDes); |
|
343 CleanupStack::PopAndDestroy(); // actionData |
|
344 } else if (property.Type() == TMessageBoxProperty::EIntProperty) { |
348 TInt value = property.IntValue(); |
345 TInt value = property.IntValue(); |
349 parameter = CHbSymbianVariant::NewL(&value, CHbSymbianVariant::EInt); |
346 parameter = CHbSymbianVariant::NewL(&value, CHbSymbianVariant::EInt); |
350 } else { |
347 } else { |
351 TPtrC value = property.StringValue(); |
348 TPtrC value = property.StringValue(); |
352 parameter = CHbSymbianVariant::NewL(&value, CHbSymbianVariant::EDes); |
349 parameter = CHbSymbianVariant::NewL(&value, CHbSymbianVariant::EDes); |
355 User::LeaveIfError(parameters->Add( |
352 User::LeaveIfError(parameters->Add( |
356 PropertyName(static_cast<TPropertyId>(i)), parameter)); |
353 PropertyName(static_cast<TPropertyId>(i)), parameter)); |
357 CleanupStack::Pop(); // parameter |
354 CleanupStack::Pop(); // parameter |
358 property.SetModified(false); |
355 property.SetModified(false); |
359 } |
356 } |
360 ignoreMask >>= 1; |
|
361 } |
357 } |
362 |
358 |
363 _LIT(KDeviceDialogType, "com.nokia.hb.devicemessagebox/1.0"); |
359 _LIT(KDeviceDialogType, "com.nokia.hb.devicemessagebox/1.0"); |
364 TInt error; |
360 TInt error; |
365 if (aShow) { |
361 if (aShow) { |
396 // Get property name |
392 // Get property name |
397 const TPtrC CHbDeviceMessageBoxPrivate::PropertyName(TPropertyId aId) |
393 const TPtrC CHbDeviceMessageBoxPrivate::PropertyName(TPropertyId aId) |
398 { |
394 { |
399 static const wchar_t * const names[] = { |
395 static const wchar_t * const names[] = { |
400 L"type", |
396 L"type", |
401 L"iconAlignment", |
|
402 L"iconVisible", |
397 L"iconVisible", |
403 L"timeout", |
398 L"timeout", |
404 L"dismissPolicy", |
399 L"dismissPolicy", |
405 L"primaryActionNull", |
|
406 L"secondaryActionNull", |
|
407 L"text", |
400 L"text", |
408 L"iconName", |
401 L"iconName", |
409 L"primaryActionText", |
402 L"acceptAction", |
410 L"secondaryActionText", |
403 L"rejectAction", |
411 L"animationDefinition" |
404 L"animationDefinition" |
412 }; |
405 }; |
413 __ASSERT_DEBUG(aId >= 0 && aId < sizeof(names)/sizeof(names[0]), Panic(EPropertyPanic)); |
406 __ASSERT_DEBUG(aId >= 0 && aId < sizeof(names)/sizeof(names[0]), Panic(EPropertyPanic)); |
414 |
407 |
415 return TPtrC((const TUint16 *)names[aId]); |
408 return TPtrC((const TUint16 *)names[aId]); |
420 TPropertyId aId, CHbDeviceMessageBoxSymbian::TButtonId aButtonId) |
413 TPropertyId aId, CHbDeviceMessageBoxSymbian::TButtonId aButtonId) |
421 { |
414 { |
422 __ASSERT_DEBUG(aButtonId == CHbDeviceMessageBoxSymbian::EAcceptButton || |
415 __ASSERT_DEBUG(aButtonId == CHbDeviceMessageBoxSymbian::EAcceptButton || |
423 aButtonId == CHbDeviceMessageBoxSymbian::ERejectButton, Panic(EButtonIdPanic)); |
416 aButtonId == CHbDeviceMessageBoxSymbian::ERejectButton, Panic(EButtonIdPanic)); |
424 switch(aId) { |
417 switch(aId) { |
425 case EAcceptNull: |
|
426 return aButtonId == CHbDeviceMessageBoxSymbian::EAcceptButton ? EAcceptNull : ERejectNull; |
|
427 case EAcceptText: |
418 case EAcceptText: |
428 return aButtonId == CHbDeviceMessageBoxSymbian::EAcceptButton ? EAcceptText : ERejectText; |
419 return aButtonId == CHbDeviceMessageBoxSymbian::EAcceptButton ? EAcceptText : ERejectText; |
429 default: |
420 default: |
430 Panic(EPropertyPanic); |
421 Panic(EPropertyPanic); |
431 return aId; // suppress warning |
422 return aId; // suppress warning |
432 } |
423 } |
|
424 } |
|
425 |
|
426 // Pack into a string a data for a button |
|
427 HBufC *CHbDeviceMessageBoxPrivate::CreateActionDataLC(TBool aNull, const TDesC &text) |
|
428 { |
|
429 HBufC *actionData; |
|
430 if (aNull) { |
|
431 actionData = HBufC::NewL(0); |
|
432 } else { |
|
433 _LIT(KtextTag, "t:"); |
|
434 actionData = HBufC::NewL(text.Length() + KtextTag().Length()); |
|
435 TPtr ptr = actionData->Des(); |
|
436 ptr.Append(KtextTag); |
|
437 ptr.Append(text); |
|
438 } |
|
439 CleanupStack::PushL(actionData); |
|
440 return actionData; |
433 } |
441 } |
434 |
442 |
435 // Observer, data received from device message box |
443 // Observer, data received from device message box |
436 void CHbDeviceMessageBoxPrivate::DataReceived(CHbSymbianVariantMap& aData) |
444 void CHbDeviceMessageBoxPrivate::DataReceived(CHbSymbianVariantMap& aData) |
437 { |
445 { |
559 iMessageBox = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EQuestion); |
567 iMessageBox = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EQuestion); |
560 _LIT(KText, "Accept connection ?"); |
568 _LIT(KText, "Accept connection ?"); |
561 iMessageBox->SetTextL(KText); |
569 iMessageBox->SetTextL(KText); |
562 _LIT(KIconName, "qtg_small_smiley_wondering"); |
570 _LIT(KIconName, "qtg_small_smiley_wondering"); |
563 iMessageBox->SetIconNameL(KIconName); |
571 iMessageBox->SetIconNameL(KIconName); |
564 const TInt KAlignLeft = 0x0001; // Qt::AlignLeft |
|
565 const TInt KAlignTop = 0x0020; // Qt::AlignTop; |
|
566 iMessageBox->SetIconAlignment(KAlignLeft | KAlignTop); |
|
567 |
572 |
568 _LIT(KAcceptText, "Yes"); |
573 _LIT(KAcceptText, "Yes"); |
569 iMessageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAcceptText); |
574 iMessageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAcceptText); |
570 _LIT(KRejectText, "No"); |
575 _LIT(KRejectText, "No"); |
571 iMessageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KRejectText); |
576 iMessageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KRejectText); |
903 { |
908 { |
904 return d->mProperties[CHbDeviceMessageBoxPrivate::EAnimationDefinition].StringValue(); |
909 return d->mProperties[CHbDeviceMessageBoxPrivate::EAnimationDefinition].StringValue(); |
905 } |
910 } |
906 |
911 |
907 /*! |
912 /*! |
908 Sets message box icon alignment. The message box gets updated next time ShowL() or UpdateL() |
|
909 is called. |
|
910 |
|
911 \param aQtAlignment Icon alignment. Values are Qt::Alignment flags. |
|
912 |
|
913 \sa Qt::Alignment, IconAlignment() |
|
914 */ |
|
915 /*! |
|
916 \deprecated CHbDeviceMessageBoxSymbian::SetIconAlignmentL(int) |
|
917 is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetIconAlignment(TInt aQtAlignment). |
|
918 |
|
919 */ |
|
920 EXPORT_C void CHbDeviceMessageBoxSymbian::SetIconAlignmentL(TInt aQtAlignment) |
|
921 { |
|
922 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::EIconAlignment, aQtAlignment); |
|
923 } |
|
924 |
|
925 /*! |
|
926 Sets message box icon alignment. The message box gets updated next time ShowL() or UpdateL() |
|
927 is called. |
|
928 |
|
929 \param aQtAlignment Icon alignment. Values are Qt::Alignment flags. |
|
930 |
|
931 \sa Qt::Alignment, IconAlignment() |
|
932 */ |
|
933 EXPORT_C void CHbDeviceMessageBoxSymbian::SetIconAlignment(TInt aQtAlignment) |
|
934 { |
|
935 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::EIconAlignment, aQtAlignment); |
|
936 } |
|
937 |
|
938 /*! |
|
939 Returns message box icon alignment. Returned values are Qt::Alignment flags. |
|
940 |
|
941 \sa Qt::Alignment, SetIconAlignment() |
|
942 */ |
|
943 EXPORT_C TInt CHbDeviceMessageBoxSymbian::IconAlignment() const |
|
944 { |
|
945 return d->mProperties[CHbDeviceMessageBoxPrivate::EIconAlignment].IntValue(); |
|
946 } |
|
947 |
|
948 /*! |
|
949 Sets message box icon visibility. The message box gets updated next time ShowL() or UpdateL() |
913 Sets message box icon visibility. The message box gets updated next time ShowL() or UpdateL() |
950 is called. |
914 is called. |
951 |
915 |
952 \param aVisible Icon visibility. |
916 \param aVisible Icon visibility. |
953 |
917 |
974 |
938 |
975 \param aTimeout Timeout in milliseconds. Zero denotes no timeout. |
939 \param aTimeout Timeout in milliseconds. Zero denotes no timeout. |
976 |
940 |
977 \sa Timeout() |
941 \sa Timeout() |
978 */ |
942 */ |
979 /*! |
943 EXPORT_C void CHbDeviceMessageBoxSymbian::SetTimeout(TInt aTimeout) |
980 \deprecated CHbDeviceMessageBoxSymbian::SetTimeoutL(int) |
|
981 is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetTimeout(TInt aTimeout). |
|
982 |
|
983 */ |
|
984 EXPORT_C void CHbDeviceMessageBoxSymbian::SetTimeoutL(TInt aTimeout) |
|
985 { |
944 { |
986 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::ETimeout, aTimeout); |
945 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::ETimeout, aTimeout); |
987 } |
946 } |
988 |
947 |
989 /*! |
948 /*! |
990 Sets message box timeout. The message box gets updated next time ShowL() or UpdateL() |
|
991 is called. |
|
992 |
|
993 \param aTimeout Timeout in milliseconds. Zero denotes no timeout. |
|
994 |
|
995 \sa Timeout() |
|
996 */ |
|
997 EXPORT_C void CHbDeviceMessageBoxSymbian::SetTimeout(TInt aTimeout) |
|
998 { |
|
999 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::ETimeout, aTimeout); |
|
1000 } |
|
1001 |
|
1002 /*! |
|
1003 Returns message box timeout value in milliseconds. |
949 Returns message box timeout value in milliseconds. |
1004 |
950 |
1005 \sa SetTimeout() |
951 \sa SetTimeout() |
1006 */ |
952 */ |
1007 EXPORT_C TInt CHbDeviceMessageBoxSymbian::Timeout() const |
953 EXPORT_C TInt CHbDeviceMessageBoxSymbian::Timeout() const |
1008 { |
954 { |
1009 return d->mProperties[CHbDeviceMessageBoxPrivate::ETimeout].IntValue(); |
955 return d->mProperties[CHbDeviceMessageBoxPrivate::ETimeout].IntValue(); |
1010 } |
|
1011 |
|
1012 /*! |
|
1013 Sets message box dismiss policy. The message box gets updated next time ShowL() or UpdateL() |
|
1014 is called. |
|
1015 |
|
1016 \param aHbPopupDismissPolicy Dismiss policy. Values are HbPopup::DismissPolicy flags. |
|
1017 |
|
1018 \sa HbPopup::DismissPolicy, DismissPolicy() |
|
1019 */ |
|
1020 /*! |
|
1021 \deprecated CHbDeviceMessageBoxSymbian::SetDismissPolicyL(int) |
|
1022 is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetDismissPolicy(TInt aHbPopupDismissPolicy). |
|
1023 |
|
1024 */ |
|
1025 EXPORT_C void CHbDeviceMessageBoxSymbian::SetDismissPolicyL(TInt aHbPopupDismissPolicy) |
|
1026 { |
|
1027 d->SetPropertyValue(CHbDeviceMessageBoxPrivate::EDismissPolicy, |
|
1028 aHbPopupDismissPolicy); |
|
1029 } |
956 } |
1030 |
957 |
1031 /*! |
958 /*! |
1032 Sets message box dismiss policy. The message box gets updated next time ShowL() or UpdateL() |
959 Sets message box dismiss policy. The message box gets updated next time ShowL() or UpdateL() |
1033 is called. |
960 is called. |
1088 \param aButton Selects the button. |
1015 \param aButton Selects the button. |
1089 \param aEnable True enables (makes visible) message box button. |
1016 \param aEnable True enables (makes visible) message box button. |
1090 |
1017 |
1091 \sa HasButton() |
1018 \sa HasButton() |
1092 */ |
1019 */ |
1093 /*! |
|
1094 \deprecated CHbDeviceMessageBoxSymbian::SetButtonL(CHbDeviceMessageBoxSymbian::TButtonId, int) |
|
1095 is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetButton(TButtonId aButton, TBool aEnable). |
|
1096 |
|
1097 */ |
|
1098 EXPORT_C void CHbDeviceMessageBoxSymbian::SetButtonL(TButtonId aButton, TBool aEnable) |
|
1099 { |
|
1100 d->SetButtonNull(aButton, !aEnable); |
|
1101 } |
|
1102 |
|
1103 /*! |
|
1104 Sets message box button presence. The message box gets updated next time ShowL() or UpdateL() |
|
1105 is called. |
|
1106 |
|
1107 \param aButton Selects the button. |
|
1108 \param aEnable True enables (makes visible) message box button. |
|
1109 |
|
1110 \sa HasButton() |
|
1111 */ |
|
1112 EXPORT_C void CHbDeviceMessageBoxSymbian::SetButton(TButtonId aButton, TBool aEnable) |
1020 EXPORT_C void CHbDeviceMessageBoxSymbian::SetButton(TButtonId aButton, TBool aEnable) |
1113 { |
1021 { |
1114 d->SetButtonNull(aButton, !aEnable); |
1022 d->SetButtonNull(aButton, !aEnable); |
1115 } |
1023 } |
1116 |
1024 |
1123 */ |
1031 */ |
1124 EXPORT_C TBool CHbDeviceMessageBoxSymbian::HasButton(TButtonId aButton) const |
1032 EXPORT_C TBool CHbDeviceMessageBoxSymbian::HasButton(TButtonId aButton) const |
1125 { |
1033 { |
1126 CHbDeviceMessageBoxPrivate::TPropertyId id = |
1034 CHbDeviceMessageBoxPrivate::TPropertyId id = |
1127 CHbDeviceMessageBoxPrivate::ButtonPropertyId( |
1035 CHbDeviceMessageBoxPrivate::ButtonPropertyId( |
1128 CHbDeviceMessageBoxPrivate::EAcceptNull, aButton); |
1036 CHbDeviceMessageBoxPrivate::EAcceptText, aButton); |
1129 return !d->mProperties[id].IntValue(); |
1037 return !d->mProperties[id].IsNullAction(); |
1130 } |
1038 } |
1131 |
1039 |
1132 /*! |
1040 /*! |
1133 Sets message box observer. The observer is called when message box closes. |
1041 Sets message box observer. The observer is called when message box closes. |
1134 |
1042 |