home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kosovo Orphans' Appeal Charity CD
/
KosovoOrphansAppeal.iso
/
commercialdemos
/
claresmicrosupplies
/
pca
/
docs
/
remote_msg
< prev
next >
Wrap
Text File
|
1996-08-20
|
5KB
|
112 lines
Plug In Compliant Application protocol
======================================
PCA In-place editing specification
==================================
Author : Rob Davison (rdavison@xtra.co.nz)
Date : 15/08/96
Status : Release 1
Introduction
============
The aim of this section is to define the work necessary for applications to
support 'in-place' editing (applications working on an object within another
application's window) within the framework supplied by the PCA itself.
This feature is an optional part of the PCA specification. All remote tasks
must be able to operate according to the normal PCA specification (open
their own window onto the object) if the Local task in question does not
support in-place editing. Even if the Local task does support this, it is
wise for the remote task to give the user the option of switching to
external editing as in-place editing has its disadvantages as well as
advantages. (The principal disadvantage being that only one in-place editing
session per object can be undertaken at a time, for obvious reasons).
Local task
----------
The greatest amount of work is down to the 'Local' or object-owning
application. After invoking a remote task with the PCA message DoYourStuff
when bit 4 of the flags word is set, it must expect receipt of
Message_HookMe from the remote task. When it gets this message it should
create a transparent icon in its window which completely covers the object
and send Message_ObjectPosition .
The button type of this icon should be taken from bits 28-31 of the flags
word as sent by Message_HookMe and the indirection string (if supported)
from R1+36
Then, on receipt of the following standard Wimp messages the Local task must
check to see if the message refers to an icon covering the object, and if it
is, modify the message block and pass the message to the remote task using
Wimp_SendMessage.
Doing this effectively cuts a 'hole' in the window where the object is.
Messages into that region get shunted to the Remote task and are ignored by
the Local task.
Details of the modifications:
6. Button_Click
xposition and yposition should be made relative to the object's bottom left.
Window handle must be set to the one supplied in Message_HookMe . Icon
handle must be set to the special value -&414350 (-"PCA")
??? Other messages ???
??? Which to support and how to modify them ???
??? Advise us if you have any suggestions ???
On receipt of Message_OpenWindow for the window in which the object resides
the Local task must send Message_ObjectPosition to the remote task so that
it can open its toolbar at an appropriate place. Also, any actions which
cause the position or size of the remotely linked object to change must
resize and reposition the icon created above and send Message_ObjectPosition
again.
On receipt of Message_UnhookMe it must delete the icon covering the object
and carry out any other work necessary to restore normal access to the
object. The same action should obviously also be undertaken if the object is
deleted.
Remote Task
-----------
On receipt of Message_ObjectPosition the remote task must open its toolbar
at an appropriate position calculated from the data contained in the
message.
This toolbar must contain at least one icon which, when clicked on, sends
Message_UnhookMe to the local task, removes any references it has to the
object and closes the toolbar. Model the appearance of this icon on the
window close icon and position the icon at the far left horizontal toolbars
or at the top left of vertical toolbars.
On receipt of Message_Do / Message_Changed the remote task must check to see
if In-place editing is on (b4 of flags in Message_Do) and, if so, send
Message_HookMe rather than opening its own window onto the object.
On receipt of ButtonClick messages (apparently) to its main window the
remote task should check the icon handle and if it is equal to -&414350
treat the coordinates passed in the ButtonClick block as 'corrected' for the
position of its window, scrollbars etc as the coordinates are already
relative to the objects bottom left. Modify the object data as appropriate
and generate Message_UpdateArea as with standard PCA practice.
You should be able to use the same code for remote and local actions just do
not convert pointer coordinates to be relative to your main window and do
not redraw your main window (it should be closed anyway).
Note: For 'painting' or 'dragging' type actions it is sometimes wise to set
the remote button type (in Message_HookMe) to Click and to do a tight
repeating 'loop' around your redraw/paint code, reading the mouse pointer
information directly until the button click stops. In this situation the
Remote task should make use of the information in the last
Message_ObjectPosition it receieved to work out the visible size and
position of the object in the Local task's window (see the !Spaint example).