30 #include <sbIPropertyArray.h>
31 #include <sbIPropertyManager.h>
32 #include <nsIStringBundle.h>
33 #include <nsITreeView.h>
49 const nsAString& aDisplayName,
50 const nsAString& aLocalizationKey,
52 const nsAString& aLabel,
53 const PRBool aRemoteReadable,
54 const PRBool aRemoteWritable,
55 const PRBool aUserViewable,
56 const PRBool aUserEditable)
59 mDisplayName = aDisplayName;
60 mLocalizationKey = aLocalizationKey;
61 mHasLabel = aHasLabel;
63 mUserViewable = aUserViewable;
64 mUserEditable = aUserEditable;
65 mRemoteReadable = aRemoteReadable;
66 mRemoteWritable = aRemoteWritable;
67 mType.AssignLiteral(
"button");
68 mSuppressSelect = PR_TRUE;
77 NS_ENSURE_SUCCESS(rv, rv);
85 sbSimpleButtonPropertyInfo::GetImageSrc(
const nsAString&
aValue,
93 sbSimpleButtonPropertyInfo::GetProgressMode(
const nsAString& aValue,
96 NS_ENSURE_ARG_POINTER(_retval);
97 *_retval = nsITreeView::PROGRESS_NONE;
102 sbSimpleButtonPropertyInfo::GetCellValue(
const nsAString& aValue,
110 sbSimpleButtonPropertyInfo::GetRowProperties(
const nsAString& aValue,
118 sbSimpleButtonPropertyInfo::GetCellProperties(
const nsAString& aValue,
121 _retval.AssignLiteral(
"button");
126 sbSimpleButtonPropertyInfo::GetColumnType(nsAString& _retval)
128 _retval.AssignLiteral(
"text");
135 sbSimpleButtonPropertyInfo::GetSuppressSelect(PRBool* aSuppressSelect)
137 NS_ENSURE_ARG_POINTER(aSuppressSelect);
138 *aSuppressSelect = mSuppressSelect;
143 sbSimpleButtonPropertyInfo::SetSuppressSelect(PRBool aSuppressSelect)
145 mSuppressSelect = aSuppressSelect;
150 sbSimpleButtonPropertyInfo::IsDisabled(
const nsAString& aCurrentValue,
153 NS_ENSURE_ARG_POINTER(_retval);
155 PRInt32
pos = aCurrentValue.FindChar(
'|');
157 *_retval = Substring(aCurrentValue, pos + 1).EqualsLiteral(
"1");
167 sbSimpleButtonPropertyInfo::HitTest(
const nsAString& aCurrentValue,
168 const nsAString& aPart,
175 NS_ENSURE_ARG_POINTER(_retval);
178 nsresult rv = IsDisabled(aCurrentValue, &isDisabled);
179 NS_ENSURE_SUCCESS(rv, rv);
185 *_retval = aPart.EqualsLiteral(
"text");
191 sbSimpleButtonPropertyInfo::GetValueForClick(
const nsAString& aCurrentValue,
198 return NS_ERROR_NOT_IMPLEMENTED;
205 sbSimpleButtonPropertyInfo::OnClick(
sbIMediaItem *aItem,
208 PRBool *_retval NS_OUTPARAM)
210 NS_ENSURE_ARG_POINTER(_retval);
225 PRInt32 pos = aValue.FindChar(
'|');
227 _retval = Substring(aValue, 0, pos);
boolean isDisabled(in AString aCurrentValue)
Whether the tree cell widget representing this property should be disabled given a value (for this pr...
The property information specific to clickable properties.