Esempio n. 1
0
BRect
PSettings::GetRect(const char *name)
{
	BRect	rect;
	status_t s=FindRect(name,&rect);
	return rect;
}
Esempio n. 2
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);	
}
Esempio n. 3
0
BRect
AttributeMessage::GetAttribute(const char* name, BRect defaultValue) const
{
	BRect value;
	if (FindRect(name, &value) != B_OK)
		return defaultValue;
	return value;
}
Esempio n. 4
0
myinline const BRect ArpMessage::GetRect(const char *name, const BRect& def, int32 index) const
{
	if( this ) {
		BRect res;
		if( FindRect(name, index, &res) != B_NO_ERROR ) return def;
		return res;
	}
	return def;
}
BRect &
Preferences::ReadRect(BRect& rect, const char* name)
{
	Lock();
	BRect loaded;
	if (FindRect(name, &loaded) == B_OK)
		rect = loaded;
	Unlock();
	return rect;
}
Esempio n. 6
0
//------------------------------------------------------------------------------
status_t	TExitStates::Unarchive(const BMessage& oMsg)
{
	status_t	aResult = B_OK;

	aResult |= SUPER::Unarchive(oMsg);
	// bool
	aResult |= FindBool(oMsg, ARC_NAME_MINIMIZED, &mMinimized);
	// string
	aResult |= FindString(oMsg, FUC_ARC_NAME_APP_VER, &mAppVer);
	// その他
	aResult |= FindRect(oMsg, FUC_ARC_NAME_FRAME, &mFrame);
	return aResult;
}
void
Preferences::LoadWindowFrame(BWindow* window, const char* name)
{
	Lock();

	BRect frame;
	if (FindRect(name, &frame) == B_OK) {
		window->MoveTo(frame.LeftTop());
		window->ResizeTo(frame.Width(), frame.Height());
		make_window_visible(window);
	}

	Unlock();
}
Esempio n. 8
0
int32 Message::FindRect(const char *name, Rect *rect) const
{
	return FindRect(name, 0, rect);
}