home *** CD-ROM | disk | FTP | other *** search
- The following Wimp messages are used by the PopUp system.
- There are 5 messages in all, but client applications should only ever
- involve themselves with the first 2 or 3 (the others are for internal use only)
-
- For further example code showing how to handle these messages, see the
- PopUp test application's !RunImage file.
-
- **** IMPORTANT NOTE **********************************************************
- * Strings passed to/from the PopUp system may be terminated by a 0 (NUL) *
- * character as in C, or by a 13 (CR) character as in BASIC. *
- * This means you can pass strings directly to the manager without worrying, *
- * but you MUST be careful when READING strings returned by the manager *
- * *
- * BASIC programmers should therefore use the following function to read any *
- * strings passed back by the manager: *
- * *
- * DEF FNzerostring(address%) :REM Read a zero-terminated string *
- * LOCAL A% *
- * *
- * A%=address% *
- * WHILE ?A% > 31: A%+=1: ENDWHILE *
- * ?A%=&0d *
- * =$address% *
- * *
- * C and assembler programmers should use a similar function to read these *
- * strings. DO NOT USE strcpy() strcat(), etc! *
- * DeskLib provides appropriate functions for this - see DeskLib:StringCR.h *
- ******************************************************************************
-
-
- Message_PopUpRequest - &46D40
- =============================
-
- This message is sent to the client application by the PopUp server when
- it needs to attach a PopUp as a leaf of one of your menus.
-
- It contains data which you should simply passed straight on to
- Wimp_CreateSubMenu by the client application, e.g.
- SYS "Wimp_CreateSubMenu",block!20,block!24,block!28
-
- This message may be phased out if future implementations of the WIMP provide
- a cleaner way for the PopUp manager to operate.
-
- Message contents:
- block + 00 (Standard RISC OS Message header)
-
- block + 20 Window handle
- block + 24 Open xpos
- block + 28 Open ypos
-
-
- Message_PopUpState - &46D41
- ===========================
-
- This message is sent from the PopUp server to the client application whenever
- the state of a PopUp changes.
- This can happen:
- * never, as in 'ProgInfo' which never returns any data to the client
- * once, as in 'SaveAs' which returns once the user has clicked 'OK'
- or finished dragging the file icon.
- * often, as in 'WimpColour', which returns a new value every time the
- user chooses a new colour (an 'instant effect' window)
-
- On receipt of this message, you should check the PopUp handle (and/or type)
- and take appropriate action with the enclosed data.
-
- Note that with STATIC PopUps this does NOT indicate that they are closed.
- (see below)
-
- Message contents:
- block + 00 (Standard RISC OS Message header)
-
- block + 20 PopUp Handle
- block + 24 PopUp type name string (12 chars incl. terminator)
- block + 36 onwards --- PopUp specific data
-
-
- Message_PopUpClosed - &46D42
- ============================
-
- This message is sent from the PopUp server to the client application whenever
- a STATIC PopUp is closed. (NOTE that this will NOT be sent for menu PopUps,
- which are more of a 'set and forget' entity)
-
- It simply informs you that the given PopUp is no longer open. If the PopUp
- thinks there is any state to return to you then it will preceed this message
- with a PopUpState message.
-
- Thus, you may recieve several PopUpState messages over time from the same
- PopUp, followed eventually by a single PopUpClosed message. You also may
- recieve nothing but a PopUpClosed message, indicating that the user cancelled
- the PopUp in a way that means the state has not changed.
-
- You can ignore this message. It is only sent so that you may free any
- references to the PopUp that you may have stored - e.g. if you only ever open
- one static PopUp you probably won't need to bother with this message.
-
- Message contents:
- block + 00 (Standard RISC OS Message header)
-
- block + 20 PopUp Handle
- block + 24 PopUp type name string (12 chars incl. terminator)
-
-
- ---
-
- The following messages are only used internally between the server and the
- PopUp Manager module, so normal applications should not know about them.
-
- Message_PopUpOpen - &46D43
- ==========================
-
- Used internally between the PopUp Manager module and server application.
- When SWI PopUp_Open is called, the request is passed on to the appropriate
- server application via this message.
-
- Message contents:
- block + 00 (Standard RISC OS Message header)
-
- block + 20 PopUp Handle (generated by the Manager module)
- block + 24 Application parameter block:
- +24 PopUp type name string (12 chars)
- +36 openx
- +40 openy
-
- +44 flag byte
- +45 reserved byte 1
- +46 reserved byte 2
- +47 reserved byte 3
-
- +48 onwards --- PopUp Specific data (max. 208 bytes)
-
-
- Message_PopUpClose - &46D44
- ===========================
-
- Used internally between the PopUp Manager module and server application.
- When SWI PopUp_Close is called, the request is passed on to the appropriate
- server application via this message.
-
- Message contents:
- block + 00 (Standard RISC OS Message header)
-
- block + 20 PopUp Handle to close
-
-