1. Changes in Win32lib v0.54
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 22, 2000
- 514 views
Below is a list of the changes in Win32Lib v0.54. This release WILL BREAK some code. I'm very sorry about that. The problem is that a few routines were badly named and have been renamed in this release. I'm trying to get some consistancy in the naming convention used. I have NOT released this code to the SourceForge website yet as I'm still tidying up the documentation. I'm expecting to loaded up in about 24-48 hours. Speak up now or forever hold your peace. --------------------------------- -Fixed. Can now use setHint() an a top-level window. -Fixed No longer triggers an onScroll event if the scroll position hasn't actually changed. -Fixed. Now handles setting focus after a control has been destroyed. -Fixed. The freeing of string memory has been made reenterant. -Fixed. getMultIndices() and getMultItems() now cope with no items selected. -Fixed. No longer crashes when a TVN_DELETEITEM event occurs for treeview controls. -Enhanced. warnErr() now allows the user can now opt to ignore repeated warnings. -Enhanced window scrollbars Standard scroll bars on windows windows now trigger onScroll events -Enhanced. create(), createEx(), setClientSize(), setSize(), setPosition(), setPenPosition() You can now supply dimensions relative to the control's parent in terms of percentages, plus optional pixel offset. -Enhanced. Extra validation is being done to ensure that Window Handles are being used with the correct control ID. -Enhanced The event handlers onXXX can now be set for the Screen ID. This will capture all events of the given type for all controls in the application. For example onKeyDown[Screen] will be fired for all KeyDown events on all controls. -Added getVScrollPos(), getHScrollPos(), setVScrollPos(), setHScrollPos() These get and set the Vertical and Horizontal positions of scrollbars that are attached to windows via the WS_H/VSCROLL -Added classDefaults() This allows you to set the default styles for each control. -Added setClientRect() This resizes your window so that the client area is as specified. -Added doEvents() This allows Windows to check for messages/events during event handling. -Added acquire_mem(), release_mem(), new_memset(), and manage_mem() These are the new memory management routines that are used in win32lib. The use of free(), allocate() and allocate_string() is discouraged inside win32lib.ew. Please use the new routines instead. -Added getPosition() This returns a sequence containing the pixel position of the top lefthand corner of the control -Added copyFile(), deleteFile(), moveFile(), createDirectory(), getTmpPath(), getTempFile() These are wrappers for the Windows file/directory commands. -Added openDialog() This simulates a dialog-type window. It opens the specified window and directs all events to that window until it is closed. -Renamed setPosition() has been renamed to setPenPosition() -Renamed moveWindow() has been renamed to setPosition() -Renamed getExtent() has been renamed getSize() -Renamed getSize() has been renamed to getExtent() -Changed The distribution now comes with a number of toolkit files. tk_mem.e (memory management) tk_fileio.e (File Input-Output) tk_maths.e (Mathematical functions) tk_misc.e (Miscellaneous) These can be used with any Eu project. These files are "included" by win32lib.ew -Changed. onClick events now fired for all non-static controls that don't capture mouse events. For example, the StatusBar. -Changed Now uses the DoubleClick time interval for the maximum mouse click time tolerence. -Removed. The routines free_strings(), allot_string(), and allocate_struct() have been removed. --------------------------------------------- Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)
2. Re: Changes in Win32lib v0.54
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Oct 24, 2000
- 482 views
Derek, Re: the code breaking in .54, in particular the "cross" re-naming of getSize() and getExtent(), might it be possible to make a "break-fixer" program that could be run on programs to change any instance of "wrong-with-54" to "now-ok-with-54"? Re: create() etc. enhancements allowing use of % dimensions, does this mean that *every* use of create() etc is now broken??? Dan Moyer ----- Original Message ----- From: "Derek Parnell" <dparnell at BIGPOND.NET.AU> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Saturday, October 21, 2000 9:01 AM Subject: Changes in Win32lib v0.54 > Below is a list of the changes in Win32Lib v0.54. > This release WILL BREAK some code. I'm very sorry about that. > The problem is that a few routines were badly named and have been renamed in > this release. > I'm trying to get some consistancy in the naming convention used. > > I have NOT released this code to the SourceForge website yet as I'm still > tidying up the documentation. I'm expecting to loaded up in about 24-48 > hours. > > Speak up now or forever hold your peace. > > --------------------------------- > -Fixed. > Can now use setHint() an a top-level window. > -Fixed > No longer triggers an onScroll event if the scroll position > hasn't actually changed. > -Fixed. > Now handles setting focus after a control has been destroyed. > -Fixed. > The freeing of string memory has been made reenterant. > -Fixed. > getMultIndices() and getMultItems() now cope with no items > selected. > -Fixed. > No longer crashes when a TVN_DELETEITEM event occurs for > treeview controls. > -Enhanced. > warnErr() now allows the user can now opt to ignore repeated > warnings. > -Enhanced window scrollbars > Standard scroll bars on windows windows now trigger onScroll > events > -Enhanced. create(), createEx(), setClientSize(), setSize(), > setPosition(), setPenPosition() > You can now supply dimensions relative to the control's parent > in terms of percentages, plus optional pixel offset. > -Enhanced. > Extra validation is being done to ensure that Window Handles are > being used with the correct control ID. > -Enhanced > The event handlers onXXX can now be set for the Screen ID. This > will capture all events of the given type for all controls in > the application. For example onKeyDown[Screen] will be fired > for all KeyDown events on all controls. > -Added getVScrollPos(), getHScrollPos(), setVScrollPos(), setHScrollPos() > These get and set the Vertical and Horizontal positions of > scrollbars that are attached to windows via the WS_H/VSCROLL > -Added classDefaults() > This allows you to set the default styles for each control. > -Added setClientRect() > This resizes your window so that the client area is as specified. > -Added doEvents() > This allows Windows to check for messages/events during event > handling. > -Added acquire_mem(), release_mem(), new_memset(), and manage_mem() > These are the new memory management routines that are used in > win32lib. The use of free(), allocate() and allocate_string() > is discouraged inside win32lib.ew. Please use the new routines > instead. > -Added getPosition() > This returns a sequence containing the pixel position of the > top lefthand corner of the control > -Added copyFile(), deleteFile(), moveFile(), createDirectory(), > getTmpPath(), getTempFile() > These are wrappers for the Windows file/directory commands. > -Added openDialog() > This simulates a dialog-type window. It opens the specified > window and directs all events to that window until it is closed. > -Renamed > setPosition() has been renamed to setPenPosition() > -Renamed > moveWindow() has been renamed to setPosition() > -Renamed > getExtent() has been renamed getSize() > -Renamed > getSize() has been renamed to getExtent() > -Changed > The distribution now comes with a number of toolkit files. > tk_mem.e (memory management) > tk_fileio.e (File Input-Output) > tk_maths.e (Mathematical functions) > tk_misc.e (Miscellaneous) > These can be used with any Eu project. > These files are "included" by win32lib.ew > -Changed. > onClick events now fired for all non-static controls that don't > capture mouse events. For example, the StatusBar. > -Changed > Now uses the DoubleClick time interval for the maximum mouse > click time tolerence. > -Removed. > The routines free_strings(), allot_string(), and > allocate_struct() have been removed. > --------------------------------------------- > Derek Parnell > Melbourne, Australia > (Vote [1] The Cheshire Cat for Internet Mascot)
3. Re: Changes in Win32lib v0.54
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 28, 2000
- 476 views
----- Original Message ----- From: "Dan B Moyer" <DANMOYER at PRODIGY.NET> > Re: the code breaking in .54, in particular the "cross" re-naming of > getSize() and getExtent(), might it be possible to make a "break-fixer" > program that could be run on programs to change any instance of > "wrong-with-54" to "now-ok-with-54"? Yeah, after hand-changing all the demo programs I could agree. I'll try to knock up a quick and dirty conversion program. > Re: create() etc. enhancements allowing use of % dimensions, does this mean > that *every* use of create() etc is now broken??? No. The create() and other routines still accept the same parameters as they do now. Here's an example ... myWin = create(Window, "TEST", 0, 20, -- The left edge is at pixel #20 across 30, -- The top edge is at pixel #30 down 400, -- The width is exactly 400 pixels 300, -- The height is 300 pixels 0) Btn1 = create(MleText, "", myWin, 0.25, -- Left edge is 25% of the window width 25, -- Top edge is 25 pixels down {-1, -10}, -- width extends to right edge less 10 pixels 0.5, -- height is 50% of window height 0) when this really comes in to its fore is on a parent resize event. procedure onResize_myWindow(...) setPosition(Btn1, 0.25, -- Left edge is 25% of the window width 25, -- Top edge is 25 pixels down {-1, -10}, -- width extends to right edge less 10 pixels 0.5 -- height is 50% of window height ) end procedure ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)