|
Post by alexfish on Jul 1, 2014 14:51:12 GMT 1
Hi Vovchik and so it is done. latest Beta Post #2. BR Alex Attachments:
|
|
|
Post by vovchik on Jul 1, 2014 14:56:00 GMT 1
Dear Alex,
GREAT!!! What about tooltips? They are easy, and I have them up the kazoo in that tile changing demo - one every widget, I think. Would be nice in HUG too, as well as a way to specify the units in sliders....or none.
With kind regards and thanks, vovchik
|
|
|
Post by alexfish on Jul 1, 2014 15:12:23 GMT 1
Hi Vovchik
tool tips coming soon ,
just found slight bug in menu ATTACH,
Code now updated , but can save download again , change
SUB ATTACH
at CASE
CASE "menu"
widget = elm_menu_add(properties[hug_widget].attach) elm_menu_item_add(widget,NULL,NULL,properties[hug_child].caption$, NULL, NULL) elm_menu_item_separator_add(widget,NULL) elm_menu_move(widget,hug_xpos,hug_ypos) evas_object_show(widget)
BR Alex
|
|
|
Post by vovchik on Jul 1, 2014 17:39:24 GMT 1
Dear Alex, Thanks. Now playing around What about this thing, too: ' ------------------ SUB ICON(WIDGET* win, WIDGET* object) ' ------------------ PROTO elm_win_icon_object_set elm_win_icon_object_set(win, object) END SUB
Makes all apps look professional, at least on desktops, and easy as pie to implement. With kind regards, vovchik
|
|
|
Post by alexfish on Jul 1, 2014 19:42:40 GMT 1
Hi Vovchik
Me think u a mind reader
and update Beta on the way , just finished the bits
icons to widgets with content for icons , like buttons , but that one is done through STOCK , but can test others
window icon from file is shown in the menutest.bac , as is TOOLTIPS.
a whole load of window properties , but will have to read the source code , SETPROPERTY & SETPROPERTY$
update in about 10 mins
BR alex
|
|
|
Post by vovchik on Jul 1, 2014 20:15:25 GMT 1
Dear Alex,
Nice! Will be looking to test. Now have to consult the elementary docs to see what I can do to align menu entries. They appear right justified, even if there is no icon, so there must be a way to shove the text to the left.
With kind regards, vovchik
|
|
|
Post by vovchik on Jul 2, 2014 14:28:05 GMT 1
Dear Alex,
What about a simple ANTIALIAS - will help with text - and some kind of PROGRESSBAR or PULSER to show activity? I went through the widget list and it is impressive. Perhaps v/hboxes and taskbar would be useful too. Elementary does contain a lot of interesting things....
Thanks.
With kind regards, vovchik
|
|
|
Post by alexfish on Jul 2, 2014 18:39:26 GMT 1
Hi Vovchik Boxes are already in the lib , as BOX1 , BOX2 , pack method not applied as yet need mouse and time out to work correctly as in Callback signals both in canvas and canvas objects + widgets esp with progress bars and pulsar etc. going through each stage that was done at Kaleidoscope , Hence now have latest beta ready , please look at the updated demo code in the download .. POST #2 BR Alex PS :: will now look at the rest of the bits in Kaleidoscope Pick up MARK demo / markMouse.bac Attachments:
|
|
|
Post by alexfish on Jul 2, 2014 20:00:03 GMT 1
@ Vovchik
This is the KEYWORD command to pack a box : "BOX" this will be going into the lib
simple BOX :
here is the code so can test it , + some demo code , it should work
HTH Alex
SUB BOX(NUMBER hug_widget,NUMBER hug_child) PROTO elm_box_pack_end elm_box_pack_end(properties[hug_widget].sig_widget,properties[hug_child].sig_widget) END SUB
Some code::
INCLUDE hug_elm.bac
SUB BOX(NUMBER hug_widget,NUMBER hug_child) PROTO elm_box_pack_end elm_box_pack_end(properties[hug_widget].sig_widget,properties[hug_child].sig_widget) END SUB
INIT
'@ Always :the first widget Must be a "Window" no buts or if's else mouse will not work win=WINDOW("Elementary Tests",600,400)
H_box=BOX1(600,30) ATTACH(win,H_box,0,0)
'@ even if want to BOX a widget it still has to be attached to the window first but=BUTTON("boxed button",150,50) ATTACH(win,but,0,0)
but2=BUTTON("boxed button2",150,50) ATTACH(win,but2,0,0)
but3=BUTTON("boxed button3",150,50) ATTACH(win,but3,0,0)
'@ now just use the BOX command to put item into the box BOX(H_box,but) : BOX(H_box,but2) : BOX(H_box,but3)
V_box=BOX2(150,300) ATTACH(win,V_box,10,50) but4=BUTTON("boxed button4",150,50) ATTACH(win,but4,0,0)
but5=BUTTON("boxed button5",150,50) ATTACH(win,but5,0,0)
but6=BUTTON("boxed button6",150,50) ATTACH(win,but6,0,0)
BOX(V_box,but4) : BOX(V_box,but5) : BOX(V_box,but6)
DISPLAY
To hide all the bits in a box Example
HIDE(V_box)
then to show them again
SHOW(V_box)
|
|
|
Post by vovchik on Jul 2, 2014 20:43:39 GMT 1
Dear Alex, Lokking better than ever. I see MENU now works fine upon initialization. Thanks. WIll now examine the other bits. With kind regards, vovchik
|
|
|
Post by alexfish on Jul 3, 2014 9:57:11 GMT 1
Dear Alex, Lokking better than ever. I see MENU now works fine upon initialization. Thanks. WIll now examine the other bits. With kind regards, vovchik Vovchik the menu's not quite there yet. think this may be the final version , user can have it static or can move it . important bit is that when the screen is clicked , the menu appears. have been trying to sort out callback signals for what are canvas items and what are window items etc latest beta in Post #2 as normal' need to test this before can update the lib , here the menu should appear where ever the screen is clicked , except the frame then can proceed with the other widgets we tested. BR Alex INCLUDE hug_elm.bac
SUB Menu_Click(void *data, Evas_Object *obj, void *event_info)
LOCAL select$
LOCAL *list_it TYPE Elm_Object_Item
list_it = event_info select$=elm_object_item_text_get(list_it) PRINT "menu selcted item : ",select$
SELECT select$ CASE "Quit" QUIT
END SELECT END SUB
SUB SHOW_MENU()
PRINT " Show "
SHOW(menu) END SUB
SUB show(void *data, Evas *e, Evas_Object *obj, void *event_info)
GET(mouse)
elm_menu_move(properties[menu].sig_widget,MOUSE(0), MOUSE(1))
SHOW(menu)
END SUB
REM ---------------------------------------------------------------------- '--- * ----MAIN --- * REM ---------------------------------------------------------------------- INIT
win=WINDOW("Elementary Menu",850,500)
LOCAL *rect TYPE Widget
rect = evas_object_rectangle_add(evas_object_evas_get(properties[win].sig_widget)) evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND) elm_win_resize_object_add(properties[win].sig_widget, rect) evas_object_color_set(rect, 0, 0, 0, 0) evas_object_show(rect)
evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, show,NULL)
SETPROPERTY$(win,"win_icon","fern.png",0)
'@ creat Main menu menu=MENU("Menu") ATTACH(win,menu,100,100)
'@ main Menu MENUSET(menu,0,NULL,"Close Menu",Menu_Click) MENUSEP(menu,0) '@ creat submenu 1 Submenu_1=MENUSET(menu,-1,"mail-reply-all", "Mail",Menu_Click) MENUSEP(menu,0)
'@ Submenu_1 MENUSET(menu,Submenu_1,"object-rotate-left", "Find Mail",Menu_Click) MENUSEP(menu,Submenu_1) MENUSET(menu,Submenu_1,NULL,"look here",Menu_Click) MENUSET(menu,Submenu_1,NULL,"look there",Menu_Click) MENUSET(menu,Submenu_1,NULL,"look every where",Menu_Click)
'@ main Menu MENUSET(menu,0,NULL,"Load",Menu_Click) MENUSET(menu,0,NULL,"Save",Menu_Click)
'@ creat submenu 2 Submenu_2=MENUSET(menu,-1,NULL,"Other",Menu_Click)
'@ Submenu_2 MENUSET(menu,Submenu_2,"document-print", "other bits",Menu_Click) MENUSET(menu,Submenu_2,NULL, "bit-one",Menu_Click) MENUSET(menu,Submenu_2,NULL, "bit-two",Menu_Click) '@ main Menu MENUSET(menu,0,NULL,"Quit",Menu_Click)
Frame=FRAME(850,100) ATTACH(win,Frame,0,400) but=BUTTON("show menu",100,25) ATTACH(win,but,10,415)
'@ TOOL-TIP SETPROPERTY$(but,"tool_tip"," enable menu",0) CALLBACK(but,SHOW_MENU)
DISPLAY
|
|
|
Post by vovchik on Jul 3, 2014 12:25:00 GMT 1
Dear Alex, Thanks...will now do some testing. I have attached a little prototype app for you to look at. My problem is that I am getting a spurious widget (button) in a modal window (HELP). You will see. Also, only sounds in the basic category work so far. I have all the rest but am now thinking how I should handle the parsing of directories and the parsing of the data files to pop up info as the sequence is playing. With kind regards, vovchik UPDATE: Got the info popups to work, but, when I centre the main window via SETPROPERTY I no longer see the menu entries. I think they might be showing off sceeen somewhere. Attachments:zensound.tar.gz (230.27 KB)
|
|
|
Post by alexfish on Jul 3, 2014 14:43:50 GMT 1
Hi Vovchik
will take a look,
just had some fun trying to get the canvas event functions working , now more or less sorted
but having to do some c structs , just completed the scroll wheel ,
this one seem's to work;
SUB HUG_MOUSE_WHEEL(void *data, Evas *e, Evas_Object *obj, void *event_info)
USEC typedef struct { Evas * e; int direction; int z; unsigned int timestamp; const void * data; } Evas_Event_Mouse_Wheel;
Evas_Event_Mouse_Wheel *mousescroll; mousescroll = (Evas_Event_Mouse_Wheel*)event_info; hug_gui_properties.scroll = mousescroll->direction;
END USEC
PRINT "Scroll_you_git " , hug_gui_properties.scroll
/* EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to Evas_Event_Mouse_Wheel This event is triggered by the mouse wheel being rolled while over an object or passively grabbed to an object. */
END SUB
then if got a rectangle on the canvas can call like this. but here the rect = true Evas object and not HUG_ID
evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_WHEEL,HUG_MOUSE_WHEEL,NULL)
Have Fun Alex
|
|
|
Post by alexfish on Jul 3, 2014 16:40:43 GMT 1
Hi Vovchik found the problem , look like ATTACH canvas bug Actually the ATTACH canvas is a dummy when a Evas canvas , all it does is register the actual id of the underlying Evas have done it this way since if want GL then that one will defiantly have to be ATTACHED so can class as a bug for now , will look at the ATTACH and see where the actual problem is have also noted , can place all TIMEOUTS at the end of code , same same rule applies to HUG Gtk Also only one time out can be made live at the end. then if have others they must be called within a sub or function. BR Alex this is the tail end of the code. acanvas = CANVAS(about, "EVAS", win_w, win_h) ''ATTACH(about, acanvas, -1, -1)
WIN_ICON_SET(about, imgdir$ & "yin-yang-48.png") zen = PICTURE(imgdir$ & "yin-yang-48.png", 48, 48) DRAW(acanvas, zen, (win_w / 2) - 24, 16)
alab1 = MARK(about_text1$, win_w - 10, 450) ATTACH(about, alab1, 5, 48)
ANTIALIAS(alab1, 1) ahsep2 = HSEPARATOR(win_w - 10)
ATTACH(about, ahsep2, 5, win_h - 45)
abut = BUTTON("Close", 90, 30)
ATTACH(about, abut, win_w - 95, win_h - 35)
CALLBACK(abut, HIDE_ABOUT)
HIDE(about)
END SUB
' *********************** ' END SUBS & FUNCTION ' ***********************
' *********************** ' MAIN ' ***********************
CHECK_MIXER() MK_GUI() timer_1 = TIMEOUT(1000, ELAPSED_SHOW) DISPLAY
' *********************** ' END MAIN ' *********************** Looking Good Attachments:
|
|
|
Post by alexfish on Jul 3, 2014 18:15:46 GMT 1
Hi Vovchik Can test this lib / modded hope it fixed the ATTACH issue if Ok will update the Beta BR Alex Attachments:hug_elm4-1.bac.tar.gz (8.32 KB)
|
|