status_t Preferences::SetPoint (const char *name, BPoint p) { if (HasPoint (name) == true) return ReplacePoint (name, 0, p); return AddPoint (name, p); }
status_t AttributeMessage::SetAttribute(const char* name, const BPoint& value) { if (ReplacePoint(name, value) == B_OK) return B_OK; return AddPoint(name, value); }
void Preferences::SaveWindowPosition(BWindow* window, const char* name) { Lock(); BRect rect = window->Frame(); if (HasPoint(name)) ReplacePoint(name, rect.LeftTop()); else AddPoint(name, rect.LeftTop()); Unlock(); }
status_t TPreferences::SetPoint(const char *name, BPoint p) { if (HasPoint(name)) { return ReplacePoint(name, 0, p); } return AddPoint(name, p); }