NOTE
SIOUXSettings before you call any function that uses standard input or output. If you modify SIOUXSettings afterwards, SIOUX does not change its window.
The first three sections, "Changing the font and tabs," "Changing the size and location," and "Showing the status line," describe how to customize the SIOUX window. The next section, "Changing what happens on quit," describe how to modify how SIOUX acts when you quit it. The last section, "Using SIOUX windows in your own application," describes how you can use a SIOUX window in your own Macintosh program.
"The SIOUXSettings structure" summarizes what's in the SIOUXSettings structure.
|
This field
|
Specifies
| |
|---|---|---|
"Example of customizing a SIOUX Window" contains a small program that customizes a SIOUX window.
Example of customizing a SIOUX Window:#include <stdio.h>
#include <sioux.h>
#include <MacTypes.h>
#include <Fonts.h>
int main(void)
{
short familyID;
/* Don't exit the program after it runs or ask whether
to save the window when the program exit */
SIOUXSettings.autocloseonquit = false;
SIOUXSettings.asktosaveonclose = false;
/* Don't show the status line */
SIOUXSettings.showstatusline = false;
/* Make the window large enough to fit 1 line
of text that contains 12 characters. */
SIOUXSettings.columns = 12;
SIOUXSettings.rows = 1;
/* Place the window's top left corner at (5,40). */
SIOUXSettings.toppixel = 40;
SIOUXSettings.leftpixel = 5;
/* Set the font to be 48-point, bold, italic Times. */
SIOUXSettings.fontsize = 48;
SIOUXSettings.fontface = bold + italic;
GetFNum("\ptimes", &familyID);
SIOUXSettings.fontid = familyID;
printf("Hello World!");
return 0;
}
NOTE
fontid, fontsize, and fontface. If that font is too large, the status line may be unreadable. You can remove the status line by setting the field showstatusline to false, as described in "Showing the status line."
courier where the ID is kFontIDCourier
geneva where the ID is kFontIDGeneva
helvetica where the ID is kFontIDHelvetica
monaco where the ID is kFontIDMonaco
newYork where the ID is kFontIDNewYork
symbol where the ID is kFontIDSymbol
times where the ID is kFontIDTimes
To change the character style for the font, set fontface to one of these values:
normal
bold
italic
underline
outline
shadow
condense
extend
To change the size of the font, set fontsize to the size. By default, fontsize is 9.
SIOUXSettings.fontsize = 12;
   SIOUXSettings.fontface = bold + italic;
SIOUXSettings.fontid = kFontIDNewYork;
SIOUXSettings.tabspaces = 4;