From ggarra at advancedsl.com.ar Tue Oct 11 16:12:48 2005 From: ggarra at advancedsl.com.ar (Gonzalo Garramuno) Date: Tue, 11 Oct 2005 17:12:48 -0300 Subject: [fxruby-users] FXImage.getPixel() Message-ID: <00bd01c5cea0$28495170$0201a8c0@microsoft> FXImage.getPixel(x, y) is broken. It segfaults. (windows) Happens on both fxruby1.2 and 1.4. Sample script: require 'fox14' include Fox application = FXApp.new("bug", "gga") application.create image = FXImage.new(application, nil, IMAGE_SHMI|IMAGE_SHMP, 512, 512) image.create image.getPixel(0,0) # <------ will segfault application.run From lyle at knology.net Tue Oct 11 17:31:18 2005 From: lyle at knology.net (lyle@knology.net) Date: 11 Oct 2005 21:31:18 -0000 Subject: [fxruby-users] FXImage.getPixel() In-Reply-To: <> References: <> Message-ID: <20051011213118.20149.qmail@webmail3.knology.net> On Tue, 11 Oct 2005 17:12:48 -0300, Gonzalo Garramuno wrote : > FXImage.getPixel(x, y) is broken. It segfaults. (windows) Thanks. Have added to the bug list. I'm going to try to get a new release out sometime next week (after returning from RubyConf). From piet.hadermann at pandora.be Sat Oct 15 10:17:06 2005 From: piet.hadermann at pandora.be (Piet Hadermann) Date: Sat, 15 Oct 2005 16:17:06 +0200 Subject: [fxruby-users] Problem with 1.4.2 on fc3 Message-ID: <1129385827.13333.12.camel@localhost.localdomain> Hi! I've been trying to get fxruby 1.4.2 up and running, but unfortunately with no succes so far. My linux knowledge is still pretty basic (background in windows/c++/mfc programming for a living... and further back on Amiga... but using linux at home and for some none work-related projects) so I just hope I didn't screw up something obvious. I'm running fedora core 3, ruby 1.8.3 (2005-09-21) [i386-linux]. I installed from gems (after installing/compiling FOX itself) and get the following: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'fox14' => false fox14.so is at:/usr/lib/ruby/gems/1.8/gems/fxruby-1.4.2/ext/fox14/fox14.so /usr/local/lib contains (amongst others): libCHART-1.4.so libFOX-1.4.a libFOX-1.4.so.0 libCHART-1.4.a libCHART-1.4.so.0 libFOX-1.4.la libFOX-1.4.so.0.0.17 libCHART-1.4.la libCHART-1.4.so.0.0.17 libFOX-1.4.so gem check --alien gives me the following: Performing the 'alien' operation ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - /usr/lib/ruby/gems/1.8/gems/fxruby-1.4.2/ext/fox14/scintilla_wrap.cpp --> Does this mean I have to install scintilla (or fxscintilla ???) I figured, since there's a fox14.so and a libFOX-1.4.so, compiling/installing went ok, ar am I wrong here ? Any help is mucho appreciated, thanks in advance! Piet. From piet.hadermann at pandora.be Sun Oct 16 06:51:56 2005 From: piet.hadermann at pandora.be (Piet Hadermann) Date: Sun, 16 Oct 2005 12:51:56 +0200 Subject: [fxruby-users] Problem with 1.4.2 on fc3 In-Reply-To: <1129385827.13333.12.camel@localhost.localdomain> References: <1129385827.13333.12.camel@localhost.localdomain> Message-ID: <1129459916.5018.5.camel@localhost.localdomain> Hi! After installing scintilla/fxscintilla I still have the same issue. But... 'gem check --alien' now returns the following: fxruby-1.4.2 has 1 problems /usr/lib/ruby/gems/1.8/cache/fxruby-1.4.2.gem: Unmanaged files in gem: ["ext/fox14/gem_make.out", "ext/fox14/fox14.so", "ext/fox14/unregisterOwnedObjects.o", "ext/fox14/ui_wrap.o", "ext/fox14/treelist_wrap.o", "ext/fox14/text_wrap.o", "ext/fox14/table_wrap.o", "ext/fox14/scintilla_wrap.o", "ext/fox14/menu_wrap.o", "ext/fox14/mdi_wrap.o", "ext/fox14/markfuncs.o", "ext/fox14/list_wrap.o", "ext/fox14/layout_wrap.o", "ext/fox14/label_wrap.o", "ext/fox14/impl.o", "ext/fox14/image_wrap.o", "ext/fox14/icons_wrap.o", "ext/fox14/iconlist_wrap.o", "ext/fox14/FXRuby.o", "ext/fox14/FXRbGLViewer.o", "ext/fox14/FXRbDataTarget.o", "ext/fox14/FXRbApp.o", "ext/fox14/fx3d_wrap.o", "ext/fox14/frames_wrap.o", "ext/fox14/dialogs_wrap.o", "ext/fox14/dc_wrap.o", "ext/fox14/core_wrap.o", "ext/fox14/librb.o", "ext/fox14/Makefile", "ext/fox14/mkmf.log"] At the moment I've got no clue however what this means, and if it's the cause of the problem. Any help is really appreciated. Piet. From piet.hadermann at pandora.be Sun Oct 16 15:02:38 2005 From: piet.hadermann at pandora.be (Piet Hadermann) Date: Sun, 16 Oct 2005 21:02:38 +0200 Subject: [fxruby-users] Problem with 1.4.2 on fc3 In-Reply-To: <1129459916.5018.5.camel@localhost.localdomain> References: <1129385827.13333.12.camel@localhost.localdomain> <1129459916.5018.5.camel@localhost.localdomain> Message-ID: <1129489358.5316.9.camel@localhost.localdomain> Hi! Me again (is anyone reading this except me ? Is this group abandoned ???). I found the problem: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'fxruby' => true Obviously I needed "require_gem 'fxruby'" instead of "require 'fox14'". Duh. How was I supposed to know this ? Is the fxruby site info wrong/outdated (http://www.fxruby.org/doc/gems.html) or is there something wrong with my ruby or gems installation ??? Or should this be some kind of common sense that isn't really that common to me ? Well, for the moment the problem is solved but I'd still like to be enlightened about the how/why. Thanks in advance! Piet. From lyle at knology.net Mon Oct 17 09:53:44 2005 From: lyle at knology.net (Lyle Johnson) Date: Mon, 17 Oct 2005 08:53:44 -0500 Subject: [fxruby-users] Problem with 1.4.2 on fc3 In-Reply-To: <1129489358.5316.9.camel@localhost.localdomain> References: <1129385827.13333.12.camel@localhost.localdomain> <1129459916.5018.5.camel@localhost.localdomain> <1129489358.5316.9.camel@localhost.localdomain> Message-ID: <071f38dbf8780732a0232d3bd3ad1c88@knology.net> On Oct 16, 2005, at 2:02 PM, Piet Hadermann wrote: > Hi! > > Me again (is anyone reading this except me ? Is this group > abandoned ???). Piet, I apologize for the delay in responding to your questions. I've been out of town this weekend at the Ruby Conference in San Diego, and I know that several of our "regulars" from this mailing list were out there as well. Looking back over your last three e-mails, I wanted to address some of the main points. First, you found that after building and installing the FXRuby gem, the call to require 'fox14' in irb returned false. This is a known problem with RubyGems; see for example this bug report: http://rubyforge.org/tracker/index.php? func=detail&aid=1942&group_id=126&atid=575 A better way to check for a successful FXRuby installation is to just try one of the example programs (like hello.rb). I should probably change the documentation to reflect this. You also reported several troubling messages from the "gem check --alien" command. I wasn't familiar with this option (--alien) but it looks like it's complaining about some of the files created as a side effect of compiling this extension module (e.g. all of the "*.o" files). I will research this to see if there's some way to tell RubyGems that those files are, in fact, supposed to be there! Thanks for pointing this out to me. On your last point, as to whether you should use this: require 'fox14' or this: require 'rubygems' require_gem 'fxruby' The preferred method (for me) is to set the RUBYOPT environment variable to "ubygems", as described in the RubyGems documentation. If you do this, the 'rubygems' library will be automatically loaded by the Ruby interpreter on startup and then it will be able to find the library as 'fox14'. This has been discussed on the mailing list before, but it may not be in the FXRuby User's Guide because it's something that most RubyGems users already know about. I will see about adding this to the FXRuby documentation as well. Thanks, Lyle From makenai at gmail.com Wed Oct 19 03:21:02 2005 From: makenai at gmail.com (Pawel Szymczykowski) Date: Wed, 19 Oct 2005 00:21:02 -0700 Subject: [fxruby-users] FXImage + RMagick problems Message-ID: I posted this in ruby-talk a moment ago accidentally, so I'm sorry if you see it twice. It's kind of late at night and I've been boggling at this problem for a while, so my brain doesn't seem to be working right. Here are the contents of my original ruby-talk incursion: Hi, I'm trying to combine FXRuby with RMagick. I've searched the mail archives (I had to index them myself! Is there an easy to use official search page somewhere?) and apparently it's been done before, but I can't seem to get it to work. Basically I'm processing my image and then doing an export_pixels and trying to convert it to the FXImage format. It works the first time, but when I try to do it again it crashes on my saying 'invalid image' in Linux, or something useless about abnormal termination in Windows. This is the piece of code that seems to be giving me the specific trouble: pixels = [] @current_image.export_pixels(0, 0, @current_image.columns, @current_image.rows, "RGBA").each_slice(4) { |rgba| pixels << FXRGBA( *rgba ) } an_image = FXImage.new(app, pixels, IMAGE_OWNED|IMAGE_KEEP, @current_image.columns, @current_image.rows ) That works the first time - I get a nice picture as expected when drawn to the canvas. The next time it happens via a timeout, I get the crash. Actually, it's more like it works fine if I do it before calling app.create(or maybe run?), but not afterwards. I've also tried the following as mentioned in one of the messages in the archives, but it complains that it's looking for an Array (buffer is FXMemoryBuffer class of course): buffer = FXMemoryBuffer.new( pixels ) an_image = FXImage.new(app, buffer, IMAGE_OWNED|IMAGE_KEEP, @current_image.columns, @current_image.rows ) I've tried several different combinations of the flags, and putting an_image.create in various places. The former didn't help at all, but in the latter I just got a black image. Am I doing something idiotic somewhere? I'm kind of new to ruby and GUI development in general being more of web app guy. I can post a runnable version of the code up somewhere if the problem isn't completely obvious and of course if someone is feeling charitable enough to take a look at it. Thanks for your help! -Pawel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20051019/5eb736a7/attachment-0001.htm From jeroen at fox-toolkit.org Wed Oct 19 08:54:06 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 19 Oct 2005 07:54:06 -0500 Subject: [fxruby-users] FXImage + RMagick problems In-Reply-To: References: Message-ID: <200510190754.07038.jeroen@fox-toolkit.org> On Wednesday 19 October 2005 02:21 am, Pawel Szymczykowski wrote: > I posted this in ruby-talk a moment ago accidentally, so I'm sorry if you > see it twice. It's kind of late at night and I've been boggling at this > problem for a while, so my brain doesn't seem to be working right. > > Here are the contents of my original ruby-talk incursion: > > Hi, > > I'm trying to combine FXRuby with RMagick. I've searched the mail archives > (I had to index them myself! Is there an easy to use official search page > somewhere?) and apparently it's been done before, but I can't seem to get it > to work. > > Basically I'm processing my image and then doing an export_pixels and trying > to convert it to the FXImage format. It works the first time, but when I try > to do it again it crashes on my saying 'invalid image' in Linux, or > something useless about abnormal termination in Windows. > > This is the piece of code that seems to be giving me the specific trouble: > > pixels = [] > @current_image.export_pixels(0, 0, @current_image.columns, > @current_image.rows, > "RGBA").each_slice(4) { |rgba| pixels << FXRGBA( *rgba ) } > an_image = FXImage.new(app, pixels, IMAGE_OWNED|IMAGE_KEEP, > @current_image.columns, @current_image.rows ) > > That works the first time - I get a nice picture as expected when drawn to > the canvas. The next time it happens via a timeout, I get the crash. > Actually, it's more like it works fine if I do it before calling > app.create(or maybe run?), but not afterwards. What happens is, during create(), FXImage transfers the pixel data from the client [your application] to the X11 Server. The image->create() is broken up into 3 steps: 1) create the X11-Server resident pixmap. 2) transfer the pixel data from the FXImage into this map, using the render() function. 3) if IMAGE_KEEP is not specified, release the client-side pixel data since they're no longer needed. >From this, you can surmise that it is indeed possible to change the pixmap kept in the X11 Server later on:- just call render() again. Of course, IMAGE_KEEP is needed to ensure that the client-side pixel data is still around as well. > I've also tried the following as mentioned in one of the messages in the > archives, but it complains that it's looking for an Array (buffer is > FXMemoryBuffer class of course): > > buffer = FXMemoryBuffer.new( pixels ) > an_image = FXImage.new(app, buffer, IMAGE_OWNED|IMAGE_KEEP, > @current_image.columns, @current_image.rows ) > > I've tried several different combinations of the flags, and putting > an_image.create in various places. The former didn't help at all, but in the > latter I just got a black image. > > Am I doing something idiotic somewhere? I'm kind of new to ruby and GUI > development in general being more of web app guy. I can post a runnable > version of the code up somewhere if the problem isn't completely obvious and > of course if someone is feeling charitable enough to take a look at it. I'm assuming you're talking about FXMemoryStream? Anyway, FXStream is useful as it allows e.g. FXBMPImage to extract a BMP-type image from a sequence of bytes. This uses the bmpimage->loadPixels() API. More typically this is used in conjunction with FXFileStream (in C++): FXFileStream strm; if(strm.open("filename.bmp",FXStreamLoad)){ FXBMPImage *bmp=new FXBMPImage(app,IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP); bmp->loadPixels(strm); strm.close(); } Hope this helps, Jeroen From makenai at gmail.com Wed Oct 19 19:08:29 2005 From: makenai at gmail.com (Pawel Szymczykowski) Date: Wed, 19 Oct 2005 16:08:29 -0700 Subject: [fxruby-users] FXImage + RMagick problems In-Reply-To: <200510190754.07038.jeroen@fox-toolkit.org> References: <200510190754.07038.jeroen@fox-toolkit.org> Message-ID: > From this, you can surmise that it is indeed possible to change the pixmap > kept in the X11 Server later on:- just call render() again. Of course, > IMAGE_KEEP is needed to ensure that the client-side pixel data is still > around as well. Hi Jeroen, Thanks for the response! It looks like I was confusing the issue a bit in my original testing by switching from an FXImageView to an FXCanvas which I don't really understand that well especially when drawing contexts come into place. When I went back to the FXImageView, just calling .create on the image before returning it seemed to fix my problem, however I'm not sure what I'm doing (reassigning @imageview.image = [a new image object] every second) is the most efficient way. I tried manipulating the pixel buffer directly as you suggest - would I have to do it with setpixel? I guess I can't access the .data attribute writer directly. Is there a better way I can update an imported image periodically? I'm working on a sort of primitive motion detector for a video stream with visual feedback - Ideally I'd like to be able to get something like 5 to 15 frames per second, but the way I'm doing it right now might be a bit too slow for that. I'm assuming you're talking about FXMemoryStream? Anyway, FXStream is useful > as it allows e.g. FXBMPImage to extract a BMP-type image from a sequence > of > bytes. This uses the bmpimage->loadPixels() API. More typically this is > used in conjunction with FXFileStream (in C++): Actually, I guess I was thinking about FXMemoryBuffer as referenced in the docs for the pixel buffer of FXImage: data [R] Pixel data [FXMemoryBuffer ] But I turned out to be confusing it with the array of FXColor pixels values passed to FXImage.new. Basically I've been very confused about the way the whole thing works Hope this helps, > It has indeed - I wasn't clear on what FXImage.create was actually doing before, so I overlooked my larger overall problem with the Canvas object. Thanks! -Pawel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20051019/46ad6e80/attachment.htm From jeroen at fox-toolkit.org Thu Oct 20 00:37:21 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 19 Oct 2005 23:37:21 -0500 Subject: [fxruby-users] FXImage + RMagick problems In-Reply-To: References: <200510190754.07038.jeroen@fox-toolkit.org> Message-ID: <200510192337.21612.jeroen@fox-toolkit.org> On Wednesday 19 October 2005 18:08, Pawel Szymczykowski wrote: > > From this, you can surmise that it is indeed possible to change the pixmap > > kept in the X11 Server later on:- just call render() again. Of course, > > IMAGE_KEEP is needed to ensure that the client-side pixel data is still > > around as well. > > Hi Jeroen, > > Thanks for the response! It looks like I was confusing the issue a bit in my > original testing by switching from an FXImageView to an FXCanvas which I > don't really understand that well especially when drawing contexts come into > place. When I went back to the FXImageView, just calling .create on the > image before returning it seemed to fix my problem, however I'm not sure > what I'm doing (reassigning @imageview.image = [a new image object] every > second) is the most efficient way. I tried manipulating the pixel buffer > directly as you suggest - would I have to do it with setpixel? I guess I > can't access the .data attribute writer directly. > > Is there a better way I can update an imported image periodically? I'm For motion video, FXImage is probably not ideal; there is no FOX widget for this, but something like an XV [X video extension] would probably be better. With suitable hardware support, it should be able to do 30frames/second at full video resolution. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:30 10/19/2005 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From riccardo at fisica.uniud.it Thu Oct 27 17:02:33 2005 From: riccardo at fisica.uniud.it (Riccardo Giannitrapani) Date: Thu, 27 Oct 2005 23:02:33 +0200 Subject: [fxruby-users] Toolbar question In-Reply-To: <200510192337.21612.jeroen@fox-toolkit.org> References: <200510190754.07038.jeroen@fox-toolkit.org> <200510192337.21612.jeroen@fox-toolkit.org> Message-ID: Hi everyone here I'm with a small question on FXToolBar that I hope is not another faq one (I've tried to search around, but with not so much effort I have to admit) .. I'm migrating my application to FXRuby 1.2 to the new 1.4 and wow, I'm so happy till now .. the only problem I've found is the following one that maybe depend on my wrong usage of the new toolbar classes .. in the previous version I remember that when a window was resized in such a way that the buttons in a toolbar were too many to fit the window width, they were automatically moved in more than one row .. now it seems I am not able to reproduce that behaviour .. when I resize my window and the toolbar is larger than the window width, the most right buttons just disappear outside the window frame .. is this a new intended behaviour? Or maybe I'm doing something wrong? Thanks so much for the help, Riccardo :) -- Riccardo Giannitrapani I.N.F.N - Sezione di Trieste and Dipartimento di Fisica Universita` di Udine - Via delle Scienze, 206 Udine (Italy) Room L1-14-BE Tel (Office): +39-0432-558209 Home Page: http://www.fisica.uniud.it/~riccardo ICQ# 86590904 ---- There are only 10 kinds of people in this world: those who understand binary and those who don't. (Anonymous) From piet.hadermann at pandora.be Thu Oct 27 19:39:33 2005 From: piet.hadermann at pandora.be (Piet Hadermann) Date: Fri, 28 Oct 2005 01:39:33 +0200 Subject: [fxruby-users] SEL_LEFTBUTTONPRESS cause 'autograb' ??? Message-ID: <1130456373.6600.25.camel@localhost.localdomain> Hello list! After the initial troubles getting fxruby up and running, I'm really enjoying both ruby and fxruby. BTW:Lyle: about half of the times I turned to the web/googlegroups/... to find solutions to an issue it was answered in a message/post from you. They should give you a ruby statue or something. Or maybe 2:one for making fxruby, one for being so much help handling problems/questions. Thanks! Most things just work as expected and I've been flabbergasted a few times seeing how easy it can be to implement even more advanced gui trickery. The only gui related programming I've been doing the last couple of years was with the vc++/mfc combo, and ruby/fxruby is really breath of fresh air that makes you do things instead of wondering how you should do them. However, there's something weird bugging me at the moment. I'll use the 'fx_button.rb' example to explain things. I added the following in ButtonWindow.initialize: @button.connect(SEL_LEFTBUTTONPRESS) { puts 'lmb pressed' } @button.connect(SEL_LEFTBUTTONRELEASE) { puts 'lmb release' } If I run this, the SEL_LEFTBUTTONPRESS gets handled, but SEL_LEFTBUTTONRELEASE doesn't. Also, it seems this causes all events to be automatically 'grabbed' to 'button' and I am not able to click any other button. I can't even close the window (except when using ALT-F4). Everytime I press the left mousebutton, no matter where, it gets handled by that button handler (after pressing the button once). If I add an 'ungrab' in there, like this: @button.connect(SEL_LEFTBUTTONPRESS) { puts 'lmb pressed' @button.ungrab } I can at least close the window again and pressing other buttons gets handled again. But, SEL_LEFTBUTTONRELEASE stil doesn't seem to get handled. If I just delete handling of SEL_LEFTBUTTONPRESS, then SEL_LEFTBUTTONRELEASE gets handled when I release left mousebutton. I get the same behaviour under a WinXP as wel as a Fedore Core 3 installation, both using fxruby 1.4.2. (ah yes: basically this is a first step in wanting to click that button and move it around) Is this a bug or am I seeing/assuming things wrong ? Thanks in Advance! Piet. From lyle at knology.net Thu Oct 27 20:20:52 2005 From: lyle at knology.net (Lyle Johnson) Date: Thu, 27 Oct 2005 19:20:52 -0500 Subject: [fxruby-users] SEL_LEFTBUTTONPRESS cause 'autograb' ??? In-Reply-To: <1130456373.6600.25.camel@localhost.localdomain> References: <1130456373.6600.25.camel@localhost.localdomain> Message-ID: On Oct 27, 2005, at 6:39 PM, Piet Hadermann wrote: > However, there's something weird bugging me at the moment. I'll use the > 'fx_button.rb' example to explain things. > > I added the following in ButtonWindow.initialize: > > @button.connect(SEL_LEFTBUTTONPRESS) { > puts 'lmb pressed' > } > > @button.connect(SEL_LEFTBUTTONRELEASE) { > puts 'lmb release' > } > > If I run this, the SEL_LEFTBUTTONPRESS gets handled, but > SEL_LEFTBUTTONRELEASE doesn't. Also, it seems this causes all events to > be automatically 'grabbed' to 'button' and I am not able to click any > other button. OK, I'm seeing this too and as far as I can tell it's a bug. The button is supposed to grab the mouse cursor when the button goes down, and then send the SEL_LEFTBUTTONPRESS message to the target (and this is happening). But when the button goes up, it's supposed to ungrab and then send you SEL_LEFTBUTTONRELEASE (and this is *not* happening). I'll try to figure out what's wrong and get this fixed ASAP. From jeroen at fox-toolkit.org Fri Oct 28 00:14:49 2005 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 27 Oct 2005 23:14:49 -0500 Subject: [fxruby-users] Toolbar question In-Reply-To: References: <200510192337.21612.jeroen@fox-toolkit.org> Message-ID: <200510272314.50077.jeroen@fox-toolkit.org> On Thursday 27 October 2005 16:02, Riccardo Giannitrapani wrote: > Hi everyone > > here I'm with a small question on FXToolBar that I hope is not another faq > one (I've tried to search around, but with not so much effort I have to > admit) .. I'm migrating my application to FXRuby 1.2 to the new 1.4 and > wow, I'm so happy till now .. the only problem I've found is the following > one that maybe depend on my wrong usage of the new toolbar classes .. in > the previous version I remember that when a window was resized in such a > way that the buttons in a toolbar were too many to fit the window width, > they were automatically moved in more than one row .. now it seems I am > not able to reproduce that behaviour .. when I resize my window and the > toolbar is larger than the window width, the most right buttons just > disappear outside the window frame .. is this a new intended behaviour? Or > maybe I'm doing something wrong? > > Thanks so much for the help, Riccardo :) Since 1.4, there is a new toolbar docking algorithm. The toolbars are no longer directly children of FXTopWindow, but of a FXDockSite which is itself a direct child of FXTopWindow. The upshot of this new arrangement is that the wrapping algorithm [which needs a known width or height], is now done in FXDockSite rather than FXToolBar. In other words, the icons in the toolbar don't wrap, but if you have a bunch of toolbars side by side, they would wrap based on the FXDockSite's dimensions. My advice is to use smaller toolbars; you can park them side by side at first, but if the window is made smaller they'll wrap and occupy two lines in the dock site. I'm not convinced yet that the wrapping behaviour as we used to have it in FXToolBar is impossible, but it has become a non-trivial due to coupling between side-by-side toolbars. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:00 10/27/2005 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From lyle at knology.net Sat Oct 29 11:11:16 2005 From: lyle at knology.net (Lyle Johnson) Date: Sat, 29 Oct 2005 10:11:16 -0500 Subject: [fxruby-users] SEL_LEFTBUTTONPRESS cause 'autograb' ??? In-Reply-To: <1130456373.6600.25.camel@localhost.localdomain> References: <1130456373.6600.25.camel@localhost.localdomain> Message-ID: <087787aeb7bd8b61d4eefbb8fde67e49@knology.net> On Oct 27, 2005, at 6:39 PM, Piet Hadermann wrote: > If I run this, the SEL_LEFTBUTTONPRESS gets handled, but > SEL_LEFTBUTTONRELEASE doesn't... Just a follow-up to my previous response, this apparently is not a bug but a "feature". The standard message handler for SEL_LEFTBUTTONPRESS on an FXButton widget gives the button's message target the first chance to handle that message. If the button's message target *does* handle the message (i.e. the message handler returns something other than false), then FXButton considers the message handling complete and doesn't do any additional processing. This is what's happening in your case, when you have a handler like so: @button.connect(SEL_LEFTBUTTONPRESS) { puts "pressed" } The problem is that, for your purposes, you *do* want FXButton to do that additional processing after your code has done its handling of SEL_LEFTBUTTONPRESS. For that reason, you need to modify your handler code so that when it's done, it returns false, e.g.: @button.connect(SEL_LEFTBUTTONPRESS) { puts "pressed" ; false } You'd want to do the same thing in your SEL_LEFTBUTTONRELEASE handler. Hope this helps, Lyle