Re: Project Leviathan - wxEuphoria 3.1.0 alpha1

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...
ghaberek said...

I think the library really hits a brick wall when fails to have a proper ListView implementation.

I appreciate the other points you made, but just in case, demo\pGUI\listview.exw does the detailed-list-with-sortable-columns thing I need, but there is indeed nothing similar to a thumbnail view.

I looked at that but it's actually a good example of what's turned me off from IUP.

This code just looks ugly to me. And it's not your fault, IUP forces this syntax on you.

I just can't make their ALL CAPS ATTRIBUTE SYNTAX sit comfortably in my head.

procedure main() 
    IupOpen() 
 
    IupSetHandle(LB, IupLoadImage("lightbulb.png")) 
 
    matrix = IupMatrix() 
    IupSetInt(matrix, "NUMCOL", length(titles)) 
    IupSetInt(matrix, "NUMCOL_VISIBLE", length(titles)) 
    IupSetInt(matrix, "NUMLIN", MAX) 
    IupSetInt(matrix, "NUMLIN_VISIBLE", 15) 
--  IupSetInt(matrix, "WIDTHDEF", 40) -- (now completely overidden anyway) 
    for i=1 to length(twidth) do 
        IupSetIntId(matrix, "RASTERWIDTH", i, twidth[i]) 
        IupSetAttributeId(matrix, "ALIGNMENT", i, talign[i]) 
    end for 
    --IMPORTANT: HEIGHT0 tells IupMatrix that we are gonna have column titles at line 0 
    IupSetInt(matrix, "HEIGHT0", 10); 
--  IupSetInt(matrix, "WIDTH0", NULL);  -- (no help) 
    IupSetAttribute(matrix, "RESIZEMATRIX", "YES"); 
    IupSetAttribute(matrix, "MARKMODE", "LIN"); 
    IupSetAttribute(matrix, "MARKAREA", "CONTINUOUS"); 
--DEV does not seem to work... 
--  IupSetAttribute(matrix, "MULTIPLE", "YES"); -- (or is that "MARKMULTIPLE"? the default is NO anyway) 
 
--  IupSetAttribute(matrix, "READONLY", "YES"); -- with VALUE_CB set, non-setting of VALUE_EDIT_CB (also) makes it read-only 
    IupSetAttribute(matrix, "HIDEFOCUS", "YES"); 
    IupSetAttribute(matrix, "FRAMECOLOR", "220 220 220"); 
--  IupSetAttribute(matrix, "FRAMEVERTCOLOR*:1", "255 255 255") 
    IupSetAttribute(matrix, "BORDER", "NO"); 
    IupSetAttribute(matrix, "CURSOR", "ARROW"); 
    IupSetAttribute(matrix, "TYPE*:1", "IMAGE"); 
 
    IupSetCallback(matrix, "VALUE_CB",      Icallback("value_cb")) 
    IupSetCallback(matrix, "ENTERITEM_CB",  Icallback("enteritem_cb")); 
    IupSetCallback(matrix, "CLICK_CB",      Icallback("click_cb")); 
 
    statusbar = IupLabel(buildDummyData()); 
    IupSetAttribute(statusbar, "EXPAND", "HORIZONTAL"); 
    IupSetAttribute(statusbar, "PADDING", "10x5"); 
 
    Ihandle vbox = IupVbox({matrix, 
                            statusbar}); 
 
    Ihandle dlg = IupDialog(vbox) 
    IupSetAttribute(dlg, "TITLE", "IupMatrix in Callback Mode"); 
    IupSetCallback(dlg, "RESIZE_CB", Icallback("resize_cb")); 
    IupSetCallback(dlg, "K_ANY", Icallback("key_cb")); 
    IupShow(dlg) 
 
    IupMainLoop() 
    IupClose() 
end procedure 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu