Quantcast
Channel: Product Communities
Viewing all articles
Browse latest Browse all 105279

Forum Post: Re: mdlInput_setMonitorFunction( )

$
0
0

[quote user="dw_elliott"]I need to set up an input monitoring function mdlInput_setMonitorFunction ( ) [/quote]

An irritating feature (or anti-feature) of the V8 MDL documentation is that often the user callback (or hook) function prototype is missing from a set function description. In this case, what should your callback function look like?

Fortunately, I keep the MicroStation/J MDL help for occasions such as this. Here's the callback description …

userInput_monitor

 #include <userfnc.h>
#include <msinputq.h>

int userInput_monitor
(
Inputq_element *queueElementP /* <=> pointer to queue element */
);
Description:
An input monitor user function is designated to MicroStation when the user function name
is specified in a call to the mdlInput_setMonitorFunction function.
The actual function name is insignificant to MicroStation.

userInput_monitor views every queue element that the command processors will process.
The userInput_monitor function can manipulate the queue element.

When the monitor function sees the queue element, the element is in a buffer large
enough to hold any legal queue element.
Therefore, the queue element can be transformed into any legal queue element.

userInput_monitor is called after MicroStation has completed its preprocessing.
MicroStation's preprocessing consists of turning RESET commands into RESET queue
elements and turning precision key-in commands into DATAPNT queue elements.

Returns:
A userInput_monitor function must return INPUT_ACCEPT to accept the queue element
or INPUT_REJECT to reject it. If the function returns INPUT_ACCEPT,
MicroStation continues processing the queue element.

Regards, Jon Summers
LA Solutions


Viewing all articles
Browse latest Browse all 105279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>