|
Post by alexfish on Oct 30, 2012 14:00:14 GMT 1
Though I would try opening up a Project SVG file with InkScape.
|
|
|
Post by alexfish on Oct 30, 2012 14:25:02 GMT 1
Wonder if librsvg up to some of this ?
|
|
|
Post by alexfish on Oct 30, 2012 22:14:40 GMT 1
sizable window tricks make small window then can place other widgets outside the viewable window the main working area is 1000 x 1000 pixels . work a widget around the max area see what happens Attachments:
|
|
|
Post by alexfish on Oct 31, 2012 17:33:54 GMT 1
MM! looks interesting
loaded Project svg file converted by Inkscape into image
|
|
|
Post by alexfish on Nov 1, 2012 8:52:46 GMT 1
Up date: J-vap 4-1
Bug fixes , on widget delete duplicate data appeared on last widget when save Project , then open.
additions include :- xref : Gators mini guide : bacongui28 beta , these are not installed in the user bin all available in the J-vap directory, after calling jvap.
as mentioned jvap may fail when trying first compile . if so call jvap again.
unpack the tar file , then from root terminal cd to "/J-vap-4-1/user/share/jvap" : directory
then
./install.sh
BR
alexfish
|
|
|
Post by alexfish on Nov 2, 2012 19:04:58 GMT 1
J-vap beta rad demo 4-2
fixes : file dialog crash on close + no file select . eronious results from compile errors leading to crash, error messages now sent to bottom right pane
add sc and ch radio buttons
sc = system compile using .so ch = compile with hug lib
don't blink using sc
unpack the tarfile
from the root terminal cd to the J-vap-4-2/usr/share/jvap directory
./install.sh exit the root terminal from user terminal
jvap
Regards
Alex
|
|
|
Post by alexfish on Nov 2, 2012 22:08:58 GMT 1
Just a few of notes about J-vap.
user saves the project when decides to do so. but if have changed important data in the editors, then suggest saving before compile.
compiling , auto generates a .bac file which is found in the J-vap folder in the Home Directory. user can call the bacongui from there. it will not ask to save as, if want use the compile as "entry box" to change the name before compling.
if compiling local "cs" , change the
INCLUDE rad.bac TO
INCLUDE "/usr/share/jvap/rad.bac"
Example of compile local script
INCLUDE "/usr/share/jvap/rad.bac" HUGOPTIONS("NOSCALING")
REM------ User code here ----
SUB Button_3_Click( )
END SUB SUB Button_4_Click( )
END SUB SUB Edit_5_Click( )
END SUB SUB Edit_6_Click( )
END SUB
window1 = WINDOW("Window1",460,220) REM -------------- PROPERTY(window1 , "decorated", TRUE)
Progress_2=PROGRESSBAR("Progress_2",450,40) ATTACH(window1,Progress_2,5,5)
Button_3=BUTTON("Button_3",100,30) ATTACH(window1,Button_3,5,50) FONT(Button_3,"sans regular normal 9") CALLBACK(Button_3,Button_3_Click)
Button_4=BUTTON("Button_4",100,30) ATTACH(window1,Button_4,355,50) FONT(Button_4,"sans regular normal 9") CALLBACK(Button_4,Button_4_Click)
Edit_5=EDIT(190,135) ATTACH(window1,Edit_5,5,80) CALLBACK(Edit_5,Edit_5_Click)
Edit_6=EDIT(255,135) ATTACH(window1,Edit_6,200,80) CALLBACK(Edit_6,Edit_6_Click)
DISPLAY
for a "ch" compile you can leave the code as is. the hug.bac should be there.
in the J-vap folder there are a couple of tools "3g" and "xref", click on them to find what they do.
first time users , suggest leave the settings as is just click to add a button play around with the sizing and placing. or use a frame. can generate nice ui's with frames.
also play around with the window packers, try 5 and 5 move the frame to x=5 y=5 them right click on the frame to suit
main widget control
left click to size , middle button click to set right click to move , middle to set middle button click , display info and enter edits.
Regards
Alex
|
|
|
Post by alexfish on Nov 3, 2012 17:43:03 GMT 1
J-vap 4-2 update to 4-2-1
Fix: file dialog Improved error report on compile , Error message + code to bottom right pane
Regards
Alex
|
|
|
Post by alexfish on Nov 20, 2012 20:06:22 GMT 1
Rad Demo 4-9 Beta : Progress Update
TABBED NOTEBOOK Implemented (coding this into a single IMAGE was harder than expected , hence the delay ) but woks as a note book should Phew! WIDGET association TO FRAME placement implemented " I.E. auto radio grouping implemented"
Release schedule : SUN 25 NOV 2012
Regards
Alex
|
|
|
Post by alexfish on Nov 30, 2012 15:30:09 GMT 1
J-vap 0-4-9-1 BETA
fix: CANVAS CALLBACK : IMAGE LOAD FILE : fix: Notebook; After file load "widgets not listing in the notebook code" fix: Spurious tab add + widgets, "disable add new widget untill last is registered"
debugging the tabs took longer than expected , hence radio grouping has been omitted , will update asp
Omitted use of hug executor , set radio button to sc "compile local"
bacon beta's are installed , but not latest version with sdl support
This is a full install package Download and extract the Tar file
cd to the /usr/share/jvap
then from the terminal as root
./install.sh put the kettle on , it may take a while to install all the bits.
Exit the root terminal
then as user call from the terminal
jvap
Implementing Tab-Notebook
Click to add the Notebook , grab the notebook to position or resize. Click on the First tab then click add notebook , this auto adds a tab.
To add widgets to notebook click on a tab then click to add widget When selecting a different tab to add widgets then existing widgets will still be visible , these will disappear after adding a widget. Must click tab first and then add widget , else the widget will not attach to notebook, place the widget within bounds of Notebook. Widgets do not follow the Notebook, but no different when using bacongui , whereby the widget is place out of range. can exit note editing by clicking "exit tab edits"
Delete all Tabs prior to deleting Main Notebook :
can speed up note-edits by un-checking "Win Autosize".
remember most of what is required is in the "/home/<user>/J-vap" folder.
BR
Alex
|
|
|
Post by alexfish on Nov 30, 2012 18:42:37 GMT 1
What next:
Adding:
MSGDIALOG FILEDIALOG SEDIT, source code editor
refining the widgets , IE Notebook tabs will look like a Notebook , text placement refining the input dialogs , List , Procs ,GSR
Possible : as in working on
Gridview based on the exiting LIST "tree view"
Option Compile as GTK or as . Graphical application , based on svg , much like the design window in the editor , GTK + Graphical
Sample of the LIST with header and gridlines Must include grid_line in the main lib
IMPORT "gtk_tree_view_set_grid_lines(long,int)" FROM hug_Gtk$ TYPE void The Function:Example
FUNCTION GRIDVIEW (STRING header$,int hug_xsize, int hug_ysize,int gridlines)
LOCAL lst, tree, sel, cell, tc, win
lst = gtk_list_store_new(1, G_TYPE_STRING) tree = gtk_tree_view_new_with_model(lst) gtk_tree_view_set_grid_lines(tree,gridlines) gtk_tree_view_set_headers_visible(tree, 1)
sel = gtk_tree_view_get_selection(tree) gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE) cell = gtk_cell_renderer_text_new()
tc = gtk_tree_view_column_new_with_attributes( header$, cell, "text", 0, 0) gtk_tree_view_append_column(tree, tc)
win = gtk_scrolled_window_new(0, 0) gtk_scrolled_window_set_policy(win, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC) gtk_scrolled_window_set_shadow_type(win, GTK_SHADOW_ETCHED_IN) gtk_container_add(win, tree)
IF HUG_WIDGET_SHOW THEN gtk_widget_show_all(win)
hug_widget_xsize(STR$(win)) = hug_xsize hug_widget_ysize(STR$(win)) = hug_ysize hug_widget_signal(STR$(win)) = 5 hug_widget_s_widget(STR$(win)) = sel
hug_widget_type$(STR$(win)) = "list" hug_widget_attach(STR$(win)) = sel hug_widget_font(STR$(win)) = tree hug_widget_focus(STR$(win)) = lst
RETURN win
END FUNCTION Some Code: Example
INCLUDE hug.bacINCLUDE gridview.bac
win=WINDOW("test",300,300) list=GRIDVIEW("Header1",100,300,0) ATTACH(win,list,0,0) TEXT(list,"0ne") TEXT(list,"Two") TEXT(list,"Three") TEXT(list,"Four") TEXT(list," ") list2=GRIDVIEW("Header2",100,300,1) ATTACH(win,list2,100,0) TEXT(list2,"FIVE") TEXT(list2,"SIX") TEXT(list2,"SEVEN") TEXT(list2,"EIGHT") TEXT(list2," ") DISPLAY
|
|
|
Post by bigbass on Dec 2, 2012 4:58:19 GMT 1
Hey Alexfish I adjusted your code so it would compile and added the callbacks to get the selected option to show in the terminal A great example will add it to the widgets page we needed a multiple list widget ! Now we just need Peter to do the REGISTER and METHOD so it gets HUGGED or maybe he could explain what needs to be done so we have another example how to add widgets the official HUG way we need more widgets Name this multi-list.bac lib$ = HUGLIB$("gtk") IMPORT "gtk_tree_view_set_grid_lines(long,int)" FROM lib$ TYPE void
INCLUDE hug.bac INCLUDE gridview.bac
SUB list_choices() listbox_selected$ = GRAB$(list) PRINT listbox_selected$ END SUB
SUB list_choices2() listbox_selected2$ = GRAB$(list2) PRINT listbox_selected2$ END SUB
win=WINDOW("Multi list",200,200) list=GRIDVIEW("LIST",100,200,0) ATTACH(win,list,0,0) TEXT(list,"0ne") TEXT(list,"Two") TEXT(list,"Three") TEXT(list,"Four") TEXT(list," ") CALLBACK(list, list_choices)
list2=GRIDVIEW("LIST2",100,200,1) ATTACH(win,list2,100,0) TEXT(list2,"FIVE") TEXT(list2,"SIX") TEXT(list2,"SEVEN") TEXT(list2,"EIGHT") TEXT(list2," ") CALLBACK(list2, list_choices2)
DISPLAY
name this gridview.bac it doesn't get compiled it is the include file FUNCTION GRIDVIEW (STRING header$,int hug_xsize, int hug_ysize,int gridlines)
LOCAL lst, tree, sel, cell, tc, win
lst = gtk_list_store_new(1, G_TYPE_STRING) tree = gtk_tree_view_new_with_model(lst) gtk_tree_view_set_grid_lines(tree,gridlines) gtk_tree_view_set_headers_visible(tree, 1)
sel = gtk_tree_view_get_selection(tree) gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE) cell = gtk_cell_renderer_text_new()
tc = gtk_tree_view_column_new_with_attributes( header$, cell, "text", 0, 0) gtk_tree_view_append_column(tree, tc)
win = gtk_scrolled_window_new(0, 0) gtk_scrolled_window_set_policy(win, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC) gtk_scrolled_window_set_shadow_type(win, GTK_SHADOW_ETCHED_IN) gtk_container_add(win, tree)
IF HUG_WIDGET_SHOW THEN gtk_widget_show_all(win)
hug_widget_xsize(STR$(win)) = hug_xsize hug_widget_ysize(STR$(win)) = hug_ysize hug_widget_signal(STR$(win)) = 5 hug_widget_s_widget(STR$(win)) = sel
hug_widget_type$(STR$(win)) = "list" hug_widget_attach(STR$(win)) = sel hug_widget_font(STR$(win)) = tree hug_widget_focus(STR$(win)) = lst
RETURN win
END FUNCTION
|
|
|
Post by alexfish on Dec 2, 2012 19:28:12 GMT 1
Nice to see you back Joe.
Will be looking at the grid in detail soon , need to look into what is in the dev-helper as regards adding columns + settings
just completed the Notebook for jvap
BR
Alex
|
|
|
Post by alexfish on Dec 3, 2012 2:18:42 GMT 1
@ Joe can get gridview with multiple colums GTK say set the column and set the text but when place text to column 0 all the colums show the same text , MM! set to column 1 or more then no text appears more work to do I suppose. Attachments:
|
|
|
Post by bigbass on Dec 3, 2012 4:11:06 GMT 1
Hey alexfish (You may have overlooked something) this works with three as static in the same way you could add more source it to see the output in the terminal Joe Name it multi-list3.baclib$ = HUGLIB$("gtk") IMPORT "gtk_tree_view_set_grid_lines(long,int)" FROM lib$ TYPE void
INCLUDE hug.bac INCLUDE gridview.bac
SUB list_choices() listbox_selected$ = GRAB$(list) PRINT listbox_selected$ END SUB
SUB list_choices2() listbox_selected2$ = GRAB$(list2) PRINT listbox_selected2$ END SUB
SUB list_choices3() listbox_selected3$ = GRAB$(list3) PRINT listbox_selected3$ END SUB
win=WINDOW("Multi list",300,200) list=GRIDVIEW("LIST",100,200,1) ATTACH(win,list,0,0) TEXT(list,"0ne") TEXT(list,"Two") TEXT(list,"Three") TEXT(list,"Four") CALLBACK(list, list_choices)
list2=GRIDVIEW("LIST2",100,200,1) ATTACH(win,list2,100,0) TEXT(list2,"FIVE") TEXT(list2,"SIX") TEXT(list2,"SEVEN") TEXT(list2,"EIGHT") CALLBACK(list2, list_choices2)
list3=GRIDVIEW("LIST3",100,200,1) ATTACH(win,list3,200,0) TEXT(list3,"a") TEXT(list3,"b") TEXT(list3,"c") TEXT(list3,"d") CALLBACK(list3, list_choices3)
DISPLAY
|
|