[ Classes | Constants | Functions ]
Back to the top of Index
Back to the top of Index
Back to the top of Index
enum MouseState ;
#include "Program.h"
The simple programming environment is defined by four functions. Each of the four functions in the simple programming environment MUST be defined, even if the body of the function contains no code.
The Program.h include file defines four constants that describe the state of the mouse buttons when a mouse event occurs. These constants are used in the OnMouseEvent function's buttonState parameter.
enum MouseState { leftButtonDown = 1, rightButtonDown = 2, middleButtonDown = 4, isDragging = 8 };
Back to the top of Index
void OnStart(void);
#include "Program.h"
This function is called exactly once when the "Start" button in the start window is pressed. This function is used to initialize the system.
void OnStart(void);
Back to the top of Index
void OnMouseEvent(char *frame, int x, int y, int buttonState);
#include "Program.h"
This function is called whenever a mouse event occurs within a user-defined Frame. The identity of the frame, the coordinates of the mouse position, and the state of the mouse buttons are passed as parameters.
void OnMouseEvent(char *frame, int x, int y, int buttonState);
Back to the top of Index
void OnTimerEvent(void);
#include "Program.h"
This function is called whenever the timer has been started by the user (using the Timer pulldown menu in the start window of the simple programming environment) and the timer has reached the end of the current timer interval. The timer interval can be changed by the slider control in the start window. The function is called repeatedly, at the end of each timer interval, as long as the timer is turned on. The timer may be turned off by using the Timer pulldown menu in the start window.
void OnTimerEvent(void);
Back to the top of Index
void OnPaint(void);
#include "Program.h"
This function is called whenever the system suspects that the contents of a window may need to be refreshed (redrawn) due to actions in the user interface (e.g, by moving a window that was obscuring part of a lower window, requiring the lower (previously obscured) window to be redrawn).
void OnPaint(void);
Back to the top of Index
Report problems to jkotula@unimax.com