Return to Index

Variables, Macros, Functions, and Enumerations


Global Variables

const unsigned int [] N_primes : A list of increasing prime numbers.
const unsigned int N_num_primes : The number of primes in the N_primes array.
PlotId INVALID_PLOT : An invalid plot identifier.
PlotId NEW_PLOT : Indicates to use the next available plot identifier.
PlotId MAX_PLOTS : The maximum number of plots
CursorId MAX_CURSORS : The maximum number of cursors.

Macros

#define MAX(a, b) : Returns the maximum of the two numbers.
#define MIN(a, b) : Returns the smaller of the two numbers.

Typedefs

typedef void* Ptr
typedef const void* CPtr
typedef int CursorId
typedef int PlotId

Enumeration:

enum LineReaderSetting = {
    LR_SET_TRIM_LINES
    LR_SET_WHITESPACE
    LR_SET_CASE_SENSITIVE
    LR_ADD_EOL_CONTINUE
    LR_ADD_BNL_CONTINUE
    LR_ADD_COMMENT_START
    LR_ADD_COMMENT_EXCEPTION
    LR_ADD_PARTIAL_COMMENT
};
enum Font = {
    HELVETICA
    TIMES
    COURIER
};
enum FontStyle = {
    NORMAL
    BOLD
    ITALIC
    BOLD_ITALIC
};
enum DrawMode = {
    STANDARD
    INVERT
    XOR
};
enum LineStyle = {
    SOLID
    DASHED
    DOTTED
    DASHDOTTED
};
enum KeyCode = {
    KEY_ESCAPE
    KEY_BACKSPACE
    KEY_TAB
    KEY_ENTER
    KEY_PRINT
    KEY_SCROLL_LOCK
    KEY_PAUSE
    KEY_INSERT
    KEY_HOME
    KEY_PAGE_UP
    KEY_DELETE
    KEY_END
    KEY_PAGE_DOWN
    KEY_LEFT
    KEY_UP
    KEY_RIGHT
    KEY_DOWN
    KEY_SHIFT_L
    KEY_SHIFT_R
    KEY_CONTROL_L
    KEY_CONTROL_R
    KEY_CAPS_LOCK
    KEY_ALT_L
    KEY_ALT_R
    KEY_META_L
    KEY_META_R
    KEY_NUM_LOCK
    KEY_KP_ENTER
    KEY_F1
    KEY_F2
    KEY_F3
    KEY_F4
    KEY_F5
    KEY_F6
    KEY_F7
    KEY_F8
    KEY_F9
    KEY_F10
    KEY_F11
    KEY_F12
};
enum KeyModifier = {
    MOD_NONE
    MOD_CTRL
    MOD_ALT
    MOD_SHIFT
};
enum PlotStyle = {
    CONTINUOUS
    PLUSES
    BOXES
    CIRCLES
    POINTS
    CROSSES
};
enum GraphAxis = {
    XAXIS
    YAXIS
    BOTHAXES
};
enum MessageInfo = {
    YES
    NO
    CANCEL
    YES_NO
    YES_NO_CANCEL
    INFORMATION
    ALERT
};

Functions:


unsigned int GetLargerPrime
unsigned int GetLargerPrime(unsigned int x);

Returns a prime number equal or greater than the parameter.
Parameters:
unsigned int xThe minimum value.

void EndApp
void EndApp();

Attempts to quit the application. Calls the user-defined AppQuit() function, and exits if AppQuit returns true.

void SetAppHelpFile
void SetAppHelpFile(const String& path);

Sets the application's help file. This should be the path to an HTML help file.
Parameters:
const String& pathThe file path.

void ShowAppHelp
void ShowAppHelp();

Displays a help dialog with the specified help file.

void HideAppHelp
void HideAppHelp();

Hides the application's help viewer dialog.

void SetAppHelpTopline
void SetAppHelpTopline(int n);

Sets the top line in the help viewer to the numbered line
Parameters:
int nThe line to show.

void SetAppHelpTopline
void SetAppHelpTopline(const String& str);

Sets the top line in the help viewer to the named line
Parameters:
const String& strThe line to show.

void Message
void Message(const char* pMsg, ... .);

Displays a simple message dialog with an OK button and the given message.
Parameters:
const char* pMsgThe format string for the message. This function works just like the standard printf(...) function.
... .The variable length argument list for the format string.

void Alert
void Alert(const char* pMsg, ... .);

Displays an alert message dialog with an OK button and the given message.
Parameters:
const char* pMsgThe format string for the message. This function works just like the standard printf(...) function.
... .The variable length argument list for the format string.

int Question
int Question(int pType, const char* pMsg, ... .);

Displays a simple question dialog box. The button configuration can be customized.

Returns: Returns one of YES, NO, or CANCEL, depending on which button was pressed.
Parameters:
int pTypeThe button format. Possible values are YES_NO and YES_NO_CANCEL.
const char* pMsgThe format string for the message. This function works just like the standard printf(...) function.
... .The variable length argument list for the format string.

bool InputBox
bool InputBox(String& pLabel, const char* fmt, ... .);

Shows a dialog displaying some text, allows the user to edit it, and returns the new string.

Returns: Returns true if the Ok button was pressed.
Parameters:
String& pLabelThe initial default text to display, and the string referenced is assigned to the new string if Ok is pressed.
const char* fmtThe format string for the dialog's message label.
... .The variable length argument list for the format string.

bool ShowFileChooser
bool ShowFileChooser(const String& title, const String& patterns, const String& path, String& file);

Shows a file selection dialog box. For example,
   String fn;
   bool success = ShowFileChooser("Open", "*", "", fn);


Returns: Returns whether the user actually selected a file or canceled the dialog.
Parameters:
const String& titleThe title of the selection dialog.
const String& patternsThe file matching patterns to filter.
const String& pathThe initial path to display. An empty "" string uses the current path.
String& fileA reference to a string where to place the chosen file name.

bool ShowDirChooser
bool ShowDirChooser(const String& title, String& dir, bool relative);

Shows a directory selection dialog box. For example,
   String dir;
   bool success = ShowDirChooser("Choose Dir", dir, true);


Returns: Returns whether the user actually selected a file or canceled the dialog.
Parameters:
const String& titleThe title of the selection dialog.
String& dirThe initial directory, as well as the where the chosen directory is placed if the user clicks ok.
bool relativeWhether the filename should be relative (true) or absolute (false).

bool ShowColorChooser
bool ShowColorChooser(const String& pTitle, Color& pColor);

Shows a color selection dialog box. The pColor parameter specifies the inital color, and is changed to the color that the user selects.

Returns: Returns true if the user clicks Ok and updates the color.
Parameters:
const String& pTitleThe title of the color selection dialog.
Color& pColorThe color.


Generated automatically by docgen 0.0.1
© 2003 Aron Dobos