Exemplo n.º 1
0
status_t ArpBox::GetSupportedSuites(BMessage *data)
{
	data->AddString("suites", "suite/vnd.ARP.ArpBox");
	BPropertyInfo prop_info(properties_box);
	data->AddFlat("messages", &prop_info);
	LayoutGetSupportedSuites(data);
	return BBox::GetSupportedSuites(data);
}
Exemplo n.º 2
0
status_t
NotificationView::GetSupportedSuites(BMessage* msg)
{
	msg->AddString("suites", "suite/x-vnd.Haiku-notification_server");
	BPropertyInfo prop_info(message_prop_list);
	msg->AddFlat("messages", &prop_info);
	return BView::GetSupportedSuites(msg); 		
}
Exemplo n.º 3
0
//------------------------------------------------------------------------------
status_t BControl::GetSupportedSuites(BMessage *message)
{
	message->AddString("suites", "suite/vnd.Be-control");

	BPropertyInfo prop_info(prop_list);
	message->AddFlat("messages", &prop_info);
	
	return BView::GetSupportedSuites(message);
}
Exemplo n.º 4
0
status_t Printer::GetSupportedSuites(BMessage* msg)
{
	msg->AddString("suites", "application/x-vnd.OpenBeOS-printer");
	
	BPropertyInfo prop_info(prop_list);
	msg->AddFlat("messages", &prop_info);
	
	return Inherited::GetSupportedSuites(msg);
}
Exemplo n.º 5
0
status_t
PathBox::GetSupportedSuites(BMessage *msg)
{
	msg->AddString("suites","suite/vnd.DW-pathbox");
	
	BPropertyInfo prop_info(sProperties);
	msg->AddFlat("messages",&prop_info);
	return BView::GetSupportedSuites(msg);
}
Exemplo n.º 6
0
status_t
AutoTextControl::GetSupportedSuites(BMessage* msg)
{
	msg->AddString("suites", "suite/vnd.DW-autotextcontrol");

	BPropertyInfo prop_info(sProperties);
	msg->AddFlat("messages", &prop_info);
	return BTextControl::GetSupportedSuites(msg);
}
Exemplo n.º 7
0
status_t
Spinner::GetSupportedSuites(BMessage *msg)
{
	msg->AddString("suites","suite/vnd.DW-spinner");
	
	BPropertyInfo prop_info(sProperties);
	msg->AddFlat("messages",&prop_info);
	return BControl::GetSupportedSuites(msg);
}
Exemplo n.º 8
0
status_t
BDecimalSpinner::GetSupportedSuites(BMessage* message)
{
	message->AddString("suites", "suite/vnd.Haiku-decimal-spinner");

	BPropertyInfo prop_info(sProperties);
	message->AddFlat("messages", &prop_info);

	return BView::GetSupportedSuites(message);
}
Exemplo n.º 9
0
BHandler*
NotificationView::ResolveSpecifier(BMessage* msg, int32 index, BMessage* spec, int32 form, const char* prop)
{
	BPropertyInfo prop_info(message_prop_list);
	if (prop_info.FindMatch(msg, index, spec, form, prop) >= 0) {
		msg->PopSpecifier();
		return this;
	}

	return BView::ResolveSpecifier(msg, index, spec, form, prop);
}
Exemplo n.º 10
0
status_t BeHappy::GetSupportedSuites(BMessage *message)
{
	message->AddString("suites","suite/vnd.STertois-BeHappy-application");
	
	static property_info prop_list[] = {
		{"Add-on",{B_GET_PROPERTY,0},{B_INDEX_SPECIFIER,0},"Add-on name"},
		{"Add-ons",{B_COUNT_PROPERTIES,0},{B_DIRECT_SPECIFIER,0},"Add-on count"},
		{0}};
	BPropertyInfo prop_info(prop_list);
	message->AddFlat("messages",&prop_info);
	return(BApplication::GetSupportedSuites(message));
}
Exemplo n.º 11
0
		BHandler * ResolveSpecifier(BMessage *msg, int32 index, BMessage *spec, int32 form, const char *prop) {
			BPropertyInfo prop_info(main_prop_list);
			printf("app: looking for property %s\n",prop);
			if (strcmp(prop, "message") == 0) {
				BMessenger msgr(fWin);
				
				msgr.SendMessage(msg,fWin);
				
				return NULL;
			};
			return BApplication::ResolveSpecifier(msg, index, spec, form, prop);
		};
Exemplo n.º 12
0
BHandler*
ArpBox::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier,
						 int32 form, const char *property)
{
	BPropertyInfo prop_info(properties_box);
	if( prop_info.FindMatch(msg, index, specifier, form, property) >= 0 ) return this;
	BHandler* ret = 0;
	if( LayoutResolveSpecifier(&ret, msg, index, specifier,
							   form, property) == B_OK ) {
		return ret;
	}
	return BBox::ResolveSpecifier(msg, index, specifier, form, property);
}
Exemplo n.º 13
0
void ArpBox::MessageReceived(BMessage *message)
{
	status_t err = B_OK;
	
	int32 index = 0;
	BMessage spec;
	const char* property = 0;
	int32 what=0;
	if( message->GetCurrentSpecifier(&index, &spec, &what, &property) == B_OK ) {
		BPropertyInfo prop_info(properties_box);
		int32 propi = prop_info.FindMatch(message, index, &spec, what, property);
		if( propi >= 0 ) {
			if( properties_box[propi].extra_data == 1 ) {
				if( message->what == B_SET_PROPERTY ) {
					const char* str = 0;
					err = message->FindString("data", &str);
					if( !err ) {
						SetLabel(str);
						InvalidateDimens();
						return;
					}
				} else if( message->what == B_GET_PROPERTY ) {
					BMessage ret(B_REPLY);
					err = ret.AddString("result", Label());
					ret.AddInt32("error", err);
					message->SendReply(&ret);
					return;
				}
			} else if( properties_box[propi].extra_data == 2 ) {
				if( message->what == B_SET_PROPERTY ) {
					int32 value = 0;
					err = message->FindInt32("data", &value);
					if( !err ) {
						SetBorder((border_style)value);
						InvalidateDimens();
						return;
					}
				} else if( message->what == B_GET_PROPERTY ) {
					BMessage ret(B_REPLY);
					err = ret.AddInt32("result", Border());
					ret.AddInt32("error", err);
					message->SendReply(&ret);
					return;
				}
			}
		}
	}

	if( LayoutMessageReceived(message) == B_OK ) return;
	BBox::MessageReceived(message);
}
Exemplo n.º 14
0
BHandler* Printer::ResolveSpecifier(BMessage* msg, int32 index, BMessage* spec,
	int32 form, const char* prop)
{
	BPropertyInfo prop_info(prop_list);
	BHandler* rc = this;
	
	int32 idx;
	switch( idx=prop_info.FindMatch(msg,0,spec,form,prop) ) {
		case B_ERROR:
			rc = Inherited::ResolveSpecifier(msg,index,spec,form,prop);
			break;
	}
	
	return rc;
}
Exemplo n.º 15
0
status_t
PrintServerApp::GetSupportedSuites(BMessage* msg)
{
	msg->AddString("suites", "suite/vnd.OpenBeOS-printserver");

	static bool localized = false;
	if (!localized) {
		localized = true;
		for (int i = 0; prop_list[i].name != NULL; i ++)
			prop_list[i].usage = B_TRANSLATE_NOCOLLECT(prop_list[i].usage);
	}

	BPropertyInfo prop_info(prop_list);
	msg->AddFlat("messages", &prop_info);

	return Inherited::GetSupportedSuites(msg);
}
Exemplo n.º 16
0
BHandler*
NotificationWindow::ResolveSpecifier(BMessage* msg, int32 index,
                                     BMessage* spec, int32 form, const char* prop)
{
    BPropertyInfo prop_info(main_prop_list);
    BHandler* handler = NULL;

    if (strcmp(prop,"message") == 0) {
        switch (msg->what) {
        case B_CREATE_PROPERTY:
        {
            msg->PopSpecifier();
            handler = this;
            break;
        }
        case B_SET_PROPERTY:
        case B_GET_PROPERTY:
        {
            int32 i;

            if (spec->FindInt32("index", &i) != B_OK)
                i = -1;

            if (i >= 0 && i < (int32)fViews.size()) {
                msg->PopSpecifier();
                handler = fViews[i];
            } else
                handler = NULL;
            break;
        }
        case B_COUNT_PROPERTIES:
            msg->PopSpecifier();
            handler = this;
            break;
        default:
            break;
        }
    }

    if (!handler)
        handler = BWindow::ResolveSpecifier(msg, index, spec, form, prop);

    return handler;
}
Exemplo n.º 17
0
BHandler*
PrintServerApp::ResolveSpecifier(BMessage* msg, int32 index, BMessage* spec,
								int32 form, const char* prop)
{
	BPropertyInfo prop_info(prop_list);
	BHandler* rc = NULL;

	int32 idx;
	switch( idx=prop_info.FindMatch(msg,0,spec,form,prop) ) {
		case B_ERROR:
			rc = Inherited::ResolveSpecifier(msg,index,spec,form,prop);
			break;

		case 1:
			// GET Printer [arg]
			if ((rc=GetPrinterFromSpecifier(spec)) == NULL) {
				BMessage reply(B_REPLY);
				reply.AddInt32("error", B_BAD_INDEX);
				msg->SendReply(&reply);
			}
			else
				msg->PopSpecifier();
			break;

		case 5:
			// GET Transport [arg]
			if ((rc=GetTransportFromSpecifier(spec)) == NULL) {
				BMessage reply(B_REPLY);
				reply.AddInt32("error", B_BAD_INDEX);
				msg->SendReply(&reply);
			}
			else
				msg->PopSpecifier();
			break;

		default:
			rc = this;
	}

	return rc;
}
Exemplo n.º 18
0
BHandler *TPanelWindowView::ResolveSpecifier( BMessage *message, int32 index, BMessage *specifier, int32 what, const char *property )
{
	BPropertyInfo prop_info( _dock_property_list );
	if ( !strcasecmp( property, "tab" ) )
	{
		if ( message->what == B_CREATE_PROPERTY || message->what == B_DELETE_PROPERTY )
			return this;
		int32 index;
		if ( specifier->FindInt32( "index", &index ) == B_OK )
		{
			fPanels.Lock();
			TInnerPanel *panel = fPanels.ItemAt(index);
			fPanels.Unlock();
			if ( panel )
			{
				message->PopSpecifier();
				return panel;
			}
		}
	}
	if ( prop_info.FindMatch( message, index, specifier, what, property ) >= 0 )
		return this;
	return BView::ResolveSpecifier( message, index, specifier, what, property );
}
Exemplo n.º 19
0
void TPanelWindowView::GetDockbertSuites( BMessage *message )
{
	message->AddString( "suites", "suite/vnd.DM-dockbert" );
	BPropertyInfo prop_info( const_cast<property_info *>(_dock_property_list) );
	message->AddFlat( "messages", &prop_info );
}
Exemplo n.º 20
0
		status_t GetSupportedSuites(BMessage *msg) {
			msg->AddString("suites", "suite/x-vnd.beclan.InfoPopper");
			BPropertyInfo prop_info(main_prop_list);
			msg->AddFlat("messages", &prop_info);
			return BApplication::GetSupportedSuites(msg);
		};