[prev in list] [next in list] [prev in thread] [next in thread] 

List:       moblin-dev
Subject:    Re: [Moblin Dev] MxScrollView / MxListView - items not reacting on
From:       Simon Bolek <simon.bolek () googlemail ! com>
Date:       2010-05-17 19:48:59
Message-ID: AANLkTimzihslkunH_W8ZX5YniiGv7YXHoZMlDExKFH9w () mail ! gmail ! com
[Download RAW message or body]

hi:)

Thank you, i tried to do this the following way(btw, it is the MxLabel, not
ClutterText, but I assume there is not difference as to the event
functionality)

[code]
static void mx_item_factory_iface_init(MxItemFactoryIface *iface);
G_DEFINE_TYPE_WITH_CODE (RmiWidgetListView, rmi_widget_list_view,
CLUTTER_TYPE_GROUP,
        G_IMPLEMENT_INTERFACE(MX_TYPE_ITEM_FACTORY,
mx_item_factory_iface_init))
;

static ClutterActor* rmi_widget_list_create(MxItemFactory *factory) {
    rmi_log_info("[%s]", __FUNCTION__);
    return (ClutterActor*) factory;
}

static void mx_item_factory_iface_init(MxItemFactoryIface *iface) {
    rmi_log_info("[%s]", __FUNCTION__);
    iface->create = rmi_widget_list_create;
}

/*
 *rmi_widget_list_view_set_model
* @self: instance of RmiWidgetListView actor
* @model: model to be set
 * Descr:
*/
void rmi_widget_list_view_set_model(RmiWidgetListView *self, ClutterModel
*model) {
...
mx_list_view_set_item_type(MX_LIST_VIEW (self->list_view), MX_TYPE_LABEL);
mx_list_view_set_factory(MX_LIST_VIEW (self->list_view), self);
...
}

[/code]

i get the log for mx_item_factory_iface_init
but never for rmi_widget_list_create

Clearly, there is a bug somewhere, but where?

regards
simon:)



On Mon, May 17, 2010 at 6:53 PM, Thomas Wood <thomas.wood@intel.com> wrote:

>
> Hi,
>
> On Mon, 2010-05-17 at 12:23 +0100, Simon Bolek wrote:
> > hello:)
> >
> >       I have a problem with my custom widget which i created based on
> > ClutterGroup.
> > I have a widget/class based on ClutterGroup.
> > In this clutter group as children I have a MxScrollView which embedds
> > the MxListView.
> > The MxListView items are of type ClutterText.
> >
> > So this is a simple scrollable list. Working OK I see my items fed
> > from ClutterModel and can scroll with the mouse up and down.
> > But I am missing the "button-press-event" on my items.
> > I tried to the g_signal_connect(...) the signal "button-press-event"
> > on the actors:
> > - my custom widget
> > - the child MxScrollView
> > - the child MxListView
> > but i get no event fired.
> > I than tried all the other events like "event" but did not work as well.
>
> You need to make sure you ClutterText items have the "reactive" property
> set to TRUE and you connect to the button-press-event signal of each
> ClutterText created by MxListView. This is easy to do if you use a
> MxItemFactory that creates the items for MxListView.
>
> Regards,
>
> Thomas
>
>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
_______________________________________________
Moblin dev Mailing List
dev@moblin.org

To manage or unsubscribe from this mailing list visit:
http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic