miniwindow.h

Go to the documentation of this file.
00001 
00002 /*  $Id: miniwindow.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #define miniwindowinclude /*so other modules can tell we've been loaded*/
00029 
00030 
00031 #ifndef shellinclude
00032 
00033     #include "shell.h"
00034     
00035 #endif
00036 
00037 
00038 #ifndef langinclude
00039 
00040     #include "lang.h" /*our record has a valuerecord in it*/
00041     
00042 #endif
00043 
00044 #ifndef popupinclude
00045 
00046     #include "popup.h"
00047 
00048 #endif
00049 
00050 #define maxtextitems 2 
00051 
00052 #define maxpopups 2
00053 
00054 
00055 typedef boolean (*minisavestringcallback) (short, Handle); 
00056     
00057 typedef boolean (*miniloadstringcallback) (short, Handle *);
00058     
00059 typedef boolean (*minitexthitcallback) (Point);
00060     
00061 
00062 typedef struct tyminirecord {
00063     
00064     short idconfig; /*resource number for config that governs this window*/
00065     
00066     short windowtype; /*an index into cancoon.h's windowinfo array*/
00067     
00068     short cttextitems; /*actual number of valid item numbers*/
00069     
00070     short textitems [maxtextitems]; /*dialog item numbers of the text items*/
00071     
00072     Rect textrects [maxtextitems]; /*location of text items*/
00073     
00074     struct tywprecord ** textdata [maxtextitems]; /*data of text items*/
00075     
00076     short ctpopups; /*actual number of popup menus*/
00077     
00078     Rect popuprects [maxpopups]; /*each rect covers a whole popup item, including arrow*/
00079     
00080     hdlstring popupmessages [maxpopups]; /*the string displayed in the rect*/
00081     
00082     short popupnumber; /*during a popup hit, this is the index of the popup, else undefined*/
00083     
00084     short activetextitem; /*index of active text item*/
00085     
00086     Rect iconrect; /*location of the icon, for mouse clicks, cursor adjustment*/
00087     
00088     byte iconlabel [11]; /*max 10 chars for string under icon, length byte at head*/
00089     
00090     byte windowtitle [33]; /*max 32 chars for window title, length byte at head*/
00091     
00092     tyvaluerecord minivalue; /*any miniwindow can have a value associated with it*/
00093     
00094     Rect msgrect; /*location of messages displayed in this window*/
00095     
00096     bigstring bsmsg; /*string displayed in msgrect, result of shell.windowmessage call*/
00097     
00098     long forecolor, backcolor; /*uses the old QuickDraw colors, should be modernized*/
00099     
00100     boolean fliconenabled; /*enabled if there's text that can be run*/
00101     
00102     boolean flactive; /*determines whether items are drawn as active or inactive*/
00103     
00104     boolean flmassiveupdate; /*erase whole rect, use offscreen bitmap*/
00105     
00106     boolean flselectallpending; /*selectall in idle, if flactive is true*/
00107     
00108     boolean flbitmapactive; /*for some drawing, if true don't open a bitmap*/
00109     
00110     minisavestringcallback savestringroutine; 
00111     
00112     miniloadstringcallback loadstringroutine;
00113     
00114     shellcallback setvalueroutine; /*fills in the minivalue field of this record*/
00115     
00116     minitexthitcallback texthitroutine;
00117     
00118     shellvoidcallback iconenableroutine;
00119     
00120     shellcallback iconhitroutine;
00121     
00122     fillpopupcallback fillpopuproutine;
00123     
00124     popupselectcallback popupselectroutine;
00125     
00126     shellshortcallback gettargetdataroutine;
00127     
00128     long minirefcon; /*optional data for the next layer up*/
00129     } tyminirecord, *ptrminirecord, **hdlminirecord;
00130 
00131 
00132 /*globals*/
00133 
00134 extern WindowPtr miniwindow;
00135 
00136 extern hdlwindowinfo miniwindowinfo;
00137 
00138 extern hdlminirecord minidata;
00139 
00140 
00141 /*prototypes*/
00142 
00143 extern boolean minisetstring (short, Handle);
00144 
00145 extern boolean minigetstring (short, Handle *);
00146 
00147 extern boolean minigetselstring (short, bigstring);
00148 
00149 extern boolean minisetpopupmessage (short, bigstring);
00150 
00151 extern void minisetselect (short, short);
00152 
00153 extern boolean miniinvalicon (short);
00154 
00155 extern boolean minisetwindowmessage (short, bigstring);
00156 
00157 extern boolean startminidialog (short, callback);
00158 
00159 extern boolean ministart (short);
00160 
00161 
00162 
00163 

Generated on Wed May 31 18:19:55 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6