Re: Creating Panels in iTools [message #46472] |
Wed, 23 November 2005 09:22  |
David Alexander
Messages: 26 Registered: August 2005
|
Junior Member |
|
|
James,
When you create and register your own UI panel the default is to always
put it on the right, as you've seen. The location of the UI panel is
specified by the ORIENTATION keyword to CW_ITPANEL. If you set this
keyword to 0, it will place the panel on the left.
There are two ways to use panels:
1) The simple method: Just register your panel according to the docs,
and your panel shows up in the GUI (on the right). You're probably
doing it this way now.
2) The complex method: Implement your own GUI code for the iTool
interface, and specify that you want the panel on the left (with the
ORIENTATION keyword described above). Here's the deal: The default
appearance of an itool GUI is defined in the IDLitWdTool.pro routine,
which is used by all the standard RSI iTools. If you want to change the
elements or appearance of your own iTool, you have to implement your
own version of this file. This is where you would call CW_ITPANEL and
set the ORIENTATION keyword. This is explained in the section "Creating
a Custom iTools Widget Interface" in the iTool Developer's Guide.
For the mouse-click events in your panel, you'll handle mouse events on
your draw widgets like you would in any widget application (ie, use the
BUTTON_EVENTS keyword when creating your draw widget, and implement an
event handler). You'll probably need to save a reference to the tool
object and any other objects you might need in the state structure of
your panel widget. Probably the easist thing to do is to store all the
image data in the itools data manager, then when the user clicks on a
thumbnail detemine which thumbnail they clicked, then get the image
data for that image from the data manager and replace the data in the
image visualization with the new data.
If that doesn't make sense, let me know, I can go into more detail.
Dave
|
|
|