예제 #1
0
status_t Preferences::SetRect (const char *name, BRect r)
{
	if (HasRect (name) == true)
		return ReplaceRect (name, 0, r);

	return AddRect (name, r);
}
예제 #2
0
status_t
AttributeMessage::SetAttribute(const char* name, const BRect& value)
{
	if (ReplaceRect(name, value) == B_OK)
		return B_OK;
	return AddRect(name, value);
}
예제 #3
0
void
PSettings::SetRect(const char *name,BRect rect)
{
	BRect	old;
	status_t s=FindRect(name,&old);
	if(s==B_OK)ReplaceRect(name,rect);
	else AddRect(name,rect);	
}
예제 #4
0
void
Preferences::SaveRect(BRect& rect, const char* name)
{
	Lock();
	if (HasRect(name))
		ReplaceRect(name, rect);
	else
		AddRect(name, rect);
	Unlock();
}
예제 #5
0
void
Preferences::SaveWindowFrame(BWindow* window, const char* name)
{
	Lock();

	BRect rect = window->Frame();
	if (HasRect(name))
		ReplaceRect(name, rect);
	else
		AddRect(name, rect);

	Unlock();
}
예제 #6
0
status_t TPreferences::SetRect(const char *name, BRect r) {
	if (HasRect(name)) {
		return ReplaceRect(name, 0, r);
	}
	return AddRect(name, r);
}