Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] pushing SWT's display/interaction capabilities?

I am pushing the capabilities of SWT a bit and would love some suggestions
(more info as to why I am asking these questions is included below).  

1. Can mouse events be passed to a composite not being shown on the screen?
(i.e., a large composite stored within a smaller composite; most of the
larger composite is not visible on the screen but contains components)

2. Is there anyway to quickly resize an image without aliasing using the GC?
(i.e., gc.drawImage() allows resizing between source and destination, and it
is fast; but things looks very pixelated since it is just indexing
discretely within the source image and not doing any averaging,
interpolation, etc.)

3. Can shape and perspective transforms be applied to Composites, Controls,
or Canvases? (i.e., make a Button look like a triangle going into the
screen.) I think the answer is, "no, buddy, don't you understand that SWT
uses native widgets and most platforms don't allow arbitrary
transformations."  But if I'm wrong here, that would save a ton of trouble.

4. Is there such thing as a transparent Canvas? This is an very old question
in the SWT community, but I can't make a canvas transparent (i.e., captures
mouse/key events and has a bounds, but does not paint to the screen) without
playing silly tricks (i.e., make an image of the background below it and
then setting that as the canvas's background image) on my machine running
Linux Gtk. Shown below is a "SWT.TRANSPARENT" canvas that paints a shadow at
a diagonal, but the red canvas below is occluded completely by the
rectangular bounds of the top canvas.  Also, the SWT.NO_BACKGROUND style
shows all of the way to the desktop (through the parent canvas and shell);
this is cool, but not what I am looking for.
http://www.nabble.com/file/p18385244/non-transparent2.png 

5. Related to [Q4]; is there a way to capture mouse events in a region,
while still showing that region's contents, and then keeping the mouse
events from being transfered to the visible elements in that space? (i.e., a
truly transparent canvas placed over a region would accomplish this).


that's enough for now.  thanks in advance for your help! :)

Adam
kumpf@xxxxxxx
http://web.mit.edu/kumpf/www
http://avocado-cad.sourceforge.net/


------
if you are curious, here's is what I am up to and why I posed the above
questions...

I am working on a different form of GUI interaction and I am rethinking the
way content is displayed, organized, and manipulated -- in particular, ways
to interact with data that is very wide and/or long.  

Typically this is done with scroll bars, but scroll bars hide information so
I would like to dynamically squish, stretch, morph, etc. elements to make
room for large content.  A simple example of this, since I love examples
(i.e., my "i.e."s above), is to simply squish all components to half their
size (1/4 their area) for displaying 800x800 content in a 400x400 window.
But it gets more exciting and clever when it can be dynamic and non-linear.  

The most promising path I've tried so far is to put the full-size content
(800x800) within a tiny 1x1 composite, and then print(GC) that full-size
composite to an image.  I can then manipulate the image (squish, stretch,
bend, etc.) to give the effect of morph'd widgets -- but I don't have a way
to let the user interact with them, so I would like to pass mouse events to
the off-screen composite.  of course, I'm hoping this could be generic, so I
am hesitant to hard-code a single layer mouse event passer (the large-scale
composite may itself contain dozens of other composites, canvases, controls,
etc.).

The above questions are places I'm kind of stuck/frustrated at this point as
I prototype some ideas -- any help and/or ideas would be excellent; thanks!

-- 
View this message in context: http://www.nabble.com/pushing-SWT%27s-display-interaction-capabilities--tp18385244p18385244.html
Sent from the Eclipse Platform - swt mailing list archive at Nabble.com.



Back to the top