Re: [Xbae-discuss] xbae and sorting
Brought to you by:
dannybackx
From: Bernd M. <bm...@ar...> - 2004-06-28 18:31:26
|
Am Montag, 28. Juni 2004 17:59 schrieben Sie: > Sorting can be accomplished quite easily by putting pointers to your > records in the indvidual rows with XbaeMatrixSetRowUserData() and then wh= en > you need to sort the matrix collect all the pointers with > XbaeMatrixGetRowUserData, sort them with qsort, then reset the matrix row= s. > > We've done several varients of this and it works just fine. > > many thanks for your answer. the problem is, that several applications need to store individual data in = the=20 user_data pointer. Therefore this value has to be sorted too. there may not be a problem to add a second one, but i would prefer a buildi= n=20 function like: XbaeMatrixSort (Widget w, void *proc) where proc is the user-defined-sort-comparison-function. =2E.. String value1; String value2; XtPointer userdata1; XtPointer userdata2; =2E.. (something like this...) I would prefer a defined structure, which will include all neccesary values. Take a look to=20 http://www.arcad.de/INTERNA-Prospekt-WWW.pdf This product was build with xrt-table. =46or my opinion the per_cell and user-data value and pixmap and clip point= er=20 has to get connected to your cells matrix. (one structure) then the sorting will be easy and the handling of the xbae will be more=20 easier. i am sure, the NOT_PER_CELL method is faster than the PER_CELL method. we have tested one of our databases with 17.000 articles with your xbae and= =20 the slow per-cell method. its really fast enough. xrt does all jobs with a filter-mask. first, you have to declare the row and/or column range, then you change the= =20 parameters. (color, alignment, etc....) This is very efficient. the source of xbae is very difficult. there is many same code and the same= =20 functions in the source. (XtRealloc...., XtFree....) while we tried to understand the code, we lost the overview. when we want to add a value to a cell, we have first to add a row and a=20 column. a quick easy start is not possible. (dynamic malloc?) a big problem is the multiline/singleline table standard. in practice it is= =20 important to use both XmText modes together. (long text for articles, etc.) your draw.c routine is not able to display long text properly.=20 if the text contains the CR-character, the text will not be parsed into=20 correct lines. (we have changed this behavior) the decision between pixmap and/or text depends on a callback. i guess, tha= t=20 it should depend on an !XmUNSPECIFIED_PIXMAP value in your pixmap variable= =20 and/or type. (possible text and pixmap together? no areaclear?) the xbae it the only widget we found, which has a good basis.=20 in practice there are some missing functions, which rejects a proper using. So: unfortunally i have no time to build a good, common xbae source. i am only able to build a (german: hauruck) derivate. we are not able to use the xrt widget because it seems, that the developmen= t=20 stops. the qt library is to far away. so the xbae source must live, isnt it? bernd > > -----Original Message----- > From: xba...@li... > [mailto:xba...@li...] On Behalf Of Bernd > Metzger Sent: Monday, June 28, 2004 10:15 AM > To: xba...@li... > Subject: [Xbae-discuss] xbae and sorting > > > hello, > > we have worked a long time with the xrt table widget. > because it seems, that there is no further development, we > took a look to other widgets. > the xbae widget is ok, but there are some important functions missing: > > the structure of the cell structs doesnt allow a qsort. > the handing of pixmaps is complicate (callback!) > one missing resize function in the matrixrefresh function is important. > (add it) > > There is no problem to change this source. > but we want to work together with all developers. > we would like to get an answer, so we will work together. > > > mit freundlichen Gr=FC=DFen > Ihr > > Arcad Systemhaus > Bernhard Metzger > bm...@ar... > http://www.arcad.de > phone: +49 2364 2000 > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. Attend Bla= ck > Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top > technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ Xbae-discuss mailing list > Xba...@li... > https://lists.sourceforge.net/lists/listinfo/xbae-discuss =2D-=20 mit freundlichen Gr=FC=DFen Ihr Arcad Systemhaus Bernhard Metzger bm...@ar... http://www.arcad.de phone: +49 2364 2000 |