appletdialogs.c File Reference

#include "applet.h"
#include "appletquickdraw.h"
#include "appletops.h"
#include "appletresource.h"
#include "appletmain.h"
#include "appletdialogs.h"

Include dependency graph for appletdialogs.c:

Go to the source code of this file.

Defines

#define modaldialogcallbackUPP   &modaldialogcallback
#define alertdialogid   128
#define alertokitem   1
#define alertmsgitem   3
#define savedialogid   131
#define saveyesitem   1
#define savenoitem   2
#define savecancelitem   3
#define savemsgitem   4
#define confirmdialogid   129
#define confirmokitem   1
#define confirmcancelitem   2
#define confirmmsgitem   3
#define yesnodialogid   129
#define yesnookitem   1
#define yesnocancelitem   2
#define yesnomsgitem   3
#define threewaydialogid   131
#define leftbuttonitem   3
#define midbuttonitem   2
#define rightbuttonitem   1
#define messageitem   4
#define askdialogid   130
#define askokitem   1
#define askcancelitem   2
#define askpromptitem   3
#define askansweritem   4

Functions

void setdialogtext (DialogPtr pdialog, short itemnumber, bigstring bs)
void getdialogtext (DialogPtr pdialog, short itemnumber, bigstring bs)
void selectdialogtext (DialogPtr pdialog, short itemnumber)
void disabledialogitem (DialogPtr pdialog, short itemnumber)
void enabledialogitem (DialogPtr pdialog, short itemnumber)
void dialoggetobjectrect (DialogPtr pdialog, short objectnumber, Rect *r)
void parsedialogstring (bigstring bs)
static short dialogcountitems (DialogPtr pdialog)
static boolean dialogitemisedittext (DialogPtr pdialog, short item)
static dialoghasedititems (DialogPtr pdialog)
static void dialoggetbuttonstring (DialogPtr pdialog, short item, bigstring bs)
static void dialogsetbuttonstring (DialogPtr pdialog, short item, bigstring bs)
static void setdefaultitem (DialogPtr pdialog, short defaultitem)
void boldenbutton (DialogPtr pdialog, short itemnumber)
static boolean dialogitemtypeiscontrol (short itemtype)
static boolean dialogitemisbutton (DialogPtr pdialog, short item)
static void highlightdialogbutton (DialogPtr pdialog, short itemnumber, boolean flon)
static boolean dialogitemisenabled (DialogPtr pdialog, short item)
static boolean dialogsimulatehit (DialogPtr pdialog, short item)
static boolean dialogmapkeystroke (DialogPtr pdialog, bigstring bsmap, short *item)
DialogPtr newmodaldialog (short id, short defaultitem)
static pascal Boolean modaldialogcallback (DialogPtr pdialog, EventRecord *ev, short *item)
short runmodaldialog (void)
boolean alertdialog (bigstring bs)
short savedialog (bigstring fname)
boolean confirmdialog (bigstring bs)
boolean yesnodialog (bigstring bs)
short threewaydialog (bigstring bsprompt, bigstring leftbutton, bigstring midbutton, bigstring rightbutton)
boolean askdialog (bigstring bsprompt, bigstring bsanswer)
boolean oserror (OSErr errcode)

Variables

boolean fldialogsenabled = true
bigstring bsalertstring


Define Documentation

#define alertdialogid   128
 

#define alertmsgitem   3
 

#define alertokitem   1
 

#define askansweritem   4
 

#define askcancelitem   2
 

#define askdialogid   130
 

#define askokitem   1
 

#define askpromptitem   3
 

#define confirmcancelitem   2
 

#define confirmdialogid   129
 

Referenced by confirmdialog().

#define confirmmsgitem   3
 

Referenced by confirmdialog().

#define confirmokitem   1
 

Referenced by confirmdialog().

#define leftbuttonitem   3
 

Referenced by threewaydialog().

#define messageitem   4
 

Referenced by threewaydialog().

#define midbuttonitem   2
 

Referenced by threewaydialog().

#define modaldialogcallbackUPP   &modaldialogcallback
 

Definition at line 475 of file appletdialogs.c.

Referenced by runmodaldialog().

#define rightbuttonitem   1
 

Referenced by threewaydialog().

#define savecancelitem   3
 

#define savedialogid   131
 

#define savemsgitem   4
 

Referenced by savedialog().

#define savenoitem   2
 

#define saveyesitem   1
 

#define threewaydialogid   131
 

#define yesnocancelitem   2
 

Referenced by yesnodialog().

#define yesnodialogid   129
 

Referenced by yesnodialog().

#define yesnomsgitem   3
 

Referenced by yesnodialog().

#define yesnookitem   1
 

Referenced by yesnodialog().


Function Documentation

boolean alertdialog bigstring  bs  ) 
 

Definition at line 491 of file appletdialogs.c.

References alertdialogid, alertmsgitem, alertokitem, bsalertstring, copystring(), DebugStr(), disposemodaldialog(), fldialogsenabled, newmodaldialog(), nil, optionkeydown(), parsedialogstring(), runmodaldialog(), setdialogtext(), and sysbeep.

Here is the call graph for this function:

boolean askdialog bigstring  bsprompt,
bigstring  bsanswer
 

Definition at line 684 of file appletdialogs.c.

References askansweritem, askcancelitem, askdialogid, askokitem, disposemodaldialog(), emptystring, getdialogtext(), newmodaldialog(), nil, runmodaldialog(), selectdialogtext(), and setdialogtext().

Here is the call graph for this function:

void boldenbutton DialogPtr  pdialog,
short  itemnumber
 

Definition at line 185 of file appletdialogs.c.

References insetrect(), popmacport(), popport(), pushmacport(), and pushport().

Here is the call graph for this function:

boolean confirmdialog bigstring  bs  ) 
 

Definition at line 584 of file appletdialogs.c.

References confirmdialogid, confirmmsgitem, confirmokitem, newmodaldialog(), nil, parsedialogstring(), runmodaldialog(), and setdialogtext().

Here is the call graph for this function:

static short dialogcountitems DialogPtr  pdialog  )  [static]
 

Definition at line 113 of file appletdialogs.c.

References h.

static void dialoggetbuttonstring DialogPtr  pdialog,
short  item,
bigstring  bs
[static]
 

Definition at line 155 of file appletdialogs.c.

References copystring().

Here is the call graph for this function:

void dialoggetobjectrect DialogPtr  pdialog,
short  objectnumber,
Rect r
 

Definition at line 92 of file appletdialogs.c.

static dialoghasedititems DialogPtr  pdialog  )  [static]
 

Definition at line 140 of file appletdialogs.c.

References dialogcountitems(), dialogitemisedittext(), and i.

Here is the call graph for this function:

static boolean dialogitemisbutton DialogPtr  pdialog,
short  item
[static]
 

Definition at line 224 of file appletdialogs.c.

References dialogitemtypeiscontrol().

Here is the call graph for this function:

static boolean dialogitemisedittext DialogPtr  pdialog,
short  item
[static]
 

Definition at line 128 of file appletdialogs.c.

static boolean dialogitemisenabled DialogPtr  pdialog,
short  item
[static]
 

Definition at line 261 of file appletdialogs.c.

static boolean dialogitemtypeiscontrol short  itemtype  )  [static]
 

Definition at line 214 of file appletdialogs.c.

static boolean dialogmapkeystroke DialogPtr  pdialog,
bigstring  bsmap,
short item
[static]
 

Definition at line 288 of file appletdialogs.c.

References alllower(), bigstring, cmdkeydown(), dialogcountitems(), dialoggetbuttonstring(), dialoghasedititems(), dialogitemisbutton(), equalstrings(), i, setstringlength, and stringlength.

Here is the call graph for this function:

static void dialogsetbuttonstring DialogPtr  pdialog,
short  item,
bigstring  bs
[static]
 

Definition at line 167 of file appletdialogs.c.

static boolean dialogsimulatehit DialogPtr  pdialog,
short  item
[static]
 

Definition at line 273 of file appletdialogs.c.

References delayticks(), dialogitemisbutton(), dialogitemisenabled(), and highlightdialogbutton().

Here is the call graph for this function:

void disabledialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 61 of file appletdialogs.c.

References dialogitemtypeiscontrol(), and grayrect().

Here is the call graph for this function:

void enabledialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 78 of file appletdialogs.c.

References dialogitemtypeiscontrol().

Here is the call graph for this function:

void getdialogtext DialogPtr  pdialog,
short  itemnumber,
bigstring  bs
 

Definition at line 43 of file appletdialogs.c.

static void highlightdialogbutton DialogPtr  pdialog,
short  itemnumber,
boolean  flon
[static]
 

Definition at line 239 of file appletdialogs.c.

References nil.

static pascal Boolean modaldialogcallback DialogPtr  pdialog,
EventRecord ev,
short item
[static]
 

Definition at line 379 of file appletdialogs.c.

References autoKey, bigstring, boldenbutton(), cancelbuttonstring, chenter, chescape, chreturn, dialogmapkeystroke(), dialogsimulatehit(), getresourcestring(), keyDown, setstringwithchar, and updateEvt.

Here is the call graph for this function:

DialogPtr newmodaldialog short  id,
short  defaultitem
 

Definition at line 353 of file appletdialogs.c.

References arrowcursor(), boldenbutton(), bounds, centerwindow(), cometofront(), DebugStr(), dialoghasedititems(), nil, positiondialogwindow(), quickdrawglobal, RestoreA5, setdefaultitem(), SetUpCurA5, shellactivate(), shellwritescrap(), and textscraptype.

Here is the call graph for this function:

boolean oserror OSErr  errcode  ) 
 

Definition at line 720 of file appletdialogs.c.

References alertdialog(), bigstring, copystring(), getsystemerrorstring(), isemptystring, lasterror, nil, noErr, parseparamstring(), pushint(), setparseparams(), shellerrormessage(), and STR_Mac_OS_Error.

Here is the call graph for this function:

void parsedialogstring bigstring  bs  ) 
 

Definition at line 101 of file appletdialogs.c.

References i, and stringlength.

short runmodaldialog void   ) 
 

Definition at line 481 of file appletdialogs.c.

References modaldialogcallbackUPP.

short savedialog bigstring  fname  ) 
 

Definition at line 529 of file appletdialogs.c.

References bigstring, copystring(), disposemodaldialog(), newmodaldialog(), nil, pushstring(), runmodaldialog(), savecancelitem, savedialogid, savemsgitem, savenoitem, saveyesitem, and setdialogtext().

Here is the call graph for this function:

void selectdialogtext DialogPtr  pdialog,
short  itemnumber
 

Definition at line 55 of file appletdialogs.c.

References infinity, noErr, and selection.

static void setdefaultitem DialogPtr  pdialog,
short  defaultitem
[static]
 

Definition at line 179 of file appletdialogs.c.

void setdialogtext DialogPtr  pdialog,
short  itemnumber,
bigstring  bs
 

Definition at line 31 of file appletdialogs.c.

References dialogscanspecialchars(), dialogselectall(), noErr, and X0_p2cstrcpy().

Here is the call graph for this function:

short threewaydialog bigstring  bsprompt,
bigstring  leftbutton,
bigstring  midbutton,
bigstring  rightbutton
 

Definition at line 640 of file appletdialogs.c.

References dialogsetbuttonstring(), disposemodaldialog(), leftbuttonitem, messageitem, midbuttonitem, newmodaldialog(), nil, parsedialogstring(), rightbuttonitem, runmodaldialog(), setdialogtext(), threewaycancelitem, threewaydialogid, threewaymsgitem, threewaynoitem, and threewayyesitem.

Here is the call graph for this function:

boolean yesnodialog bigstring  bs  ) 
 

Definition at line 610 of file appletdialogs.c.

References dialogsetbuttonstring(), newmodaldialog(), nil, parsedialogstring(), runmodaldialog(), setdialogtext(), yesnocancelitem, yesnodialogid, yesnomsgitem, and yesnookitem.

Here is the call graph for this function:


Variable Documentation

bigstring bsalertstring
 

Definition at line 26 of file appletdialogs.c.

boolean fldialogsenabled = true
 

Definition at line 25 of file appletdialogs.c.


Generated on Wed May 31 20:23:52 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6