dialogs.c File Reference

#include "frontier.h"
#include "standard.h"
#include "quickdraw.h"
#include "bitmaps.h"
#include "cursor.h"
#include "font.h"
#include "launch.h"
#include "kb.h"
#include "memory.h"
#include "resources.h"
#include "scrap.h"
#include "strings.h"
#include "frontierwindows.h"
#include "ops.h"
#include "shell.h"
#include "shellmenu.h"
#include "shell.rsrc.h"
#include "dialogs.h"
#include "lang.h"
#include "mac.h"
#include "langinternal.h"
#include "tablestructure.h"

Include dependency graph for dialogs.c:

Go to the source code of this file.

Defines

#define windowevents   (updateMask + activMask)

Functions

short dialogcountitems (DialogPtr pdialog)
static void dialoggeteditbuffer (DialogPtr pdialog, TEHandle *hbuffer)
void boldenbutton (DialogPtr pdialog, short itemnumber)
void positiondialogwindow (DialogPtr pdialog)
static boolean dialogitemtypeiscontrol (short itemtype)
void disabledialogitem (DialogPtr pdialog, short itemnumber)
void enabledialogitem (DialogPtr pdialog, short itemnumber)
void hidedialogitem (DialogPtr pdialog, short itemnumber)
void showdialogitem (DialogPtr pdialog, short itemnumber)
void setdefaultitem (DialogPtr pdialog, short defaultitem)
static boolean dialogitemisenabled (DialogPtr pdialog, short item)
boolean dialogitemisbutton (DialogPtr pdialog, short item)
static boolean dialogitemisedittext (DialogPtr pdialog, short item)
static boolean dialoghasedititems (DialogPtr pdialog)
static void dialoggetbuttonstring (DialogPtr pdialog, short item, bigstring bs)
static void dialogsetbuttonstring (DialogPtr pdialog, short item, bigstring bs)
DialogPtr newmodaldialog (short id, short defaultitem)
void disposemodaldialog (DialogPtr pdialog)
void setdialogcheckbox (DialogPtr pdialog, short item, boolean fl)
boolean getdialogcheckbox (DialogPtr pdialog, short item)
void toggledialogcheckbox (DialogPtr pdialog, short item)
boolean setdialogradiovalue (DialogPtr pdialog, short firstitem, short lastitem, short val)
short getdialogradiovalue (DialogPtr pdialog, short firstitem, short lastitem)
void getdialogtext (DialogPtr pdialog, short itemnumber, bigstring bs)
static void dialogscanspecialchars (bigstring bs)
void setdialogicon (DialogPtr pdialog, short itemnumber, short iconnum)
void setdialogtext (DialogPtr pdialog, short itemnumber, bigstring bs)
void selectdialogtext (DialogPtr pdialog, short itemnumber)
short getdialogint (DialogPtr pdialog, short itemnumber)
void setdialogint (DialogPtr pdialog, short itemnumber, short num)
OSType getdialogostype (DialogPtr pdialog, short itemnumber)
void setdialogostype (DialogPtr pdialog, short itemnumber, OSType type)
void setdialogbutton (DialogPtr pdialog, short itemnumber, bigstring bs)
void dialoggetobjectrect (DialogPtr pdialog, short objectnumber, Rect *r)
void dialogsetobjectrect (DialogPtr pdialog, short objectnumber, Rect r)
boolean dialogsetfontsize (DialogPtr pdialog, short font, short size)
boolean ptinuseritem (Point pt, DialogPtr pdialog, short item)
boolean setuseritemdrawroutine (DialogPtr pdialog, short item, dialogcallback drawroutine)
static void highlightdialogbutton (DialogPtr pdialog, short itemnumber, boolean flon)
static boolean dialogsimulatehit (DialogPtr pdialog, short item)
static boolean dialogmapkeystroke (DialogPtr pdialog, bigstring bsmap, short *item)
static void passwordprocesskey (DialogPtr pdialog, char chkb, EventRecord *ev, short *item)
pascal boolean modaldialogcallback (DialogPtr pdialog, EventRecord *ev, short *item)
static short runmodaldialog (void)
void dialogupdate (EventRecord *event, DialogPtr pdialog)
boolean dialogevent (EventRecord *event, DialogPtr pdialog, short *itemnumber)
boolean dialogidle (DialogPtr pdialog)
boolean dialogactivate (DialogPtr pdialog, boolean flactivate)
boolean dialoggetselect (DialogPtr pdialog, short *startsel, short *endsel)
boolean dialogsetselect (DialogPtr pdialog, short startsel, short endsel)
boolean dialogselectall (DialogPtr pdialog)
short savedialog (bigstring bsfname)
short replacevariabledialog (bigstring bsitem)
boolean revertdialog (bigstring bsfname)
boolean askdialog (bigstring bsprompt, bigstring bsanswer)
boolean twowaydialog (bigstring bsprompt, bigstring okbutton, bigstring cancelbutton)
short threewaydialog (bigstring bsprompt, bigstring yesbutton, bigstring nobutton, bigstring cancelbutton)
boolean intdialog (bigstring bsprompt, short *intval)
boolean chardialog (bigstring bsprompt, short *charval)
boolean msgdialog (bigstring bsprompt)
short customalert (short id, bigstring bsprompt)
boolean alertdialog (bigstring bsprompt)
boolean alertstring (short iderror)
boolean customdialog (short id, short defaultitem, dialogcallback itemhitcallback)
boolean askpassword (bigstring passprompt, bigstring password)
boolean initdialogs (void)
char X0_p2cstrcpy (char *dst, StringPtr src)

Variables

static short passworditem = -1


Define Documentation

#define windowevents   (updateMask + activMask)
 

Definition at line 59 of file dialogs.c.

Referenced by disposemodaldialog().


Function Documentation

boolean alertdialog bigstring  bsprompt  ) 
 

Definition at line 1822 of file dialogs.c.

boolean alertstring short  iderror  ) 
 

Definition at line 1855 of file dialogs.c.

References alertdialog(), alertstringlistnumber, bigstring, and getstringlist().

Here is the call graph for this function:

boolean askdialog bigstring  bsprompt,
bigstring  bsanswer
 

Definition at line 1530 of file dialogs.c.

boolean askpassword bigstring  passprompt,
bigstring  password
 

Definition at line 1906 of file dialogs.c.

References askansweritem, askcancelitem, askdialogid, askokitem, disposemodaldialog(), newmodaldialog(), nil, passworditem, runmodaldialog(), setdialogtext(), and setemptystring.

Here is the call graph for this function:

void boldenbutton DialogPtr  pdialog,
short  itemnumber
 

Definition at line 91 of file dialogs.c.

boolean chardialog bigstring  bsprompt,
short charval
 

Definition at line 1695 of file dialogs.c.

References bigstring, charcancelitem, chardialogid, charokitem, charpromptitem, charvalitem, chnul, disposemodaldialog(), getdialogtext(), isemptystring, newmodaldialog(), nil, runmodaldialog(), selectdialogtext(), setdialogtext(), setstringwithchar, and uppercasechar().

Here is the call graph for this function:

short customalert short  id,
bigstring  bsprompt
 

Definition at line 1789 of file dialogs.c.

References newmodaldialog(), nil, runmodaldialog(), and setdialogtext().

Here is the call graph for this function:

boolean customdialog short  id,
short  defaultitem,
dialogcallback  itemhitcallback
 

Definition at line 1865 of file dialogs.c.

References dialogselectall(), disposemodaldialog(), newmodaldialog(), nil, and runmodaldialog().

Referenced by langrundialog(), and showpopupkinddialog().

Here is the call graph for this function:

boolean dialogactivate DialogPtr  pdialog,
boolean  flactivate
 

Definition at line 1258 of file dialogs.c.

References dialoggeteditbuffer(), and nil.

Referenced by langdialogactivate().

Here is the call graph for this function:

short dialogcountitems DialogPtr  pdialog  ) 
 

Definition at line 62 of file dialogs.c.

Referenced by dialoghasedititems(), dialogmapkeystroke(), and langvaliddialogitem().

boolean dialogevent EventRecord event,
DialogPtr  pdialog,
short itemnumber
 

Definition at line 1220 of file dialogs.c.

References modaldialogcallback(), and nil.

Referenced by langdialogkeystroke(), and langdialogmousedown().

Here is the call graph for this function:

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

Definition at line 289 of file dialogs.c.

References copystring().

Referenced by dialogmapkeystroke().

Here is the call graph for this function:

static void dialoggeteditbuffer DialogPtr  pdialog,
TEHandle *  hbuffer
[static]
 

Definition at line 71 of file dialogs.c.

Referenced by dialogactivate(), dialoggetselect(), dialogidle(), dialogsetfontsize(), dialogsetobjectrect(), and dialogsetselect().

void dialoggetobjectrect DialogPtr  pdialog,
short  objectnumber,
Rect r
 

Definition at line 688 of file dialogs.c.

boolean dialoggetselect DialogPtr  pdialog,
short startsel,
short endsel
 

Definition at line 1276 of file dialogs.c.

References dialoggeteditbuffer(), and nil.

Here is the call graph for this function:

static boolean dialoghasedititems DialogPtr  pdialog  )  [static]
 

Definition at line 274 of file dialogs.c.

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

Referenced by dialogmapkeystroke(), and newmodaldialog().

Here is the call graph for this function:

boolean dialogidle DialogPtr  pdialog  ) 
 

Definition at line 1245 of file dialogs.c.

References dialoggeteditbuffer(), and nil.

Referenced by langdialogidle().

Here is the call graph for this function:

boolean dialogitemisbutton DialogPtr  pdialog,
short  item
 

Definition at line 247 of file dialogs.c.

References dialogitemtypeiscontrol().

Referenced by dialogmapkeystroke(), dialogsimulatehit(), and langrunmodeless().

Here is the call graph for this function:

static boolean dialogitemisedittext DialogPtr  pdialog,
short  item
[static]
 

Definition at line 262 of file dialogs.c.

Referenced by dialoghasedititems().

static boolean dialogitemisenabled DialogPtr  pdialog,
short  item
[static]
 

Definition at line 235 of file dialogs.c.

Referenced by dialogsimulatehit().

static boolean dialogitemtypeiscontrol short  itemtype  )  [static]
 

Definition at line 163 of file dialogs.c.

Referenced by dialogitemisbutton(), disabledialogitem(), and enabledialogitem().

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

Definition at line 830 of file dialogs.c.

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

Referenced by modaldialogcallback().

Here is the call graph for this function:

static void dialogscanspecialchars bigstring  bs  )  [static]
 

Definition at line 515 of file dialogs.c.

References chreturn, ct, i, and stringlength.

Referenced by setdialogtext().

boolean dialogselectall DialogPtr  pdialog  ) 
 

Definition at line 1311 of file dialogs.c.

References dialogsetselect(), infinity, and noErr.

Referenced by customdialog(), langdialogselectall(), langrunmodeless(), and setdialogtext().

Here is the call graph for this function:

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

Definition at line 311 of file dialogs.c.

Referenced by threewaydialog(), twowaydialog(), and yesnodialog().

boolean dialogsetfontsize DialogPtr  pdialog,
short  font,
short  size
 

Definition at line 723 of file dialogs.c.

References tyFontInfo::ascent, tyFontInfo::descent, dialoggeteditbuffer(), globalfontinfo, h, tyFontInfo::leading, popstyle(), and pushstyle().

Here is the call graph for this function:

void dialogsetobjectrect DialogPtr  pdialog,
short  objectnumber,
Rect  r
 

Definition at line 697 of file dialogs.c.

References dialoggeteditbuffer().

Here is the call graph for this function:

boolean dialogsetselect DialogPtr  pdialog,
short  startsel,
short  endsel
 

Definition at line 1294 of file dialogs.c.

References dialoggeteditbuffer(), and nil.

Referenced by dialogselectall().

Here is the call graph for this function:

static boolean dialogsimulatehit DialogPtr  pdialog,
short  item
[static]
 

Definition at line 803 of file dialogs.c.

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

Referenced by modaldialogcallback().

Here is the call graph for this function:

void dialogupdate EventRecord event,
DialogPtr  pdialog
 

Definition at line 1186 of file dialogs.c.

References DisposeRgn, modaldialogcallback(), and NewRgn.

Referenced by langdialogupdate().

Here is the call graph for this function:

void disabledialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 173 of file dialogs.c.

void disposemodaldialog DialogPtr  pdialog  ) 
 

Definition at line 385 of file dialogs.c.

References flscriptrunning, langpartialeventloop(), shellpartialeventloop(), and windowevents.

Referenced by alertdialog(), askdialog(), askpassword(), chardialog(), customdialog(), intdialog(), msgdialog(), revertdialog(), savedialog(), threewaydialog(), and twowaydialog().

Here is the call graph for this function:

void enabledialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 195 of file dialogs.c.

boolean getdialogcheckbox DialogPtr  pdialog,
short  item
 

Definition at line 428 of file dialogs.c.

References bitboolean.

Referenced by getdialogradiovalue(), and setdialogradiovalue().

short getdialogint DialogPtr  pdialog,
short  itemnumber
 

Definition at line 608 of file dialogs.c.

References bigstring, getdialogtext(), and stringtonumber().

Here is the call graph for this function:

OSType getdialogostype DialogPtr  pdialog,
short  itemnumber
 

Definition at line 635 of file dialogs.c.

References bigstring, getdialogtext(), and stringtoostype().

Here is the call graph for this function:

short getdialogradiovalue DialogPtr  pdialog,
short  firstitem,
short  lastitem
 

Definition at line 482 of file dialogs.c.

References getdialogcheckbox().

Here is the call graph for this function:

void getdialogtext DialogPtr  pdialog,
short  itemnumber,
bigstring  bs
 

Definition at line 503 of file dialogs.c.

void hidedialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 213 of file dialogs.c.

Referenced by langsetdialogitemvis().

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

Definition at line 781 of file dialogs.c.

References nil.

Referenced by dialogsimulatehit().

boolean initdialogs void   ) 
 

Definition at line 1977 of file dialogs.c.

References RememberA5.

boolean intdialog bigstring  bsprompt,
short intval
 

Definition at line 1658 of file dialogs.c.

References bigstring, disposemodaldialog(), getdialogtext(), intdialogid, intintitem, intokitem, intpromptitem, newmodaldialog(), nil, runmodaldialog(), selectdialogtext(), setdialogtext(), shorttostring(), and stringtoshort().

Here is the call graph for this function:

pascal boolean modaldialogcallback DialogPtr  pdialog,
EventRecord ev,
short item
 

Definition at line 966 of file dialogs.c.

References autoKey, bigstring, boldenbutton(), cancelbuttonstring, chenter, chescape, chreturn, dialogmapkeystroke(), dialogsimulatehit(), keyDown, nil, passworditem, passwordprocesskey(), RestoreA5, setstringwithchar, SetUpAppA5, shellevent, shellgetstring(), updateEvt, and tyEventRecord::when.

Referenced by dialogevent(), dialogupdate(), and runmodaldialog().

Here is the call graph for this function:

boolean msgdialog bigstring  bsprompt  ) 
 

Definition at line 1758 of file dialogs.c.

References disposemodaldialog(), msgdialogid, msgmsgitem, msgokitem, newmodaldialog(), nil, runmodaldialog(), and setdialogtext().

Here is the call graph for this function:

DialogPtr newmodaldialog short  id,
short  defaultitem
 

Definition at line 323 of file dialogs.c.

static void passwordprocesskey DialogPtr  pdialog,
char  chkb,
EventRecord ev,
short item
[static]
 

Definition at line 898 of file dialogs.c.

References chbackspace, chdownarrow, chleftarrow, chrightarrow, chtab, chuparrow, passworditem, setstringlength, and stringlength.

Referenced by modaldialogcallback().

void positiondialogwindow DialogPtr  pdialog  ) 
 

Definition at line 130 of file dialogs.c.

References getcurrentscreenbounds(), h, movewindow(), and v.

Referenced by myMoof(), and newmodaldialog().

Here is the call graph for this function:

boolean ptinuseritem Point  pt,
DialogPtr  pdialog,
short  item
 

Definition at line 754 of file dialogs.c.

References dialoggetobjectrect(), pointinrect(), pt, and r.

Here is the call graph for this function:

short replacevariabledialog bigstring  bsitem  ) 
 

Definition at line 1405 of file dialogs.c.

References bigstring, copystring(), disablelangerror(), enablelangerror(), fl, getstringlist(), getsystemtablescript(), idreplacedialogexpertmode, langerrorlist, langrunstring(), nil, parsedialogstring(), pophashtable(), pushhashtable(), replacecancelitem, replaceduplicateitem, replaceitemerror, replacereplaceitem, roottable, stringisboolean(), and threewaydialog().

Here is the call graph for this function:

boolean revertdialog bigstring  bsfname  ) 
 

Definition at line 1500 of file dialogs.c.

References disposemodaldialog(), newmodaldialog(), nil, revertdialogid, revertokitem, and runmodaldialog().

Here is the call graph for this function:

static short runmodaldialog void   )  [static]
 

Definition at line 1112 of file dialogs.c.

References cursorisarrow, modaldialogcallback(), RestoreA5, setcursortype(), and SetUpCurA5.

Referenced by alertdialog(), askdialog(), askpassword(), chardialog(), confirmdialog(), customalert(), customdialog(), intdialog(), msgdialog(), revertdialog(), savedialog(), threewaydialog(), twowaydialog(), and yesnodialog().

Here is the call graph for this function:

short savedialog bigstring  bsfname  ) 
 

Definition at line 1341 of file dialogs.c.

void selectdialogtext DialogPtr  pdialog,
short  itemnumber
 

Definition at line 593 of file dialogs.c.

void setdefaultitem DialogPtr  pdialog,
short  defaultitem
 

Definition at line 225 of file dialogs.c.

Referenced by langdialognewwindow(), and newmodaldialog().

void setdialogbutton DialogPtr  pdialog,
short  itemnumber,
bigstring  bs
 

Definition at line 662 of file dialogs.c.

References r.

void setdialogcheckbox DialogPtr  pdialog,
short  item,
boolean  fl
 

Definition at line 412 of file dialogs.c.

Referenced by setdialogradiovalue().

void setdialogicon DialogPtr  pdialog,
short  itemnumber,
short  iconnum
 

Definition at line 534 of file dialogs.c.

References nil.

void setdialogint DialogPtr  pdialog,
short  itemnumber,
short  num
 

Definition at line 625 of file dialogs.c.

References bigstring, and setdialogtext().

Here is the call graph for this function:

void setdialogostype DialogPtr  pdialog,
short  itemnumber,
OSType  type
 

Definition at line 652 of file dialogs.c.

References bigstring, ostypetostring(), and setdialogtext().

Here is the call graph for this function:

boolean setdialogradiovalue DialogPtr  pdialog,
short  firstitem,
short  lastitem,
short  val
 

Definition at line 460 of file dialogs.c.

References getdialogcheckbox(), and setdialogcheckbox().

Here is the call graph for this function:

void setdialogtext DialogPtr  pdialog,
short  itemnumber,
bigstring  bs
 

Definition at line 553 of file dialogs.c.

boolean setuseritemdrawroutine DialogPtr  pdialog,
short  item,
dialogcallback  drawroutine
 

Definition at line 765 of file dialogs.c.

References assert.

void showdialogitem DialogPtr  pdialog,
short  itemnumber
 

Definition at line 219 of file dialogs.c.

Referenced by langsetdialogitemvis().

short threewaydialog bigstring  bsprompt,
bigstring  yesbutton,
bigstring  nobutton,
bigstring  cancelbutton
 

Definition at line 1615 of file dialogs.c.

void toggledialogcheckbox DialogPtr  pdialog,
short  item
 

Definition at line 444 of file dialogs.c.

boolean twowaydialog bigstring  bsprompt,
bigstring  okbutton,
bigstring  cancelbutton
 

Definition at line 1584 of file dialogs.c.

char X0_p2cstrcpy char *  dst,
StringPtr  src
 

Definition at line 1991 of file dialogs.c.

References i.

Referenced by setdialogtext().


Variable Documentation

short passworditem = -1 [static]
 

Definition at line 895 of file dialogs.c.

Referenced by askpassword(), modaldialogcallback(), and passwordprocesskey().


Generated on Thu Jun 1 06:54:50 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6