I figured it out -- it had to do with the layers and the (appearent) 
difference between the E_LAYER_SET() macro and the evas_object_layer_set() 
function.  This is the working incantation (code):

    evas_object_move(m->sw_bg_object,m->cur.x,m->cur.y);                       
    evas_object_resize(m->sw_bg_object,m->cur.w,m->cur.h);                     
    //E_LAYER_SET(m->sw_bg_object,E_COMP_CANVAS_LAYER_MENU);                   
    E_LAYER_SET(m->container_object,E_COMP_CANVAS_LAYER_MENU);                 
    evas_object_layer_set(m->sw_bg_object,E_COMP_CANVAS_LAYER_MENU-1);         
    short bg_layer = evas_object_layer_get(m->sw_bg_object);                   
    short container_layer = evas_object_layer_get(m->container_object);        
    fprintf(stderr,"*** e_start_menu_activate_mouse: bg_layer is %d, 
container_layer is %d\n",bg_layer,container_layer);
    evas_object_show(m->sw_bg_object);                                         
 
I need to do an E_LAYER_SET on the *container_object*, which is an elm_table
widget, swallowed into sw_bg_object, a Edje object
("e/widgets/menu/default/background"). *Then* I need to use
evas_object_layer_set() to set sw_bg_object's layer to be just below the
container_object. If I use E_LAYER_SET only on the sw_bg_object, nothing
*visible* happens. If I use E_LAYER_SET on both the sw_bg_object and the
container_object, I get a transparent background (sw_bg_object is not seen).
If I use E_LAYER_SET on only the container_object, I get the proper
background, but it is at too low a layer (other windows are above it as shown
in http://www.deepsoft.com/home/layersetcontaineronly/). But the 'trick' of
using E_LAYER_SET on the container_object and then using evas_object_layer_set
with a layer one level down on the sw_bg_object works correctly. I don't know
if this is a bug or feature...


At Wed, 19 Mar 2014 16:42:13 -0400 Robert Heller <hel...@deepsoft.com> wrote:

> 
> At Fri, 14 Mar 2014 12:18:49 +0900 Carsten Haitzler (The Rasterman) 
> <ras...@rasterman.com> wrote:
> 
> > 
> > On Thu, 13 Mar 2014 21:37:10 -0400 Robert Heller <hel...@deepsoft.com> said:
> > 
> > > 'canvas' is the second argument to e_start_menu_realize_inwindow(), that 
> > > is
> > > the background object. Maybe that is wrong? What is the correct way to 
> > > get a
> > > Evas_Object pointer to use as the 'canvas' for creating elm widgets on?
> > > Somehow I need to get from the Evas pointer to the something to create 
> > > elm 
> > > widgets on.
> > 
> > any object will do - it gets the canvas from the object.
> >
> 
> OK, I *think* I know what is going on.  The table widget does not itself have 
> a backgroud -- it get that from its 'parent', (eg an elm_win widget or 
> something).  The thing here is that the table does not have an *elm* widget 
> as 
> a parent.  Its 'parent' (such as it is) is a bare Edje Evas_Object.  
> Basically 
> I am creating a Edje Evas_Object and setting it up as a menu background:
> 
>     /* Create a window, and realize the menu in it. */                        
>  
>     o = edje_object_add(e_comp_get(m->zone)->evas);                           
>  
>     evas_object_name_set(o, "start_menu->sw_bg_object");                      
>  
>     evas_object_data_set(o, "e_start_menu", m);                               
>  
>     e_theme_edje_object_set(o, "base/theme/menus",                            
>  
>                                "e/widgets/menu/default/background");          
>  
>     m->sw_bg_object = o;                                                      
>  
> 
> And then using this as the parent object when I create the table:
> 
>     /* Create the menu container, an Elm Table widget. */                     
>  
>     o = elm_table_add(canvas); /* canvas IS m->sw_bg_object */
>     fprintf(stderr,"*** e_start_menu_realize_inwindow(): elm_table_add(%p) 
> returns %p\n",canvas,o);
>     m->container_object = o;                                        
> 
> And finally I am using edje_object_part_swallow() to swallow the elm_table 
> into the background object.  I'm guessing this is wrong.  I need to do 
> something different somewhere, but I am unsure what I should be doing.
> 
> There isn't any good documentation on what is the proper way to use elm
> widgets with Enlightenment itself. The Enlightenment 'widgets' (and even more
> primitive e_<thing> things) leave lots to be desired and are poorly documented
> and are effectively depreciated -- eventually Enlightenment will move to use
> Elementary (elm) widgets, so there must be a proper way to do this. Or at 
> least there is a contemplated way of doing this. What is it?
> 
> 

-- 
Robert Heller             -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


          

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to