Beispiel #1
0
BView*
IPCPAddon::CreateView(BPoint leftTop)
{
	if(!fIPCPView) {
		BRect rect;
		Addons()->FindRect(DUN_TAB_VIEW_RECT, &rect);
		fIPCPView = new IPCPView(this, rect);
		fIPCPView->Reload();
	}
	
	fIPCPView->MoveTo(leftTop);
	return fIPCPView;
}
BView*
ConnectionOptionsAddon::CreateView(BPoint leftTop)
{
	if(!fConnectionOptionsView) {
		BRect rect;
		Addons()->FindRect(DUN_TAB_VIEW_RECT, &rect);
		fConnectionOptionsView = new ConnectionOptionsView(this, rect);
		fConnectionOptionsView->Reload();
	}
	
	fConnectionOptionsView->MoveTo(leftTop);
	return fConnectionOptionsView;
}
Beispiel #3
0
bool
PPPoEAddon::GetPreferredSize(float *width, float *height) const
{
	float viewWidth;
	if(Addons()->FindFloat(DUN_DEVICE_VIEW_WIDTH, &viewWidth) != B_OK)
		viewWidth = 270;
			// default value
	
	if(width)
		*width = viewWidth;
	if(height)
		*height = fHeight;
	
	return true;
}
Beispiel #4
0
bool
IPCPAddon::GetPreferredSize(float *width, float *height) const
{
	BRect rect;
	if(Addons()->FindRect(DUN_TAB_VIEW_RECT, &rect) != B_OK)
		rect.Set(0, 0, 200, 300);
			// set default values
	
	if(width)
		*width = rect.Width();
	if(height)
		*height = rect.Height();
	
	return true;
}
Beispiel #5
0
BView*
PPPoEAddon::CreateView(BPoint leftTop)
{
	if(!fPPPoEView) {
		float width;
		if(!Addons()->FindFloat(DUN_DEVICE_VIEW_WIDTH, &width))
			width = 270;
				// default value
		
		BRect rect(0, 0, width, fHeight);
		fPPPoEView = new PPPoEView(this, rect);
		fPPPoEView->Reload();
	}
	
	fPPPoEView->MoveTo(leftTop);
	return fPPPoEView;
}