From: Mats B. <ma...@pr...> - 2001-07-22 15:20:32
|
Parallel post to "tc...@li..." and "comp.lang.tcl". Reply-To: compl.lang.tcl Hi all, I've made a native menubutton for the Mac. It is made as a shared lib, and with a few lines of code you replace the old one completely. It presently lacks the -image and -bitmap options. The implementation differs a bit from the other Mac controls (button, checkbutton, radiobutton) since it doesn't uses a mix of Apple and tk drawing code (very unfortunate IMHO), but uses all native Apple code for most things. Before I take it any further, I want to have an experienced Mac programmer to scrutiny it for any stupid solutions. Get it from "http://hem.fyristorg.com/matben/download/MacMenuButton.sit" Wishes, Mats Bengtsson PS: In case you don't use it already, native tk_messageBox at "http://hem.fyristorg.com/matben/download/MovableAlerts.sit" README for the MacMenuButton extension -------------------------------------- This is supposed to replace the 'menubutton' on the Macintosh. It requires the Appearence Manager which is found in MacOS 8.0 and up. There are some issues left: - The -image and -bitmap options are not supported, yet. - The UTF-8 translation is not made. - There is no button pressed flag so I highlight it when the mouse enters, just as a reminder that it must be fixed. - Don't know which color to pick for the three pixels in each corner. It is now the -background color, but the ordinary button uses -highlightbackground? - The position of the popup menu should be changed in order to conform better with standard Mac apperance.. - The widget class is the "standard" MenuButton class. - Something needs to be done so that we can get Mac native font stuffs from a Tk_Font object; I've included a crude hack. - It is compliant to the Apperance Manager which means that foreground and background colors are set via themes and not from command switches. USAGE: Put the MacMenuButton.shlb in the "Tool Command Language" folder, and ... if {[string compare $tcl_platform(platform) "macintosh"] == 0} { if {![catch {package require MacMenuButton} msg]} { rename menubutton "" rename macmenubutton menubutton } } Mats Bengtsson ma...@pr... |