Re: [Iup-users] Some mixed bugs and questions
Brought to you by:
scuri
From: Antonio S. <sc...@te...> - 2010-05-31 18:25:28
|
On the buttons you have those problems, are you using IMAGE and IMPRESS? Thanks, scuri From: Robert Persson [mailto:r.k...@gm...] Sent: sexta-feira, 28 de maio de 2010 14:46 To: IUP discussion list. Subject: Re: [Iup-users] Some mixed bugs and questions Hello Scuri. There has been a few places where the sluggish visual feedback of buttons has annoyed me. My current project is a CAD/drawing system which has unlimited undo/redo capabilities through an incremental spatial database. Oftenly the user wants to go 'back' many steps, let say 10-20 by pressing the undo toolbar button. Maybe i'm very quick but the visual feedback only shows the button has been pressed 2-3 times on my computer, but the button ACTION callback is called as many times as it's pressed (except for the FOCUSONCLICK bug I reported earlier). I think I can live with this but it's really nice whe the user interface is 'responsive'. This behaviour of buttons has not been in any toolkit I've worked with before, for example wxWidgets, Borland VCL, WindowsForms, FLTK, FOX toolkit and more. /Regards Robert Persson 2010/5/28 Antonio Scuri <sc...@te...> Hi, About the button problem, are you using it to build an increment/decrement button set? Like in IupSpin? If so, I may have an alternative. To use a scrollbar control. Notice that its buttons are much more simpler that a standard button. And it can be reduced to show only its increment buttons. What do you think? BTW, did you notice that IupText has the SPIN attribute? Best, scuri From: Robert Persson [mailto:r.k...@gm...] Sent: quarta-feira, 26 de maio de 2010 10:39 To: IUP discussion list. Subject: Re: [Iup-users] Some mixed bugs and questions Hello Scuri! * On my windows 64 box, when a button has FOCUSONCLICK=NO, and is clicked two times quickly (like 'double click'), the ACTION callback is called not two, but three times! I suspect this has something to do with double click handling in button control. Point 9 in my last mail (se below) was about a delay when a button is clicked several times quickly. The ACTION callback is called correctly, but the visual feedback has a really sluggish feeling. I bet this has to do with the double click handling in the button control as well. (note that I run without visual styles). It would be really nice to have this fixed. * About point 1 below, binary incompability between ubuntu and the linux on your support machines (CentOS???), is it known why this incompability exists? Diffrent GTK versions? * In a future version of IUP, a nice utility function would be a way to convert a K_ANY key converted to the actual output of that keypress. /Regards Robert.P., Sweden 2010/5/11 Antonio Scuri <sc...@te...> Hi Robert, Thanks for all the reports. > 1) On a linux2.6 64 bit (ubuntu 9.10), the code below does not show the > title text of the checkbox. The natural size of the checkbox seems to > be correctly computed. The console also shows the following error > running this program: > "(iupctest:10430): Gtk-CRITICAL **: gtk_label_set_text: assertion > 'GTK_IS_LABEL (label)' failed" That is a binary compatibility problem between the machine I built the library and your system. I use Ubuntu myself, but the machine I use the build the libraries are managed by the Tecgraf technical support, and they are not Ubuntu. While I convince them to change the OS, the only solution is to rebuild the library on your system. Only the main library is need to be rebuilt. Let me know if this is a problem for you. In Ubuntu you will have to install the gtk2-dev package and download the IUP source code, in the iup/src folder type make. Tip, to download the source code from CVS type: cvs -z3 -d:pserver:ano...@iu...:/cvsroot/iup co -P iup (once) cvs -q -z3 -d:pserver:ano...@iu...:/cvsroot/iup update -P (to keep it up to date) > 2) In the tree control DELNODE=MARKED cannot delete the node with ID 0 > even if ADDROOT=NO Sorry, this is a bug. I removed the constrain in 3.1, but a "for" was starting at 1. It is fixed on CVS. It affected all drivers. > 3) PARENT attribute of tree return 0 for nodes that has no parent. This > is a misbehaviour if ADDROOT=NO, because there is no way to know if a > node is in the branch with id 0 or directly in the tree with no parent. Well, in fact it returns NULL. If you use IupGetInt to check the attribute then the NULL will be converted to 0. You must check if it's NULL before using IupGetInt. > 4) I dont know if this is a 'bug' but TITLEFONTid in a tree returns > nothing if the TITLEFONTid attribute was never set. That's correct. > 5) VALUE attribute of tree returns 0 when no node is focused, just as > the documentation tells. This was not a problem before, but now when > ADDROOT=NO there is no way to tell if the first node is selected or > not. Almost what you said. VALUE is focus, not selection. For backward compatibility VALUE must return 0 when no node is focused, independent of the selected node(s). It returns -1 if there are no nodes in the tree (this is new in 3.1). To check if the first node is selected, use "MARKED0". > 6) Setting MARK=CLEARALL in tree control does the same as setting > MARK=MARKALL, ie. it selects all nodes in the tree. It seems like > CLEARALL is misconnected. This bugs shows om my 64 bit windows7 box. It is fixed now on CVS. It affected only the Windows driver. > 7) Question: RENAMESELECTION in tree control returns NULL when I try to > use it. How is it supposed to be used? Sample? I forgot to document its usage. It is used only once after SHOWRENAME_CB is called and before the text box is shown, so it is write-only, cannot be consulted in RENAME_CB. > 8) Question: How is the new attribute EXPANDWEIGHT for vbox and hbox > children supposed to be used? In my test, i tried to add three buttons > to a vbox, setting "EXPANDWEIGHT"="0.5" and "EXPAND"="YES" assuming the > buttons would expand only through the half width of the vbox, but > nothing happened compared to the usual behavior. EXPANDWEIGHT is used relative to the possible expansion of the control. The expansion for each control is done if there is room in the box, but it will be done equally for all controls than can expand inside that box. EXPADWEIGHT allow you to control that allowing a control to expand more or less than another. Usually you will set something like 0.7 in one control and 1.3 in another control, so the second control will expand more than the first. But notice that this will only work if both controls have EXPAND in the direction of the box. But I just noticed a stupid error, in the implementation I used "EXPANDWEIGTH" (noticed the misplaced TH at the end). It was wrong also in my test application... What a shame... Although in the documentation is spelled right. It is fixed on CVS. > 9) This is a question/bug that has been up before but is not cleared. > The button control in windows has a delay after it's clicked, making it > impossible to click (send ACTION callbacks) several times a second. > This can be easily tested by counting the times per second a button is > clicked. It is impossible to more than about 1-2 times a second. This > is no problem for toolbar buttons but it is really annoying for buttons > that increases a value in a text box for example. Yes, that's correct. To accept a repeating click in a button, instead of implementing the ACTION callback, use the BUTTON_CB callback. This is a lower level callback and the results are much better for that application. Another interesting trick is that if you just want to enable a click and hold behavior, start a timer in BUTTON_CB and stop it when the button is released. See the implementation of the IupSpin control in the "iup/src/iup_spin.c" module. > 10) The new sizer control is very nice. One thing a noticed is that it > was possible to drag the bar below the childs natural size. Maybe some > way to set a limit would be nice? On the child you want to limit, set the MINSIZE attribute. But I just noticed that IupSplit is not respecting MINSIZE and MAXSIZE, its children are limited but the bar moves over the control. It is fixed in CVS. I also added a new attribute for IupSplit, MIXMAX that allows to constrain its interaction. > 11) Finally some future feature request. > >utf-8 is on the way and this is a major need for me. Will this be in > like IUP3.2 or further inte future, IUP4.0?? I think this will be in 3.2. > >Images in lists has been discussed. Will thoose also work when the > list is a drop down list? Yes, it will also work for drop down. > >Setting a grid in ROWSELECT or COLUMNSELECT mode would be a nice > feature as well as custom painting in the cells and/or images for the > cells. This would make the grid a powerful listview control. Don't get which control you are talking about. But IupMatrix is our current control most similar to listview. In IupMatrix you can draw in the cells using CD. We have planned some improvements for IupMatrix, like support for toggle marks, images or a progress indicator, instead of text in a cell. This is planned also for 3.2. Best, Scuri ---------------------------------------------------------------------------- -- _______________________________________________ Iup-users mailing list Iup...@li... https://lists.sourceforge.net/lists/listinfo/iup-users ---------------------------------------------------------------------------- -- _______________________________________________ Iup-users mailing list Iup...@li... https://lists.sourceforge.net/lists/listinfo/iup-users |