From: Mark M. <mie...@gm...> - 2007-07-12 15:07:10
|
Hi all, I'm getting ready to commit some updates to the ooDialog ListControl and thought I'd post an outline of them for comment. The Windows List-View control has been considerably extended since ooDialog was designed, I've added support for some but not all of the new features. Here is a list of the new methods. Extended Styles: Although the extended styles use window flags, they use a seperate mechanism then the normal style flags. You can not create a List-View control using the flags, they have to be added (or removed) after the control exists. ::method ReplaceExtendedStyle use strict arg oldstyle, newstyle ::method AddExtendedStyle use strict arg style ::method RemoveExtendedStyle use strict arg style ::method GetExtendedStyle ::method GetExtendedStyleRaw These are the style keywords BORDERSELECT CHECKBOXES FLATSB FULLROWSELECT GRIDLINES HEADERDRAGDROP INFOTIP MULTIWORKAREAS ONECLICKACTIVATE REGIONAL SUBITEMIMAGES TRACKSELECT TWOCLICKACTIVATE UNDERLINECOLD UNDERLINEHOT LABELTIP DOUBLEBUFFER SIMPLESELECT Function: ======= ::method SetHoverTime use arg time ::method GetHoverTime -- Up to this point, I have pretty firm feelings that the method names are correct. Below this, I could be swayed into changing them. One of the new features of the List-View control is a check box at the left of a row. The following methods are to manipulate the checkboxes. Obviously, this is the way I think it should be done. But, the methods could be condensed into fewer methods. For instance, Check could take a -1 to CheckAll, same for Uncheck. GetCheck could be removed. IsChecked simply checks the return code and returns false on error. However, one of the things about ooDialog that can be frustrating to the user is that things don't work as expected, but there is no clue as to why. So, GetCheck supplies a way for the user to understand why there is a failure without sticking a printf in the C code and rebuilding. IsChecked supplies a way to use the method in a logical expression without getting an error that the value is not strictly 0 or 1 (if there is an error return code.) ::method Check use strict arg item ::method CheckAll ::method Uncheck use strict arg item ::method UncheckAll ::method GetCheck use strict arg item returns 0, 1, or error codes ::method IsChecked use strict arg item returns strictly .true or .false Notifications: ========= The List-View notifications supply a lot more information than is currently available to the ooDialog programmer. For instance, the ooDialog programmer can connect a left mouse click on the ListControl to a method. But, the notification simply says there was a click - it could be anywhere. However, the infomation as to which row, and even which column in that row, was clicked on is available. I have added the following notifications. Currently, I have them in a separate method. Separate from the existing ConnectListNotify. They could be all put in the existing method. As both the implementer and a user of ooDialog, I would prefer that they be in a seperate method. Here again, I could easily be swayed. ::method ConnectListNotifyEx use arg id, type, msgToRise type = "CLICK" Left mouse click, supplies row and column clicked. type = "CHECKBOXCHANGED" Checkbox was checked or unchecked. Supplies which row and if checked or unchecked type = "SELECTCHANGED" Selection state changed. Supplies which row and if now selected or unselected. type = "FOCUSCHANGED" Focus state changed. Supplies which row and if now focused or unfocused. type = "SELECTFOCUS" Selection or focus changed. Supplies which row and new state. SELECTED FOCUSED UNSELECTED UNFOCUSED |