Compare commits

...

1539 Commits

Author SHA1 Message Date
cmanske
37ba2f3880 Composer bug fixes and 5.0 feature work
git-svn-id: svn://10.0.0.236/branches/Composer_BRANCH1@2382 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 20:10:34 +00:00
cmanske
5a2531227a Composer bug fixes and 5.0 feature work
git-svn-id: svn://10.0.0.236/branches/Composer_BRANCH1@2380 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 20:06:06 +00:00
(no author)
fea22a7fea This commit was manufactured by cvs2svn to create branch 'Composer_BRANCH1'.
git-svn-id: svn://10.0.0.236/branches/Composer_BRANCH1@2341 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 07:31:16 +00:00
morse
6dd0737902 bug 122126, reviewed by atotic
git-svn-id: svn://10.0.0.236/trunk@2340 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 07:31:15 +00:00
morse
48c842a852 bug 122126, reviewed by aoki
git-svn-id: svn://10.0.0.236/trunk@2339 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 07:24:36 +00:00
scc
8215a118ba added symlink lines, most still need to be completed with final product names; dist directory probably needs to be set correctly
git-svn-id: svn://10.0.0.236/trunk@2338 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 05:46:21 +00:00
mccabe
1403ada266 Conditionalized a (jsint) cast to ask JSDOUBLE_IS_NaN first -
hopefully avoiding a SIGPFE on Alpha Linux.  (And others?)


git-svn-id: svn://10.0.0.236/trunk@2335 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 04:53:37 +00:00
timm
9144c3b087 fix threading problem with thermo bar
git-svn-id: svn://10.0.0.236/trunk@2334 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:36:23 +00:00
timm
f70fcc46ce Sols changes
git-svn-id: svn://10.0.0.236/trunk@2333 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:35:09 +00:00
timm
4d6fd3d15c remove debugging stubs
git-svn-id: svn://10.0.0.236/trunk@2332 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:34:57 +00:00
timm
2328897d3e add getSelectedISPName
git-svn-id: svn://10.0.0.236/trunk@2331 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:34:14 +00:00
timm
c2b35bd975 remove debugging stub
git-svn-id: svn://10.0.0.236/trunk@2330 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:33:37 +00:00
timm
fea8bc8078 117255 fix for null exception
git-svn-id: svn://10.0.0.236/trunk@2329 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:32:53 +00:00
timm
bea1cec239 Sols changes, fix for 97647
git-svn-id: svn://10.0.0.236/trunk@2328 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 03:31:09 +00:00
spider
582fd7877f Allow mkdepend to be built on windoze
git-svn-id: svn://10.0.0.236/trunk@2327 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 02:27:09 +00:00
spider
2afd1eef7d windows dep. stuff
git-svn-id: svn://10.0.0.236/trunk@2326 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 02:14:26 +00:00
michaelp
d4e2a5a20c added support for front-to-back view rendering.
git-svn-id: svn://10.0.0.236/trunk@2325 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 02:13:28 +00:00
tague
55e417dfe9 added libnls headers to public build
git-svn-id: svn://10.0.0.236/trunk@2324 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 02:02:27 +00:00
scullin
35ec9fcc3e Enable html coloring stream converter in modular netlib.
git-svn-id: svn://10.0.0.236/trunk@2322 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 01:28:29 +00:00
scullin
5fdece0330 Change magic emacs line to reflect correct tab size.
git-svn-id: svn://10.0.0.236/trunk@2321 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 01:27:50 +00:00
scullin
0dbf249dce Don't build mkstream.c with modular netlib
git-svn-id: svn://10.0.0.236/trunk@2320 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 01:26:05 +00:00
scullin
d960e37ced Enable more protocols
git-svn-id: svn://10.0.0.236/trunk@2319 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 01:24:22 +00:00
scullin
31fb3c746d Rebuild when sub-libraries change.
git-svn-id: svn://10.0.0.236/trunk@2318 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 01:24:05 +00:00
spider
06abfe228b Adding makedep to gconfig
git-svn-id: svn://10.0.0.236/trunk@2316 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:59:31 +00:00
sfraser
7f9b0a7fe2 Added some more headers to export
git-svn-id: svn://10.0.0.236/trunk@2315 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:53:55 +00:00
sfraser
4d0cc4402f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2314 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:53:25 +00:00
sfraser
8703114e8b Addd some more export files
git-svn-id: svn://10.0.0.236/trunk@2313 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:53:11 +00:00
sfraser
5f209ad760 Updated the list of export.mac files
git-svn-id: svn://10.0.0.236/trunk@2311 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:50:22 +00:00
sfraser
df4052e541 Fixing bugs in the scripts that copy headers into dist. Now allow trailing #comments, and handle whitespace after file names.
git-svn-id: svn://10.0.0.236/trunk@2310 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-27 00:50:08 +00:00
buster
db2f93e156 fixed case-sensitive include
git-svn-id: svn://10.0.0.236/trunk@2307 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:28:48 +00:00
peterl
e232225565 added visibility style attribute
git-svn-id: svn://10.0.0.236/trunk@2306 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:17:29 +00:00
peterl
86b7ae08b5 moved attributes around
git-svn-id: svn://10.0.0.236/trunk@2305 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:16:55 +00:00
peterl
779a602187 added visibility style attribute
moved attributes from position to display struct


git-svn-id: svn://10.0.0.236/trunk@2304 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:15:47 +00:00
peterl
ef76e4aa4a use context graph for finding contexts
git-svn-id: svn://10.0.0.236/trunk@2303 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:14:56 +00:00
peterl
9050d134bb cleaned up visibility
git-svn-id: svn://10.0.0.236/trunk@2302 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:14:29 +00:00
peterl
f264deae62 reworked up reset code
added child list


git-svn-id: svn://10.0.0.236/trunk@2301 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:14:09 +00:00
peterl
2a8bcff4d7 cleanup
git-svn-id: svn://10.0.0.236/trunk@2300 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:13:26 +00:00
peterl
16a18a6b6d moved overflow from position to display struct
git-svn-id: svn://10.0.0.236/trunk@2299 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:13:15 +00:00
peterl
e280fe1c34 documented reset vs inherited attributes
shuffled some attributes around


git-svn-id: svn://10.0.0.236/trunk@2298 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 23:12:14 +00:00
waldemar
6f622be91c Fixed bug 117404: typeof should return "function" on scripts and regular expressions.
git-svn-id: svn://10.0.0.236/trunk@2295 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 22:11:00 +00:00
buster
314c1c9eb4 table width computation using style system (more than it used to, at least)
git-svn-id: svn://10.0.0.236/trunk@2294 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 22:03:16 +00:00
waldemar
66bf5ae377 Fixed syntax errors
git-svn-id: svn://10.0.0.236/trunk@2291 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 21:25:41 +00:00
kostello
b9b928f869 Updated Table Border code to render HTML3.2 compatible borders (no longer using the cool,
CSS borders).
Fixed Table but submitted by Isaac David Guedalia <daniel_sh@gezernet.co.il>.


git-svn-id: svn://10.0.0.236/trunk@2288 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 20:57:24 +00:00
kostello
557fb3323f Moved Get3DColors from HRPart to CSSRendering.
Modified Border Drawing Code to use Get3DColors for backwards compatibility purposes.


git-svn-id: svn://10.0.0.236/trunk@2287 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 20:52:59 +00:00
kostello
3b45b56e92 Moved Get3DColors from HRPart to CSSRendering.
git-svn-id: svn://10.0.0.236/trunk@2286 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 20:52:12 +00:00
scc
17b0861b94 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2283 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:48:03 +00:00
scc
0b0f644879 Added code to handle the `stop for errors, but not logging' case; moved copyright to (newly added) POD section
git-svn-id: svn://10.0.0.236/trunk@2282 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:46:36 +00:00
scc
9bc43c2d77 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@2281 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:36:10 +00:00
scc
ceebd16267 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2280 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:34:23 +00:00
ftang
bdcc75c122 fix the x-x-big5(and also gb2312, ksc5601) problem MS FrontPage introduced
for UNIX and Mac. The Window fixed eariler.


git-svn-id: svn://10.0.0.236/trunk@2278 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:18:47 +00:00
radha
002970c8f4 Re-fix for earlier fix for bug # 104761. Re-fix provided by timm. See bug report
for further details.


git-svn-id: svn://10.0.0.236/trunk@2277 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 19:05:32 +00:00
ftang
6e7465ed87 Fix NO-ending-SI problem for EUC-KR to ISO-2022-KR conversion
Thanks Jungshik Shin <jshin@pantheon.yale.edu> from the net and Erik van der Poel


git-svn-id: svn://10.0.0.236/trunk@2276 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:52:50 +00:00
radha
0bf82aa7dc New resources for the "Show/Hide Navigation Center" menu option
git-svn-id: svn://10.0.0.236/trunk@2275 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:52:01 +00:00
radha
33443f536a Add new command xfeToggleNavCenter to show/hide Aurora pane
git-svn-id: svn://10.0.0.236/trunk@2274 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:51:12 +00:00
radha
493b237768 Add BrowserView to the source files list.
git-svn-id: svn://10.0.0.236/trunk@2273 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:50:25 +00:00
radha
fabf4d340b Use BrowserView instead of HTML View. BrowserView holds a HTML view and a
NavCenter. Create a new menu option "Show/Hide NavCenter".


git-svn-id: svn://10.0.0.236/trunk@2272 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:49:53 +00:00
radha
5cf9772f51 Initial Checkin. This is the new view for all browser frames. It holds a HTML
View and a Nav Center View. Navcenter is currently turned off by default. It
can be  turned on with the "Show Navigation Center"  menu option.


git-svn-id: svn://10.0.0.236/trunk@2271 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 18:48:14 +00:00
pinkerton
3f7244a881 Status bar now uses appearance to draw progress bar separate from status text. Related Netscape classes that do the same thing obsoleted.
git-svn-id: svn://10.0.0.236/trunk@2267 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 16:32:05 +00:00
pinkerton
e5d0c4da33 default button again works in profile picker dialog.
git-svn-id: svn://10.0.0.236/trunk@2266 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 16:30:42 +00:00
ltabb
bbbb26567e this is a test for judd, no code effect
git-svn-id: svn://10.0.0.236/trunk@2265 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 14:51:51 +00:00
shaver
ca7d9cbe28 actually define the function properties of a script when decoding
git-svn-id: svn://10.0.0.236/trunk@2262 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 13:25:26 +00:00
shaver
6b2c0b6ca0 preserve sprop->id across XDR
git-svn-id: svn://10.0.0.236/trunk@2261 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 12:18:18 +00:00
ramiro
a67670f676 Change the logic of the || operators. This fixes a problem where the
bookmark window was asserting for no reason.
Thanks to Andrew Veliath <andrewtv@usa.net>


git-svn-id: svn://10.0.0.236/trunk@2260 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 12:15:44 +00:00
ramiro
fc422af5d8 In mozilla.c it says that XFE_InitDNS_Early is called before NSPR, etc.; but
the LOG macro calls PR_smprintf which fires up NSPR.    Use fprintf instead
of LOG() for this case.
Thanks to tenthumbs@cybernex.net.


git-svn-id: svn://10.0.0.236/trunk@2259 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 11:08:10 +00:00
ramiro
110ffa00cd Mozilla crashed after visiting a page with plugin. This is caused
by an access to a NULL pointer (plugin->handle).
Thanks to weitsang@yahoo.com
Fixes bugzilla #409.


git-svn-id: svn://10.0.0.236/trunk@2258 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-26 10:58:59 +00:00
troy
d2d4e15ea4 Merged ResizeReflow() and IncrementalReflow() into one Reflow() member function
git-svn-id: svn://10.0.0.236/trunk@2253 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-25 17:31:49 +00:00
guha
75cecf8781 Mac ifdef bustage fixage
git-svn-id: svn://10.0.0.236/trunk@2249 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-24 01:13:55 +00:00
guha
36a7576bb9 Add test.c : This file is not in the client build but is meant as
a sample file for those who want to use the XML module in standalone
mode.

Added a bunch of ifdefs for getting the standalone mode.


git-svn-id: svn://10.0.0.236/trunk@2248 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-24 00:27:54 +00:00
spider
a329725d0b Support for resource files on win32 - other platforms currently
ignore the RESFILE and RCFILE variables


git-svn-id: svn://10.0.0.236/trunk@2246 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 18:34:48 +00:00
spider
7fcbc136f4 Support for Julian and nls prior to FreeSource move to /m/pub
git-svn-id: svn://10.0.0.236/trunk@2245 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 18:34:15 +00:00
scullin
19b636f12a Only build module with nglayout.
git-svn-id: svn://10.0.0.236/trunk@2241 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 03:54:56 +00:00
briano
924dbfe9d2 Fixing the SCO OpenServer builds. Need to define _SVID3 in this special case so including statvfs.h will give us what we need. Anyone want to volunteer a more elegant solution? Approved by ramiro@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@2240 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 03:46:19 +00:00
scullin
22acc06189 Landing modular netlib on Window.
git-svn-id: svn://10.0.0.236/trunk@2236 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 01:38:10 +00:00
scullin
14adc6359a Added modular netlib to nglayout/Raptor
git-svn-id: svn://10.0.0.236/trunk@2235 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 01:36:28 +00:00
scullin
6e902be1c6 Updated for modular netlib
git-svn-id: svn://10.0.0.236/trunk@2234 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 01:35:51 +00:00
scullin
9916a96f39 Fix nglayout build.
git-svn-id: svn://10.0.0.236/trunk@2232 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 01:28:11 +00:00
sfraser
4d3a73a6a0 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2231 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 01:14:17 +00:00
scullin
97ebcd1ae6 Fix printing of nsString.
git-svn-id: svn://10.0.0.236/trunk@2228 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 00:28:02 +00:00
rjc
596d7a6b33 Fix FTP on Mac. (Approval by module owner: gagan)
git-svn-id: svn://10.0.0.236/trunk@2227 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-23 00:09:18 +00:00
scullin
10222065f1 Landed raptor modular netlib stuff
git-svn-id: svn://10.0.0.236/trunk@2225 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 23:38:40 +00:00
hardts
cfef75c533 XPCOM has now landed on the tip
git-svn-id: svn://10.0.0.236/trunk@2224 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 22:41:37 +00:00
hardts
053114cc3c was 0 length file after landing branch, copy in the branch version
git-svn-id: svn://10.0.0.236/trunk@2223 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 22:34:32 +00:00
hardts
35e38c9902 TestID.cpp didn't get branch changes for some reason, adding them now.
git-svn-id: svn://10.0.0.236/trunk@2221 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 22:30:53 +00:00
cyeh
cd4e15a1f7 add file vr_stubs.c to libreg as part of the XPCOM_BRANCH landing
git-svn-id: svn://10.0.0.236/trunk@2219 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 22:01:45 +00:00
hardts
217d4a9900 landing XPCOM_BRANCH
git-svn-id: svn://10.0.0.236/trunk@2218 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 21:56:30 +00:00
hardts
d583c3a3b9 land XPCOM_BRANCH
git-svn-id: svn://10.0.0.236/trunk@2217 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 21:55:49 +00:00
cyeh
4222ef6c58 assist with XPCOM_BRANCH landing. add files nsDebug.cpp and nsSupportsArray.cpp to projects
git-svn-id: svn://10.0.0.236/trunk@2215 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 21:52:45 +00:00
pinkerton
6fc714fb0e More appearance manager changes. Support for toolbar buttons being AM savvy. (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@2213 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 20:25:42 +00:00
pinkerton
29536f7fbb First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2212 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 20:23:25 +00:00
kipp
2f9b3b6470 Including missing nsCoord
git-svn-id: svn://10.0.0.236/trunk@2211 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 20:11:42 +00:00
kipp
3ff4de3bf3 Added -md argument handling
git-svn-id: svn://10.0.0.236/trunk@2210 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 20:11:14 +00:00
rickg
8da56df062 fixed bug in form -- form flag was never being set to true
git-svn-id: svn://10.0.0.236/trunk@2204 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 19:31:38 +00:00
cyeh
b41a29c6af A utility batch file for setting all the necessary environment variables
that needed to build Mozilla for Win32.  Contributed by Lucas Gonze
(lucas@gonze.com) and Rick Ekle (rekle@iconect.net).  You'll need to edit
this file to point it at the location of your development environment and your
local copy of the source tree.


git-svn-id: svn://10.0.0.236/trunk@2203 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 19:30:23 +00:00
rickg
57d6142350 fixed a minor build problem with blender
git-svn-id: svn://10.0.0.236/trunk@2202 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 19:16:08 +00:00
guha
bb4e0c0672 Fix crashing bug caused by very long string being passed to FE_Trace
git-svn-id: svn://10.0.0.236/trunk@2201 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:51:38 +00:00
kipp
5906363e28 Let .cpp compilations KEEP the .cfg file too
git-svn-id: svn://10.0.0.236/trunk@2200 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:43:34 +00:00
kipp
04d414f623 Fixed windows cvpack problem
git-svn-id: svn://10.0.0.236/trunk@2199 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:41:08 +00:00
kipp
c6d6b4ec78 Removed a pile of includes
git-svn-id: svn://10.0.0.236/trunk@2198 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:39:28 +00:00
kipp
a38d94f629 Move padding out of UL/OL and into LI's that are in UL/OL's
git-svn-id: svn://10.0.0.236/trunk@2197 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:39:11 +00:00
kipp
3409cd9d61 Use new GetVisibleArea API
git-svn-id: svn://10.0.0.236/trunk@2196 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:38:33 +00:00
kipp
bd1b101779 Support LI's with padding instead of UL padding
git-svn-id: svn://10.0.0.236/trunk@2195 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:38:11 +00:00
gagan
abcef8c094 Unix builds. Not in the main build yet.
git-svn-id: svn://10.0.0.236/trunk@2194 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:38:10 +00:00
kipp
72ef1d9055 Removed some dead code; added code to DidReflow children at a good spot
git-svn-id: svn://10.0.0.236/trunk@2193 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:37:49 +00:00
kipp
48eb9c0084 Removed some includes
git-svn-id: svn://10.0.0.236/trunk@2192 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:37:25 +00:00
kipp
08c1e11e08 Removed an include
git-svn-id: svn://10.0.0.236/trunk@2191 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:37:15 +00:00
kipp
32b44a6565 Declare nsStylePosition
git-svn-id: svn://10.0.0.236/trunk@2190 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:37:04 +00:00
kipp
8e76027a72 Removed includes; updated GetVisibleArea API
git-svn-id: svn://10.0.0.236/trunk@2189 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:36:40 +00:00
kipp
d81b9d196e updated GetVisibleArea API
git-svn-id: svn://10.0.0.236/trunk@2188 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:36:27 +00:00
gagan
b64eb63d71 strlen to PL_strlen. Not in the build yet.
git-svn-id: svn://10.0.0.236/trunk@2187 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:34:22 +00:00
kipp
60a0ef89f7 Removed includes
git-svn-id: svn://10.0.0.236/trunk@2186 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:28:40 +00:00
kipp
acaaec9578 Only verify last is complete when enabled
git-svn-id: svn://10.0.0.236/trunk@2185 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:28:29 +00:00
kipp
e62719b058 Removed unneeded include
git-svn-id: svn://10.0.0.236/trunk@2184 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:28:02 +00:00
kipp
3cf90601b8 Repaired GetVisibleArea API
git-svn-id: svn://10.0.0.236/trunk@2183 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:27:48 +00:00
kipp
6a7bc663f3 new
git-svn-id: svn://10.0.0.236/trunk@2182 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:27:25 +00:00
jevering
7c150df597 Fixed about: URL's from crashing the viewer.
git-svn-id: svn://10.0.0.236/trunk@2181 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 18:10:08 +00:00
buster
483b518e3e added -r # for specifying a repeat count for batch mode
git-svn-id: svn://10.0.0.236/trunk@2179 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 17:34:58 +00:00
slamm
7a91059224 Fix crash on bringing up second NavCenter.
git-svn-id: svn://10.0.0.236/trunk@2176 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 17:15:03 +00:00
dcone
20016a960c Added the nsBlender classes to the project
git-svn-id: svn://10.0.0.236/trunk@2174 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 14:15:57 +00:00
hshaw
7b81da6fb3 Fix for SCO build. bitypes.h defines int32_t and was missing from stub files. Not a problem in real sun-java. Thanks briano@netscape.com
git-svn-id: svn://10.0.0.236/trunk@2173 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 09:31:16 +00:00
ramiro
0c2f6f30df Fix a dyslexic typo. Geez, how long was this here for ?
git-svn-id: svn://10.0.0.236/trunk@2172 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 06:52:57 +00:00
ramiro
350ecf8d15 Add initial support for layable children resource.
git-svn-id: svn://10.0.0.236/trunk@2171 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 06:50:41 +00:00
atotic
14133bdcd6 Commiting this from windows caused my special characters to disappear
git-svn-id: svn://10.0.0.236/trunk@2170 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 06:35:58 +00:00
atotic
8110e44179 Experimental Mac makefile
git-svn-id: svn://10.0.0.236/trunk@2169 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 05:57:00 +00:00
troy
14c16833da Changed reference to reflow command to a pointer to a reflow command
git-svn-id: svn://10.0.0.236/trunk@2168 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 04:56:27 +00:00
troy
ac413c29fa Changed splittable enum to be bit flags
git-svn-id: svn://10.0.0.236/trunk@2167 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 04:54:11 +00:00
pinkerton
ade769a9c5 commented out the annoying assert when max round was exceeded.
git-svn-id: svn://10.0.0.236/trunk@2166 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 04:22:04 +00:00
pinkerton
afe582b7b5 Landing of a bunch of appearance manager stuff. (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@2165 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 04:19:24 +00:00
troy
c7abe18deb Changed the nsBandTrapezoid::State enum values to conform to the coding
standard


git-svn-id: svn://10.0.0.236/trunk@2164 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 04:03:14 +00:00
troy
449871aa10 Added new Reflow() member function that will eventually supersede the two
existing reflow functions: ResizeReflow() and IncrementalReflow()


git-svn-id: svn://10.0.0.236/trunk@2162 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 03:52:51 +00:00
troy
06b63f6642 Some work in progress for incremental floaters
git-svn-id: svn://10.0.0.236/trunk@2161 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 02:38:41 +00:00
spider
bb47dc2302 Adding the beginnings of Colormap Installation
git-svn-id: svn://10.0.0.236/trunk@2160 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 01:58:31 +00:00
wtc
81cc85bf08 OSF1 V3.2 does not have <machines/builtins.h>, which declares the
atomic routines.  Thanks to Andrew Cassin <acassin@cs.mu.oz.au> for
this patch.


git-svn-id: svn://10.0.0.236/trunk@2157 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 00:59:33 +00:00
troy
6b6d4c22d4 Fixed some busted code of a bogus type cast
git-svn-id: svn://10.0.0.236/trunk@2154 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 00:45:34 +00:00
buster
9d29532002 made nsTableCaptionFrame a subclass of nsBodyFrame
git-svn-id: svn://10.0.0.236/trunk@2151 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-22 00:05:22 +00:00
shaver
6b008173d1 added missing lib
git-svn-id: svn://10.0.0.236/trunk@2150 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 23:53:00 +00:00
kostello
997174b4d5 * Added Support for cell spacing
* NOTE: due to changes in the style system -- things won't look correct right away.


git-svn-id: svn://10.0.0.236/trunk@2149 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 23:43:18 +00:00
buster
93d6e09272 added a "-f" debug option to read a file for URLs to load
added a "-d" debug option to set the delay between URL loads


git-svn-id: svn://10.0.0.236/trunk@2147 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 23:41:53 +00:00
mccabe
d90f218a88 Fix to (83996), global parseInt function fails for numbers > 2^31.
It now passes all of the tests in 15.1.2.2-1 (except that parseInt
still has the .length property, which is a different bug) - so I'll
close the bug.

Still possibly at issue is whether we conform to ECMA language about
decimal numbers that are too large to fit in a double.  I treat
decimal digits after the 20th as zero, but there could be some
floating-point rounding wackiness going on.  In particular - are we
doing the right thing for numbers that are powers of 2, but larger
than 2^54, that are representable in a double?


git-svn-id: svn://10.0.0.236/trunk@2143 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 23:15:24 +00:00
matt
559c72d11b ifdef include on prosdep. If should not be dependent. Was breaking js/src builds
git-svn-id: svn://10.0.0.236/trunk@2141 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 22:41:18 +00:00
rickg
7afaf5e301 temp. comment out call
git-svn-id: svn://10.0.0.236/trunk@2138 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 22:19:40 +00:00
montulli
73bf44f694 initial add of netsream.h , not yet in build
git-svn-id: svn://10.0.0.236/trunk@2134 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 22:03:55 +00:00
gagan
f8b1fc15d8 An excursion timing class.
git-svn-id: svn://10.0.0.236/trunk@2132 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 21:56:58 +00:00
rickg
f2f5d28308 incremental parsing; xml support; token handler dispatching; performance
git-svn-id: svn://10.0.0.236/trunk@2126 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 20:38:32 +00:00
rickg
3fac38b3d8 moved to new incremental API
git-svn-id: svn://10.0.0.236/trunk@2125 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 20:37:41 +00:00
rickg
7caed77d22 minor perf improvement to deque
git-svn-id: svn://10.0.0.236/trunk@2124 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 20:37:17 +00:00
guha
f3f598e3ce Add prototype, temporary bug fix added.
git-svn-id: svn://10.0.0.236/trunk@2122 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 19:23:44 +00:00
guha
9d3512090b Export NET_InitRDFCookieResources
git-svn-id: svn://10.0.0.236/trunk@2121 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 19:17:21 +00:00
guha
612bc28681 Add export (for Mac), fix XP_strcmp NOT_NULL bug.
git-svn-id: svn://10.0.0.236/trunk@2120 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 19:16:43 +00:00
guha
a66d4a6595 Cookie changes.
git-svn-id: svn://10.0.0.236/trunk@2119 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 19:08:38 +00:00
selmer
05259add9a Change over to http: w/IP for reggie connections
git-svn-id: svn://10.0.0.236/trunk@2115 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 18:18:55 +00:00
gagan
fd6863b577 Added nsCachePref for cache preferences. This will have the interface
for libpref or nsPref stuff. Added database support for dbm. General
progress. This is not in the main build as yet.


git-svn-id: svn://10.0.0.236/trunk@2113 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 18:04:34 +00:00
gagan
019a155771 Added nsCachePref for cache preferences. This will have the interface
for libpref or nsPref stuff. General progress. This is not in the main
build as yet.


git-svn-id: svn://10.0.0.236/trunk@2112 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 18:03:50 +00:00
guha
ab5cd02bee Fix Linux optimized build problem reported by
Hani Suleiman <hani@fate.demon.co.uk>

>Building an optimised build under Linux fails unless the FE_Trace() on
>line 143 is wrapped with #ifdef DEBUG


git-svn-id: svn://10.0.0.236/trunk@2110 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 17:34:57 +00:00
kipp
b7133a9963 disabled reflow-mapped-child for now
git-svn-id: svn://10.0.0.236/trunk@2109 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 16:29:20 +00:00
kipp
f80729a530 Not quite functional handling of line state during GetReflowMetrics
git-svn-id: svn://10.0.0.236/trunk@2108 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 16:12:31 +00:00
kipp
ba6ecd8a02 better handle reflow avoidance; factored align children slightly different so that more code is shared between ResizeReflow and IncrementalReflow; fixed more cases where reflow is required
git-svn-id: svn://10.0.0.236/trunk@2107 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 16:12:10 +00:00
kipp
af4fc73183 Added a few more fields to better handle reflow avoidance; factored align children slightly different so that more code is shared between ResizeReflow and IncrementalReflow
git-svn-id: svn://10.0.0.236/trunk@2106 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 16:11:29 +00:00
kipp
7e6b6eb56f Removed temporary content appended hack (it no longer works)
git-svn-id: svn://10.0.0.236/trunk@2105 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 16:10:35 +00:00
spider
d6f1c041a2 Some additional Rendering Implementations (Line/Rect/Arc)
Support for offscreen Pixmap's


git-svn-id: svn://10.0.0.236/trunk@2103 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 08:24:44 +00:00
toshok
fbb307b987 fix the bug where form reset with textarea's would segfault. just cut-n-pasted one line from the text input element's reset method.
git-svn-id: svn://10.0.0.236/trunk@2102 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 07:18:51 +00:00
briano
a329fa209e Added -D_PR_LOCAL_THREADS_ONLY so files outside nsprpub that include _scoos.h will compile.
git-svn-id: svn://10.0.0.236/trunk@2100 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 04:06:00 +00:00
scc
64bca9f3dc Report the project that actually stopped the build.
git-svn-id: svn://10.0.0.236/trunk@2094 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 02:41:11 +00:00
peterl
63031f554c new file
git-svn-id: svn://10.0.0.236/trunk@2091 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 02:34:45 +00:00
peterl
25861753fc Changed GetStyleData to use an enum instead of an nsID
git-svn-id: svn://10.0.0.236/trunk@2090 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 02:34:13 +00:00
rickg
835d063055 filled in the popback function
git-svn-id: svn://10.0.0.236/trunk@2089 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 02:27:34 +00:00
slamm
d65d3e6e3d Fix Mozilla bug #385. Global history file would not get recreated if it was deleted. Thanks to Ronan Waide <waider@cognotec.com> for reporting the problem and developing a patch.
git-svn-id: svn://10.0.0.236/trunk@2087 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 01:39:25 +00:00
rjc
e812d8fbf5 Bug fix: Make sure parent isn't NULL.
git-svn-id: svn://10.0.0.236/trunk@2084 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 01:06:51 +00:00
rjc
7953137eac GetSlotValue() now returns memory which caller must free (if its a string). Remove references to DEBUG_RDF_GetSlotValue_Memory_Needs_Freedom define.
git-svn-id: svn://10.0.0.236/trunk@2082 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 00:57:25 +00:00
spider
970e83bba8 Fixes for making nsAppTest use gfx basics
git-svn-id: svn://10.0.0.236/trunk@2079 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-21 00:37:02 +00:00
slamm
17f978fb8f Use the winning animation from the Mozilla Logo Contest. Congratulations go to Urs Streidl <urs@gigaperls.org>.
git-svn-id: svn://10.0.0.236/trunk@2072 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:33:44 +00:00
spider
ea4ca5d1b9 Add motif to DIRS, commented out for now
git-svn-id: svn://10.0.0.236/trunk@2071 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:20:32 +00:00
spider
0866ff0202 Adding NS_NATIVE_WIDGET to get the native widget associated with an nsIWidget.
Windows has a concept of a native window whilst unix has a native widget and
a native window.


git-svn-id: svn://10.0.0.236/trunk@2070 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:19:38 +00:00
kipp
a9dcc1b0ed Fixed bug in nsString::Cut code where the sizeof(chartype) was multipled a bit aggresively; I also tuned the routine somewhat as well
git-svn-id: svn://10.0.0.236/trunk@2069 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:18:25 +00:00
spider
e80bba2116 Motif Mods
git-svn-id: svn://10.0.0.236/trunk@2068 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:18:09 +00:00
spider
eed0288148 Xlib mods
git-svn-id: svn://10.0.0.236/trunk@2067 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:17:49 +00:00
scc
1794e6b4c9 Added StopForErrors() and DontStopForErrors(). The former is the default, though logging must be on to allow errors to be noticed.
git-svn-id: svn://10.0.0.236/trunk@2066 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:09:53 +00:00
jevering
e5cf6a5951 Broke release build. Fixed.
git-svn-id: svn://10.0.0.236/trunk@2065 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 23:08:12 +00:00
montulli
1ed5ce76dd initial add of cstream library, not yet in build
git-svn-id: svn://10.0.0.236/trunk@2063 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 22:36:31 +00:00
kmcclusk
c294a50d5f Removed windows directory from widget/tests
git-svn-id: svn://10.0.0.236/trunk@2061 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 22:07:17 +00:00
kmcclusk
df29b2b178 Created an AppShell to abstract the event loop. Re-organized widget tests
into scribble and widget subdirectories and separated cross-platform code from
platform specific code


git-svn-id: svn://10.0.0.236/trunk@2060 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 22:02:14 +00:00
kipp
e4dbeae2e8 Disable reflow optimizations for now
git-svn-id: svn://10.0.0.236/trunk@2057 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:51:51 +00:00
spider
3edc3aaa94 Add NS_UNIX if __unix is defined
git-svn-id: svn://10.0.0.236/trunk@2056 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:40:46 +00:00
troy
18c747aa19 Cleaned up performance
git-svn-id: svn://10.0.0.236/trunk@2055 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:40:00 +00:00
spider
46b5aeb9b8 update nsAppTest for unix to work
git-svn-id: svn://10.0.0.236/trunk@2054 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:29:18 +00:00
peterl
5a89c809b7 made it build on irix
git-svn-id: svn://10.0.0.236/trunk@2053 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:28:36 +00:00
dcone
76471f424e put in the inverse color table routine and did 8 bit alpha
git-svn-id: svn://10.0.0.236/trunk@2052 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:12:38 +00:00
spider
48f1bf43c5 Support for so's made of archives
git-svn-id: svn://10.0.0.236/trunk@2050 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:02:04 +00:00
spider
a92e35fbe7 Misc Unix stuff
git-svn-id: svn://10.0.0.236/trunk@2049 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 21:01:38 +00:00
peterl
5881217641 added load timing
git-svn-id: svn://10.0.0.236/trunk@2048 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 20:34:54 +00:00
peterl
5673af6984 added rule hash table to speed up style resolution
git-svn-id: svn://10.0.0.236/trunk@2047 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 20:34:17 +00:00
peterl
c31cedc223 collapse double empty contexts
git-svn-id: svn://10.0.0.236/trunk@2046 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 20:33:30 +00:00
peterl
c7440bcf59 added rule count accessor
git-svn-id: svn://10.0.0.236/trunk@2045 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 20:32:57 +00:00
peterl
9d9d3404d3 added enumerate methods
git-svn-id: svn://10.0.0.236/trunk@2044 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 20:31:58 +00:00
robinf
702d26cb8e fixinb header bug in AS help
git-svn-id: svn://10.0.0.236/trunk@2042 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 19:17:14 +00:00
robinf
656ec38f0e fixinb header bug
git-svn-id: svn://10.0.0.236/trunk@2041 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 19:10:12 +00:00
robinf
959244b105 fixinb bug in comment line
git-svn-id: svn://10.0.0.236/trunk@2038 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 19:02:32 +00:00
spider
83c4fc037c Some unix stuff
git-svn-id: svn://10.0.0.236/trunk@2035 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 17:59:52 +00:00
thom
c5eba1ff11 added project file for mac build
git-svn-id: svn://10.0.0.236/trunk@2033 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 17:30:15 +00:00
kipp
d7224c5e89 Added command line args for purify/quantify runs
git-svn-id: svn://10.0.0.236/trunk@2030 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:28:40 +00:00
kipp
87b65c0bca Added rule for MULTICOL
git-svn-id: svn://10.0.0.236/trunk@2029 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:28:19 +00:00
kipp
7517c6c495 Add in will/did reflow calls; add in tracing calls too
git-svn-id: svn://10.0.0.236/trunk@2028 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:28:05 +00:00
kipp
b1a4dc5a81 Use new tracing macros; add in ReflowMappedChild to avoid reflowing children
git-svn-id: svn://10.0.0.236/trunk@2027 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:27:46 +00:00
kipp
fcd752ba90 Use new tracing macros and verify-tree-enable
git-svn-id: svn://10.0.0.236/trunk@2026 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:27:22 +00:00
kipp
d7c6851d21 Added in mDeltaWidth to block reflow state
git-svn-id: svn://10.0.0.236/trunk@2025 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:26:46 +00:00
kipp
e91d496797 Fixed GetReflowMetrics to return something; use new tracing methods and verify-tree-enable; compute delta width for line layout logic
git-svn-id: svn://10.0.0.236/trunk@2024 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:26:34 +00:00
kipp
3f35550560 GetReflowMetrics now updates the reflow state
git-svn-id: svn://10.0.0.236/trunk@2023 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:25:40 +00:00
kipp
88d895e375 Added a minor optimization to avoid memcpy calls that aren't needed
git-svn-id: svn://10.0.0.236/trunk@2022 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:25:16 +00:00
kipp
7d6827867d Use new frame tracing macros
git-svn-id: svn://10.0.0.236/trunk@2021 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:24:54 +00:00
kipp
f074763ff0 Declare tracing macros that use nspr logging and tracing methods that support the macros
git-svn-id: svn://10.0.0.236/trunk@2020 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:24:36 +00:00
kipp
1811ed96e7 Implement new debugging hooks that use nspr logging; also implement tracing methods in nsFrame; use tracing in will/did-reflow hooks
git-svn-id: svn://10.0.0.236/trunk@2019 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:24:13 +00:00
kipp
289b959938 Added some trace messages; fixed bug in PaintChildren that was always painting all children instead of allowing the intersection with the dirty rect to avoid paints
git-svn-id: svn://10.0.0.236/trunk@2018 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:23:37 +00:00
kipp
be2e63322f Added more debugging hooks that use nspr logging
git-svn-id: svn://10.0.0.236/trunk@2017 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:22:15 +00:00
kipp
a84aba4939 Added empty constructor; removed instance count sillyness
git-svn-id: svn://10.0.0.236/trunk@2016 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 16:21:48 +00:00
scc
7b810c81dd First Checked In.
git-svn-id: svn://10.0.0.236/trunk@2015 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 08:12:13 +00:00
rjc
6a0f22ab75 Add support for "Refresh" command across data sources. Also, fix a couple more bugs in HT regarding node count (deletion didn't always update the count correctly.)
git-svn-id: svn://10.0.0.236/trunk@2013 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 06:35:51 +00:00
troy
a558a8350d Added more self-test code
git-svn-id: svn://10.0.0.236/trunk@2012 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 05:29:56 +00:00
troy
b702a4ba14 Implemented RemoveRegion()
git-svn-id: svn://10.0.0.236/trunk@2010 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 05:14:14 +00:00
pinkerton
1dd9e2519e provide a valid context to HT_Launch (appr/rev sdagley).
git-svn-id: svn://10.0.0.236/trunk@2009 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 04:29:48 +00:00
brade
579c9382d7 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@2008 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 04:06:08 +00:00
rjc
bce056df6f Fix bug with tracking # of grandchildren nodes. (Discovered by pinkerton)
git-svn-id: svn://10.0.0.236/trunk@2007 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 03:43:43 +00:00
mccabe
f491c91092 Removed the escape and unescape functions, as they are now part of the
core engine.  (They've become part of the ECMA spec.)  Fix to (97681).


git-svn-id: svn://10.0.0.236/trunk@2006 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 03:25:41 +00:00
mccabe
f6b9e3b9f1 Removed the escape and unescape functions, as they are now part of the core engine. (They've become part of the ECMA spec.) Fix to (97681).
git-svn-id: svn://10.0.0.236/trunk@2005 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 03:23:07 +00:00
valeski
0d79805d7e fixing a purify UMR as reported by Kipp
git-svn-id: svn://10.0.0.236/trunk@2003 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 02:33:17 +00:00
blythe
ff93a49ca6 The preference DLLs contain COM objects. Their registry keys are set to
have relative paths.  This normally works fine, unless the current working
directory is other than that of the default program directory where the
pref DLLs are normally located.  This could happen by executing the
program from a different directory, or by saving a file to a directory
other than the default program directory.  In order to fix this, we need
to push to the program directory just prior to loading a preference
COM object, and then pop back.


git-svn-id: svn://10.0.0.236/trunk@2002 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 02:15:42 +00:00
rjc
21479d1671 Make Appletalk URLs (at:, afp:) more closely match URL format definition in CyberDog.
git-svn-id: svn://10.0.0.236/trunk@1999 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 01:13:24 +00:00
karnaze
d730d6f71d temp hack to test post submission
git-svn-id: svn://10.0.0.236/trunk@1990 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-20 00:10:42 +00:00
thom
38a3d3a5fc fixed compile errors for mac
git-svn-id: svn://10.0.0.236/trunk@1984 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 23:11:28 +00:00
troy
e456af6993 Changes for removing regions
git-svn-id: svn://10.0.0.236/trunk@1983 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 22:55:40 +00:00
michaelp
a1d8688193 removed rects from region apis. fleshed out windows region implementation.
git-svn-id: svn://10.0.0.236/trunk@1980 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 22:08:46 +00:00
guha
698734b1fa fix mac horkage
git-svn-id: svn://10.0.0.236/trunk@1979 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 22:07:35 +00:00
guha
c9b6a45791 more small fixes
git-svn-id: svn://10.0.0.236/trunk@1974 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 21:01:38 +00:00
rods
c491d51bea initial checkin
git-svn-id: svn://10.0.0.236/trunk@1973 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 20:39:31 +00:00
rods
bf9d48d947 removed xwin directory
git-svn-id: svn://10.0.0.236/trunk@1972 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 20:34:45 +00:00
sar
7493f80280 backing out the whitespace change and implementing a better fix for the line length problem - courtesy of Dan Veditz
git-svn-id: svn://10.0.0.236/trunk@1970 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 20:20:15 +00:00
sar
62142af8ac were up against a 4k POSIX inspired limit on command lines. I've removed white space to bring the command line under the limit. This is a temporary workaround and this needs to be repaired properly.
git-svn-id: svn://10.0.0.236/trunk@1967 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:59:38 +00:00
pinkerton
160a8e61dd add comment that this class is obsolete (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1966 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:31:51 +00:00
pinkerton
8d35afb70d Beginnings of appearance manager support. Add AM classes to powerplant and make toolbars use either AM (through CAMSavvyBevelView) or old way if AM not present (for now, this may change). (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1965 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:25:59 +00:00
pinkerton
ce8e90e141 use new HT_Launch api (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1964 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:21:38 +00:00
pinkerton
6c9089dc62 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@1963 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:16:51 +00:00
jevering
1a4bf77fe2 Debug Robot work.
git-svn-id: svn://10.0.0.236/trunk@1962 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 19:06:59 +00:00
thom
0679c3495c added worksheet for checking out nglayout from archive
git-svn-id: svn://10.0.0.236/trunk@1961 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 18:41:40 +00:00
thom
10c14c948c files to help build the project
git-svn-id: svn://10.0.0.236/trunk@1960 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 18:37:15 +00:00
cyeh
c35d1d0ae5 update documentation to reflect mozilla as root of the source directory
git-svn-id: svn://10.0.0.236/trunk@1959 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 18:11:30 +00:00
karnaze
45388bf6ed better layout, sizing of select
git-svn-id: svn://10.0.0.236/trunk@1957 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:51:21 +00:00
pnunn
15db7e35fe Remove temporary fix to Makefile for alpha linux optimization build of jidctred.c in jpeg module.
-pnunn


git-svn-id: svn://10.0.0.236/trunk@1956 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:50:14 +00:00
cyeh
d385affc17 update documentation to reflect mozilla as root of the source diretory
git-svn-id: svn://10.0.0.236/trunk@1955 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:34:43 +00:00
brade
835770d74d remove file jdictred.c to fix Alpha Linux build [for pnunn]
git-svn-id: svn://10.0.0.236/trunk@1954 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:10:36 +00:00
pnunn
4a557ed622 jidctred.c isn't used and causes build errors on alpha linux. Removed.
git-svn-id: svn://10.0.0.236/trunk@1953 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:05:36 +00:00
pnunn
5d9a7159aa jidctred.c is not needed and causes build problems (optimization) on alpha linux.
git-svn-id: svn://10.0.0.236/trunk@1952 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 17:00:46 +00:00
pnunn
a9bcb781ad Take out scaling, for makefile fix for linux optimization build problems on jidctred.c.
git-svn-id: svn://10.0.0.236/trunk@1951 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 16:59:07 +00:00
vidur
138a395379 New files for XPCOM interface generation
git-svn-id: svn://10.0.0.236/trunk@1946 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 15:59:53 +00:00
troy
e7e5cf121d Work in progress on removing a region
git-svn-id: svn://10.0.0.236/trunk@1945 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 15:30:10 +00:00
cmanske
aeec6647c1 Trying to help out the build bustage
git-svn-id: svn://10.0.0.236/trunk@1936 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 06:31:08 +00:00
vidur
dd3b2d1dca Added Core IDL files
git-svn-id: svn://10.0.0.236/trunk@1928 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 05:25:17 +00:00
vidur
606efca8f6 Added XPCOM interface generation
git-svn-id: svn://10.0.0.236/trunk@1926 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 05:21:21 +00:00
davidm
fb3a49b0a8 Reverting out changes which should have landed on the branch
git-svn-id: svn://10.0.0.236/trunk@1923 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 04:06:40 +00:00
montulli
0170278262 fix commercial build
git-svn-id: svn://10.0.0.236/trunk@1913 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:37:48 +00:00
montulli
74188eedbb fix commercial build
git-svn-id: svn://10.0.0.236/trunk@1902 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:28:35 +00:00
montulli
0f73aed6b6 fix commercial build
git-svn-id: svn://10.0.0.236/trunk@1899 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:22:20 +00:00
troy
628ced511a Signed
git-svn-id: svn://10.0.0.236/trunk@1894 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:02:39 +00:00
troy
00dc35659a Initial check-in
git-svn-id: svn://10.0.0.236/trunk@1893 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:01:30 +00:00
troy
ed866399b2 Revamped space manager internals
git-svn-id: svn://10.0.0.236/trunk@1892 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 03:00:56 +00:00
rickg
0e475bb67c small improvement to deque-iterator interface
git-svn-id: svn://10.0.0.236/trunk@1889 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 01:51:24 +00:00
montulli
f86a872ab2 add pr includes for build
git-svn-id: svn://10.0.0.236/trunk@1887 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 01:46:14 +00:00
davidm
6245cefeb7 Updated from Nova branch to Normandy branch
git-svn-id: svn://10.0.0.236/trunk@1880 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 01:05:08 +00:00
scullin
3ef5c773eb Moving over from xp library to NSPR
git-svn-id: svn://10.0.0.236/trunk@1878 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:57:15 +00:00
scullin
f62d3cc534 Moving over from xp library to NSPR. Moved cvactive.h from include to
network/cnvts


git-svn-id: svn://10.0.0.236/trunk@1875 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:54:09 +00:00
scullin
debabe5641 Moved cvactive.h from include to network/cnvts
git-svn-id: svn://10.0.0.236/trunk@1872 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:38:16 +00:00
peterl
24cf967380 added pseudo-class rule matching
git-svn-id: svn://10.0.0.236/trunk@1870 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:09:29 +00:00
peterl
acfcdc2a6b added link state api
git-svn-id: svn://10.0.0.236/trunk@1869 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:08:57 +00:00
peterl
8e416a2afc added pseudo-class atoms
git-svn-id: svn://10.0.0.236/trunk@1868 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:08:16 +00:00
scullin
d714884f88 Moved cvactive.h from include to network/cnvts
git-svn-id: svn://10.0.0.236/trunk@1866 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-19 00:07:47 +00:00
kmcclusk
3383117044 Changed listbox to be a nonintegral height under Win32
git-svn-id: svn://10.0.0.236/trunk@1865 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 23:52:20 +00:00
scullin
a630772729 Moved cvactive.h from include to network/cnvts
git-svn-id: svn://10.0.0.236/trunk@1863 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 23:51:09 +00:00
thom
f0392ea33c mac build
git-svn-id: svn://10.0.0.236/trunk@1861 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:50:19 +00:00
thom
ddff04c33f Mac checkin
git-svn-id: svn://10.0.0.236/trunk@1860 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:47:24 +00:00
thom
dc472ffeb0 Commented out forward class declaration that was choking code warrior
git-svn-id: svn://10.0.0.236/trunk@1859 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:45:00 +00:00
thom
6800ec6d38 Mac checkin
git-svn-id: svn://10.0.0.236/trunk@1858 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:42:13 +00:00
michaelp
b8b80b4ecc added stub nsRegionWin.cpp
git-svn-id: svn://10.0.0.236/trunk@1857 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:24:20 +00:00
atotic
e98e711acf Added new access paths for planned will's netlib modularization checkin
git-svn-id: svn://10.0.0.236/trunk@1856 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 22:10:09 +00:00
toshok
57a8a16052 apparently digital unix's c compiler has a problem with the work 'readonly' (it appears to be a reserved word, as far as that compiler goes). So, I'm changing all occurences of the readonly form element attribute to read_only. Thanks to berkley@cs.wustl.edu (Berkley Shands) for the report and suggested fix.
git-svn-id: svn://10.0.0.236/trunk@1855 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:58:00 +00:00
michaelp
1fd6c53148 killed nsRegion.h. added nsIRegion.h. added SetClipRegion() to rendering context.
modified APIs that had been referring to nsRegion to use nsIRegion.


git-svn-id: svn://10.0.0.236/trunk@1852 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:46:20 +00:00
peterl
73c129482a more style debugging code
git-svn-id: svn://10.0.0.236/trunk@1850 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:12:19 +00:00
peterl
94da62428a added pseudo frame support
git-svn-id: svn://10.0.0.236/trunk@1849 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:11:08 +00:00
peterl
738c42eb75 cleaned up list output
git-svn-id: svn://10.0.0.236/trunk@1848 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:10:44 +00:00
peterl
296429509e pseudo frame support
git-svn-id: svn://10.0.0.236/trunk@1847 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:10:19 +00:00
peterl
f09aae3304 correct case of selectors
skip empty selectors
better pseudo-class support


git-svn-id: svn://10.0.0.236/trunk@1846 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:09:43 +00:00
peterl
9b35736a68 added pseudo element support
git-svn-id: svn://10.0.0.236/trunk@1845 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:07:54 +00:00
peterl
891a4eb5d1 fixed memory leak
fixed uninitialized memory read


git-svn-id: svn://10.0.0.236/trunk@1844 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:07:24 +00:00
peterl
021e20ff2c added pseudo style support
git-svn-id: svn://10.0.0.236/trunk@1843 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:06:33 +00:00
peterl
bae746d31c added pseudo style support
added debug list of context graph


git-svn-id: svn://10.0.0.236/trunk@1842 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:05:52 +00:00
peterl
98569af3d2 added debugging code
git-svn-id: svn://10.0.0.236/trunk@1841 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:04:26 +00:00
peterl
28f4537549 fixed memory leak
git-svn-id: svn://10.0.0.236/trunk@1840 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:03:55 +00:00
peterl
796739f0d7 added pseudo frame style support
git-svn-id: svn://10.0.0.236/trunk@1839 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:03:10 +00:00
peterl
80dd125ad5 added list method
git-svn-id: svn://10.0.0.236/trunk@1838 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 21:02:49 +00:00
nisheeth
7b46e0d71b val was not being initialized properly lo_LayoutBlockSpacer(). Fixed. Thanks
to Kathy Brade (brade@netscape.com) for catching this.


git-svn-id: svn://10.0.0.236/trunk@1835 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 20:44:34 +00:00
brade
796eba9e99 remove #ifdef XP_MAC and unify memory calls/API; reviewed sdagley; approved toshok
git-svn-id: svn://10.0.0.236/trunk@1834 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 20:42:39 +00:00
toshok
8e35d123f9 this change may look like a lot, but it's really only one line. the rest is formatting. at any rate, this fixes the problem where the underlines were drawn at places other than the proper place for links.
git-svn-id: svn://10.0.0.236/trunk@1833 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 20:42:30 +00:00
thom
e6c4ec060c *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@1828 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 19:47:30 +00:00
toshok
6a48818ffb Fix bugzilla entries 134 (javascript crashing setting text in textarea) and 346 (missing & in call to fe_convertToXmString) thanks to waider@waider.ie (Ronan Waide) for the fixes.
git-svn-id: svn://10.0.0.236/trunk@1824 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 18:28:55 +00:00
karnaze
7c7404988e fixed nsInputFile::SizeTo
git-svn-id: svn://10.0.0.236/trunk@1822 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 18:07:01 +00:00
kmcclusk
5106d81117 Added nsTooltipEvent to indicate the index of the tooltip rectangle that is being shown.
Now correctly initializes TOOLINFO structures before using them.


git-svn-id: svn://10.0.0.236/trunk@1819 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 17:55:34 +00:00
kipp
36585827fd Print out state when non-zero
git-svn-id: svn://10.0.0.236/trunk@1816 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:53:09 +00:00
kipp
3be7942344 Call WillReflow before reflowing children
git-svn-id: svn://10.0.0.236/trunk@1815 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:52:57 +00:00
kipp
8397a26e24 dump out state and next-in-flow/prev-in-flow conditionally
git-svn-id: svn://10.0.0.236/trunk@1814 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:52:41 +00:00
kipp
be2171d84f Implement DidReflow to pass it down to children when exiting reflow; dump out state and next-in-flow/prev-in-flow conditionally
git-svn-id: svn://10.0.0.236/trunk@1813 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:51:37 +00:00
kipp
09c14b650b Implement DidReflow to pass it down to children when exiting reflow
git-svn-id: svn://10.0.0.236/trunk@1812 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:51:17 +00:00
karnaze
c6f7ca1c13 initial support for <input type=file>, combo box use of widget init data for sizing
git-svn-id: svn://10.0.0.236/trunk@1811 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-18 16:39:42 +00:00
guha
c9368a0466 fix bug in xml glue reported by Henning Behme
of iX Magazine, Germany


git-svn-id: svn://10.0.0.236/trunk@1807 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-17 18:22:29 +00:00
brendan
844e2114c4 Modernize README
git-svn-id: svn://10.0.0.236/trunk@1796 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-16 00:55:35 +00:00
thom
de892d2fc0 mac project for layout
git-svn-id: svn://10.0.0.236/trunk@1784 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 22:24:27 +00:00
thom
884257d7fb mac project for htmlparser
git-svn-id: svn://10.0.0.236/trunk@1783 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 22:23:34 +00:00
thom
749a2f608a *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@1782 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 22:22:34 +00:00
thom
d94aa1f263 gfx is a graphics envionment for nglayout
git-svn-id: svn://10.0.0.236/trunk@1781 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 22:11:03 +00:00
briano
1319f7d9f3 Forgot to make sure the optimization tweak only happens when BUILD_OPT is set. Duh.
git-svn-id: svn://10.0.0.236/trunk@1763 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 19:02:42 +00:00
spence
9433ad818b ifdef bustage
git-svn-id: svn://10.0.0.236/trunk@1760 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 18:54:35 +00:00
briano
82febb3994 Minor tweak for Alpha Linux. On my machine (DECStation 200, 64MB, RH5,
2.0.30), using -O2 (the default) causes the optimizer to dump core,
leaving gcc hanging.  Using -O instead, for just jidctred.c, works fine.
This is hopefully a temporary hack.  Anyone have any long-term solutions?
Approved by pnunn@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@1759 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 18:50:35 +00:00
dario
ae00c83c64 final checkin from Judah
git-svn-id: svn://10.0.0.236/trunk@1758 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 18:49:17 +00:00
jevering
03e1d6d1b3 Dont crash (at least in debug mode) when a stream cannot be opened.
git-svn-id: svn://10.0.0.236/trunk@1756 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 18:16:39 +00:00
rods
b8e2e3379e initial
git-svn-id: svn://10.0.0.236/trunk@1753 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 17:43:42 +00:00
briano
abadd4350e 'Fixed' the warning about the supposed trigraph. a=djw
git-svn-id: svn://10.0.0.236/trunk@1751 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 17:16:49 +00:00
atotic
ccf76ff3ee Removed NSstring.* because of conflicts with raptor, renamed to macstrdlibxetras
git-svn-id: svn://10.0.0.236/trunk@1750 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 16:59:14 +00:00
atotic
1b116c75fd Renamed nsstring.[c|h] to macstdlibextras.[c|h] because of the naming conflict with Raptor (which uses ns prefix exclusively).
git-svn-id: svn://10.0.0.236/trunk@1749 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 16:54:09 +00:00
atotic
6e725d53b2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@1748 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 16:52:14 +00:00
ramiro
1978d2055d Add support for dropping to toolbox tabs.
git-svn-id: svn://10.0.0.236/trunk@1741 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 14:32:43 +00:00
ramiro
9bc24c9ded Add XfeTabDrawRaised().
git-svn-id: svn://10.0.0.236/trunk@1740 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 14:14:17 +00:00
ramiro
c19d523901 Add XfeToolBarGetFirstItem().
git-svn-id: svn://10.0.0.236/trunk@1739 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 13:30:24 +00:00
ramiro
b7a22d4046 Use a define instead of a hard coded '-1' constant.
git-svn-id: svn://10.0.0.236/trunk@1738 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 11:37:38 +00:00
ramiro
a548db7541 Remove dead code.
git-svn-id: svn://10.0.0.236/trunk@1737 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 11:32:28 +00:00
ramiro
d793c376eb Add icon to indicator if needed.
git-svn-id: svn://10.0.0.236/trunk@1736 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 11:23:24 +00:00
ramiro
9612894836 Add a check for a NULL str before passing it to strcmp().
Otherwise, Linux and possibly other platforms with strict strcmp()
implementations will crash when the plugin list is NULL.  Thanks to
pollmann@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@1735 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 11:21:09 +00:00
ramiro
6c9a7381bc Take out row column assertion. Any manager can be a parent of this widget.
Thanks to Dirk Laessig <d.laessig@tu-bs.de>


git-svn-id: svn://10.0.0.236/trunk@1733 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 10:01:57 +00:00
ramiro
4b689e87cd Dont move dead widgets.
Thanks to Dirk Laessig <d.laessig@tu-bs.de>


git-svn-id: svn://10.0.0.236/trunk@1732 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 10:01:54 +00:00
rpotts
fff42d31c8 Added status arguments to OnStopBinding(...)
git-svn-id: svn://10.0.0.236/trunk@1731 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:46:51 +00:00
rpotts
a8ce21f5fc Fixed IRIX build bustage... Added status arguments to OnStopBinding(...)
git-svn-id: svn://10.0.0.236/trunk@1730 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:46:42 +00:00
rpotts
943c179e9a Fixed OnStopBinding(...) to take status arguments...
git-svn-id: svn://10.0.0.236/trunk@1729 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:42:07 +00:00
rpotts
b0007ddd7f Added exports for nsIBaseStream.h and nsIOutputStream.h
git-svn-id: svn://10.0.0.236/trunk@1728 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:41:21 +00:00
rpotts
51c1ae6c3f Changed to use the nsIBaseStream as a base class...
git-svn-id: svn://10.0.0.236/trunk@1727 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:40:43 +00:00
rpotts
5341d8930c Interface for Output Streams...
git-svn-id: svn://10.0.0.236/trunk@1726 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:40:02 +00:00
rpotts
68365a9056 New interface that all stream interfaces can derive from...
git-svn-id: svn://10.0.0.236/trunk@1725 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 09:39:37 +00:00
rpotts
32c056bbbd fix for the IRIX build...
git-svn-id: svn://10.0.0.236/trunk@1713 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 08:51:48 +00:00
spence
aa327e5e21 correctly set position for shack elements
git-svn-id: svn://10.0.0.236/trunk@1705 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 01:15:01 +00:00
spence
8d91fa7351 improve shack widget mgmt
git-svn-id: svn://10.0.0.236/trunk@1702 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-15 00:13:57 +00:00
spence
bf8dba93ab xfe shack changes
git-svn-id: svn://10.0.0.236/trunk@1696 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 23:43:26 +00:00
selmer
5864826a77 Fixed up comments in QuitNavigator re: 112622
git-svn-id: svn://10.0.0.236/trunk@1695 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 23:40:45 +00:00
selmer
349958722e Bug #112622 - change our quit to not broadcast, it was tripping up a java window
git-svn-id: svn://10.0.0.236/trunk@1693 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 23:37:57 +00:00
spider
3a7a283400 Fixes for toplevel shared support
git-svn-id: svn://10.0.0.236/trunk@1687 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:53:21 +00:00
spider
6ba088ac61 Allow shared objects to be built of archives on Unix
git-svn-id: svn://10.0.0.236/trunk@1685 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:38:21 +00:00
rickg
4e262a1fe0 WIP for push based tokenization
git-svn-id: svn://10.0.0.236/trunk@1683 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:19:08 +00:00
rickg
affe63fab7 minor performance tweak for deque
git-svn-id: svn://10.0.0.236/trunk@1682 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:18:44 +00:00
jevering
eab4da2c10 Adding visual mode.
git-svn-id: svn://10.0.0.236/trunk@1680 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:16:51 +00:00
jevering
e46e399e41 Beginning to add visual mode.
git-svn-id: svn://10.0.0.236/trunk@1679 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 22:16:36 +00:00
dcone
2817e8b60f More composition code, much faster now
git-svn-id: svn://10.0.0.236/trunk@1676 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 21:49:58 +00:00
jevering
18844ec299 Fixed robot walking somewhat.. needs more cleaning.
git-svn-id: svn://10.0.0.236/trunk@1675 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 21:47:33 +00:00
kmcclusk
0e678cc344 Added widget specific init structs
git-svn-id: svn://10.0.0.236/trunk@1671 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 21:34:08 +00:00
spider
64afacb3f9 Allow shared libraries to be created from multiple archives
git-svn-id: svn://10.0.0.236/trunk@1670 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 21:28:02 +00:00
spider
bc5ea70e80 Allow shared libraries to be created based on several archive libraries
git-svn-id: svn://10.0.0.236/trunk@1668 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 21:27:16 +00:00
slamm
08792f1237 Make page proxy hot spot fit the icon.
git-svn-id: svn://10.0.0.236/trunk@1663 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 20:32:03 +00:00
jevering
99360cdcf8 Hooked up debugging robot to viewer shell
git-svn-id: svn://10.0.0.236/trunk@1629 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 18:25:17 +00:00
wtc
3e14d3e49b Merged NSPRPUB_19980508_BRANCH to the main trunk. The 19980508
branch is a temporary branch for us to copy the latest changes
from our internal development tree to the public mozilla tree.


git-svn-id: svn://10.0.0.236/trunk@1624 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 18:09:56 +00:00
jevering
2ac90f63b7 Moved to .\test
git-svn-id: svn://10.0.0.236/trunk@1619 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 17:42:08 +00:00
wtc
0e5fd8fabf In Rhapsody 5.1 (DR2), the C++ compiler is named c++.
git-svn-id: svn://10.0.0.236/trunk@1608 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 17:01:14 +00:00
ramiro
1ceea7a990 TASKBAR define should be MOZ_TASKBAR.
git-svn-id: svn://10.0.0.236/trunk@1602 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 09:18:26 +00:00
kipp
da654e994c nuked
git-svn-id: svn://10.0.0.236/trunk@1600 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 02:46:28 +00:00
spider
71a19f5b61 Fixes for Unix widget so loading
git-svn-id: svn://10.0.0.236/trunk@1597 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 01:48:54 +00:00
spider
8fc73d2700 Fixes to remove ARCHIVE_ONLY and use MKSHLIB
git-svn-id: svn://10.0.0.236/trunk@1596 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 01:44:50 +00:00
jevering
b0cd070d09 used to be the RobotMain but now is the function DebugRobot to be
added to the viewer.


git-svn-id: svn://10.0.0.236/trunk@1592 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 01:08:06 +00:00
jevering
4e7c880297 Pulled the DebugRobot out into separate DLL
Moved the test code in the robot/test directory.


git-svn-id: svn://10.0.0.236/trunk@1591 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 01:05:56 +00:00
spider
936f05f547 Removing Init where passing nsIShellInstance
git-svn-id: svn://10.0.0.236/trunk@1589 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 01:02:14 +00:00
kipp
368de8a159 Fixed up code that wasn't using the nsReflowStatus constants defined in nsIFrame.h
git-svn-id: svn://10.0.0.236/trunk@1588 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:49:46 +00:00
kipp
4ba0b9750b Removed some useless code
git-svn-id: svn://10.0.0.236/trunk@1587 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:49:11 +00:00
kipp
2a9df998b9 Implement new frame methods and store the current state
git-svn-id: svn://10.0.0.236/trunk@1586 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:47:32 +00:00
kipp
5076956d30 Flipped state value of NS_FRAME_COMPLETE with NS_FRAME_NOT_COMPLETE; added new methods WillReflow and DidReflow as well as GetFrameState and SetFrameState
git-svn-id: svn://10.0.0.236/trunk@1585 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:47:05 +00:00
spider
5dd62eb2be Unix fixes
git-svn-id: svn://10.0.0.236/trunk@1584 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:39:59 +00:00
spider
c5149eee02 Fixes to get UNIX working
git-svn-id: svn://10.0.0.236/trunk@1583 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:38:37 +00:00
michaelp
5096e309be added gamma correction of images.
git-svn-id: svn://10.0.0.236/trunk@1582 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:27:38 +00:00
rjc
a640989090 HT_Launch() changes.
git-svn-id: svn://10.0.0.236/trunk@1578 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:01:43 +00:00
robinf
89fbfc375e replacing corrupted images
git-svn-id: svn://10.0.0.236/trunk@1577 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-14 00:00:17 +00:00
robinf
6285fa084e fixing text so that it tells user how to start AS right away frfom this screen.
git-svn-id: svn://10.0.0.236/trunk@1576 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:59:16 +00:00
peterl
b07a7ad406 added HTML CSS style sheet (for STYLE= attributes)
git-svn-id: svn://10.0.0.236/trunk@1575 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:43:44 +00:00
peterl
cee84ada85 added style atom
git-svn-id: svn://10.0.0.236/trunk@1574 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:42:40 +00:00
peterl
54b5bf170e added HTML CSS style sheet
git-svn-id: svn://10.0.0.236/trunk@1573 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:42:18 +00:00
peterl
27702b7e88 renamed getSupportsValue to getISupportsValue
git-svn-id: svn://10.0.0.236/trunk@1572 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:42:01 +00:00
mccabe
b8c778ab5e ECMA fix to (117144).
Array.prototype.sort(comparefn) was casting the result of the compare
to an int, which lost when the compare function returned (ecma-valid)
strange double values.  These now get clamped to -1, 0, 1.


git-svn-id: svn://10.0.0.236/trunk@1570 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 23:29:52 +00:00
peterl
9194035028 attribute fix for kostello
git-svn-id: svn://10.0.0.236/trunk@1568 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:41:15 +00:00
peterl
d6449ed8e9 fixed bug in parse declaration block, we now discard empty declarations
tweaked position


git-svn-id: svn://10.0.0.236/trunk@1567 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:40:54 +00:00
peterl
ae5af73b56 fixed position
git-svn-id: svn://10.0.0.236/trunk@1566 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:40:17 +00:00
peterl
4b50ddb390 remove spacing cache invalidate
git-svn-id: svn://10.0.0.236/trunk@1565 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:39:41 +00:00
peterl
6ed543f432 connected spacing calculations to frame
git-svn-id: svn://10.0.0.236/trunk@1564 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:38:54 +00:00
peterl
8a4b477f37 fixed style position values
git-svn-id: svn://10.0.0.236/trunk@1563 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:38:37 +00:00
peterl
47b492ce9f added style size calculation methods
made get style data const


git-svn-id: svn://10.0.0.236/trunk@1562 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:38:09 +00:00
peterl
cdcb865f7e removed cache invalidation methods
git-svn-id: svn://10.0.0.236/trunk@1561 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:35:30 +00:00
spence
264a526b7a fix ifdef bustage
git-svn-id: svn://10.0.0.236/trunk@1559 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:35:20 +00:00
mccabe
a603cb7869 Warning fix - added an (int16) cast to quiet a Windows warning.
git-svn-id: svn://10.0.0.236/trunk@1555 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 22:13:30 +00:00
donm
aeaccc2e80 fixed unix build bustage. LO_BUILTIN requires #define SHACK and lo_ele.h
git-svn-id: svn://10.0.0.236/trunk@1554 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:59:20 +00:00
jevering
76d0c4b9da Fixed compilation error by adding appropriate new nsIHTMLContentSink
members to the RobotSink class.


git-svn-id: svn://10.0.0.236/trunk@1551 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:45:24 +00:00
gagan
0c234e4c55 progress...
git-svn-id: svn://10.0.0.236/trunk@1550 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:38:42 +00:00
pinkerton
5e9b3cc7e3 Removed mention of central personal toolbar manager since each toolbar now talks to HT. (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1548 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:25:39 +00:00
pinkerton
500e90b4e5 removed CPersonalToolbarTable.cp which is no longer needed (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1547 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:25:12 +00:00
pinkerton
00123bba4f rewrite of personal toolbar not to use centralized manager class and talk directly to HT like the selector pane (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1546 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:24:48 +00:00
pinkerton
a17a03f9d8 Fix crash during "view source" where we were double-deleting the urlStruct. (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@1545 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 21:22:56 +00:00
djw
e836bb2f3b Added -gtszapsymbol and -gtsnozapsymbol for manually overriding the
implicit rules. See gtscc -help.


git-svn-id: svn://10.0.0.236/trunk@1538 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 20:49:10 +00:00
sar
340141d12c add util to the include path
git-svn-id: svn://10.0.0.236/trunk@1535 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 20:33:32 +00:00
sar
52755a9a58 adding network to the include paths
git-svn-id: svn://10.0.0.236/trunk@1534 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 20:29:38 +00:00
sar
233a15e916 add softupdt to list of includes
git-svn-id: svn://10.0.0.236/trunk@1530 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 19:39:53 +00:00
peterl
3bf3d61497 fixed pow problem
git-svn-id: svn://10.0.0.236/trunk@1527 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 19:01:55 +00:00
michaelp
a4c9a27432 fixed compiler overload warning on tinderbox.
git-svn-id: svn://10.0.0.236/trunk@1525 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 18:54:18 +00:00
valeski
10660f6423 added cookie filter pref name to the default list
git-svn-id: svn://10.0.0.236/trunk@1524 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 18:40:30 +00:00
sar
00b03cbd6c add mktrace.h to the export lists. It's required by softupdt
git-svn-id: svn://10.0.0.236/trunk@1523 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 18:39:52 +00:00
michaelp
7225f63069 added gamma correction methods to the device context. the windows rendering context now
gamma corrects colors. fixed tablecellframe to call the right nsStyleCoord constructor.


git-svn-id: svn://10.0.0.236/trunk@1521 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 18:15:06 +00:00
jevering
15426a4ead Fixed build problems.
git-svn-id: svn://10.0.0.236/trunk@1519 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 17:55:04 +00:00
sar
58e8c8d316 adding jtools to the include path
git-svn-id: svn://10.0.0.236/trunk@1518 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 17:53:28 +00:00
karnaze
bf8234dd48 more select/option support
git-svn-id: svn://10.0.0.236/trunk@1517 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 17:43:35 +00:00
sar
be8a870be8 add jtools to the include paths
git-svn-id: svn://10.0.0.236/trunk@1516 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 17:33:42 +00:00
troy
7e662b38e2 Changes to space manager implementation.
git-svn-id: svn://10.0.0.236/trunk@1514 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 16:22:44 +00:00
dcone
420248debb speed up of alpha, some small fixes, inter checkin
git-svn-id: svn://10.0.0.236/trunk@1513 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 14:28:16 +00:00
mcafee
a4465638db Using relative paths for compilers & libtool
git-svn-id: svn://10.0.0.236/trunk@1512 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 07:59:54 +00:00
mcafee
3487e45d9d DR2 moved the compilers
git-svn-id: svn://10.0.0.236/trunk@1511 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 06:40:49 +00:00
sar
dcdbb6ae26 add mkutils.h since it wasn't being exported, and it's needed. Also make a formatting change for EXPORTS for readability
git-svn-id: svn://10.0.0.236/trunk@1510 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 05:48:50 +00:00
mcafee
13838a678d Adding support for NEXTSTEP. Fixing broken/missing getcwd() command, falls back to getwd(). a=briano
git-svn-id: svn://10.0.0.236/trunk@1509 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 04:02:37 +00:00
mcafee
25f8e0035c getcwd() doesn't malloc properly, falling back to getwd().
git-svn-id: svn://10.0.0.236/trunk@1508 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 04:00:15 +00:00
mcafee
6eda67228d Attempt to piggy-back build off of the RHAPSODY ifdef. switching to libtool. a=briano
git-svn-id: svn://10.0.0.236/trunk@1507 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 03:58:14 +00:00
michaelp
1f91c084c2 killed temp printf()s.
git-svn-id: svn://10.0.0.236/trunk@1506 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 03:40:01 +00:00
michaelp
808a040fee made form elements scroll smoothly. added apis to widgets to support this.
git-svn-id: svn://10.0.0.236/trunk@1505 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 03:39:08 +00:00
spider
dad0f00a2a Fixes for Private Modules Headers. Allow 'this' modules private headers
to be included on source PATH


git-svn-id: svn://10.0.0.236/trunk@1504 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:44:47 +00:00
kipp
e7b5397b7e Fixed coord to be setup properly
git-svn-id: svn://10.0.0.236/trunk@1503 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:33:34 +00:00
kipp
c10b69d3ba Fixed ptr compilation bug
git-svn-id: svn://10.0.0.236/trunk@1502 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:13:09 +00:00
kipp
40fbd986a8 Removed unused variable
git-svn-id: svn://10.0.0.236/trunk@1501 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:12:54 +00:00
kipp
dc0ac433ad Removed unused variable; fixed assingment into error return status
git-svn-id: svn://10.0.0.236/trunk@1500 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:12:40 +00:00
kipp
a6a43e031e Cast lineReflowStatus before comparing for negative values!; eliminated unused variables
git-svn-id: svn://10.0.0.236/trunk@1499 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:11:51 +00:00
kipp
7f9fab77fd Eliminate anonymous struct (and useless bitfields) to fix irix compilation problem
git-svn-id: svn://10.0.0.236/trunk@1498 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:10:35 +00:00
kipp
e695e3478d Export nsIFrameImageLoader too
git-svn-id: svn://10.0.0.236/trunk@1497 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-13 00:10:06 +00:00
kipp
77740b1433 Fixed vertical alignment bug: lines that contained bottom aligned objects would add in too much height
git-svn-id: svn://10.0.0.236/trunk@1496 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:53:37 +00:00
kipp
4a26cb720b Removed dead code
git-svn-id: svn://10.0.0.236/trunk@1495 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:52:45 +00:00
kipp
5335baf069 Use code in nsHTMLImageLoader to share code and fix image bugs in image buttons; removed some tabs in the source; get image border handled right
git-svn-id: svn://10.0.0.236/trunk@1494 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:52:33 +00:00
kipp
c8feee6b6b Removed special code for mWidth/mHeight handling
git-svn-id: svn://10.0.0.236/trunk@1493 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:51:46 +00:00
kipp
8098bd43a8 Removed mWidth and mHeight; use base class handling of that now
git-svn-id: svn://10.0.0.236/trunk@1492 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:51:30 +00:00
kipp
df00cff097 Removed IMG rule
git-svn-id: svn://10.0.0.236/trunk@1491 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:51:09 +00:00
kipp
8b2fdfef7c Make image borders work when html attribute is defined
git-svn-id: svn://10.0.0.236/trunk@1490 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:50:54 +00:00
kipp
62a3217422 Use nsHTMLImageLoader to share code
git-svn-id: svn://10.0.0.236/trunk@1489 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:50:28 +00:00
kipp
6e90ba8b92 Moved margin code into line layout
git-svn-id: svn://10.0.0.236/trunk@1488 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:49:40 +00:00
kipp
49beda22be Removed left/right margin calc as caller is doing it
git-svn-id: svn://10.0.0.236/trunk@1487 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:48:37 +00:00
kipp
501a8c4114 new
git-svn-id: svn://10.0.0.236/trunk@1486 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:48:11 +00:00
kipp
9f0294cdd7 Added methods to invalidate the caches
git-svn-id: svn://10.0.0.236/trunk@1485 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:47:50 +00:00
scullin
b2f44a3b36 Release mode fix.
git-svn-id: svn://10.0.0.236/trunk@1484 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:32:59 +00:00
spence
eec4cff8d3 shack layout element
git-svn-id: svn://10.0.0.236/trunk@1483 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:22:14 +00:00
spider
095c6349c5 fixes for archive rules
git-svn-id: svn://10.0.0.236/trunk@1482 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:15:00 +00:00
spence
6cd3efd65e handle relayout of shack elements
git-svn-id: svn://10.0.0.236/trunk@1481 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:04:58 +00:00
troy
43a82bdef4 Space manager API change
git-svn-id: svn://10.0.0.236/trunk@1480 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:02:47 +00:00
troy
eb154aa999 Changed API
git-svn-id: svn://10.0.0.236/trunk@1479 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:02:14 +00:00
troy
5d0ec492ca Added new member functions
git-svn-id: svn://10.0.0.236/trunk@1478 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 23:02:02 +00:00
peterl
1fe962d622 sync to nsStyleSpacing api changes
git-svn-id: svn://10.0.0.236/trunk@1477 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:58:14 +00:00
peterl
ecfff23b8f added proper support for border padding & margin
better support for clip


git-svn-id: svn://10.0.0.236/trunk@1476 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:57:52 +00:00
donm
1bcbbcd707 Export mkutils.h and cache header files.
git-svn-id: svn://10.0.0.236/trunk@1475 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:57:27 +00:00
peterl
59ffeb9079 added clip inherit support
added line-height number support


git-svn-id: svn://10.0.0.236/trunk@1474 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:56:18 +00:00
peterl
f9ecfae273 sync to new spacing apis
git-svn-id: svn://10.0.0.236/trunk@1471 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:28:01 +00:00
peterl
e6ff058617 fixed clip rect handling (auto side support)
git-svn-id: svn://10.0.0.236/trunk@1470 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:26:59 +00:00
peterl
00c2c6f37f added table enums
added clip flags


git-svn-id: svn://10.0.0.236/trunk@1469 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:25:31 +00:00
peterl
93da6a385a added factor unit
added nsStyleSides


git-svn-id: svn://10.0.0.236/trunk@1468 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:24:12 +00:00
peterl
01cc78cc80 merged nsStyleBorder & nsStyleSpacing
changed spacing data to use nsStyleSides
removed virtual methods
added nsStyleTable


git-svn-id: svn://10.0.0.236/trunk@1467 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:23:13 +00:00
peterl
e5373a0d6f Merged nsStyleBorder & nsStyleSpacing
changed spacing values o use nsStyleSides
removed virtual methods


git-svn-id: svn://10.0.0.236/trunk@1466 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:21:03 +00:00
peterl
b7d34bef34 added factor unit type
added nsStyleSides


git-svn-id: svn://10.0.0.236/trunk@1465 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 22:18:42 +00:00
spence
758cb4eb72 shack elements are tabable
git-svn-id: svn://10.0.0.236/trunk@1464 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 21:57:20 +00:00
spence
0e49124d3b pick up src param for shack elements
git-svn-id: svn://10.0.0.236/trunk@1460 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 21:19:19 +00:00
spence
c5a52db205 doc info relfects shack elements
git-svn-id: svn://10.0.0.236/trunk@1459 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 21:18:46 +00:00
dario
14344a215e idl compiler
git-svn-id: svn://10.0.0.236/trunk@1458 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 20:30:45 +00:00
robinf
9a69c9479f replacing corrupted file; adding plaecholder image for netcenter xscreen
git-svn-id: svn://10.0.0.236/trunk@1457 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 19:38:47 +00:00
gagan
c4789590cd Fixes the Linux build problems. Thanks Ramiro.
git-svn-id: svn://10.0.0.236/trunk@1456 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 19:21:59 +00:00
spence
056043dc1b changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1455 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 19:16:46 +00:00
spence
f7128b6ef7 changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1454 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 19:10:35 +00:00
spence
b4790ac48d changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1453 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 19:03:13 +00:00
spence
0c7af8c730 changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1452 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:55:51 +00:00
spence
ef8e866fbf changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1451 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:42:16 +00:00
spence
0b01b981e2 changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1450 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:33:45 +00:00
karnaze
db91979176 textarea sizing improvement; use nsCSSLayout::GetStyleSize; fix combo box SizeTo
git-svn-id: svn://10.0.0.236/trunk@1449 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:28:58 +00:00
spence
5a9fb075fa changes for shack layout element
git-svn-id: svn://10.0.0.236/trunk@1448 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:25:24 +00:00
spence
718cd7523e new shack layout element
git-svn-id: svn://10.0.0.236/trunk@1447 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:22:49 +00:00
cyeh
654f82a5f5 add mozilla/lib/libnet back to MozillaSourceCommon for NORMANDY_BRANCH
git-svn-id: svn://10.0.0.236/trunk@1446 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:03:37 +00:00
cyeh
d86f4cda50 removing old netlib implementation from tip. these files have been moved
to mozilla/network.  refer to those files.


git-svn-id: svn://10.0.0.236/trunk@1445 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 18:03:30 +00:00
brade
9991020037 don't allow image tags to be created without an image source
git-svn-id: svn://10.0.0.236/trunk@1444 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 17:12:02 +00:00
troy
009e2343c6 Removed some temporary code that isn't needed now that content changed
reflow commands aren't generated for the body


git-svn-id: svn://10.0.0.236/trunk@1443 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 04:46:27 +00:00
troy
a1cde81868 Changed enum to conform with coding standards
git-svn-id: svn://10.0.0.236/trunk@1442 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 04:38:23 +00:00
troy
5a839584c7 Change to nsIFrame API
git-svn-id: svn://10.0.0.236/trunk@1441 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 04:17:56 +00:00
montulli
3d17637b71 add <signal.h>
git-svn-id: svn://10.0.0.236/trunk@1440 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 02:28:20 +00:00
selmer
68b64888ae fix bug#116315: don't pass null char into JRI_NewPlatformString
git-svn-id: svn://10.0.0.236/trunk@1439 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 02:03:33 +00:00
kipp
f810b7168d Release image loader during delete frame to break so that images shutdown properly
git-svn-id: svn://10.0.0.236/trunk@1438 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:32:30 +00:00
kipp
7653fb2f79 Added container methods for the singly contained frame
git-svn-id: svn://10.0.0.236/trunk@1437 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:31:22 +00:00
kipp
aeca5d3fb6 Init band data so that zero is returned on failure
git-svn-id: svn://10.0.0.236/trunk@1436 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:30:57 +00:00
kipp
cf3c34edc3 Re-installed the temporary content appended hack
git-svn-id: svn://10.0.0.236/trunk@1435 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:30:40 +00:00
kipp
9da44d2113 Pass on stop image load to the image loader too so that circular references can be broken and memory can get released properly
git-svn-id: svn://10.0.0.236/trunk@1434 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:30:15 +00:00
kipp
d32ff2fb28 Removed unused variables and methods
git-svn-id: svn://10.0.0.236/trunk@1433 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:29:43 +00:00
kipp
41b2b93fa7 Implement stop and abort; stop properly breaks circular link to image request
git-svn-id: svn://10.0.0.236/trunk@1432 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:29:29 +00:00
kipp
6bb8246384 Declare stop and abort methods
git-svn-id: svn://10.0.0.236/trunk@1431 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:28:51 +00:00
kipp
f94faae66b Added stop and abort methods
git-svn-id: svn://10.0.0.236/trunk@1430 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:28:31 +00:00
rickg
e8f3b719cd made comments more complete
git-svn-id: svn://10.0.0.236/trunk@1429 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 01:11:50 +00:00
rickg
c9a40cc270 updated comments
git-svn-id: svn://10.0.0.236/trunk@1428 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 00:59:32 +00:00
montulli
d18d2837c3 add <signal.h>
git-svn-id: svn://10.0.0.236/trunk@1427 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-12 00:42:47 +00:00
kipp
f1960f5125 Make url's absolute per the css spec
git-svn-id: svn://10.0.0.236/trunk@1426 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 23:28:47 +00:00
kipp
34091b102f Skip over whitespace properly after url string (it's optional whitespace not mandatory whitespace)
git-svn-id: svn://10.0.0.236/trunk@1425 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 23:28:22 +00:00
rickg
d279bd9b90 fixed numeric entities
git-svn-id: svn://10.0.0.236/trunk@1424 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 23:28:01 +00:00
rickg
08ea7302b4 added IsDigit to string
git-svn-id: svn://10.0.0.236/trunk@1423 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 23:27:35 +00:00
atotic
597bf87774 File case weirdness
git-svn-id: svn://10.0.0.236/trunk@1420 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 23:04:36 +00:00
kipp
ee0932b472 Declare nsIView just in case somebody else doesn't
git-svn-id: svn://10.0.0.236/trunk@1419 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:58:44 +00:00
kipp
29014e986a Use new image loading API's
git-svn-id: svn://10.0.0.236/trunk@1418 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:58:20 +00:00
kipp
aeb7f4e124 Revised image loading API's
git-svn-id: svn://10.0.0.236/trunk@1417 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:57:05 +00:00
kipp
d28087541a Removed image loading code (factored out into nsFrameImageLoader); revised API for image loading
git-svn-id: svn://10.0.0.236/trunk@1416 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:56:58 +00:00
kipp
89aaae1f2d Added nsFrameImageLoader
git-svn-id: svn://10.0.0.236/trunk@1415 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:56:23 +00:00
kipp
07232aab59 Export nsIFrameImageLoader.h
git-svn-id: svn://10.0.0.236/trunk@1414 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:55:54 +00:00
kipp
164321faf9 new
git-svn-id: svn://10.0.0.236/trunk@1413 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:52:40 +00:00
montulli
b1069775d3 add exports to layout and libstyle
git-svn-id: svn://10.0.0.236/trunk@1408 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:11:39 +00:00
montulli
cac7dcf982 add network
git-svn-id: svn://10.0.0.236/trunk@1407 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:09:40 +00:00
montulli
527d9f61ef use mozilla/network now instead of lib/libnet
git-svn-id: svn://10.0.0.236/trunk@1406 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:09:10 +00:00
montulli
9fa204a081 use network dir instead of libnet
git-svn-id: svn://10.0.0.236/trunk@1404 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:07:07 +00:00
montulli
57612be151 add mkgeturl.h
git-svn-id: svn://10.0.0.236/trunk@1403 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:04:57 +00:00
montulli
02058ba996 remove libnet
git-svn-id: svn://10.0.0.236/trunk@1402 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:04:01 +00:00
montulli
d83f821242 add network directory
git-svn-id: svn://10.0.0.236/trunk@1401 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:03:25 +00:00
montulli
4285557751 changes for the new mozilla/network directory.
git-svn-id: svn://10.0.0.236/trunk@1399 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:02:46 +00:00
atotic
fb1313cc77 Netlib modularity changes. montulli's your point man
git-svn-id: svn://10.0.0.236/trunk@1398 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:02:43 +00:00
cyeh
8c0ccec706 new netlib in it's new home and modular too.
git-svn-id: svn://10.0.0.236/trunk@1397 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 22:01:18 +00:00
selmer
791cab04d8 removed extraneous JAVA_DESTPATH definition
git-svn-id: svn://10.0.0.236/trunk@1396 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 21:59:36 +00:00
montulli
b8f16d0f85 add #mkgeturl.h
git-svn-id: svn://10.0.0.236/trunk@1395 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 21:41:26 +00:00
troy
9a3b2e21ef Changed table code to pay attention to the ALIGN attribute
git-svn-id: svn://10.0.0.236/trunk@1394 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 21:31:12 +00:00
troy
70f7b2d8cd Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@1393 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 21:03:50 +00:00
rpotts
be5c685363 Added support for receiving OnProgress(...) notifications...
git-svn-id: svn://10.0.0.236/trunk@1392 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 20:30:35 +00:00
spence
c603cea888 new layout element for shack objects
git-svn-id: svn://10.0.0.236/trunk@1389 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 19:54:46 +00:00
spider
e97259e58a Final UNIX fixes
git-svn-id: svn://10.0.0.236/trunk@1388 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 19:45:12 +00:00
spider
c8ee4c7bf3 windows fixes
git-svn-id: svn://10.0.0.236/trunk@1387 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 19:34:25 +00:00
spider
f49bd7b89a More UNIX Lib fixes
git-svn-id: svn://10.0.0.236/trunk@1386 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 19:33:23 +00:00
spider
f172c6f0f1 Platform Independe EXTRA_LIBS fixes
git-svn-id: svn://10.0.0.236/trunk@1385 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 19:06:15 +00:00
troy
66c14fdbb1 Wrapped VerifyLines() inside of a NS_DEBUG #define
git-svn-id: svn://10.0.0.236/trunk@1384 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 18:54:15 +00:00
troy
b83e1077b0 More incremental reflow work.
git-svn-id: svn://10.0.0.236/trunk@1383 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 18:38:10 +00:00
spider
750378f65c Add gconfig to build_trex
git-svn-id: svn://10.0.0.236/trunk@1382 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 16:50:16 +00:00
ftang
a989b3e678 Add Armenian XFE support. thanks for Hovik Melikyan from hovik@undp.am
git-svn-id: svn://10.0.0.236/trunk@1381 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 16:49:30 +00:00
spider
8e877f008d Refer to nglayout now
git-svn-id: svn://10.0.0.236/trunk@1380 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 16:32:14 +00:00
spider
7918f08d9d Actually refer to nglayout properly now
git-svn-id: svn://10.0.0.236/trunk@1379 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 16:27:28 +00:00
spider
17aee6decd Refer to nglayout.mk now
git-svn-id: svn://10.0.0.236/trunk@1378 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-11 16:24:06 +00:00
jwz
dd5ae078e5 red letter edition
git-svn-id: svn://10.0.0.236/trunk@1377 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-10 18:54:17 +00:00
mccabe
afa28896ca (Not part of the mozilla build process.)
Added support in the javascript shell for the #! unix script hack; if
the first line read by the shell (from a file, not interactive) starts
with #, the line is treated as a comment.

This should make
#!/usr/bin/js work...


git-svn-id: svn://10.0.0.236/trunk@1376 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 05:54:12 +00:00
troy
1b3c6fc947 Work in progress on block incremental reflow
git-svn-id: svn://10.0.0.236/trunk@1375 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:52:29 +00:00
kipp
5cb5cb49e5 Use new LoadImage API
git-svn-id: svn://10.0.0.236/trunk@1374 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:23:54 +00:00
kipp
7331ec5631 Removed uneeded code; added a reminder comment
git-svn-id: svn://10.0.0.236/trunk@1373 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:23:41 +00:00
kipp
ea27670082 Cheesy implementation of the reflow lock and content appended
git-svn-id: svn://10.0.0.236/trunk@1372 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:22:41 +00:00
kipp
7dc9190770 Updated to new API
git-svn-id: svn://10.0.0.236/trunk@1371 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:22:14 +00:00
kipp
cdf6691a9d Reworked load image support and provided content changed calls to the shell when image sizes arrive
git-svn-id: svn://10.0.0.236/trunk@1370 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:22:01 +00:00
kipp
522bd8f35e Added enter/exit reflow lock methods
git-svn-id: svn://10.0.0.236/trunk@1369 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:21:34 +00:00
kipp
266494fc93 Revised LoadImage API to use NS_IMETHOD and provide alot more information about the load
git-svn-id: svn://10.0.0.236/trunk@1368 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:21:19 +00:00
kipp
19ce06fe2f Wrap document loads with reflow lock calls
git-svn-id: svn://10.0.0.236/trunk@1367 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:20:54 +00:00
kipp
cf55be8188 Remove useless header file
git-svn-id: svn://10.0.0.236/trunk@1366 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:20:37 +00:00
kipp
23bcab2333 Removed unused class decl
git-svn-id: svn://10.0.0.236/trunk@1365 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 03:20:24 +00:00
racham
4489bdc493 Path for compare.js changed
git-svn-id: svn://10.0.0.236/trunk@1364 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 02:16:33 +00:00
rickg
cb2d8b8eb8 MUCH better support for auto-closing tags.
git-svn-id: svn://10.0.0.236/trunk@1363 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-09 00:42:33 +00:00
scullin
e794b4507e Fix NSPR related breakage.
git-svn-id: svn://10.0.0.236/trunk@1360 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 23:56:08 +00:00
montulli
17459e838c update include path
git-svn-id: svn://10.0.0.236/trunk@1358 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 23:40:53 +00:00
karnaze
8400595193 select/option
git-svn-id: svn://10.0.0.236/trunk@1355 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 23:08:43 +00:00
wtc
8a008e57b5 Added new test files.
git-svn-id: svn://10.0.0.236/trunk@1352 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 23:07:27 +00:00
rickg
683ffd3d1f changed OPTION tag from leaf to container node
git-svn-id: svn://10.0.0.236/trunk@1350 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 22:36:15 +00:00
atotic
fe9c67a957 More build changes, added some missing files
git-svn-id: svn://10.0.0.236/trunk@1349 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:42:48 +00:00
atotic
573139f59c #ifdef NET_mail/news functionality with MOZ_MAIL_NEWS.
git-svn-id: svn://10.0.0.236/trunk@1348 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:42:26 +00:00
scullin
42f328fc71 Fix depth, and add client directory
git-svn-id: svn://10.0.0.236/trunk@1347 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:27:46 +00:00
hyatt
be768f6a5b Making the Aurora tree respond to the divider properties.
git-svn-id: svn://10.0.0.236/trunk@1346 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:23:47 +00:00
kipp
9003aba3c1 Fixed irix bustage
git-svn-id: svn://10.0.0.236/trunk@1345 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:12:12 +00:00
atotic
ecc83b402a More build changes (renaming the targets)
git-svn-id: svn://10.0.0.236/trunk@1344 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 21:03:19 +00:00
timm
e93ed99ecf fix path routines to append path delimiter
git-svn-id: svn://10.0.0.236/trunk@1343 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:20:19 +00:00
timm
8cdfb14c42 fix getFolder to return windows style path
git-svn-id: svn://10.0.0.236/trunk@1342 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:19:43 +00:00
kipp
31d88fddf9 nuked
git-svn-id: svn://10.0.0.236/trunk@1341 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:19:18 +00:00
kipp
30a587c651 updated
git-svn-id: svn://10.0.0.236/trunk@1340 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:18:36 +00:00
kipp
384524a3d9 new
git-svn-id: svn://10.0.0.236/trunk@1339 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:18:35 +00:00
karnaze
ab454da4fd more support for textarea, select/option in content sink
git-svn-id: svn://10.0.0.236/trunk@1338 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:18:06 +00:00
kipp
053274d5b7 Removed more raptor references
git-svn-id: svn://10.0.0.236/trunk@1337 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 20:10:36 +00:00
kipp
171bc76637 new
git-svn-id: svn://10.0.0.236/trunk@1336 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:58:01 +00:00
kipp
c56ba929aa Fixed pseudo-frame body behavior
git-svn-id: svn://10.0.0.236/trunk@1335 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:43:25 +00:00
timm
b7351b8392 dial string should be in status text, not progress text
git-svn-id: svn://10.0.0.236/trunk@1334 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:28:49 +00:00
timm
a45c483ad7 remove copy of compare.js, since we dont want it in the jar
git-svn-id: svn://10.0.0.236/trunk@1333 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:28:04 +00:00
timm
2156c7d5d7 remove IDs and ARCHIVE tags
git-svn-id: svn://10.0.0.236/trunk@1332 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:27:40 +00:00
timm
4e130f7162 remove IPs and put reggie.netscape.com back
git-svn-id: svn://10.0.0.236/trunk@1331 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:26:43 +00:00
timm
3f3c31c971 erase compare.js as part of make if it exists in this dir
git-svn-id: svn://10.0.0.236/trunk@1330 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:26:11 +00:00
timm
9aa0247b63 added debugging for set1StepMode
git-svn-id: svn://10.0.0.236/trunk@1329 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:25:47 +00:00
timm
b5ac9e9ddf added debugging info for MetadataMode and LocalMode
git-svn-id: svn://10.0.0.236/trunk@1328 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:24:49 +00:00
radha
a58f0b6a8a Checkin for fix 104761. If the target window has a context associated with it, use it.
Fix was originally provided by toshok.


git-svn-id: svn://10.0.0.236/trunk@1327 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:24:28 +00:00
timm
ccb1fc9ade add ASW_DEVMODE
git-svn-id: svn://10.0.0.236/trunk@1326 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:24:15 +00:00
ftang
cb7fffc2df Add Armenain support. Approvaed by WinFE owner, Thanks Hovik Melikyan <hovik@undp.am>
from the net


git-svn-id: svn://10.0.0.236/trunk@1323 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 19:23:48 +00:00
wtc
cbcb32a7d6 Use cc -bundle to build loadable modules on Rhapsody. Thanks to
Matt Watson <mwatson@apple.com> for the patch.


git-svn-id: svn://10.0.0.236/trunk@1322 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:52:44 +00:00
cmanske
0d6028508b Fixed another memory bug in Composer
git-svn-id: svn://10.0.0.236/trunk@1321 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:51:58 +00:00
wtc
dad061f564 The type of the third argument for accept, recvfrom, getsockname, and
getpeername is 'int', not 'size_t'.


git-svn-id: svn://10.0.0.236/trunk@1320 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:50:15 +00:00
wtc
6b251dc0ae Fixed comment.
git-svn-id: svn://10.0.0.236/trunk@1319 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:48:46 +00:00
wtc
06c4a3d9ee Merged patches from Matt Watson <mwatson@apple.com> to make loadable
modules work on Rhapsody.  Still have a few kinks to iron out.


git-svn-id: svn://10.0.0.236/trunk@1318 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:43:58 +00:00
wtc
682e147ebf Matt Watson <mwatson@apple.com> pointed out that it is not safe to
redefine FD_SETSIZE on Rhapsody.


git-svn-id: svn://10.0.0.236/trunk@1317 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:41:51 +00:00
wtc
7e8f7154f4 Added a few function declarations and header inclusions to get rid of
compiler warnings.


git-svn-id: svn://10.0.0.236/trunk@1316 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:37:38 +00:00
wtc
6c9253e597 Merged Rhapsody patches contributed by Matt Watson <mwatson@apple.com>.
git-svn-id: svn://10.0.0.236/trunk@1315 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:35:19 +00:00
rods
9b04324111 added major selection method and data members
git-svn-id: svn://10.0.0.236/trunk@1314 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:33:42 +00:00
wtc
91ebeaa99b Merged patches contributed by Matt Watson <mwatson@apple.com>.
git-svn-id: svn://10.0.0.236/trunk@1313 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 18:32:30 +00:00
michaelp
5f4ea5859a when switching documents, the scrollbars are reset.
git-svn-id: svn://10.0.0.236/trunk@1312 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 17:50:43 +00:00
atotic
dddb703cfd Added an include of shist.h
git-svn-id: svn://10.0.0.236/trunk@1311 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 17:27:49 +00:00
kipp
9748b6eb2b Factored out sizing into ComputeDesiredSize and fixed the size to reflect the size of the content
git-svn-id: svn://10.0.0.236/trunk@1310 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 17:23:06 +00:00
atotic
612c02f3da First Checked In.
git-svn-id: svn://10.0.0.236/trunk@1309 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 17:13:01 +00:00
troy
2e789484b5 Changed container related functions to return NS_ERROR_NOT_IMPLEMENTED
instead of NS_OK


git-svn-id: svn://10.0.0.236/trunk@1308 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 17:02:35 +00:00
troy
a447ffcc90 Moved ContentChanged() logic to nsFrame since it was completely generic and
serves as reasonable default behavior for all frames


git-svn-id: svn://10.0.0.236/trunk@1304 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 16:34:27 +00:00
troy
f8e3f6b0a7 Changed ContentChanged() to generate a reflow command
git-svn-id: svn://10.0.0.236/trunk@1303 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 16:33:07 +00:00
pinkerton
d173dd8ecd free memory allocated (silently!) by GetURLFromFileSpec(). (appr brade).
git-svn-id: svn://10.0.0.236/trunk@1302 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:35:42 +00:00
pinkerton
dd2b3e15e2 added "rdf" to access paths so composer can understand drops from HT (appr brade).
git-svn-id: svn://10.0.0.236/trunk@1301 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:34:44 +00:00
pinkerton
d9cc5aa3b0 New drag and drop architecture using CURLDragMixin subclasses. Fixed bug where dropping text clipping would drop at old insertion point, not at mouse location. (appr brade).
git-svn-id: svn://10.0.0.236/trunk@1300 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:34:07 +00:00
rods
80849d47b2 added Selection methods to nsICodment, nsDocument, nsiSplittableFRame
git-svn-id: svn://10.0.0.236/trunk@1299 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:07:41 +00:00
rods
495bdfe1d4 added Edit menu
git-svn-id: svn://10.0.0.236/trunk@1298 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:06:41 +00:00
dcone
5b5fdcadb6 put back in optimize
git-svn-id: svn://10.0.0.236/trunk@1297 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 15:05:27 +00:00
rods
8124074533 added mouseEvent struct
git-svn-id: svn://10.0.0.236/trunk@1296 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 14:54:09 +00:00
dcone
332f4c19f3 Some more alpha blending, fixed some bugs and the test app now works
git-svn-id: svn://10.0.0.236/trunk@1295 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 14:24:53 +00:00
mcafee
013d1299c8 Enable dynamic library creation. a,r=briano
git-svn-id: svn://10.0.0.236/trunk@1294 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 08:01:10 +00:00
sdagley
07644fd855 Merging current fix for #86787 and #96213 from 4.x tree. When creating a new window check chrome to see if it should be created zoomable rather than changing it afterwards. Works around WDEF change in MacOS 8 that breaks old hack that would toggle zoom widget after creating window.
git-svn-id: svn://10.0.0.236/trunk@1293 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 06:08:55 +00:00
rjc
b1c2f2652a Small fix... use '\0' instead of NULL.
git-svn-id: svn://10.0.0.236/trunk@1292 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 06:01:30 +00:00
rjc
aacb6b7891 Move all hardcoded RDF strings into allxpstr.
git-svn-id: svn://10.0.0.236/trunk@1291 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 05:48:44 +00:00
rjc
7483ba47fe Move all hardcoded strings into allxpstr. Bug fix from tenthumbs@cybernex.net in isNodeEditable(). HT Properties dialog changes (pretty, now). Better color support.
git-svn-id: svn://10.0.0.236/trunk@1290 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 05:48:14 +00:00
troy
833c505aff Hooked up ContentChanged() to notify the frame
git-svn-id: svn://10.0.0.236/trunk@1289 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 04:59:35 +00:00
troy
80084f86ae Added ContentChanged() member function
git-svn-id: svn://10.0.0.236/trunk@1288 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 04:56:47 +00:00
troy
4c7726d9f7 Added ContentChanged() member function
git-svn-id: svn://10.0.0.236/trunk@1287 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 04:45:37 +00:00
sdagley
e5ef4cb8fc Merging sfraser fix for #115706 from 4.x branch.
git-svn-id: svn://10.0.0.236/trunk@1286 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 03:34:05 +00:00
michaelp
6b1b7b071b added horizontal scrollbar.
git-svn-id: svn://10.0.0.236/trunk@1278 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 01:25:25 +00:00
timm
f2f6958b0e Add in "ARCHIVE=asw.jar" for compare.js
git-svn-id: svn://10.0.0.236/trunk@1277 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 01:17:40 +00:00
cmanske
b6085352b8 Fixed memory crash bug in new Composer table code
git-svn-id: svn://10.0.0.236/trunk@1276 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 01:12:10 +00:00
michaelp
67a0e11240 we now have horizontal scrolling.
git-svn-id: svn://10.0.0.236/trunk@1275 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 01:11:57 +00:00
timm
6a5d8b07ea Not for Preston
git-svn-id: svn://10.0.0.236/trunk@1271 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 00:33:10 +00:00
timm
b763535f3a Registration Server IAS file
git-svn-id: svn://10.0.0.236/trunk@1270 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 00:31:35 +00:00
kipp
e8970aba73 Support width/height ala css
git-svn-id: svn://10.0.0.236/trunk@1269 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 00:16:41 +00:00
kipp
dd47ae8835 Added MapImagePropertiesInto
git-svn-id: svn://10.0.0.236/trunk@1268 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-08 00:16:30 +00:00
robinf
b1735e0810 scrubbed lighthouse and N logos from these images
git-svn-id: svn://10.0.0.236/trunk@1265 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:50:36 +00:00
kipp
40a0ee1354 Support css width&height style properties
git-svn-id: svn://10.0.0.236/trunk@1264 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:38:51 +00:00
kipp
5bcb630e75 Unsupported border+padding around form elements (except for image - it still works)
git-svn-id: svn://10.0.0.236/trunk@1263 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:38:12 +00:00
ftang
0619cd5b32 Add Armenian support. Thanks for Hovik Melikyan <hovik@moon.yerphi.am> for this.
git-svn-id: svn://10.0.0.236/trunk@1262 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:12:48 +00:00
michaelp
5dd9734a48 scrolling views are now self-contained. preparations have been made for horizontal scrolling.
git-svn-id: svn://10.0.0.236/trunk@1261 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:07:10 +00:00
ftang
52495ca4a4 Add Armenian support. Thanks for Hovik Melikyan <hovik@moon.yerphi.am> for this.
git-svn-id: svn://10.0.0.236/trunk@1259 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:03:45 +00:00
ftang
186160708d Add Armenian support. Thanks for Hovik Melikyan <hovik@yerphi.am> (from Armenian)
for this.


git-svn-id: svn://10.0.0.236/trunk@1258 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 23:02:26 +00:00
spider
558248ce6a emove web fully
git-svn-id: svn://10.0.0.236/trunk@1257 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 22:53:28 +00:00
spider
6f3722d906 Fix include from web to shell
git-svn-id: svn://10.0.0.236/trunk@1256 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 22:49:59 +00:00
kipp
220394c0ec Support width & height ala css1
git-svn-id: svn://10.0.0.236/trunk@1250 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:50:56 +00:00
kipp
ebf8497eb7 order sid's alphabeticly
git-svn-id: svn://10.0.0.236/trunk@1249 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:36:41 +00:00
kipp
83683e9db6 Added GetStyleSize
git-svn-id: svn://10.0.0.236/trunk@1248 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:36:16 +00:00
kipp
f3b0df343f Set clip rect if style says to
git-svn-id: svn://10.0.0.236/trunk@1247 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:35:03 +00:00
ftang
ba092104d8 add codeset conversion table for ARMSCII-8 Thanks Hovik Melikyan hovik@undp.am
git-svn-id: svn://10.0.0.236/trunk@1246 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:28:17 +00:00
toshok
aa0742196b Remove #ifdef's for TEXT_CHUNK_LIMIT, since it's always defined to something.
git-svn-id: svn://10.0.0.236/trunk@1245 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:16:02 +00:00
toshok
69c01e024d I know I'm going to get strung up for this, but I just can't read this file without a window that's like 150 columns wide.
git-svn-id: svn://10.0.0.236/trunk@1244 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:12:03 +00:00
rickg
73cdf7b056 new contentsink api's for kipp
git-svn-id: svn://10.0.0.236/trunk@1243 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:11:07 +00:00
troy
4a9b848ec2 Work in progress
git-svn-id: svn://10.0.0.236/trunk@1242 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 21:10:07 +00:00
scullin
ff4907675c G++ warning fix submitted by Brian Grunkemeyer.
git-svn-id: svn://10.0.0.236/trunk@1241 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 20:50:59 +00:00
toshok
ffbf7864d1 remove huge commented out chunks of code (that have been commented out since time began, it seems.) also added a couple of fairly bogus comments at the beginnings of lo_Push/PopAlignment
git-svn-id: svn://10.0.0.236/trunk@1240 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 20:44:45 +00:00
troy
e1891fa2e0 Started hooking up appended content handler
git-svn-id: svn://10.0.0.236/trunk@1239 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 20:28:16 +00:00
spider
8734855a1d More fixes
git-svn-id: svn://10.0.0.236/trunk@1238 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 20:09:25 +00:00
wtc
dca0a521aa Matt Waston <mwatson@apple.com> taught me what common symbols are
and to compile with -fno-common.


git-svn-id: svn://10.0.0.236/trunk@1237 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 19:19:25 +00:00
spider
26b167fe2b Changes class NSApplicationManager to nsApplicationManager
git-svn-id: svn://10.0.0.236/trunk@1236 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 18:39:40 +00:00
spider
afe6262d35 Adding toplevel trex unix makefile
git-svn-id: svn://10.0.0.236/trunk@1235 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 18:19:43 +00:00
spider
b9c5f0cf67 Unix Shell Implementation stuff
git-svn-id: svn://10.0.0.236/trunk@1234 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 18:18:38 +00:00
michaelp
dea683c9d2 deferred creation of null pen until we actually need to use it.
git-svn-id: svn://10.0.0.236/trunk@1233 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 18:00:48 +00:00
michaelp
a7492ad3ee sped up filled polygons.
git-svn-id: svn://10.0.0.236/trunk@1232 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 17:54:14 +00:00
kipp
87a10a39d9 Support (mostly) border+padding around input form elements
git-svn-id: svn://10.0.0.236/trunk@1231 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 16:13:59 +00:00
kipp
f62d45c7d8 Fixed the dancing form-elements bug by making MoveTo properly account for the views offset from parent
git-svn-id: svn://10.0.0.236/trunk@1230 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 16:13:09 +00:00
wtc
7609a85751 Fixed Bugzilla bug #235: Define the macro _PR_HAVE_SOCKADDR_LEN to
indicate that struct sockaddr_in on BSD/OS has a sa_len field.
The code in unix.c checks this macro.  We acknowledge Bert Driehuis
<driehuis@playbeing.com> for reporting the bug and suggesting a fix.


git-svn-id: svn://10.0.0.236/trunk@1229 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 15:43:43 +00:00
rpotts
6f109ea508 Ignore the return value from NET_PollSockets(...) since it is FALSE when there are file: URLs waiting to be processed...
git-svn-id: svn://10.0.0.236/trunk@1228 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 11:01:48 +00:00
wtc
4bc4288454 Moved Rhapsody's shared library rule from rules.mk to Rhapsody.mk.
git-svn-id: svn://10.0.0.236/trunk@1227 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 07:23:49 +00:00
rickg
a0aa2749b7 WIP: push-based tokenization
git-svn-id: svn://10.0.0.236/trunk@1226 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 07:19:47 +00:00
rpotts
61e75a1a74 Fix up makefile.win to completely remove nsInputStream :-)
git-svn-id: svn://10.0.0.236/trunk@1225 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 07:04:08 +00:00
rpotts
1edf5e97a3 fixed up IStreamListener implementation to take a length in the OnDataAvailable(...) method.
git-svn-id: svn://10.0.0.236/trunk@1224 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 06:53:11 +00:00
rpotts
723cc251cb Removed nsInputStream.cpp since file and resource protocols are now handled by netlib...
git-svn-id: svn://10.0.0.236/trunk@1223 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 06:52:11 +00:00
wtc
987efb9517 Bugzilla bug #218: define HAVE_STRERROR only if it is not yet defined.
Thanks to David Nebinger (dnebinger@synertech.highmark.com) for reporting
the problem and suggesting the fix.


git-svn-id: svn://10.0.0.236/trunk@1221 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 06:38:26 +00:00
wtc
1f68fdef7a Bugzilla bug #265: Use full pathname /usr/ccs/bin/as (as opposed to just
'as') to assemble os_SunOS_ultrasparc.s because we need the -P option
of Solaris 'as' to run cpp and process header file inclusion.  This
way we won't accidentally get GNU 'as', which doesn't understand -P.
We acknowledge Paul Kanz (pkanz@conix.com) for suggesting the fix.


git-svn-id: svn://10.0.0.236/trunk@1220 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 06:29:44 +00:00
troy
bfddc50483 Work on getting floaters working again
git-svn-id: svn://10.0.0.236/trunk@1219 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 05:25:08 +00:00
troy
fb89e3aef1 Made "delete" by "remove" since delete is a reserved JavaScript keyword
git-svn-id: svn://10.0.0.236/trunk@1218 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 05:23:52 +00:00
wtc
7e8f8d4e76 On Alpha Linux, the mmap'd stack needs to be made executable because
setjmp/signal seem to put machine instructions on the stack.  This
fix is contributed by gatgul@voicenet.com (Uncle George).


git-svn-id: svn://10.0.0.236/trunk@1217 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 05:07:25 +00:00
kipp
ee8301ea61 Implemented destroy-lines
git-svn-id: svn://10.0.0.236/trunk@1212 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 03:45:29 +00:00
troy
ed7b88f4e8 Checks whether the next-in-flow should be deleted
git-svn-id: svn://10.0.0.236/trunk@1210 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 02:51:30 +00:00
wtc
5fe72e5298 The stack pointer is the 0th element in the jmp_buf.
git-svn-id: svn://10.0.0.236/trunk@1208 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 01:52:43 +00:00
michaelp
9eacf21021 hey, now the state stack is actually useful. duh.
git-svn-id: svn://10.0.0.236/trunk@1206 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 01:10:20 +00:00
kipp
d75e25fc42 Ported to new CreateFrame/CreateContinuingFrame APIs
git-svn-id: svn://10.0.0.236/trunk@1204 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 00:08:20 +00:00
kipp
99983b9346 Ported to new CreateFrame/CreateContinuingFrame APIs; removed some debris code
git-svn-id: svn://10.0.0.236/trunk@1203 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 00:06:53 +00:00
kipp
aed636929a Updated style sheet
git-svn-id: svn://10.0.0.236/trunk@1202 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 00:06:15 +00:00
kipp
9e181db532 Changed CreateContinuingFrame to take a style context argument to reduce style context creation
git-svn-id: svn://10.0.0.236/trunk@1201 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 00:05:37 +00:00
kipp
b924a98f77 Updated CreateFrame to take a style context argument to reduce style context creation
git-svn-id: svn://10.0.0.236/trunk@1200 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-07 00:05:13 +00:00
gagan
e810b91676 Add module id to object.
git-svn-id: svn://10.0.0.236/trunk@1199 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 23:24:55 +00:00
gagan
c4342a5a32 Time something using an excursion class.
git-svn-id: svn://10.0.0.236/trunk@1198 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 23:18:38 +00:00
michaelp
226d27c5ad added pens to graphics state. more performance improvements.
git-svn-id: svn://10.0.0.236/trunk@1196 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 22:50:23 +00:00
rpotts
29ece213ae renamed the nsIStreamNotification interface to nsIStreamListener
git-svn-id: svn://10.0.0.236/trunk@1195 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 22:16:02 +00:00
pinkerton
d700ab2088 use new D&D mixins in CURLDragHelper.cp/h to handle drops of url-like things. (rev/appr sdagley, for all the others too...)
git-svn-id: svn://10.0.0.236/trunk@1193 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 21:27:09 +00:00
pinkerton
565e05b5bf use new D&D mixins in CURLDragHelper.cp/h to handle drops of url-like things.
git-svn-id: svn://10.0.0.236/trunk@1192 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 21:26:21 +00:00
rpotts
559b78f09d updated to use the URL->Open(...) method for starting an async url load...
git-svn-id: svn://10.0.0.236/trunk@1191 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 21:20:04 +00:00
gagan
b949d65ee3 Progress.
git-svn-id: svn://10.0.0.236/trunk@1189 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 20:29:20 +00:00
wtc
d67c10164b Define IP_MULTICAST to get the IP multicast macro/struct definitions
in netinet/in.h on SINIX 5.43.  We acknowledge the help of Sanjay
Gupta <gupta@informix.com>.


git-svn-id: svn://10.0.0.236/trunk@1186 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 19:53:26 +00:00
robinf
1db206f872 replacing corrupted images in previews
git-svn-id: svn://10.0.0.236/trunk@1185 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 18:23:32 +00:00
troy
8d64b6f3f2 Fixed build bustage
git-svn-id: svn://10.0.0.236/trunk@1183 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 18:13:58 +00:00
ramiro
17ef3f1e2e Fix build problem reported by avogel@bdm.com (Andy Vogel). The PopupCommand
class defined in 2 different *.cpp files and was confusing thr dgux linker.
Add {Rdf,Editor} prefix to PopupCommand class to avoid ambiguity.


git-svn-id: svn://10.0.0.236/trunk@1182 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 17:49:57 +00:00
ramiro
ef8e0398bd Move the bookmark widgets to their own library. Componetize things a bit.
Should make it easier to completely bypass these widgets if needed - as
will probably be the case for lite browsers and "motifs" that break cause
of them.


git-svn-id: svn://10.0.0.236/trunk@1181 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 17:36:34 +00:00
ramiro
bafb2a76af Add .cvsignore for xfe
git-svn-id: svn://10.0.0.236/trunk@1180 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 16:46:53 +00:00
michaelp
8eaa2f652c added fonts to graphics state stack. general optimizations.
git-svn-id: svn://10.0.0.236/trunk@1179 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 16:42:05 +00:00
troy
0b3ffa2df6 Started adding ContentChanged() notifications
git-svn-id: svn://10.0.0.236/trunk@1178 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 16:28:55 +00:00
troy
c8bc0d3bcc Hooked up DOM insert/replace/delete
git-svn-id: svn://10.0.0.236/trunk@1177 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 16:27:15 +00:00
troy
2c774cd094 Hooked up insert/delete/replace
git-svn-id: svn://10.0.0.236/trunk@1176 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 16:26:06 +00:00
michaelp
bf4e5ec274 added solid brushes to graphics state.
git-svn-id: svn://10.0.0.236/trunk@1175 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-06 02:26:17 +00:00
briano
f76aa54e4a Attempt to handle the various SINIX versions (that I know of) in a cleaner way.
git-svn-id: svn://10.0.0.236/trunk@1171 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 23:58:14 +00:00
troy
22a5d2831e Frames no longet store the content index-in-parent
git-svn-id: svn://10.0.0.236/trunk@1169 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 23:56:50 +00:00
kmcclusk
a85f449dd0 Added tooltip widget and ScreenToWidget and WidgetToScreen conversion member functions
git-svn-id: svn://10.0.0.236/trunk@1168 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 23:41:16 +00:00
wtc
c76e69b986 Checked in (unfinished) Rhapsody port provided by Chris McAfee and
Chris Toshok (mcafee, toshok@netscape.com).  It is classic NSPR,
local threads only (based on setjmp/longjmp).


git-svn-id: svn://10.0.0.236/trunk@1167 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 23:28:45 +00:00
rickg
7eac5ad111 removed redundate class spec -- fixed a mac problem
git-svn-id: svn://10.0.0.236/trunk@1166 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 22:58:30 +00:00
michaelp
c8b3138e73 when selecting a bitmap into a drawing surface, we now reselect the bitmap
that used to be there when we're done.


git-svn-id: svn://10.0.0.236/trunk@1164 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 22:39:19 +00:00
mlm
e68d6633a8 - Fix for new engine - do not require tag to always be there, as sometimes
the prototype object will be passed in.


git-svn-id: svn://10.0.0.236/trunk@1163 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 22:33:10 +00:00
michaelp
96769227de API cleanup for images and drawing surfaces.
git-svn-id: svn://10.0.0.236/trunk@1161 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 22:11:50 +00:00
montulli
86dbcbf7e1 fix warning
git-svn-id: svn://10.0.0.236/trunk@1160 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 21:41:24 +00:00
montulli
5814fe706a add mkaccess to makefile fix warnings
git-svn-id: svn://10.0.0.236/trunk@1159 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 21:40:39 +00:00
pinkerton
a212449b03 fix for bug #115653 for file sharing (rev scc, appr don).
git-svn-id: svn://10.0.0.236/trunk@1158 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 21:27:12 +00:00
pinkerton
72c1a2dd70 Fix off-by-one error when adding new rows from external rdf containers. (rev scc, appr don)
git-svn-id: svn://10.0.0.236/trunk@1157 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 21:21:43 +00:00
hardts
cb80304b07 added support for MOZ_RAPTOR
git-svn-id: svn://10.0.0.236/trunk@1156 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 21:16:24 +00:00
selmer
c7623e9c1a Creating Java strings: don't include null char in length count
git-svn-id: svn://10.0.0.236/trunk@1151 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 20:35:13 +00:00
rickg
ed863f453a removed nsDefaultTokenHandler.*
git-svn-id: svn://10.0.0.236/trunk@1150 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 20:25:19 +00:00
spider
96958337e4 adding Unix Shell Makefile stuff
git-svn-id: svn://10.0.0.236/trunk@1149 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 20:17:21 +00:00
spider
82ed228fd3 Miscellaneous UNIX fixes and ISupports Interface cleanup in implementations
git-svn-id: svn://10.0.0.236/trunk@1148 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 20:16:13 +00:00
kmcclusk
ee0d950c4d *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@1147 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 19:58:27 +00:00
pinkerton
3d020afdc7 Add LO_LayingOut to fix mac build bustage (appr cyeh).
git-svn-id: svn://10.0.0.236/trunk@1144 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:56:21 +00:00
hardts
2e49d986f7 check for null to prevent crash
git-svn-id: svn://10.0.0.236/trunk@1142 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:51:19 +00:00
michaelp
ebba598484 cleaned up.
git-svn-id: svn://10.0.0.236/trunk@1140 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:34:51 +00:00
montulli
3d43abb2b2 remove annoying asserts
git-svn-id: svn://10.0.0.236/trunk@1139 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:32:09 +00:00
spider
963949d6d3 Toplevel Window and Event implementations
git-svn-id: svn://10.0.0.236/trunk@1138 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:16:25 +00:00
michaelp
5c52551637 ResizeView() now does the right thing.
git-svn-id: svn://10.0.0.236/trunk@1137 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 18:04:56 +00:00
montulli
484796bcde fix annoying asserts
git-svn-id: svn://10.0.0.236/trunk@1136 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 17:50:26 +00:00
montulli
ebdea24d4c add glhist.h to fix compile warnings
git-svn-id: svn://10.0.0.236/trunk@1135 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 17:45:41 +00:00
michaelp
8796e9dab3 before releasing the timer in the destructor, we Cancel() the timer per vidur's
suggestion.


git-svn-id: svn://10.0.0.236/trunk@1134 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 17:29:08 +00:00
nisheeth
d43383f719 Added a check in LO_RelayoutOnResize() to bail if the document is being
laid out.


git-svn-id: svn://10.0.0.236/trunk@1133 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 17:27:23 +00:00
dcone
888e657348 Composition Work 24 bit complete
git-svn-id: svn://10.0.0.236/trunk@1131 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 14:47:16 +00:00
troy
c6e290213d Work in progress for inserted incremental reflow
git-svn-id: svn://10.0.0.236/trunk@1124 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 04:47:53 +00:00
rjc
cd708b48b7 (Mac only) Appletalk changes to support changes related to RDFT-specified data sources.
git-svn-id: svn://10.0.0.236/trunk@1123 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 02:56:07 +00:00
spider
e8c0760d9b Adding toplevel trex makefile
git-svn-id: svn://10.0.0.236/trunk@1121 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 02:03:57 +00:00
cyeh
f8babf45d0 change reference to "ns" since it refers to an old source root. remove
requirement on -k gmake flag


git-svn-id: svn://10.0.0.236/trunk@1120 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 01:27:49 +00:00
racham
37acf6df7a Minor textual changes associated with set up communicator button
git-svn-id: svn://10.0.0.236/trunk@1119 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:51:35 +00:00
spider
f8555ac899 Implement some toplevel windowing functionality
git-svn-id: svn://10.0.0.236/trunk@1118 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:50:35 +00:00
gagan
0862eba745 Updated include locations.
git-svn-id: svn://10.0.0.236/trunk@1117 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:41:34 +00:00
gagan
f098d37d23 MSDev project file update.
git-svn-id: svn://10.0.0.236/trunk@1116 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:40:21 +00:00
gagan
8fd7f0162f RC file.
git-svn-id: svn://10.0.0.236/trunk@1115 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:39:07 +00:00
gagan
b23ea7975d Added the test example.
NSPR changes.


git-svn-id: svn://10.0.0.236/trunk@1114 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:37:53 +00:00
briano
c4ea4cc289 Handle different SINIX versions properly. Thanks to Sanjay Gupta (gupta@informix.com) for the suggestion.
git-svn-id: svn://10.0.0.236/trunk@1113 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-05 00:10:34 +00:00
ftang
12a7beca15 fix the broken cp125[12] to/from unicode table I check in last time...
git-svn-id: svn://10.0.0.236/trunk@1112 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 23:44:59 +00:00
rickg
d6f2b8d6cb fixed general closure case
git-svn-id: svn://10.0.0.236/trunk@1111 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 23:36:46 +00:00
scullin
a7f345f764 Added NS_ERROR_FAILURE define provided by Brian Grunkemeyer.
git-svn-id: svn://10.0.0.236/trunk@1110 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 23:30:05 +00:00
scullin
a75e8b6a75 Added tarball rules.
git-svn-id: svn://10.0.0.236/trunk@1109 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 23:24:41 +00:00
spider
d6e3184abb Adding shell as new component on toplevel. Used to be in webshell.
This stuff allows an application to implement an interface instead of
providing the standard main().


git-svn-id: svn://10.0.0.236/trunk@1108 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 23:02:06 +00:00
troy
b470bf2def Fixed my build bustage
git-svn-id: svn://10.0.0.236/trunk@1107 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 22:50:13 +00:00
timm
03f29e9d41 changed "reggie.netscape.com" to be actual IP number to remove dependency
on DNS


git-svn-id: svn://10.0.0.236/trunk@1106 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 22:41:10 +00:00
thom
49acb7a1f2 Moved general Mac defines from Comm_Headers.c to Comm_Defines.h so that raptor can include Comm_Defines.h
git-svn-id: svn://10.0.0.236/trunk@1105 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 22:31:33 +00:00
timm
367c6a4f72 move inpvw5a.htm to a different array index because it was conflicting
with the New Account path


git-svn-id: svn://10.0.0.236/trunk@1104 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 21:29:42 +00:00
troy
c94f8a9104 Implemented DOM document's createTextNode() function, and changed insertBefore()
handler to allow refChild to be null


git-svn-id: svn://10.0.0.236/trunk@1103 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 20:34:37 +00:00
troy
ea789f09b3 Fixed InsertBefore() to allow refChild to be null
git-svn-id: svn://10.0.0.236/trunk@1102 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 20:33:05 +00:00
spider
39bdbd8c87 Removing ApplicationShell interfaces from webshell. Will be moved to toplevel 'shell' in near future.
git-svn-id: svn://10.0.0.236/trunk@1100 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 19:25:58 +00:00
kmcclusk
b36f4e2193 Added support for generating tooltip events
git-svn-id: svn://10.0.0.236/trunk@1099 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 19:25:25 +00:00
troy
d14a6a735d Added ContentInserted handler
git-svn-id: svn://10.0.0.236/trunk@1098 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 18:32:12 +00:00
troy
087c280a87 Work in progress for incremental reflow (insert)
git-svn-id: svn://10.0.0.236/trunk@1097 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 17:54:45 +00:00
troy
88dd3c090e Started hooking up createElement(), and commented out some asserts that
were getting hit


git-svn-id: svn://10.0.0.236/trunk@1096 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 17:54:08 +00:00
michaelp
f9b8d8ed34 made Composite() API in ViewManager work.
git-svn-id: svn://10.0.0.236/trunk@1095 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 17:41:57 +00:00
donm
420925b89b backing out Brian O's change that broke the gromit tree.
git-svn-id: svn://10.0.0.236/trunk@1093 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 17:22:59 +00:00
mcafee
542bc2ac58 Comment about moz-export
git-svn-id: svn://10.0.0.236/trunk@1092 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-04 07:03:58 +00:00
wtc
be97fc9aaa Deleted unused macro defines and commented-out code.
git-svn-id: svn://10.0.0.236/trunk@1089 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 23:22:09 +00:00
wtc
dd57c99a8b In make_file() and parse_file_seq(), when we see a char sequence
like 'C:/', we must make sure that there is exactly one letter
before the ':', so that it is indeed a drive letter.
Without these two fixes, the following two makefiles fail.

----------- Makefile 1 -----------------
all: c:/input c:/output
c:/input c:/output:c:/%put:/tmp
	@echo $@
---------- end of Makefile 1  ----------

Without the fix to make_file(), 'c:/%put:/tmp' would be incorrectly
parsed as a single token.  But it should be parsed as two tokens:
'c:/%put' and '/tmp'.  (This is a static pattern rule.)

---------- Makefile2 ------------------
c:/foobar:/tmp
	@echo $@
-------- end of Makefile2 -------------

Without the fix to parse_file_seq(), 'c:/foobar:/tmp' would be
parsed as one token, and make would complain about missing
separator.


git-svn-id: svn://10.0.0.236/trunk@1088 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 23:05:13 +00:00
ramiro
5a82956398 add missing -lXmu on irix and solaris
git-svn-id: svn://10.0.0.236/trunk@1087 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 12:26:58 +00:00
ramiro
cd82b2ca50 comment out gcc-ism
git-svn-id: svn://10.0.0.236/trunk@1086 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 12:26:08 +00:00
ramiro
76bc3096dd Add comments describing the makefiles. Dont force the initial value of
XFE_{SHARED,STATIC}_LIBS.


git-svn-id: svn://10.0.0.236/trunk@1085 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 12:10:33 +00:00
ramiro
a9ee7f9237 move XfeWidgets tests to their own directory
git-svn-id: svn://10.0.0.236/trunk@1084 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:59:23 +00:00
ramiro
8f2f7c9e55 add XmL tests
git-svn-id: svn://10.0.0.236/trunk@1083 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:52:01 +00:00
ramiro
f79791ac77 remove ad2c from a hardcoded location
git-svn-id: svn://10.0.0.236/trunk@1082 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:49:36 +00:00
ramiro
b15cda5963 add ad2c in a shared location
git-svn-id: svn://10.0.0.236/trunk@1081 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:49:07 +00:00
ramiro
65eb7efec8 Simplify the tests Makefil. Move all the defines and rules to a shared
makefile that can be included from different dirs.  Make creating tests in
subdirectories that depend on different libraries a lot easier and cleaner.


git-svn-id: svn://10.0.0.236/trunk@1080 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:48:15 +00:00
ramiro
1c87169b99 Update for edit support.
git-svn-id: svn://10.0.0.236/trunk@1079 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 11:47:01 +00:00
ramiro
a5b53e175e Make sure the client can properly link with motif 2.1 and gnu libc2 on
linux.  Also link with libBrokenLocale.so since locale support in
motif 2.1 with GLIBC is currently broken.


git-svn-id: svn://10.0.0.236/trunk@1078 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 06:36:27 +00:00
troy
7fb32b9f33 Added ComputeDesiredRect() to share some common code between DoResizeReflow()
and IncrementalReflow()


git-svn-id: svn://10.0.0.236/trunk@1077 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 04:57:29 +00:00
troy
000dc3a44d Made sure to set previous bottom margin when restoring reflow state
git-svn-id: svn://10.0.0.236/trunk@1075 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 04:37:56 +00:00
troy
0973be9e03 Fixed a problem with mY not being updated properly for a bottom
margin


git-svn-id: svn://10.0.0.236/trunk@1074 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 04:16:13 +00:00
troy
c15cd7b12f Removed ColumnFrame from the build
git-svn-id: svn://10.0.0.236/trunk@1073 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 04:00:37 +00:00
troy
295ea0d708 Changed body to create block pseudo-frame instead of a column pseudo frame,
and hooked up the reflow appended code


git-svn-id: svn://10.0.0.236/trunk@1072 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-03 03:51:48 +00:00
gagan
7cc7463c45 removed a not used file.
git-svn-id: svn://10.0.0.236/trunk@1068 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 02:35:41 +00:00
gagan
9c5d443da8 New modular cache files.
git-svn-id: svn://10.0.0.236/trunk@1067 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 02:29:42 +00:00
rjc
04940af93b More interface support.
git-svn-id: svn://10.0.0.236/trunk@1066 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 02:18:36 +00:00
kipp
51777f1e3b Set ascent/descent information so that vertical alignment works better
git-svn-id: svn://10.0.0.236/trunk@1065 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 02:04:00 +00:00
rjc
4016c14fb8 Better fix for Guha bustage... requires a prototype addition in net.h for NET_GetQuickURL() though. Removed #include "mkutils.h" from glue.h as its a private Netlib header file.
git-svn-id: svn://10.0.0.236/trunk@1062 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 01:28:02 +00:00
hyatt
f97af63ed5 Fixing an icon positioning bug.
git-svn-id: svn://10.0.0.236/trunk@1061 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 01:02:20 +00:00
rjc
a3b19be43f Fix Guha bustage by adding a #include "mkutils.h" in glue.h, adding appropriate include path(s) to libnet, and modifying Navigator.exp to export the NET_GetQuickUrl() function.
git-svn-id: svn://10.0.0.236/trunk@1060 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 01:00:06 +00:00
kipp
2c81902303 BR's are inline and cyan (if they are rendering)
git-svn-id: svn://10.0.0.236/trunk@1059 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:56:55 +00:00
kipp
292cd327b7 Spanked nsBlockFrame: newly rewritten, broken into two pieces (see nsLineLayout.h,.cpp for the line layout code)
git-svn-id: svn://10.0.0.236/trunk@1058 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:56:24 +00:00
kipp
127f91306b Fixed default background repeat bug
git-svn-id: svn://10.0.0.236/trunk@1057 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:55:29 +00:00
kipp
58d03021d1 Stub for WillDeleteNextInFlowFrame; call it during DeleteChildNextInFlows; fixed up ReflowChild spacemanager version to not mess with the availSize when talking to a space manager cognizant child
git-svn-id: svn://10.0.0.236/trunk@1056 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:55:11 +00:00
kipp
fa7caec542 Added WillDeleteNextInFlowFrame to allow for deletion pre-processing by container frames
git-svn-id: svn://10.0.0.236/trunk@1055 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:54:12 +00:00
hyatt
baa5c03f7f Fix to ensure that radio buttons and checkboxes are drawn with the proper background color.
Reviewed by Nisheeth.


git-svn-id: svn://10.0.0.236/trunk@1054 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:43:19 +00:00
hyatt
aa3283f7ca Fix for a crashing bug when the next layout element after a radio button or checkbox
is not text.


git-svn-id: svn://10.0.0.236/trunk@1053 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:42:50 +00:00
kipp
a756b3b6a4 Updated
git-svn-id: svn://10.0.0.236/trunk@1052 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:40:25 +00:00
kipp
de1607afa2 Fixed reference to unix_date
git-svn-id: svn://10.0.0.236/trunk@1051 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:35:17 +00:00
rpotts
95be00f510 Release the URL object to keep purity happy...
git-svn-id: svn://10.0.0.236/trunk@1049 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-02 00:01:41 +00:00
radha
d76280625c Fix for bug 107058. Increase the size of the executable name holder in
fe_showConference() from 32 to 1024 so that conference can be loaded
successfully.


git-svn-id: svn://10.0.0.236/trunk@1048 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:52:12 +00:00
montulli
51868dddec move bug fix over from lib/libnet
git-svn-id: svn://10.0.0.236/trunk@1047 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:30:33 +00:00
radha
0a89ef3908 Bug fix for 83769. Add MOZILLA_HOME/lib to the list of library_paths.
git-svn-id: svn://10.0.0.236/trunk@1046 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:27:04 +00:00
montulli
0143762f77 apply fixes from older netlib directory
git-svn-id: svn://10.0.0.236/trunk@1045 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:19:50 +00:00
montulli
c5c0900bcc move extcache function to public header
git-svn-id: svn://10.0.0.236/trunk@1044 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:19:03 +00:00
karnaze
66562cc5a4 added <input type=image>, fixed bug where multiple submit buttons sent data
git-svn-id: svn://10.0.0.236/trunk@1043 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:18:44 +00:00
montulli
96c4c39f1b move memcachefunc to public header
git-svn-id: svn://10.0.0.236/trunk@1041 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:16:57 +00:00
montulli
effff2047a fix include statement
git-svn-id: svn://10.0.0.236/trunk@1040 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 23:13:28 +00:00
hyatt
d54ff49f96 Fixing the column headers so that a BG image can be mapped to them. Also making
them respond to FG and BG color parameters.


git-svn-id: svn://10.0.0.236/trunk@1038 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 22:55:07 +00:00
hyatt
a0ecf0e3f2 Making the embedded title strip 256-color friendly and fixing a bug
where it always used white as its foreground color.


git-svn-id: svn://10.0.0.236/trunk@1037 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 22:54:07 +00:00
guha
3450d2ecd5 Use the new netgeturlquick that Gagan has given us
git-svn-id: svn://10.0.0.236/trunk@1034 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 22:42:37 +00:00
kostello
4d778817c3 Cleaned up getting attribute values
git-svn-id: svn://10.0.0.236/trunk@1031 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 21:55:36 +00:00
ftang
4e44f6e2e3 Add mapping for windows-1251 fon
git-svn-id: svn://10.0.0.236/trunk@1030 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 21:41:12 +00:00
ftang
9aa414d6de Check in locale independent form select/button handling change Approvaled by XFE owner
git-svn-id: svn://10.0.0.236/trunk@1029 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 21:40:38 +00:00
kostello
30896a4b70 Made SetStyleContext take the presentation context as a parameter
git-svn-id: svn://10.0.0.236/trunk@1028 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:45:15 +00:00
kostello
36357f1dc0 Made SetStyleContext take the presentation context as a parameter
Made DidSetStyleContext virtual, since we need to override the behavior in subclasses
Moved attribute setting logic from nsTableCell to nsTableCellFrame
Table Borders are being drawn again : )
Table Padding is being displayed


git-svn-id: svn://10.0.0.236/trunk@1027 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:44:55 +00:00
kostello
7cde78d07b Made SetStyleContext take the presentation context as a parameter
Made DidSetStyleContext virtual, since we need to override the behavior in subclasses


git-svn-id: svn://10.0.0.236/trunk@1026 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:43:42 +00:00
kostello
fdf9769d8a * Made SetStyleContext take the presentation context as a parameter
* Made DidSetStyleContext virtual, since we need to override the behavior in subclasses


git-svn-id: svn://10.0.0.236/trunk@1025 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:43:02 +00:00
hyatt
d8dec8ac2b Modified version of nathan wykes' history patch.
git-svn-id: svn://10.0.0.236/trunk@1023 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:40:25 +00:00
ftang
b8ccf4eb84 Add cyrillic font auto selection for x frontend.
Thanks for Serge Orlov (sorlov@con.mcst.ru) from the net.


git-svn-id: svn://10.0.0.236/trunk@1022 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:23:44 +00:00
spider
be13abc9d8 Add more Objects to be registered for the ApplicationShell
git-svn-id: svn://10.0.0.236/trunk@1021 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 20:13:51 +00:00
srinivas
2d0a84dad9 Set up pointers to the stack-pointer/frame-pointer words in the thread's
context structure. Useful for displaying thread stacks in the debugger.


git-svn-id: svn://10.0.0.236/trunk@1020 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:47:14 +00:00
srinivas
c7bab903e6 Initialize the outermost stack frame for the thread and setup pointers to the
stack-pointer/frame-pointer words in the thread's context structure.
Useful for displaying thread stacks in the debugger.


git-svn-id: svn://10.0.0.236/trunk@1019 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:45:13 +00:00
spider
824671d01d Adding global gmake config - common config for win and unix using gmake
git-svn-id: svn://10.0.0.236/trunk@1018 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:32:41 +00:00
dbragg
b0083fce34 Corrected depth after cd-ing into signed directory
git-svn-id: svn://10.0.0.236/trunk@1017 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:31:11 +00:00
racham
08b8e55802 Last line reffering to clicking on next button to reach account setup is removed - Bug 90536
git-svn-id: svn://10.0.0.236/trunk@1016 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:03:49 +00:00
racham
bebb497e7e Hypertext references modified & newentry Comm Setup - Bug 90536
git-svn-id: svn://10.0.0.236/trunk@1015 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 19:01:26 +00:00
racham
73ac93f943 Account set Shortcut button (double arrow) suppressed
git-svn-id: svn://10.0.0.236/trunk@1014 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:59:44 +00:00
racham
461d17e5cb Navigational changes of bugs 110410, 107811, 90536
git-svn-id: svn://10.0.0.236/trunk@1013 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:58:30 +00:00
hyatt
d77b9b3e90 Tweaks.
git-svn-id: svn://10.0.0.236/trunk@1012 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:58:01 +00:00
hyatt
0e22f337a2 Patch from Jim Ewald to keep Mozilla from crashing when "About Navigator..." is selected.
git-svn-id: svn://10.0.0.236/trunk@1011 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:53:04 +00:00
hyatt
5d0689fb40 Fix for a thrown assertion when NavCenter is collapsed.
git-svn-id: svn://10.0.0.236/trunk@1010 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:52:28 +00:00
hyatt
0041bd1c5e Making the tree view 256-color friendly. Adding more customizability options. Turned the dividers
between nodes off by default.


git-svn-id: svn://10.0.0.236/trunk@1009 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 18:33:47 +00:00
chouck
b0aa9d97ba Fix for casts inside PR_FREEIF() inspired by <rkl@csc.liv.ac.uk>
git-svn-id: svn://10.0.0.236/trunk@1007 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 17:44:19 +00:00
chouck
8927813180 Minor memory leak
git-svn-id: svn://10.0.0.236/trunk@1006 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 17:41:02 +00:00
spider
f2288f5c9d Fix UNIX build bustage on some systems where tweak_nspr gets appended to TARGET after inclusion of rules.mk, thus breaking nsinstall.
git-svn-id: svn://10.0.0.236/trunk@1003 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 17:11:13 +00:00
spider
3d3f3369ec Fix UNIX breakage when tweak_nspr is appended to TARGET on some systems (like mine)
git-svn-id: svn://10.0.0.236/trunk@1001 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 17:04:22 +00:00
timm
3acc4e4c39 changes for reggie 2 step
git-svn-id: svn://10.0.0.236/trunk@1000 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:37:35 +00:00
timm
578096c81b Removed 'Cancel' from ProgressApplet, allow CPGeneratorProgress to restart
git-svn-id: svn://10.0.0.236/trunk@999 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:31:14 +00:00
timm
18598552aa Add "RegSource=APL"
git-svn-id: svn://10.0.0.236/trunk@998 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:29:56 +00:00
timm
c0a11178ba changes for reggie 2 step
git-svn-id: svn://10.0.0.236/trunk@997 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:29:17 +00:00
timm
35a5f94651 new reggie 2 step templates
git-svn-id: svn://10.0.0.236/trunk@996 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:28:13 +00:00
timm
2e42d46cc6 new files for reggie 2 step
git-svn-id: svn://10.0.0.236/trunk@995 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 10:25:21 +00:00
mccabe
5332947894 Added #if defined ( SNI ) to a few existing #if tests, for compiling
on SINIX.


git-svn-id: svn://10.0.0.236/trunk@994 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 07:06:12 +00:00
rpotts
6bf27be3b9 nsSelectionRange.h is required by nsISelection.h
git-svn-id: svn://10.0.0.236/trunk@993 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:56:08 +00:00
rpotts
82e75d2589 nslayout.h is *all* lower case
git-svn-id: svn://10.0.0.236/trunk@992 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:55:11 +00:00
rpotts
ee491f23cc fixed bustage...
git-svn-id: svn://10.0.0.236/trunk@990 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:18:07 +00:00
rpotts
0f42d7d2f9 changed to use the new nsIURL support provided by netlib...
git-svn-id: svn://10.0.0.236/trunk@989 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:07:49 +00:00
rpotts
9fe6a0963b added netlib to the include path...
git-svn-id: svn://10.0.0.236/trunk@988 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:07:25 +00:00
rpotts
46cff9faab added the netlib import library...
git-svn-id: svn://10.0.0.236/trunk@987 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 05:00:44 +00:00
rpotts
a5b0db532d Do not delete the nsIInputStream. Call Release() instead. Reference counting is important!!
git-svn-id: svn://10.0.0.236/trunk@986 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:59:28 +00:00
rpotts
780c801dcc added netlib to the include path
git-svn-id: svn://10.0.0.236/trunk@985 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:56:26 +00:00
rpotts
f89777dd1d added new module export macro NS_NET
git-svn-id: svn://10.0.0.236/trunk@984 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:55:39 +00:00
rpotts
ac18334c10 removed nsURL.cpp from the build...
git-svn-id: svn://10.0.0.236/trunk@983 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:55:01 +00:00
rpotts
61406ea472 nsIURL.h and nsURL.cpp have been moved to mozilla\lib\libnet
git-svn-id: svn://10.0.0.236/trunk@982 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:53:42 +00:00
rpotts
88e2da5f3f the base module is now required by netlib :-(
git-svn-id: svn://10.0.0.236/trunk@979 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 04:52:51 +00:00
michaelp
4d46f24a23 InsertChild() with a zindex now does the right thing.
RemoveChild() now invalidates the area where the view was.
added NS_RELEASE() cleanup.


git-svn-id: svn://10.0.0.236/trunk@975 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:15:31 +00:00
michaelp
632082625a added NS_RELEASE() cleanup.
git-svn-id: svn://10.0.0.236/trunk@974 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:14:03 +00:00
michaelp
54953fa08e fixed various shutdown and linked list management bugs.
git-svn-id: svn://10.0.0.236/trunk@973 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:13:34 +00:00
michaelp
3a92d6d01c killed erroneous comments.
git-svn-id: svn://10.0.0.236/trunk@972 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:11:47 +00:00
michaelp
6053e4f001 added additional cleanup when shutting down the websidget so that the
ViwManager will actually go away.


git-svn-id: svn://10.0.0.236/trunk@971 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:11:13 +00:00
michaelp
3ff1be94d8 added missing NS_RELEASE() after calling GetWidget().
git-svn-id: svn://10.0.0.236/trunk@970 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:09:53 +00:00
michaelp
3ba2f75f2f added missing NS_RELEASE() after getting a window in the cursor setting code.
git-svn-id: svn://10.0.0.236/trunk@969 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:09:07 +00:00
michaelp
75e204180f fixed bug in state management of clip rects.
git-svn-id: svn://10.0.0.236/trunk@968 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 03:08:08 +00:00
montulli
6099321277 fix prototype
git-svn-id: svn://10.0.0.236/trunk@967 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 02:24:39 +00:00
spider
635953eb9a Fix crash if root view is not setup properly during window creation
git-svn-id: svn://10.0.0.236/trunk@966 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 02:18:39 +00:00
briano
f8066a66f9 Eliminated the confusing and pointless OS version macros.
git-svn-id: svn://10.0.0.236/trunk@965 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 02:04:06 +00:00
briano
cc294e1bae Converted the LINUX2_0 and MKLINUX references to just LINUX, and added danda's tweak from the OS/2 branch.
git-svn-id: svn://10.0.0.236/trunk@964 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 01:54:32 +00:00
mccabe
9b313afb01 Another place where error reporting hadn't caught up to 16-bit
character strings; added a js_DeflateString call.  Thanks to gcc 2.8.1
for catching this - it complained about "char format, different type
arg (arg 4)" - which means that it looked in the (printf-style) format
string and checked type against it.  Wow.


git-svn-id: svn://10.0.0.236/trunk@963 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 01:39:51 +00:00
hyatt
4d8ca6df3a Fix for a problem with the system color changing.
git-svn-id: svn://10.0.0.236/trunk@962 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 01:26:08 +00:00
spider
a9f9424d30 Code Cleanup...
git-svn-id: svn://10.0.0.236/trunk@961 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 01:16:44 +00:00
hyatt
97e25edfcc You can now click on the vertical bars to collapse the parent node.
git-svn-id: svn://10.0.0.236/trunk@960 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 00:59:05 +00:00
scullin
1a588fe0ab Added netcache requirement.
git-svn-id: svn://10.0.0.236/trunk@959 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 00:58:36 +00:00
mccabe
eeb3cc74f2 Restoring changes that were backed out because of a one-line error in
prmjtime.c.


git-svn-id: svn://10.0.0.236/trunk@958 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 00:22:06 +00:00
montulli
97038f9345 fix proto
git-svn-id: svn://10.0.0.236/trunk@957 18797224-902f-48f8-a5cc-f745e15eee43
1998-05-01 00:04:12 +00:00
hyatt
45825818f9 Tree view can now show or hide tree connections (the bars).
git-svn-id: svn://10.0.0.236/trunk@956 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:52:37 +00:00
hyatt
736d044cd4 View now properly invalidated when colors/backgrounds/properties change.
git-svn-id: svn://10.0.0.236/trunk@955 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:52:20 +00:00
montulli
2b7baab535 Add unix makefiles and make a few include file tweaks for unix compilation
git-svn-id: svn://10.0.0.236/trunk@953 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:52:15 +00:00
hyatt
87eaefd3ce Fixed a bug where the navbar was using the tree view's bg image rather than
its own.


git-svn-id: svn://10.0.0.236/trunk@952 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:51:59 +00:00
hyatt
7d36db57e4 Patch from Sam Keeny on the net which fixes kiosk mode.
git-svn-id: svn://10.0.0.236/trunk@951 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:51:29 +00:00
montulli
c9c3400e81 fix layout .> lay
git-svn-id: svn://10.0.0.236/trunk@948 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:45:52 +00:00
montulli
e4b21d25b7 fix makefile
git-svn-id: svn://10.0.0.236/trunk@947 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:44:45 +00:00
kipp
ba7de39efe new
git-svn-id: svn://10.0.0.236/trunk@946 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:32:32 +00:00
montulli
3196bd8a06 make layout module name be lay instead of layout to be compatible with unix
git-svn-id: svn://10.0.0.236/trunk@945 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 23:30:20 +00:00
hyatt
25acb7bb52 Improvements to the tree control.
(1) Fixed inline editing so that the text field is properly cleared
	(2) Fixed marquee selection so that the first item is selected
	(3) Added the ability to customize column header colors and to
	customize the tree colors.  Can load a background image as well.
	(4) Added dividers
	(5) Removed the bitmap dependency when drawing lines and triggers.
	(6) Changed the way sorting looks.


git-svn-id: svn://10.0.0.236/trunk@944 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:15:42 +00:00
gagan
f2a00a0985 Added NET_GetURLQuick, for retrieving objects from cache before updating
them from the server. Use with caution, possibility of stale objects. See
bug #114363.


git-svn-id: svn://10.0.0.236/trunk@943 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:14:29 +00:00
hyatt
9241e5aa90 Fix for a memory trashing bug that occurred whenever the URL column was shown
in Aurora.  (Symptom was a damaged block on exit.)


git-svn-id: svn://10.0.0.236/trunk@942 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:13:55 +00:00
hyatt
6f53c14cb8 Changes to the outliner base class to cut down resource usage. (Bitmaps don't
have to be loaded by a derived class that knows how to draw its triggers.)


git-svn-id: svn://10.0.0.236/trunk@941 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:13:23 +00:00
hyatt
2304f2a909 Tweaks to get Aurora working with Composer.
git-svn-id: svn://10.0.0.236/trunk@940 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:12:40 +00:00
hyatt
869a60505e Removed the embedded button menu. Added the ability to customize the title bar's
appearance.


git-svn-id: svn://10.0.0.236/trunk@939 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:12:15 +00:00
hyatt
bf7202af7d Fixes to the way custom icons are handled in Aurora.
git-svn-id: svn://10.0.0.236/trunk@938 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:11:34 +00:00
hyatt
14134ff171 Fix for Bug #107284, need to monitor when the animation starts and stops.
git-svn-id: svn://10.0.0.236/trunk@937 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:10:33 +00:00
hyatt
488c5f3343 Fix for Bug#107284, need to monitor when the animation starts and stops.
git-svn-id: svn://10.0.0.236/trunk@936 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:09:21 +00:00
hyatt
2a18679c20 Enabling Aurora in composer.
git-svn-id: svn://10.0.0.236/trunk@934 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:08:44 +00:00
rickg
1beed254e9 minor improvement to backward propagation code
git-svn-id: svn://10.0.0.236/trunk@933 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 22:06:16 +00:00
montulli
b515fc55dd Add netlib in new location.
This is a (mostly) unmodified version of lib/libnet
broken up into functional areas
It should be binary compatible with the lib created by lib/libnet
but is now 10 libs.
The only substantial things changed in the version is the include files


git-svn-id: svn://10.0.0.236/trunk@931 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 20:53:59 +00:00
montulli
c1da74a63a export style header files
git-svn-id: svn://10.0.0.236/trunk@930 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 20:35:16 +00:00
montulli
e26c0b8b5c export layout.h into layout public include directory
git-svn-id: svn://10.0.0.236/trunk@929 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 20:33:35 +00:00
rickg
1253f68df0 got newlines working much better; Kipp still won't be happy, but the, he never is.
git-svn-id: svn://10.0.0.236/trunk@928 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 20:23:07 +00:00
wtc
e9b6d10641 Recognize SINIX-Y, the high-end version of SINIX.
(Patch provided by Sanjay Gupta <gupta@informix.com>.)


git-svn-id: svn://10.0.0.236/trunk@927 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 20:07:51 +00:00
peterl
7f15ff1ab6 update to new value class api
git-svn-id: svn://10.0.0.236/trunk@926 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:57:36 +00:00
peterl
4d90cd509c added new unit types, cleaned up api
git-svn-id: svn://10.0.0.236/trunk@925 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:56:39 +00:00
peterl
f102a97623 updated to new value class api
git-svn-id: svn://10.0.0.236/trunk@924 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:55:51 +00:00
peterl
9de9eff153 removed include
git-svn-id: svn://10.0.0.236/trunk@923 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:53:05 +00:00
peterl
3a74004725 changed api, added new units
git-svn-id: svn://10.0.0.236/trunk@922 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:52:46 +00:00
peterl
02e53b2bb5 changed to nsStylePosition to use nsStyleCoord
git-svn-id: svn://10.0.0.236/trunk@921 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:52:26 +00:00
peterl
c7ab938a26 removed style position value, added cursor auto
git-svn-id: svn://10.0.0.236/trunk@920 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:51:52 +00:00
peterl
7ff699f97c updated api, added new units
git-svn-id: svn://10.0.0.236/trunk@919 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:50:36 +00:00
peterl
e7ae6a57ec changed nsStypePosition to use nsStyleCoord
git-svn-id: svn://10.0.0.236/trunk@918 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:50:18 +00:00
wtc
9858b6150a Various makefile cleanups. On SCO OpenServer, the value of OS_ARCH
is now 'SCOOS' instead of 'SCO_SV'.  Also, we just use the cpp macro 'SCO'
and deleted the macro 'SCO_SV'.
In pr/src/md/unix/Makefile, we do not assemble the ultrasparc assembly
file if we are compiling with gcc.


git-svn-id: svn://10.0.0.236/trunk@917 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:36:53 +00:00
rods
e8df85316f initial
git-svn-id: svn://10.0.0.236/trunk@916 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 19:15:05 +00:00
rods
a31617a2db added selection classes to makefiles and added the selection object and methods to nsDocument and nsIDocument
git-svn-id: svn://10.0.0.236/trunk@913 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 18:21:59 +00:00
buster
10cf7de2c3 fixed method names
git-svn-id: svn://10.0.0.236/trunk@912 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 18:04:16 +00:00
buster
3a3e869ea0 added nsITableLayoutStrategy as the interface for objects that manage
table column balancing.  Implemented in BasicTableLayoutStrategy (HTML4-spec).
nsTableFrame instantiates a strategy depending on the compatibility mode.


git-svn-id: svn://10.0.0.236/trunk@911 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 17:57:09 +00:00
rpotts
68ec6fbca1 moved the include of windows.h inside of an XP_PC ifdef...
git-svn-id: svn://10.0.0.236/trunk@910 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 17:52:15 +00:00
spider
929d758f31 Fix UNIX build bustage
git-svn-id: svn://10.0.0.236/trunk@909 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 16:40:38 +00:00
rods
83895f1ffd turned off selection
git-svn-id: svn://10.0.0.236/trunk@908 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 16:13:01 +00:00
buster
ea4ac0c312 fixed a rounding error, and made tables quiet
git-svn-id: svn://10.0.0.236/trunk@907 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 15:20:23 +00:00
buster
130cc8acf5 at Peters request, I added NS_INT_PIXELS_TO_TWIPS and NS_FLOAT_PIXELS_TO_TWIPS
git-svn-id: svn://10.0.0.236/trunk@906 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 15:11:33 +00:00
hshaw
d15d7a4b72 Back out changes which are breaking builds (at request of mccabe)
git-svn-id: svn://10.0.0.236/trunk@903 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 08:18:42 +00:00
hshaw
db8e901896 Back out changes which are breaking builds (at request of mccabe)
git-svn-id: svn://10.0.0.236/trunk@902 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 08:10:05 +00:00
rickg
ce4b76d61a huge improvements to parser
git-svn-id: svn://10.0.0.236/trunk@901 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 05:56:39 +00:00
rickg
d7a05d60d4 minor tweak to iterator
git-svn-id: svn://10.0.0.236/trunk@900 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 05:55:51 +00:00
warren
4300ed4358 Changes should have been on the branch -- reverted.
git-svn-id: svn://10.0.0.236/trunk@898 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 05:28:19 +00:00
warren
a7bc3044d8 Changes to build with MOZ_OJI (and not MOZ_JAVA).
git-svn-id: svn://10.0.0.236/trunk@897 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 04:27:29 +00:00
mccabe
4747d02fa9 Changed pr[mj]time.c to just return 0 for failure in FormatTime, and
changed jsdate.c to detect failure and default to using toString in
place of toLocaleString whenever FormatTime fails.


git-svn-id: svn://10.0.0.236/trunk@895 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 03:51:26 +00:00
montulli
177e6468b9 fix extension labels
Thanks to: Paul Chek <pchek@ziplink.net> for the fix


git-svn-id: svn://10.0.0.236/trunk@894 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 02:54:34 +00:00
michaelp
228526d605 minor tweaks to UpdateView() in view manager. if you want to invalidate a whole
view, pass in nsnull for the nsRegion param.
viewmanager InsertChild() above/below now does the right thing.
fixed cujo's table thingie.


git-svn-id: svn://10.0.0.236/trunk@893 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 02:41:14 +00:00
sar
d271dff890 Taking out the stuff not relevant to the public tree...
All references to MOZ_JAVAVER deleted (java is included in the MozillaProductWin module)
The other branch tag references have been deleted (dbm is pulled as part of the module, security
    and coreconf have no relevance in the public tree)
pull_all is only defined as pull_client_source_product (ifdef for MOZ_MEDIUM was removed)
pull_security and pull_client were removed
build_ldap was removed


git-svn-id: svn://10.0.0.236/trunk@892 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 02:16:43 +00:00
gagan
dd67cf36ef Fixed the authentication bug #114532 which resulted in an incorrect entry
in the authentication list.


git-svn-id: svn://10.0.0.236/trunk@891 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 01:55:10 +00:00
ramiro
9310bbbb06 Add an extra sanity check on the children argument.
git-svn-id: svn://10.0.0.236/trunk@890 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 01:48:30 +00:00
gagan
c093c6c84e Corrected a misspelled #include. Thanks Sanjay Gupta (gupta@informix.com)
git-svn-id: svn://10.0.0.236/trunk@889 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 01:47:21 +00:00
ramiro
45e962ceae Fix crash on startup in mozilla Personal Toolbar. Make the recursive
children killing function more robust.


git-svn-id: svn://10.0.0.236/trunk@888 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 01:39:28 +00:00
buster
4744264a52 lots of pre-conditions and asserts added
fixed a bug in layout having to do with sizing cells in columns that are spanned into


git-svn-id: svn://10.0.0.236/trunk@887 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:27:59 +00:00
mccabe
246b37fa96 Fixes for getting the timezone string fot toString, and for asking for
a localized string from the os for toLocaleString.  The time struct
used to interface to the os time-formatting functions only takes a
16-bit year, so we map to an equivalent year (for getting the timezone
string) or clamp for years outside that range.


git-svn-id: svn://10.0.0.236/trunk@886 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:27:43 +00:00
mccabe
e6a6db8cd7 Removed some unused constants.
git-svn-id: svn://10.0.0.236/trunk@885 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:14:07 +00:00
mccabe
1912e0d8e7 Removed some unused lines related to jsdate.c.
git-svn-id: svn://10.0.0.236/trunk@884 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:11:31 +00:00
ftang
67b6544f6f Fix uTable change suggestion from qupta@informix.com (forwarded by
Wan-Teh Chang)


git-svn-id: svn://10.0.0.236/trunk@883 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-30 00:02:20 +00:00
michaelp
02194e7102 Arghh ....
git-svn-id: svn://10.0.0.236/trunk@882 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:57:32 +00:00
mccabe
6a0e192f5f ECMA-conformance fix to (95045) - added 'enum' and 'debugger' as
reserved words, and changed the versioning check that previously
applied to 'export' to accept any 'ecma' version... which means that
export becomes a keyword for the default version.  Does this mean
we'll need to unreserve all the java keywords?  Not sure we want to do
that...


git-svn-id: svn://10.0.0.236/trunk@881 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:57:20 +00:00
mccabe
6c9a40d28d Fixed error message associated with trying to use a keyword as an
identifier; it was only printing the first character of the
identifier, because it expected 8-bit chars, and was being called with
a 16-bit representation of the offending keyword.


git-svn-id: svn://10.0.0.236/trunk@880 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:52:40 +00:00
spider
33154649fc Fix yet another build bustage by maio ... windows.h was removed somewhere....
git-svn-id: svn://10.0.0.236/trunk@879 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:49:38 +00:00
spider
2d279ab608 Fix build bustage of non-existent header file
git-svn-id: svn://10.0.0.236/trunk@878 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 23:23:40 +00:00
spider
8b28e5c284 Modifications to support new nsIApplicationShell interface
git-svn-id: svn://10.0.0.236/trunk@877 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 22:43:33 +00:00
peterl
db7ba47330 removed unneeded destructors
cleaned up some initial values


git-svn-id: svn://10.0.0.236/trunk@876 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 21:06:15 +00:00
peterl
b0cae37787 added normal value
git-svn-id: svn://10.0.0.236/trunk@875 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 21:05:28 +00:00
peterl
e0d215699f removed unneeded destructors
git-svn-id: svn://10.0.0.236/trunk@874 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 21:04:57 +00:00
rpotts
8b6c6d6ca6 added windows.h since NSPR no longer includes it...
git-svn-id: svn://10.0.0.236/trunk@873 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 20:47:18 +00:00
dcone
308ff813eb Updated nsImageWin and gfx bit test for composite functionality
git-svn-id: svn://10.0.0.236/trunk@872 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 20:28:16 +00:00
rpotts
b174335bfa removed eval(PRBool,...) function since it clashes with the eval(PRInt32,...) version
git-svn-id: svn://10.0.0.236/trunk@871 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 20:10:16 +00:00
rpotts
5c411b7d88 added include of string.h since NSPR no longer includes windows.h which pulled it in...
git-svn-id: svn://10.0.0.236/trunk@870 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 20:04:28 +00:00
rpotts
9650c7aa2b Added windows.h since NSPR no longer includes it...
git-svn-id: svn://10.0.0.236/trunk@869 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 20:01:24 +00:00
kmcclusk
27415284fe Added events for left and right mouse button double clicks
git-svn-id: svn://10.0.0.236/trunk@868 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 19:59:06 +00:00
rpotts
d1ddb05cac added windows.h since it is no longer provided by NSPR
git-svn-id: svn://10.0.0.236/trunk@867 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 19:57:57 +00:00
rpotts
6c30425beb PRBool is now a PRIntn which caused conflicts between member functions mangled on PRInt32 vs PRBool. To fix the build I removed the PRBool versions...
git-svn-id: svn://10.0.0.236/trunk@866 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 19:52:45 +00:00
rpotts
67a5df01f5 added include of windows.h since NSPR no longer pulls it in...
git-svn-id: svn://10.0.0.236/trunk@865 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 19:37:33 +00:00
rpotts
a2f6cdb246 added #include windows.h since NSPR no longer includes it...
git-svn-id: svn://10.0.0.236/trunk@862 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 19:25:27 +00:00
kostello
e8e9dbc69b Fixed Unix Build Error -- nsCoord.h must be case sensitive
git-svn-id: svn://10.0.0.236/trunk@858 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 18:39:30 +00:00
guha
df4c7e0fc5 Remove some files from CVS
(the old xml parser was confusing a lot of people
even though it wasn't being used.)


git-svn-id: svn://10.0.0.236/trunk@855 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 18:00:31 +00:00
karnaze
209c861a0e ifdefed MapAttributesInto
git-svn-id: svn://10.0.0.236/trunk@853 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 17:27:44 +00:00
karnaze
0a07a4bf82 ifdefed style sizing code
git-svn-id: svn://10.0.0.236/trunk@852 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 17:14:24 +00:00
rods
f71616b8fa initial check in
git-svn-id: svn://10.0.0.236/trunk@851 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 17:08:57 +00:00
karnaze
7fe4b14c5d minor cleanup, reinstate css sizing.
git-svn-id: svn://10.0.0.236/trunk@850 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 16:30:55 +00:00
ramiro
9d1d9fed95 The reallyUpdateRoot() call seems to be crashing the browser for some people.
I cannot reproduce the problem yet.  Im working on finding a real solution,
but I dont want the browser to crash on startup on the next mozilla release,
so im commenting it out.


git-svn-id: svn://10.0.0.236/trunk@849 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 14:45:52 +00:00
ramiro
7a0330fe5f Dont update the menu accent if the widget is dead. Fixes core dump in
Mozilla that occurs on filing of bookmarks.


git-svn-id: svn://10.0.0.236/trunk@848 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 11:14:05 +00:00
nisheeth
05287d1e22 - Added #ifdef DOM to layout.h
- Backing out some changes in layout.c that should not have gotten checked in...


git-svn-id: svn://10.0.0.236/trunk@847 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 10:47:20 +00:00
nisheeth
e3b2621102 Added lm_trans.c to Unix makefile...
git-svn-id: svn://10.0.0.236/trunk@846 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 10:45:43 +00:00
nisheeth
a42fcb9ca8 Added layspan.c in mozilla/lib/layout, lm_span.c and lm_trans.c in mozilla/lib/libmocha.
git-svn-id: svn://10.0.0.236/trunk@845 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 10:20:16 +00:00
nisheeth
5db071e76e Touchdown of MARINER_DOM_BRANCH.
git-svn-id: svn://10.0.0.236/trunk@841 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 10:13:27 +00:00
nisheeth
c4bd436721 Touchdown of MARINER_DOM_BRANCH...
git-svn-id: svn://10.0.0.236/trunk@840 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 10:08:50 +00:00
nisheeth
7960424738 Warning fixes. Thanks to Rick Osborne (rick@spacey.net).
git-svn-id: svn://10.0.0.236/trunk@839 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 08:41:05 +00:00
nisheeth
010ada78cf Warning fix. Thanks to tenthumbs@cybernex.net.
git-svn-id: svn://10.0.0.236/trunk@838 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 08:39:56 +00:00
jsw
ad8a2bf568 get the damn function name right
git-svn-id: svn://10.0.0.236/trunk@837 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 08:38:27 +00:00
nisheeth
4dc19bf8d2 Added access path for jscompat.h
git-svn-id: svn://10.0.0.236/trunk@835 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 08:05:20 +00:00
nisheeth
30f99a45f9 Added export of CL_CompositeNow, CL_GetCompositorOffscreenDrawing, CL_SetCompositorOffscreenDrawing and CL_UpdateDocumentRect for XML changes.
git-svn-id: svn://10.0.0.236/trunk@833 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 07:50:37 +00:00
toshok
2ed0b8e3af REQUIRE js
git-svn-id: svn://10.0.0.236/trunk@832 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 07:09:33 +00:00
ftang
02d2f8e308 fix CP1251 viewing problem by using 8859_5 font. We may need to
add better support (decide which font to use  in the init time instead of
compile time) in the future.


git-svn-id: svn://10.0.0.236/trunk@831 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 06:09:25 +00:00
mccabe
85c8006a9f Added some #ifdef JAVA guards to remove compile warnings.
Thanks go to rick@spacey.net (Rick Osborne) for finding these.


git-svn-id: svn://10.0.0.236/trunk@828 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 02:39:43 +00:00
michaelp
c7fe1544fe more cliprect api changes...
git-svn-id: svn://10.0.0.236/trunk@827 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 02:24:07 +00:00
wtc
705b2825f3 Added alpha and x86 binaries and the README file to
buildtools/windows/bin.


git-svn-id: svn://10.0.0.236/trunk@825 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 01:35:56 +00:00
troy
a10eab0307 Changed space manager to return a list of available and unavailable trapezoids
git-svn-id: svn://10.0.0.236/trunk@821 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:58:16 +00:00
pinkerton
241c685bdb also send the bookmark drag flavor so that other applications (dragThing, etc) can get both the url and the title (rev sdagley, appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@820 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:57:11 +00:00
pinkerton
bdde74a642 remove the comment about how we're going to pull the bookmark drag flavor, since we're not. (rev sdagley, appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@819 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:56:31 +00:00
ftang
2b7a3e4a9a Check in additional KOI8-R font registry name. Thanks for
sorlov@con.mcst.ru
from the net


git-svn-id: svn://10.0.0.236/trunk@818 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:56:23 +00:00
ftang
c208a630a8 fix ISO8859-5,7,9 KOI8-R Name entity problem
git-svn-id: svn://10.0.0.236/trunk@813 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:36:25 +00:00
wtc
718a40bb0a ReliantUNIX is renamed SINIX.
git-svn-id: svn://10.0.0.236/trunk@811 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-29 00:08:32 +00:00
peterl
9bd123cf4d changed nsStyleText to use nsStyleCoord
git-svn-id: svn://10.0.0.236/trunk@810 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 23:57:01 +00:00
peterl
60016b76aa removed inheritance from style mapping
changed nsStyleText to use nsStyleCoord


git-svn-id: svn://10.0.0.236/trunk@809 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 23:56:28 +00:00
wtc
8d1bc32fbe Got rid of the LINUX1_2 and LINUX2_0 macros. I hope that this will
make building on 2.1.x easier.  In case we need to distinguish between
different versions of Linux, we will try to use feature-based macros
as opposed to version-based macros.
Files changed: Linux.mk, _linux.h, _pth.h, prnetdb.c, and ptthread.c.


git-svn-id: svn://10.0.0.236/trunk@808 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 23:54:29 +00:00
peterl
0645caeec0 added nsStyleCoord
git-svn-id: svn://10.0.0.236/trunk@807 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 23:54:06 +00:00
peterl
0a122c5b8d added subclass hook for style post-processing
git-svn-id: svn://10.0.0.236/trunk@806 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 23:25:07 +00:00
kostello
ac5c637ccd Call to RecalcLayoutData
git-svn-id: svn://10.0.0.236/trunk@805 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:44:05 +00:00
wtc
54f4d85fe1 Merged NSPRPUB_19980421_BRANCH to the main trunk.
git-svn-id: svn://10.0.0.236/trunk@803 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:43:48 +00:00
kostello
c14bf79c47 Updated table to process cellpadding, cellspacing and background color
attributes


git-svn-id: svn://10.0.0.236/trunk@802 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:43:19 +00:00
kostello
d534119b9b Name changed from ResetColumnLayoutData to RecalcColumnLayoutData
git-svn-id: svn://10.0.0.236/trunk@801 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:41:25 +00:00
kostello
5c08b8b7ff Added SetTableForChildren to set the children's table instance variable
git-svn-id: svn://10.0.0.236/trunk@800 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:40:22 +00:00
kostello
0d5d1cb20d Added MapHTMLBorderStyle, MapBorderMarginPaddingInto
git-svn-id: svn://10.0.0.236/trunk@799 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:34:16 +00:00
sdagley
9eb50e034c Added files needed for nisheeth (layprobe.c) and brade (editor.r)
git-svn-id: svn://10.0.0.236/trunk@798 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 22:10:41 +00:00
rjc
02bc22984a Workspace interface customization support.
git-svn-id: svn://10.0.0.236/trunk@797 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 21:51:48 +00:00
nisheeth
1b734a3e51 Added layprobe.c to ns/lib/layout.
git-svn-id: svn://10.0.0.236/trunk@796 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 21:43:22 +00:00
nisheeth
ecabf21450 Adding stubs for the Layout Probe API.
git-svn-id: svn://10.0.0.236/trunk@794 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 21:41:20 +00:00
slamm
1a4fd9ef7d Fix shutdown bug. Set NavCenter to really close, not just hide. This fixes the problem where you are unable to exit after opening NavCenter.
git-svn-id: svn://10.0.0.236/trunk@791 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 21:04:36 +00:00
pinkerton
2f7304b5ed Doh! I removed the wrong icons last time (I removed hilighted instead of selected). Put the right ones back in and take the wrong ones out. (appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@790 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 20:59:06 +00:00
slamm
f65d505ecc Add a few more EDITOR ifdefs
git-svn-id: svn://10.0.0.236/trunk@789 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 20:59:01 +00:00
troy
31fd94622e Added an XXX to CreateFrame() as a reminder that we're resolving the
style context more than once...


git-svn-id: svn://10.0.0.236/trunk@788 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 20:58:46 +00:00
pinkerton
64f42dadfe Fix 2 problems: cells with no data no longer show garbage as tooltip. Cells with separator no longer show tooltip. (rev sdagley, appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@787 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 20:54:44 +00:00
kmcclusk
533b497a4d Fixed textwidget refresh problem.
Added AutoErase method to nsWindow.cpp, nsTextHelper.cpp and nsListBox.cpp


git-svn-id: svn://10.0.0.236/trunk@785 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 19:24:52 +00:00
michaelp
c7d6535311 changed clipping apis so that they take parameters in the same form that
clipping is expressed in layer tags and css-p.
added support for setting transforms in layers (untested and very likely
problematic if scales are applied).
changed event handling and painting apis in views to support inherited
visibility.
all parameters passed into view.Init() are now properly stored in the view.
view opacity apis are now real.


git-svn-id: svn://10.0.0.236/trunk@784 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 19:16:24 +00:00
karnaze
1096b080eb fix submit crash in nsWindow; more form control functionality
git-svn-id: svn://10.0.0.236/trunk@780 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 18:59:38 +00:00
donm
27e88123d1 removing Henrit's jsfile.c and jsfile.h to fix unix build bustage.
git-svn-id: svn://10.0.0.236/trunk@776 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 18:00:54 +00:00
donm
0a9b29052c backing out Henrit's changes to fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@775 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 18:00:00 +00:00
sar
55674ea59e jsfile doesn't compile on unix. Backing out the changes that henrit put it
git-svn-id: svn://10.0.0.236/trunk@773 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 17:57:43 +00:00
sar
1ca149714f reapply henrit's change since we can add it to unix as well.
git-svn-id: svn://10.0.0.236/trunk@771 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 17:23:08 +00:00
donm
d65fb3806c fixing unix build bustage.
git-svn-id: svn://10.0.0.236/trunk@770 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 17:19:14 +00:00
sar
6b83a1438a backing out henrit's changes
git-svn-id: svn://10.0.0.236/trunk@769 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 17:02:22 +00:00
kipp
5e19847a05 Correctly compute width of body frame
git-svn-id: svn://10.0.0.236/trunk@768 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 16:12:54 +00:00
kipp
9c8261c5cf Allow for optional commas between clip rect elements
git-svn-id: svn://10.0.0.236/trunk@767 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 15:24:44 +00:00
kipp
c1f559e678 updated
git-svn-id: svn://10.0.0.236/trunk@766 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 15:24:20 +00:00
henrit
71ce3e732d Adding a first version of the js File object. Developped and (slightly) tested on win32 only.
git-svn-id: svn://10.0.0.236/trunk@765 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 11:36:17 +00:00
jsw
254ef44dce take a wild assed guess at fixing the build
git-svn-id: svn://10.0.0.236/trunk@755 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 09:09:49 +00:00
jsw
41ebd3a6c6 get the name right
git-svn-id: svn://10.0.0.236/trunk@754 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 07:54:14 +00:00
jsw
e9dc89c86a get type correct for socket
git-svn-id: svn://10.0.0.236/trunk@749 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 07:53:25 +00:00
jsw
4e0b870651 move xp_sec to secnav
git-svn-id: svn://10.0.0.236/trunk@748 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 07:48:02 +00:00
mccabe
83d55f638a Added public license header.
git-svn-id: svn://10.0.0.236/trunk@747 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 07:33:09 +00:00
mccabe
a9f37501c2 Propagated some #defines to work with irix 6.3 as well as 6.2.
(HAVE_ALIGNED_DOUBLES)


git-svn-id: svn://10.0.0.236/trunk@746 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 06:35:55 +00:00
mccabe
734ff77d30 Corrected BUILD_OPT oversight where a = instead of a += override the
OPTIMIZER flag in the included config/*.mk file.


git-svn-id: svn://10.0.0.236/trunk@745 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 06:06:09 +00:00
atotic
8f08a459c3 Fixing the -ko flag
git-svn-id: svn://10.0.0.236/trunk@744 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:44:39 +00:00
atotic
fb18d0de3b Fixing the -ko flag
git-svn-id: svn://10.0.0.236/trunk@743 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:23:29 +00:00
atotic
7f02c6b2dc Fixing the -ko flag
git-svn-id: svn://10.0.0.236/trunk@742 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:17:41 +00:00
jsw
02e32f5307 remove xp_md5 and xp_sec
git-svn-id: svn://10.0.0.236/trunk@740 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:17:37 +00:00
jsw
6e09423583 opaque sec info
git-svn-id: svn://10.0.0.236/trunk@739 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:16:06 +00:00
jsw
e9e8e3bfd6 opaque sec info
proxy tunnel changes


git-svn-id: svn://10.0.0.236/trunk@738 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:15:16 +00:00
jsw
52d4826009 move xp_sec to secnav
git-svn-id: svn://10.0.0.236/trunk@737 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:13:41 +00:00
sudu
2aa827f81a Changed libjar to refer to dist
git-svn-id: svn://10.0.0.236/trunk@736 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:09:18 +00:00
sudu
2f1674a804 Build freenav only when NO_SECURITY is set
git-svn-id: svn://10.0.0.236/trunk@735 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:09:15 +00:00
sudu
835f36be2c Cleaned up NO_SECURITY builds and removed references into product area
git-svn-id: svn://10.0.0.236/trunk@734 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 05:09:11 +00:00
atotic
570baa3b07 Fixing the -ko flag
git-svn-id: svn://10.0.0.236/trunk@733 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 04:59:01 +00:00
atotic
3461c2d197 Fixed the rcs flag to -kb
git-svn-id: svn://10.0.0.236/trunk@732 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 04:39:29 +00:00
troy
2e880e58d9 Added mClip and mClipFlags to nsStylePosition
git-svn-id: svn://10.0.0.236/trunk@730 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 03:21:18 +00:00
michaelp
5173d3062e added back code that i killed in the previous checkin, but now it works.
git-svn-id: svn://10.0.0.236/trunk@729 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 02:05:46 +00:00
mccabe
c9d08d5bba Added disambiguating braces to appease gcc 2.8.1 warning.
git-svn-id: svn://10.0.0.236/trunk@728 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 01:22:19 +00:00
ramiro
a42db46a75 Unhardcode the motif lib on x86 linux. Replace /usr/X11R6/lib/libXm.a
with -L/usr/X11R6/lib -lXm.


git-svn-id: svn://10.0.0.236/trunk@727 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 01:22:18 +00:00
rjc
e7285013df Better "autoOpen" support.
git-svn-id: svn://10.0.0.236/trunk@726 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 01:15:49 +00:00
michaelp
c0821d3557 fixed bug i just introduced (by removing code i just added)!
git-svn-id: svn://10.0.0.236/trunk@725 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 01:00:00 +00:00
michaelp
da59bfa4f4 if a view does not have a clip, then we set the clip in the rc to
the bounds for the view.


git-svn-id: svn://10.0.0.236/trunk@724 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 00:42:58 +00:00
ramiro
48ea685689 Add void to baggage prototypes. Fix from derkjan@reli.student.utwente.nl
(Derkjan de Haan) to make mozilla build with egcs.


git-svn-id: svn://10.0.0.236/trunk@723 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-28 00:28:04 +00:00
michaelp
e0f3643ffe added support for setting clip rects in views.
removed paint_all_kids().
damage rect passed to frames is now properly translated into
coord space of containing view.


git-svn-id: svn://10.0.0.236/trunk@721 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 23:51:57 +00:00
buster
a762e593b2 sped up nsBlockFrame significantly by reducing the number of times we resolve style by almost 50% on initial layout
(percentage savings go way up as the window is resized)


git-svn-id: svn://10.0.0.236/trunk@720 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 22:33:55 +00:00
hshaw
d7a904b7dd Update XFEPRIVDIR to point to ns instead of ns_priv
git-svn-id: svn://10.0.0.236/trunk@719 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:34:30 +00:00
kipp
2344c29ea1 Use PERCENT instead of PCT in style constants; udpated usage of vertical alignment information in nsStyleText
git-svn-id: svn://10.0.0.236/trunk@717 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:26:48 +00:00
kipp
80f69fc4e8 Implement all of the text styles; update to use PERCENT in naming of style constants
git-svn-id: svn://10.0.0.236/trunk@716 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:26:06 +00:00
kipp
1098ed5ee8 Use PERCENT instead of PCT in style constants; implement vertial alignment for length values and percent values
git-svn-id: svn://10.0.0.236/trunk@715 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:24:33 +00:00
kipp
b4ea1954f0 Normalize structure member names
git-svn-id: svn://10.0.0.236/trunk@714 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:24:06 +00:00
kipp
4ebc780037 Use PERCENT style constants instead of PCT
git-svn-id: svn://10.0.0.236/trunk@713 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:22:06 +00:00
kipp
0d60b06b51 Init nsStyleText values using new nsStyleValue
git-svn-id: svn://10.0.0.236/trunk@712 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:21:42 +00:00
scullin
845c8cb874 Post mozilla move raptor.mk
git-svn-id: svn://10.0.0.236/trunk@711 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:20:46 +00:00
kipp
57a438ad02 Cleaned up percent names
git-svn-id: svn://10.0.0.236/trunk@710 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:20:24 +00:00
kipp
81bd8188cf Added nsStyleValue and then updated nsStyleText to use it
git-svn-id: svn://10.0.0.236/trunk@709 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 21:19:45 +00:00
cyeh
a8c8d2732c change top-level module to MozillaSource (remove "Product" from name)
git-svn-id: svn://10.0.0.236/trunk@708 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 20:45:13 +00:00
sar
8c37edda44 making the switch ns->mozilla for dir name
git-svn-id: svn://10.0.0.236/trunk@704 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 19:21:40 +00:00
hshaw
a1b7899688 Add jar to REQUIRES and remove references to lm_crypt.c and lm_pk11.c for security build cleanup
git-svn-id: svn://10.0.0.236/trunk@703 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 19:07:29 +00:00
cyeh
7f04c6580f missed this preflight check
git-svn-id: svn://10.0.0.236/trunk@702 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 18:16:04 +00:00
cyeh
277c009e37 change to new module to pull source with root of "mozilla"
git-svn-id: svn://10.0.0.236/trunk@701 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 18:09:13 +00:00
cyeh
ba9e74f22d committing modules with mozilla as root directory
git-svn-id: svn://10.0.0.236/trunk@700 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 17:51:11 +00:00
cyeh
8c7c6df58e renaming root of the repository to "mozilla"
git-svn-id: svn://10.0.0.236/trunk@699 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 17:29:58 +00:00
rods
5f2720fb90 started adding selection
git-svn-id: svn://10.0.0.236/trunk@698 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 16:44:52 +00:00
kipp
09357d5e45 new
git-svn-id: svn://10.0.0.236/trunk@697 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 15:43:09 +00:00
kipp
90530086bd Removed hack
git-svn-id: svn://10.0.0.236/trunk@696 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 15:39:58 +00:00
cmanske
5e9b1def1f Removed field not needed in table cell data. Removed code not needed for growable array
git-svn-id: svn://10.0.0.236/trunk@695 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 15:04:05 +00:00
cmanske
46aec995e2 More table editing bug fixes. Copy/Paste arbitrary selected cell sets and deleting columns, rows fixed. More resizing bugs fixed.
git-svn-id: svn://10.0.0.236/trunk@694 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 14:37:46 +00:00
cmanske
df94b24da9 Added support to add/remove rows/columns during table creation. Fixed problem with HRULE and other object properties (rt. mouse popup menu)
git-svn-id: svn://10.0.0.236/trunk@691 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 14:36:37 +00:00
troy
db1845c8b5 Added function to set a trapezoid's shape based on a rectangle
git-svn-id: svn://10.0.0.236/trunk@690 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-27 03:35:05 +00:00
brade
b5f254d11d make grippy pane hilites valid
git-svn-id: svn://10.0.0.236/trunk@689 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 22:43:12 +00:00
brade
b8fd8f281f table dialog changes from gbrown; center dlogs over parent window (not main screen)
git-svn-id: svn://10.0.0.236/trunk@687 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 22:40:39 +00:00
brade
eb14822c97 table dialog changes from gbrown
git-svn-id: svn://10.0.0.236/trunk@686 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 22:40:00 +00:00
kipp
94a19a4f91 Get cursor properly
git-svn-id: svn://10.0.0.236/trunk@685 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:47:53 +00:00
kipp
d57f23b67d Added in cursor and direction properties
git-svn-id: svn://10.0.0.236/trunk@684 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:47:37 +00:00
kipp
72f5772d0f Add in cursors
git-svn-id: svn://10.0.0.236/trunk@683 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:47:06 +00:00
kipp
582efa0e7b Always return ibeam cursor for text
git-svn-id: svn://10.0.0.236/trunk@682 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:46:51 +00:00
kipp
403b3f8d18 Added inherit for direction style
git-svn-id: svn://10.0.0.236/trunk@681 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:46:26 +00:00
kipp
1cc6c90aec Made it build on IRIX
git-svn-id: svn://10.0.0.236/trunk@680 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:21:14 +00:00
kipp
51ccce8969 Fixed compiler bugs/warnings
git-svn-id: svn://10.0.0.236/trunk@679 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:13:20 +00:00
briano
e11dbeff37 Got rid of a minor redundancy, and added support for 2.1.x kernels.
git-svn-id: svn://10.0.0.236/trunk@678 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 03:07:41 +00:00
kipp
902295a137 Fix porting bugs - made it compile on IRIX
git-svn-id: svn://10.0.0.236/trunk@677 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 02:59:29 +00:00
kipp
5e5e6dffdb Added keywords for cursors and direction
git-svn-id: svn://10.0.0.236/trunk@676 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 02:59:02 +00:00
kipp
d267b76845 Added missing newline
git-svn-id: svn://10.0.0.236/trunk@675 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 02:57:39 +00:00
kipp
797d9351dc Added trailing newline
git-svn-id: svn://10.0.0.236/trunk@674 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-26 02:57:05 +00:00
rickg
7b8d45d8c6 added parse-system debugging hooks
git-svn-id: svn://10.0.0.236/trunk@672 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 23:10:51 +00:00
rickg
8a929464d6 update
git-svn-id: svn://10.0.0.236/trunk@671 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 19:46:11 +00:00
rickg
2c5f8ffeb3 propagation is now online, aren't DTD's cool?
git-svn-id: svn://10.0.0.236/trunk@670 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 19:45:14 +00:00
rickg
d682c47b10 added Append(unichar)
git-svn-id: svn://10.0.0.236/trunk@669 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 19:44:35 +00:00
kipp
1d81050a79 new keywords
git-svn-id: svn://10.0.0.236/trunk@668 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 19:11:20 +00:00
kipp
909bba7724 Port to new nsIDocument API
git-svn-id: svn://10.0.0.236/trunk@666 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:49:06 +00:00
kipp
b87f9199b6 Port to removal of nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@665 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:48:48 +00:00
kipp
93894c3b99 Fixed a memory problem; implement align and border properties
git-svn-id: svn://10.0.0.236/trunk@664 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:48:30 +00:00
kipp
e9b3f7100f Port to removal of nsStyleMolecule; add in border support
git-svn-id: svn://10.0.0.236/trunk@663 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:46:55 +00:00
kipp
d7fe529d84 Added in nsCSSDisplay; cleaned up text align; moved float, clear and display out of position and into display
git-svn-id: svn://10.0.0.236/trunk@662 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:45:22 +00:00
kipp
2f03c700ff Implement borders, padding, text-align properties, display, etc. Fixed bug in list inheritance
git-svn-id: svn://10.0.0.236/trunk@661 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:44:55 +00:00
kipp
24bf916e3f Updated to use new style constants
git-svn-id: svn://10.0.0.236/trunk@660 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:44:17 +00:00
kipp
d3e2cf6fab Added support for more properties
git-svn-id: svn://10.0.0.236/trunk@659 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:43:42 +00:00
kipp
d5d817ead1 updated
git-svn-id: svn://10.0.0.236/trunk@658 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:41:41 +00:00
kipp
c4d42de7a5 Stop using nsStyleMolecule; fixed bug that led to missing spaces
git-svn-id: svn://10.0.0.236/trunk@657 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:41:33 +00:00
kipp
cbf4938e33 Fixed up cursor handling; map align parameter
git-svn-id: svn://10.0.0.236/trunk@656 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:40:47 +00:00
kipp
00b1cc85fe Removed nsStyleMolecule decl
git-svn-id: svn://10.0.0.236/trunk@655 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:40:17 +00:00
kipp
3bfe67cad5 Repaired cursor discovery logic to handle A tag oddities
git-svn-id: svn://10.0.0.236/trunk@654 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:40:01 +00:00
kipp
aad54f55e7 new atoms
git-svn-id: svn://10.0.0.236/trunk@653 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:39:16 +00:00
kipp
7c700e8a5b Updated to new style constants
git-svn-id: svn://10.0.0.236/trunk@652 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:37:29 +00:00
kipp
8043537831 Stop building unused tags file
git-svn-id: svn://10.0.0.236/trunk@651 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:34:02 +00:00
kipp
ab8ffb24d3 Implement nsStyleText, nsStyleDisplay; added cursors; removed hack code
git-svn-id: svn://10.0.0.236/trunk@650 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:33:32 +00:00
kipp
efa3b90b0a Tidy up style constants
git-svn-id: svn://10.0.0.236/trunk@649 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:33:11 +00:00
kipp
324c12a6d4 Cleaned up the API
git-svn-id: svn://10.0.0.236/trunk@648 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:32:59 +00:00
kipp
758346d78d Added nsStyleText, nsStyleDisplay; removed nsStyleMolecule and hack code; cleaned up a few others
git-svn-id: svn://10.0.0.236/trunk@647 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 18:32:11 +00:00
wtc
b92f855655 "gmake clobber" should remove $(OBJDIR) too.
git-svn-id: svn://10.0.0.236/trunk@646 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 16:16:54 +00:00
hshaw
348fba16cb Only compile security stubs if NO_SECURITY turned on
git-svn-id: svn://10.0.0.236/trunk@645 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 11:32:20 +00:00
hshaw
92821a0c0c libjar is not part of public source
git-svn-id: svn://10.0.0.236/trunk@644 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 11:29:10 +00:00
mccabe
3b1a1c03e9 Fix to (115008). ECMA fix - revert to earlier behavior of decompiling
functions created with new Function as "function anonymous (...)".
Now only version 1.2 decompiles to the source for an anonymous
function.


git-svn-id: svn://10.0.0.236/trunk@643 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 08:37:06 +00:00
mccabe
7256cbaad6 Pared down prmjtime.c and prmjtime to just what is needed by jsdate.c
and synchronized them with js/ref/prtime.[ch].


git-svn-id: svn://10.0.0.236/trunk@642 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 07:42:22 +00:00
mccabe
a5b32ac223 Propagate a fix for #ifndef HAVE_LONG_LONG that found its way into src/prmjtime.c but not ref/prtime.c
git-svn-id: svn://10.0.0.236/trunk@641 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 05:26:09 +00:00
mccabe
68bd3eb6a0 Add some braces to quiet dangling-else warnings by gcc 2.8.1.
git-svn-id: svn://10.0.0.236/trunk@640 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 05:24:42 +00:00
mccabe
32987e37ee Call JS_GC instead of js_GC within JS_MaybeGC. Thanks to
A. Hodgkinson <ahodgkin@acorn.co.uk> for finding this (and to chouck
for checking it in to js/ref/jsapi.c.)


git-svn-id: svn://10.0.0.236/trunk@639 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 05:11:41 +00:00
troy
24f6d37f72 Changed IntersectRect() to return an empty rect in the case where the
two source rects don't intersect. Also changed '==' operator to return
TRUE if both rects are empty


git-svn-id: svn://10.0.0.236/trunk@638 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 04:34:52 +00:00
troy
6401d192b2 Added mOverflow to nsStylePosition
git-svn-id: svn://10.0.0.236/trunk@637 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 04:07:18 +00:00
rjc
d405d81272 Vocabulary additions for NavCenter appearance styles
git-svn-id: svn://10.0.0.236/trunk@636 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 02:07:03 +00:00
rjc
e9f23151c7 Add prototypes to remove warnings on Mac.
git-svn-id: svn://10.0.0.236/trunk@632 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-25 00:07:08 +00:00
kmcclusk
9b1d6078de Added SelectAll member function to nsITextWidget
Fixed Select(start, stop) for nsITextWidget and nsITextAreaWidget
Added NS_MOVE event
Cleanup up nsWindow.cpp by centralizing code to initialize events and dispatch events.


git-svn-id: svn://10.0.0.236/trunk@626 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 23:09:11 +00:00
jband
947dc54830 removing code that is not supposed to be released to the public at this time. This code still lives (for now) under m/src/ns/js/ref/jsd/ on the branch JSFUN13_BRANCH
git-svn-id: svn://10.0.0.236/trunk@625 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:59:00 +00:00
slamm
34616e053a Remove some unused code including old-style command handling. Examples of the new command handling can be seen in EditorView.cpp and RDFView.cpp
git-svn-id: svn://10.0.0.236/trunk@624 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:33:18 +00:00
karnaze
b4c13f5c3a added text area
git-svn-id: svn://10.0.0.236/trunk@623 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:28:41 +00:00
karnaze
5ff624fc06 enabled text area
git-svn-id: svn://10.0.0.236/trunk@622 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:27:07 +00:00
slamm
01c0e0c439 Add beginnings of context menu support
git-svn-id: svn://10.0.0.236/trunk@621 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:26:55 +00:00
slamm
29da0cfac0 Fix attachments and specify resources to make it look better. The resources can later be moved down to xfe/resources
git-svn-id: svn://10.0.0.236/trunk@620 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:26:29 +00:00
slamm
53471fb9cd Minor logic fix.
git-svn-id: svn://10.0.0.236/trunk@619 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:23:13 +00:00
briano
f557cd9518 Added support for SCO UnixWare 7, and consolidated all the Linux's.
Thanks to Thorsten Heit (thorsten@wurzelausix.cs.uni-sb.de) for the
Linux suggestion.


git-svn-id: svn://10.0.0.236/trunk@618 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:22:42 +00:00
gagan
0883032db0 This is the fix for bug #93760. It has a potential of breaking some server
implementations of decoding the authentication string that involve a user
login string of accentuated characters (for example- éçàöî)


git-svn-id: svn://10.0.0.236/trunk@617 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 22:12:09 +00:00
karnaze
4a95093116 added radio groups, select/option, beter sizing. widgets take creation parms.
git-svn-id: svn://10.0.0.236/trunk@616 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 21:37:30 +00:00
buster
68ef434e82 even better pagination. Tables with small captions can split, and
simple tables with big cells can split the cell (and it's row)


git-svn-id: svn://10.0.0.236/trunk@615 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 20:59:44 +00:00
kipp
4e90f540f3 Put generated source into the right directory
git-svn-id: svn://10.0.0.236/trunk@614 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:56:36 +00:00
kipp
248dffec8a updated scripts to work properly
git-svn-id: svn://10.0.0.236/trunk@613 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:56:23 +00:00
kipp
5d88cc8f56 added new properties
git-svn-id: svn://10.0.0.236/trunk@612 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:56:09 +00:00
kipp
fad74a13ef latest props
git-svn-id: svn://10.0.0.236/trunk@611 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:55:53 +00:00
wtc
7675cfc3ec Eliminated compiler warnings. Fixed by Rick Osborne <rick@stacey.net>.
git-svn-id: svn://10.0.0.236/trunk@610 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:48:37 +00:00
bjorn
46adef01d2 Protection around ASFILES added, so that gcc runs smoothly.
git-svn-id: svn://10.0.0.236/trunk@609 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 19:02:01 +00:00
troy
200fd1ff3d Added mZIndex to nsStylePosition. Absolutely positioned code now passed
it along to view system


git-svn-id: svn://10.0.0.236/trunk@608 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 18:34:31 +00:00
wtc
7c00209154 Serge Orlov <sorlov@con.mcst.ru> reported that gmake 3.74 on Solaris 2.5
doesn't like the extra tabs in this file.  I don't know why.  It works
for me and everyone else.  But since it doesn't hurt, I deleted the
extra tabs.


git-svn-id: svn://10.0.0.236/trunk@607 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 18:13:13 +00:00
fur
0126732a29 When JS_MaybeGC() has decided to do a garbage collection, really do
it, even when the only assignments have been to local JS variables.
Thanks to ahodgkin@acorn.co.uk for noticing.


git-svn-id: svn://10.0.0.236/trunk@606 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 18:08:04 +00:00
fur
2d2471a609 Eliminate non-ECMA warnings about lack of return value
git-svn-id: svn://10.0.0.236/trunk@605 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 17:56:47 +00:00
rods
d6a4c83eea changed the items are add into the combo box
git-svn-id: svn://10.0.0.236/trunk@604 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 16:21:32 +00:00
guha
c3a48ed6f4 Remove SCook.c from mac project file
git-svn-id: svn://10.0.0.236/trunk@603 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 16:13:20 +00:00
guha
1ee864db9f Fix potential mac problems
git-svn-id: svn://10.0.0.236/trunk@602 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 16:10:38 +00:00
guha
a94e97961d smore cleanup and bug fixes
git-svn-id: svn://10.0.0.236/trunk@601 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 16:04:53 +00:00
ramiro
2a71b7b932 Add preliminary support for editting items in toolbars.
git-svn-id: svn://10.0.0.236/trunk@600 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 12:43:28 +00:00
ramiro
8deebe0777 Cleanup string utils.
git-svn-id: svn://10.0.0.236/trunk@599 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 12:34:16 +00:00
ramiro
102ae1d944 Add one more personal toolbar command: xfeCmdPersonalToolbarItemProperties.
git-svn-id: svn://10.0.0.236/trunk@598 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 11:49:20 +00:00
ramiro
7b66a7d6a2 Add personal toolbar commands.
git-svn-id: svn://10.0.0.236/trunk@597 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 11:44:28 +00:00
ramiro
73f588efeb Cleanup the toggleShowingState() and setShowingState() madness. These
XFE_Component methods can be used instead of various other toggle/hide/show
hacks.


git-svn-id: svn://10.0.0.236/trunk@596 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 11:41:36 +00:00
fur
90ff121ec6 Temporarily disable charSet info so we can compile with JAVA defined
git-svn-id: svn://10.0.0.236/trunk@594 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 07:21:01 +00:00
ramiro
1aec16ab3b Add support ffor dynamic indicators.
git-svn-id: svn://10.0.0.236/trunk@593 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 06:57:18 +00:00
fur
5972508b18 Fix numerous cut-and-paste errors in last checkin
git-svn-id: svn://10.0.0.236/trunk@592 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 06:57:00 +00:00
ramiro
84ec8be55d Add support for dynamic indicators.
git-svn-id: svn://10.0.0.236/trunk@591 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 06:47:37 +00:00
ramiro
a307c5f940 Always insert private components at end of widget list.
git-svn-id: svn://10.0.0.236/trunk@590 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 06:44:28 +00:00
fur
39accdfa4b Temporarily disable charSet info so we can compile
git-svn-id: svn://10.0.0.236/trunk@589 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 06:26:57 +00:00
cyeh
801614bc6f adjust access paths to point to js:src and js:jsj. js:ref was added, and
it had an old nspr1.0 header in it "prcpucfg.h" htat was being picked up for the compile instead of the one in nsprpub


git-svn-id: svn://10.0.0.236/trunk@588 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 04:42:07 +00:00
troy
479019563e Added more position properties and removed some stuff from nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@587 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 03:50:38 +00:00
troy
f4f2da86ac Fixed PROP_HEIGHT to use VARIANT_KLP (was using VARIANT_KL)
git-svn-id: svn://10.0.0.236/trunk@586 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 02:43:42 +00:00
rjc
28779ff3a6 Removed unused variables to fix up warnings.
git-svn-id: svn://10.0.0.236/trunk@585 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 02:20:19 +00:00
rjc
48b61872f7 Support for workspace reordering.
git-svn-id: svn://10.0.0.236/trunk@584 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 02:15:22 +00:00
fur
2af8f4a686 (These files not built by any version of Navigator)
Initial check-in:
JSRef is migrating from /m/src JSFUN13_BRANCH to trunk /m/pub repository


git-svn-id: svn://10.0.0.236/trunk@583 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 01:42:37 +00:00
fur
dffbf084ac (This code is not built by any flavor of Navigator)
Initial check-in to mozilla tree: JSRef development is migrating from
JSFUN13_BRANCH of /m/src repository to /m/pub


git-svn-id: svn://10.0.0.236/trunk@582 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 01:35:13 +00:00
fur
425b4f0439 JS1.3 initial check-in
git-svn-id: svn://10.0.0.236/trunk@581 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 01:28:40 +00:00
fur
73e80ec159 Initial checkin of JS1.3. (Minor fix required to accomodate JSAPI behavior changes)
git-svn-id: svn://10.0.0.236/trunk@580 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:34:15 +00:00
fur
c7feaa75cf Initial checkin of JavaScript 1.3, migrated from JSFUN13_BRANCH in /m/src repository.
(Minor changes in libmocha required to accomodate JSAPI changes.)


git-svn-id: svn://10.0.0.236/trunk@579 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:32:02 +00:00
fur
6e3cdaec31 Initial checkin of JavaScript 1.3, migrated from JSFUN13_BRANCH in /m/src repository
git-svn-id: svn://10.0.0.236/trunk@578 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:31:11 +00:00
michaelp
bbe0178263 more scrolling bugs.
git-svn-id: svn://10.0.0.236/trunk@577 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:30:21 +00:00
scullin
9aec547ed0 Removed dependency on Motif
git-svn-id: svn://10.0.0.236/trunk@576 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-24 00:17:36 +00:00
dbragg
06063a9d88 Moving asw.jar into appropriate place (not into as_html)
git-svn-id: svn://10.0.0.236/trunk@573 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:51:47 +00:00
dbragg
83372571bc Um, like, ns_priv handling is screwy, but for now we need to at least POINT there...
git-svn-id: svn://10.0.0.236/trunk@572 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:45:32 +00:00
michaelp
038c0cf76e fixed bug where scollbar itself was scrolled.
git-svn-id: svn://10.0.0.236/trunk@571 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:32:59 +00:00
michaelp
b3fff96143 changed SetContainerSize() to ComputeContainerSize().
git-svn-id: svn://10.0.0.236/trunk@570 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:21:37 +00:00
dbragg
efb85c5361 for the fun of it
git-svn-id: svn://10.0.0.236/trunk@569 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:17:20 +00:00
dbragg
e286be6235 make it work for el don
git-svn-id: svn://10.0.0.236/trunk@568 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:16:06 +00:00
dbragg
890a53a1bd OK, maybe this is better?
git-svn-id: svn://10.0.0.236/trunk@567 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 23:06:18 +00:00
buster
7afb5d93bb fixed a nefarious little bug with multiple row spans in the same table
subsequent rows (the ones below the effected rows) were not placed correctly
when the height of the spanning cell became greater than the sum of the heights
of the rows it spanned.


git-svn-id: svn://10.0.0.236/trunk@566 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 22:59:07 +00:00
troy
ff40b5d8f4 More work on absolute positioning
git-svn-id: svn://10.0.0.236/trunk@565 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 22:38:52 +00:00
dbragg
e37a16249d Fixed to use correct targets
git-svn-id: svn://10.0.0.236/trunk@564 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 22:27:55 +00:00
michaelp
0063ce95c6 added AddRef() to GetScrolledView().
git-svn-id: svn://10.0.0.236/trunk@563 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 21:54:47 +00:00
michaelp
8a60a2974e removed debug junk
git-svn-id: svn://10.0.0.236/trunk@562 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 21:52:02 +00:00
michaelp
4b3b78f8e5 view no longer shows a scrollbar when we can't scroll.
added GetScrolledView().


git-svn-id: svn://10.0.0.236/trunk@561 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 21:51:43 +00:00
michaelp
4948a5cacb removed conditional calling of view->SetDimensions() in SizeTo().
git-svn-id: svn://10.0.0.236/trunk@560 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 21:51:03 +00:00
kmcclusk
1c46487c8b Added SetMaxTextLength method to text widget and textarea widget.
git-svn-id: svn://10.0.0.236/trunk@559 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 20:21:24 +00:00
scullin
cc196705ed Build on IRIX and Linux
git-svn-id: svn://10.0.0.236/trunk@558 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 19:55:08 +00:00
scullin
9684a1c1b7 Linux build fixes. Moved test.cpp to nettest.cpp to allow nettest to
build easily under UNIX.


git-svn-id: svn://10.0.0.236/trunk@557 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 19:33:34 +00:00
scullin
5497189f2b Fixed non-virtual destructor, and incorrect stream usages that
gcc didn't like.


git-svn-id: svn://10.0.0.236/trunk@556 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 19:10:35 +00:00
scullin
ae47b469c0 Fix abiguous null test for smart pointers.
git-svn-id: svn://10.0.0.236/trunk@555 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 19:08:21 +00:00
buster
a7ba4f40d7 table header and footer rowgroups placed properly, replicated across continuing tables
some pagination fixes, including a hack to make negative available heights = 1.


git-svn-id: svn://10.0.0.236/trunk@552 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 17:29:07 +00:00
buster
3f1b763ceb fixed a bug where a case during pagination wasn't being tested correctly
git-svn-id: svn://10.0.0.236/trunk@551 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 17:22:46 +00:00
buster
d8ffbf56b4 added style for HTML 4 table elements and TH
git-svn-id: svn://10.0.0.236/trunk@550 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 17:19:21 +00:00
kipp
76327db85c nuked ref to line layout
git-svn-id: svn://10.0.0.236/trunk@549 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 17:09:16 +00:00
kipp
e4a14bb64b link with plc
git-svn-id: svn://10.0.0.236/trunk@548 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 16:51:49 +00:00
kipp
b71515f8f1 Fixed SetTitle API
git-svn-id: svn://10.0.0.236/trunk@547 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 16:51:25 +00:00
kipp
c90ed276b0 define win32_lean_and_mean
git-svn-id: svn://10.0.0.236/trunk@546 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 16:47:42 +00:00
troy
5a581d1cad More CSS position work
git-svn-id: svn://10.0.0.236/trunk@545 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 15:39:48 +00:00
scullin
22e3688402 Unix build patches
git-svn-id: svn://10.0.0.236/trunk@543 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 03:51:20 +00:00
slamm
4c01b12f2a Change NavCenter (aka Aurora) to use the XmLTree instead
of the Outliner class.  This will be cleaner in the end and will give
us an easy way to do dynamic columns.


git-svn-id: svn://10.0.0.236/trunk@542 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 01:29:34 +00:00
slamm
f40ec969bd Add a new horizontalSizePolicy, XmRESIZE_IF_POSSIBLE.
This resizes the columns to make the fit in the available widget width
without scrollbars.  This is made possible by a new function,
SizeColumnsToFit(), which is adapted from Outliner.cpp:applyDelta().
Also add a resource for minColumnWidth.


git-svn-id: svn://10.0.0.236/trunk@541 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 01:29:30 +00:00
slamm
3dff3d7192 Fix print remote to take file argument.
git-svn-id: svn://10.0.0.236/trunk@540 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 01:29:26 +00:00
ftang
fd67065650 Change unicode mapping table to include EURP mapping
git-svn-id: svn://10.0.0.236/trunk@539 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 01:12:20 +00:00
mccabe
6e2b5dfd5c Makefile hacking to make 'gmake js' work in ns/js/src. Abstracted a
few constants, added -ldl for Linux.  Tested on Irix 6.3, SunOs 5.6,
Linux 2.031.


git-svn-id: svn://10.0.0.236/trunk@538 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-23 00:39:10 +00:00
rickg
2e1b6d50bc final factoring of DTDs, and removal of nsHTMLDTD.*
git-svn-id: svn://10.0.0.236/trunk@537 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:56:57 +00:00
ramiro
65743a2139 Move headers from unused to used.
git-svn-id: svn://10.0.0.236/trunk@536 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:48:50 +00:00
troy
edc3ab3009 Added nsStylePosition
git-svn-id: svn://10.0.0.236/trunk@535 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:29:01 +00:00
troy
88d4749140 Starting to pay attention to CSS positioning properties
git-svn-id: svn://10.0.0.236/trunk@534 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:28:39 +00:00
troy
1ebba559f8 Setting up style for CSS positioning
git-svn-id: svn://10.0.0.236/trunk@533 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:28:02 +00:00
kipp
db9f98a87f option is a container too
git-svn-id: svn://10.0.0.236/trunk@532 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:25:36 +00:00
kipp
f308795f16 Added in support for select/option
git-svn-id: svn://10.0.0.236/trunk@531 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 23:24:43 +00:00
wtc
91e14a02cc Added parentheses around a type cast. Fix provided by Kipp Hickmann
<kipp@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@530 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:39:24 +00:00
kipp
1993f67606 support textarea tag; some support for custom form managers
git-svn-id: svn://10.0.0.236/trunk@529 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:12:24 +00:00
kipp
6e00312ecf snapshot
git-svn-id: svn://10.0.0.236/trunk@528 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:11:52 +00:00
kipp
9fa973426f Disable noisy blink
git-svn-id: svn://10.0.0.236/trunk@527 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:11:21 +00:00
wtc
68e29b395c Fixed build problems on BSD/OS. Some makefiles need to change:
the value of OS_ARCH is changed from BSD_386 to BSD_OS.
In unix.c, we now conditionalize on the macros O_SYNC and O_FSYNC,
as opposed to the platform macros like FREEBSD and BSDI.  We
acknowledge jason@ackley.net for reporting and providing a fix
for this problem.


git-svn-id: svn://10.0.0.236/trunk@526 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:10:37 +00:00
kipp
ed2c8297d0 Treat textarea somewhat like title/script/style
git-svn-id: svn://10.0.0.236/trunk@525 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:10:27 +00:00
kipp
8626798bbb textarea is not a container
git-svn-id: svn://10.0.0.236/trunk@524 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:10:10 +00:00
kipp
3ee4df73f0 Added in TEXTAREA to special tags
git-svn-id: svn://10.0.0.236/trunk@523 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 22:09:46 +00:00
rickg
0e31300630 tweaked the API to be more DTD-like
git-svn-id: svn://10.0.0.236/trunk@517 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 20:22:59 +00:00
rickg
ab6648a9f7 improved newline handling in tables
git-svn-id: svn://10.0.0.236/trunk@516 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 19:46:40 +00:00
rickg
3ef2b1f04d moved nsDeque.* to base\src
git-svn-id: svn://10.0.0.236/trunk@515 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 19:10:39 +00:00
rickg
efaf44175a added DTD and propagation capabilities; dynamic entities, containers, token handlers
git-svn-id: svn://10.0.0.236/trunk@514 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 18:32:49 +00:00
rickg
0c45497a29 added a few new container types
git-svn-id: svn://10.0.0.236/trunk@513 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 18:28:48 +00:00
troy
da88ecd024 Fixed some bustage
git-svn-id: svn://10.0.0.236/trunk@512 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 18:15:48 +00:00
troy
1b67ec5c71 Bumping the revision to 3
git-svn-id: svn://10.0.0.236/trunk@511 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 16:11:12 +00:00
troy
e3d69df234 HackStyleFor no longer sets positionFlags
git-svn-id: svn://10.0.0.236/trunk@510 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 16:07:27 +00:00
troy
112c68d521 Work in progress on absolutely positioned elements
git-svn-id: svn://10.0.0.236/trunk@509 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 16:06:21 +00:00
troy
4fc38901fa Signing
git-svn-id: svn://10.0.0.236/trunk@508 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 16:00:00 +00:00
troy
10ad4051a6 Initial check-in
git-svn-id: svn://10.0.0.236/trunk@507 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 15:59:33 +00:00
troy
45e49986f4 Added support for CSS 'position' property
git-svn-id: svn://10.0.0.236/trunk@506 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 15:46:53 +00:00
troy
21d93f9992 Fixed a problem in SelectorMatches() that was causing id-based selectors
to always match


git-svn-id: svn://10.0.0.236/trunk@505 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 15:43:46 +00:00
peterl
d0badcb54c Switch to nsIPtrs to eliminate leaks (and to test them)
added debug code for ref counts


git-svn-id: svn://10.0.0.236/trunk@502 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:41:10 +00:00
peterl
0415cacfc0 WIP moving margin, border & padding out of nsStyleMolecule
added debug code to track ref counts


git-svn-id: svn://10.0.0.236/trunk@501 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:40:21 +00:00
peterl
877a811055 WIP moving margin, border & padding out of nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@500 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:39:35 +00:00
peterl
de9525ad79 Switch to nsIPtr for style context ptrs to eliminate leaks
git-svn-id: svn://10.0.0.236/trunk@499 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:39:00 +00:00
peterl
b38d9c1be1 added ref counting debug code
git-svn-id: svn://10.0.0.236/trunk@498 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:38:31 +00:00
peterl
90b63547ac WIP moving margin, border & padding out of nsStyleMolecule
Switch to nsIPtr for style context ptrs to eliminate leaks


git-svn-id: svn://10.0.0.236/trunk@497 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:37:57 +00:00
peterl
b15ae90fd7 moved border out of nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@496 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:36:28 +00:00
peterl
512927bf20 WIP moving border, margin & padding out of nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@495 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:33:35 +00:00
peterl
748b39e5a7 made GetStyleContext work with a null pres context
git-svn-id: svn://10.0.0.236/trunk@494 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:32:55 +00:00
peterl
69ef005d1a WIP removing border, margin & padding from nsStyleMolecule
git-svn-id: svn://10.0.0.236/trunk@493 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 06:32:17 +00:00
beard
929fd65dab AllocateMenuID
git-svn-id: svn://10.0.0.236/trunk@490 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:18:55 +00:00
beard
c0f4e071af nsPluginInstancePeer::AllocateMenuID
git-svn-id: svn://10.0.0.236/trunk@489 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:18:25 +00:00
beard
c95f92b87b FE_AllocateMenuID
git-svn-id: svn://10.0.0.236/trunk@488 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:13:46 +00:00
beard
4aae1c1b97 npn_allocateMenuID.
git-svn-id: svn://10.0.0.236/trunk@487 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:13:16 +00:00
beard
7b7ebc61c5 SetPositioned now takes a Boolean argument, added ObeyCommand for plugin menus, added menu ID allocation.
git-svn-id: svn://10.0.0.236/trunk@486 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:12:12 +00:00
beard
d85affb0f5 Added FE_AllocateMenuID, and CPluginWindow wrapper class for top-level plugin windows.
git-svn-id: svn://10.0.0.236/trunk@485 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:10:33 +00:00
beard
4c0050a1e1 Added support for dynamic allocation of menu IDs for plugins.
git-svn-id: svn://10.0.0.236/trunk@484 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:08:49 +00:00
beard
5f4e30053f Changes for plugins history.
git-svn-id: svn://10.0.0.236/trunk@483 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 02:07:52 +00:00
gagan
f55d568b04 A mechanism to flush out all authorizations in a session. Added "about:logout"
A-montulli/R-valeski. Thanks to Kit Knox (kit@cn1.connectnet.com)


git-svn-id: svn://10.0.0.236/trunk@482 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 01:03:41 +00:00
scullin
7dfe47d08b NSPR related changes submitted by wtc.
git-svn-id: svn://10.0.0.236/trunk@481 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-22 00:05:08 +00:00
hshaw
3ceac51fd3 Temporary modules to work with mozilla vs ns
git-svn-id: svn://10.0.0.236/trunk@480 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 23:28:37 +00:00
troy
8fa41c7a75 Changed space manager to pass in the frame that's associated with a block
of unavailable space


git-svn-id: svn://10.0.0.236/trunk@479 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 23:06:41 +00:00
sar
e8bbc46ebb type-o DEPT not DEPTH
git-svn-id: svn://10.0.0.236/trunk@478 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 22:07:07 +00:00
sar
7ff412e9dc change MOZ_SRC references to DEPTH
git-svn-id: svn://10.0.0.236/trunk@477 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 21:46:46 +00:00
sar
4292b1f9d5 change MOZ_SRC references to DEPTH
git-svn-id: svn://10.0.0.236/trunk@476 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 21:38:43 +00:00
sar
74864edf0d change MOZ_SRC references to DEPTH
git-svn-id: svn://10.0.0.236/trunk@473 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 21:22:54 +00:00
scullin
23fe55339a Signed.
git-svn-id: svn://10.0.0.236/trunk@471 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 20:11:22 +00:00
scullin
6abe902d24 Added
git-svn-id: svn://10.0.0.236/trunk@470 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 20:10:59 +00:00
ramiro
625f4a1818 Make sure the indicator widget is always at the WidgetList tail.
git-svn-id: svn://10.0.0.236/trunk@468 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 19:11:20 +00:00
scullin
759014f170 Fix release mode bustage.
git-svn-id: svn://10.0.0.236/trunk@466 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 18:25:52 +00:00
ramiro
f0c7de40ac Prevent toolbars from screwing with private XfeManager components.
git-svn-id: svn://10.0.0.236/trunk@465 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 18:14:13 +00:00
scullin
13b5f479b4 Don't hard-code the date.exe path, use unix_date.exe instead.
git-svn-id: svn://10.0.0.236/trunk@464 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 18:04:41 +00:00
ramiro
8e02d65602 Add XfeIsPrivateComponent().
Test whether a widget is a private component of an XfeManager parent.


git-svn-id: svn://10.0.0.236/trunk@463 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 17:57:20 +00:00
wtc
8c58ba330b Merged the makefile changes from Netscape's internal development version
of NSPR to the public ns/nsprpub on mozilla.org.
Removed ns/nsprpub/tools/winsock.lib, which should not have been
released.  This file can be generated from winsock.dll by following
the NSPR build instructions for Windows 3.11 at
http://www.mozilla.org/docs/refList/refNSPR/win16.html.


git-svn-id: svn://10.0.0.236/trunk@458 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 17:21:53 +00:00
valeski
dd762d0835 compiler warning fix (paren inclusion) submitted by dkindred@cmu.edu . approved/rev'd by nisheeth
git-svn-id: svn://10.0.0.236/trunk@457 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 17:17:35 +00:00
buster
396106f433 THEAD and TFOOT tags enabled
git-svn-id: svn://10.0.0.236/trunk@456 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 16:36:46 +00:00
ramiro
3c3218410b New and improved filing of bookmarks to Personal Toolbar.
git-svn-id: svn://10.0.0.236/trunk@455 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 16:18:00 +00:00
ramiro
bfb530894b Move fe_DestroyWidgetTree() to XfeWidgets/MenuUtils.c as
XfeDestroyMenuWidgetTree().  Make it safe for killing private components.


git-svn-id: svn://10.0.0.236/trunk@454 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 15:52:01 +00:00
ramiro
2ed5147535 Make it more paranoid.
git-svn-id: svn://10.0.0.236/trunk@453 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 15:25:45 +00:00
ramiro
5ea1eb2a69 Add XfeDestroyMenuWidgetTree().
git-svn-id: svn://10.0.0.236/trunk@452 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 15:24:01 +00:00
ramiro
2c5d76fa0e Handle bogus input for XfeCascadeGetSubMenu().
git-svn-id: svn://10.0.0.236/trunk@451 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 14:55:16 +00:00
ramiro
b1b68d08bb Add XfeToolBarGetLastItem().
git-svn-id: svn://10.0.0.236/trunk@450 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 13:29:37 +00:00
ramiro
56e18cd222 Removed unused combobox dir and define.
git-svn-id: svn://10.0.0.236/trunk@449 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 12:46:48 +00:00
ramiro
37a40cb9ee Update for indicator support. Dont hardcode button layout.
git-svn-id: svn://10.0.0.236/trunk@448 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 12:41:46 +00:00
ramiro
f14e1d2bd3 Dont hardcode button layout in XfeCreateLoadedToolBar. Update Makefile for
XfeWidgets.mk.


git-svn-id: svn://10.0.0.236/trunk@447 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 12:39:49 +00:00
ramiro
cd17caa7f8 Improve the indicator support.
git-svn-id: svn://10.0.0.236/trunk@446 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 12:38:44 +00:00
timm
449564289e Add "MOZ_INSTALL_DIR" support, change to move asw.jar to as_html directly
git-svn-id: svn://10.0.0.236/trunk@445 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 07:01:03 +00:00
timm
b45b7eeb9d Lots of changes for 2 step
git-svn-id: svn://10.0.0.236/trunk@444 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:59:12 +00:00
timm
bb5f73dcbd Make a package "netscape.asw" from the progress bar applet
git-svn-id: svn://10.0.0.236/trunk@443 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:58:48 +00:00
timm
9b8a2de5b4 Fix to make a "signed" dir as we do with the java plugin
(only way signpages.pl will work with this code, Signtool doesn't work for various reasons)


git-svn-id: svn://10.0.0.236/trunk@442 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:58:06 +00:00
timm
eeae5346cf Added modem monitoring for first step of 2 step
git-svn-id: svn://10.0.0.236/trunk@441 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:57:13 +00:00
timm
a3eab4b272 Lots of changes for 2step
git-svn-id: svn://10.0.0.236/trunk@440 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:56:36 +00:00
timm
b125254b26 Remove TABLE
git-svn-id: svn://10.0.0.236/trunk@439 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:56:11 +00:00
timm
65b41547df Add "RegRoot" entry
git-svn-id: svn://10.0.0.236/trunk@438 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:54:47 +00:00
timm
97b3719301 Changes to match changes on server side
git-svn-id: svn://10.0.0.236/trunk@437 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:53:38 +00:00
hshaw
9d19e3dacb Removed dependency on sun-java/config/rules.mak
git-svn-id: svn://10.0.0.236/trunk@436 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:49:20 +00:00
hshaw
b0d28a5761 Remove dependency on sun-java/config/rules.mak
git-svn-id: svn://10.0.0.236/trunk@435 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:48:41 +00:00
hshaw
b7eca65112 Applet is a private component and hence removed
git-svn-id: svn://10.0.0.236/trunk@434 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:48:15 +00:00
hshaw
cea6b4dbe9 Change JAVA ifdef's to OJI to distinguish between OJI and tightly integrated JAVA
git-svn-id: svn://10.0.0.236/trunk@433 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:47:20 +00:00
hshaw
2c9e7fcfdd Remove dependency on sun-java/config/rules.mak.
git-svn-id: svn://10.0.0.236/trunk@432 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:45:01 +00:00
hshaw
b9599cb12d Move library creation to libs phase, cause jpeg to depend on dist/public vs reaching into sun-java for headers
git-svn-id: svn://10.0.0.236/trunk@431 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:43:56 +00:00
hshaw
5bf2f64c6d Fix problem with dependency checking of AWT11 class files
git-svn-id: svn://10.0.0.236/trunk@430 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:42:48 +00:00
hshaw
d108d8cf64 Add NS_DEPTH to list of macros processed by mantomak
git-svn-id: svn://10.0.0.236/trunk@429 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:41:47 +00:00
hshaw
71d9cfe64d Make -DNO_SECURITY independent of MOZ_LITE/MEDIUM - hshaw/sudu
git-svn-id: svn://10.0.0.236/trunk@427 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 06:40:35 +00:00
brade
a1b5602717 minimize references to CStr255 class; fix some small memory leaks
git-svn-id: svn://10.0.0.236/trunk@426 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 04:47:44 +00:00
troy
227438369f Fixed column's incremental reflow function to properly handle margins
git-svn-id: svn://10.0.0.236/trunk@425 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 04:27:34 +00:00
brade
61d29b0ffe set pensize in drawing cell borders (if empty/zero-border and special selection or selected)
git-svn-id: svn://10.0.0.236/trunk@424 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 03:30:56 +00:00
troy
2658fcef80 Made sure pseudo frames get a top and bottom margin of 0
git-svn-id: svn://10.0.0.236/trunk@423 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 03:16:11 +00:00
ramiro
5d3257bb1d Un hard code /usr/lib/libm.a. Replace with -lm. (Linux)
git-svn-id: svn://10.0.0.236/trunk@421 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 00:52:35 +00:00
ramiro
b70b9be02d Update to 1998.
git-svn-id: svn://10.0.0.236/trunk@420 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 00:51:45 +00:00
peterl
2facdedae8 added spacing and border structs
git-svn-id: svn://10.0.0.236/trunk@419 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-21 00:02:44 +00:00
troy
e669c44ba0 Changed the space manager interface to return trapezoids instead
of rects


git-svn-id: svn://10.0.0.236/trunk@418 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 23:53:47 +00:00
montulli
164ebfb4a8 update cvpics.c to new streams API
git-svn-id: svn://10.0.0.236/trunk@417 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 22:50:15 +00:00
buster
530ef4a79a table performance and minor bug fixes.
git-svn-id: svn://10.0.0.236/trunk@416 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 22:49:15 +00:00
troy
097598d42c Fixed problem of hitting an assert when encountering an incomplete
frame when reflowing appended children


git-svn-id: svn://10.0.0.236/trunk@415 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 20:24:25 +00:00
troy
bec18bf03a Changed to using continuing frames for runaround of left/right floaters
git-svn-id: svn://10.0.0.236/trunk@414 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 19:56:35 +00:00
troy
d527779823 Changed to get nsIRunaround directly rather than use ReflowChild()
git-svn-id: svn://10.0.0.236/trunk@413 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 19:55:45 +00:00
wtc
99db30744f Eliminated compiler warnings. Fixed by Rick Osborne <rick@spacey.net>.
git-svn-id: svn://10.0.0.236/trunk@412 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 19:04:42 +00:00
wtc
73f5043417 Eliminated compiler warnings. Fixed by Rick Osborne <rick@stacey.net>.
git-svn-id: svn://10.0.0.236/trunk@411 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 18:58:25 +00:00
wtc
fb487199ca Declare PrintUsage() to return void. Fixed by Rick Osborne
<rick@spacey.net>.


git-svn-id: svn://10.0.0.236/trunk@410 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 18:55:32 +00:00
pinkerton
92017a85b5 Remove EstablishPort() override, another remaining vestage of Kelly.
git-svn-id: svn://10.0.0.236/trunk@409 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 16:18:24 +00:00
pinkerton
ef7ae56817 fix build bustage for guha.
git-svn-id: svn://10.0.0.236/trunk@408 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 16:08:47 +00:00
troy
c6bcea0c20 Made it so that continuing frames have a top margin of 0
git-svn-id: svn://10.0.0.236/trunk@407 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 04:37:49 +00:00
guha
c3a08849e5 More Sitemap related fixes
git-svn-id: svn://10.0.0.236/trunk@397 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-20 00:39:11 +00:00
ramiro
e6302e9ad0 Un hardcode XmINDICATOR_DONT_SHOW.
git-svn-id: svn://10.0.0.236/trunk@394 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 17:36:48 +00:00
ramiro
fdfce3c6c9 Fix typos.
git-svn-id: svn://10.0.0.236/trunk@393 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 16:15:00 +00:00
ramiro
8f728e3aaa Update for new XmNindicatorPosition resource.
git-svn-id: svn://10.0.0.236/trunk@392 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 16:14:30 +00:00
ramiro
3c578592a1 Add XmNindicatorPosition resource. For toolbar dropping fedback.
git-svn-id: svn://10.0.0.236/trunk@391 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 16:13:54 +00:00
ramiro
2003def889 Add XmNnumPrivateComponents resource.
git-svn-id: svn://10.0.0.236/trunk@390 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 16:12:26 +00:00
ramiro
522bc316af Fix a core dump on resizing the toolbox. The problem was a recursive geometry
call into PreferredGeometry().  Fixed by plugin in the trivial geomtry manager
instead of the one that does complicated things.


git-svn-id: svn://10.0.0.236/trunk@389 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 11:20:17 +00:00
ramiro
a6efe6a940 Add some geometry debugging assertions and comments.
git-svn-id: svn://10.0.0.236/trunk@388 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 11:16:43 +00:00
troy
b16f96084a Commented out the hack that explicitly set the P top margin since that's
now handled using CSS


git-svn-id: svn://10.0.0.236/trunk@381 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-19 05:06:41 +00:00
troy
ba24cf5205 Added code to handle CSS margin properties
git-svn-id: svn://10.0.0.236/trunk@374 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-18 22:16:37 +00:00
troy
a7dc1c48ab Fixed a problem where mLastContentIsComplete wasn't getting set right
for block-level elements


git-svn-id: svn://10.0.0.236/trunk@373 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-18 22:06:05 +00:00
troy
6579aae2d9 Fixed a bug I introduced in the previous checkin
git-svn-id: svn://10.0.0.236/trunk@370 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-18 05:03:04 +00:00
kmcclusk
fc11da3381 Changed SetBorderStyle to work with child windows only
git-svn-id: svn://10.0.0.236/trunk@369 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-18 00:27:48 +00:00
kmcclusk
00ad257db0 Added SetBorderStyle and SetTitle to nsIWidget
git-svn-id: svn://10.0.0.236/trunk@368 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 23:45:07 +00:00
troy
0246c9bb5c Changed IsSplittable to have three return values
git-svn-id: svn://10.0.0.236/trunk@367 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 23:08:20 +00:00
pinkerton
384524dbde Added CAutoCompleteURLEditField from Paul Chen. (rev sdagley, appr sdagely).
git-svn-id: svn://10.0.0.236/trunk@366 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:41:56 +00:00
pinkerton
87f5fe1107 Fix 2 const problems for Kathy (rev sdagley, appr sdagely).
git-svn-id: svn://10.0.0.236/trunk@365 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:41:09 +00:00
pinkerton
5d0fd32cd3 Remove 200K of icons that are no longer necessary.
git-svn-id: svn://10.0.0.236/trunk@364 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:40:52 +00:00
pinkerton
e062313359 When HTML area resizes, show arrow cursor in case it can take a while (like page with big tables).
git-svn-id: svn://10.0.0.236/trunk@363 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:40:30 +00:00
pinkerton
d416a91e4b No longer using extra icons for hilighted and disabled state, but drawing them with toolbox transform modes.
git-svn-id: svn://10.0.0.236/trunk@362 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:39:57 +00:00
pinkerton
050a3b89b3 change class_id of location bar's edit field to new autocomplete class (rev sdagley, appr sdagely).
git-svn-id: svn://10.0.0.236/trunk@361 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:39:12 +00:00
pinkerton
72bb2b261f register Paul's autoURLcompletion stuff. (rev sdagley, appr sdagely).
git-svn-id: svn://10.0.0.236/trunk@360 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:39:11 +00:00
pinkerton
35fe2787f3 For guha. Fixes crashes at startup.
git-svn-id: svn://10.0.0.236/trunk@359 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:33:56 +00:00
pinkerton
16734fb281 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@358 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 22:28:59 +00:00
cmanske
386e608fa2 Fixed problem with inserting at nIndex=0 in Growable array
git-svn-id: svn://10.0.0.236/trunk@357 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 21:49:18 +00:00
mlm
d6bfc7f264 Oops - back out checkin from wrong tree
git-svn-id: svn://10.0.0.236/trunk@356 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 21:42:16 +00:00
mlm
1eaf5924da Minor nit fixes that I intended to check in before, reviewed by Brendan
git-svn-id: svn://10.0.0.236/trunk@355 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 21:37:22 +00:00
cmanske
ccde004936 Fixed Table Editing bugs in Composer
git-svn-id: svn://10.0.0.236/trunk@351 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 21:34:20 +00:00
cmanske
84fb534d61 Fixed Table Editing bugs in Composer. Thanks to donwulff@iki.fi for finding a bug
git-svn-id: svn://10.0.0.236/trunk@350 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 21:32:18 +00:00
timm
eca6a1294c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@349 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 16:34:18 +00:00
ftang
281414b012 add big5 and gb2312 charset name for free font found at ifcss.org site
git-svn-id: svn://10.0.0.236/trunk@348 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 02:56:00 +00:00
troy
c394172a68 Cleaned up some logic
git-svn-id: svn://10.0.0.236/trunk@347 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 01:47:21 +00:00
troy
fd68898ebd Changed nsIFrame member functions to return a nsresult
git-svn-id: svn://10.0.0.236/trunk@346 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 01:41:24 +00:00
dario
318aac7f83 fixing global object finalization
git-svn-id: svn://10.0.0.236/trunk@345 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 01:35:54 +00:00
dario
63354f30cf fixing js capitalization and finalize methods
git-svn-id: svn://10.0.0.236/trunk@344 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 01:32:07 +00:00
dario
3ea56286d7 changing help menu text
git-svn-id: svn://10.0.0.236/trunk@343 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 01:29:45 +00:00
valeski
514d65e6fd patch from dkindred@cmu.edu. Parenthesis inclusion and a printf formatting snag. rev'd by gagan
git-svn-id: svn://10.0.0.236/trunk@342 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 00:33:25 +00:00
kmcclusk
766b20eb76 Added a tab widget
git-svn-id: svn://10.0.0.236/trunk@341 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-17 00:16:11 +00:00
wtc
0c00bf793f Ported to Linux/m68k. The patches were kindly provided by
Jes Sorensen <Jes.Sorensen@cern.ch>.


git-svn-id: svn://10.0.0.236/trunk@340 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:56:27 +00:00
pinkerton
edcb247141 Use UGAColorRamp instead of hardcoding colors. Added a lot of code for supporting drag feedback on the selector bar to indicate where new workspaces will be created. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@339 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:29:00 +00:00
pinkerton
c309d9ed0e API changes and lots of work to try to get translucent dragging to work (still commented out, though). Did fix the solid gray drag areas to just be the outlines, though. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@338 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:28:09 +00:00
pinkerton
65efea39cc API change in CIconTextSuite to use string instead of cstring. Also using UGAColorRamp instead of hardcoding colors. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@337 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:27:13 +00:00
pinkerton
2b3958dd0a API change in CIconTextSuite to use string not cstring (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@336 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:26:44 +00:00
pinkerton
903b7549bd Fix 2 places where I was assuming the NavCenter was present when it wasn't. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@335 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:26:12 +00:00
buster
369b61da86 removed noisy debug
git-svn-id: svn://10.0.0.236/trunk@334 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:25:09 +00:00
peterl
c868a04e01 added a style hack to get P align attributes to work again
git-svn-id: svn://10.0.0.236/trunk@333 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:21:45 +00:00
buster
b4bffd274b simple tables now paginate nicely. Some more complex tables
also paginate ok, though resizing in paginated mode doesn't work yet.
Captions still don't work.


git-svn-id: svn://10.0.0.236/trunk@332 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:21:32 +00:00
pinkerton
59899fad1d checked "merge into output" on non-debug targets for XMLPPCLib. (appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@331 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 22:18:33 +00:00
ftang
ce3851c572 Add cp1258 tables
git-svn-id: svn://10.0.0.236/trunk@330 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:57:10 +00:00
peterl
4ddb399190 clear web widget container before releasing it (fix leak)
git-svn-id: svn://10.0.0.236/trunk@329 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:51:59 +00:00
peterl
636d9f383e fix leaks
git-svn-id: svn://10.0.0.236/trunk@328 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:51:16 +00:00
peterl
f8e6ce5273 fix memory leaks
git-svn-id: svn://10.0.0.236/trunk@327 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:49:49 +00:00
peterl
c795eadf55 changed SetContentSink to do proper ref counting
git-svn-id: svn://10.0.0.236/trunk@326 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:48:02 +00:00
peterl
08c59feb52 fixed memory leaks in nsAutoString
git-svn-id: svn://10.0.0.236/trunk@325 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:47:17 +00:00
guha
5d714270af Fix sitemap bug reported by Pinkerton
git-svn-id: svn://10.0.0.236/trunk@324 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:29:27 +00:00
kostello
16a3417e18 Clean up (we were leaking the DocLoader -- dooh!)
git-svn-id: svn://10.0.0.236/trunk@323 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:23:48 +00:00
vidur
8c69e2b149 Fixed compiler warnings. Patch submitted by Rick Osborne (rick@spacey.net)
git-svn-id: svn://10.0.0.236/trunk@322 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 21:23:25 +00:00
kostello
d6e1df986c Added nsDocLoader and hooked it into the viewer's winmain.
If the MOZ_PURIFY_TEST environment variable is set, then when the
viewer is launched and all the test documents will be loaded.
After the test documents are loaded, the application will exit.


git-svn-id: svn://10.0.0.236/trunk@321 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 19:42:34 +00:00
pinkerton
e88b873b54 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@320 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 18:33:56 +00:00
rickg
04533b2f38 added 'marker-style' entities and fixed a few bugs
git-svn-id: svn://10.0.0.236/trunk@319 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 08:18:15 +00:00
rickg
b38724544f added runtime 'marker-style' entities and fixed a few bugs.
git-svn-id: svn://10.0.0.236/trunk@318 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-16 07:22:40 +00:00
briano
8b0c46947a Fixed the Emacs tags rules to recognize C++ sources as well. Thanks to Todd Larason (jtl@molehill.org).
git-svn-id: svn://10.0.0.236/trunk@317 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 23:56:45 +00:00
briano
2344b982ad Fixed the npglue.c screwup. Should've been npglue.cpp.
git-svn-id: svn://10.0.0.236/trunk@315 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 22:07:20 +00:00
kipp
f8027d3868 Added missing env doc
git-svn-id: svn://10.0.0.236/trunk@314 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 21:45:48 +00:00
michaelp
5449c08895 added docs.
git-svn-id: svn://10.0.0.236/trunk@313 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 20:25:02 +00:00
vidur
d168eb1a45 Documented timer interface
git-svn-id: svn://10.0.0.236/trunk@311 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 19:38:03 +00:00
vidur
732113b4c9 Documenting image library interfaces
git-svn-id: svn://10.0.0.236/trunk@310 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 19:37:44 +00:00
kostello
db8adf9761 Made the demo documents a little prettier
git-svn-id: svn://10.0.0.236/trunk@309 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 19:23:17 +00:00
blythe
19993640ed Fix some compile warnings. Thanks to Rick Osborne (rick@spacey.net)
git-svn-id: svn://10.0.0.236/trunk@308 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 18:59:47 +00:00
dario
7d9b7da232 doc
git-svn-id: svn://10.0.0.236/trunk@307 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 18:55:21 +00:00
kipp
0459378421 new
git-svn-id: svn://10.0.0.236/trunk@306 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 18:27:12 +00:00
kipp
caf6541a1a Updated tarball rules
git-svn-id: svn://10.0.0.236/trunk@305 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 18:14:33 +00:00
rickg
5205f5daea improved documentation in headers
git-svn-id: svn://10.0.0.236/trunk@304 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 17:27:56 +00:00
ramiro
5ef979d313 Add a makefile that actualy works. Update tree4.c for slamm's
XmLTreeDeleteChildren() improvement.
Coded by slamm@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@303 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 09:19:34 +00:00
ramiro
647799ff41 Fix problem in grid delete callback. It didn't set the row or column
position.  Plus, it updated the row/column count before making the callback,
so you could no longer access the userData with XtVaGetValues.

Also add XmLTreeDeleteChildren() to XmLTree.

This code written by Steve Lamm <slamm@netscape.com> and reviewed by
ramiro.


git-svn-id: svn://10.0.0.236/trunk@302 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 09:15:00 +00:00
ramiro
290d1ac464 fix name in comment
git-svn-id: svn://10.0.0.236/trunk@301 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 09:10:25 +00:00
ramiro
b20667bef6 first checked in
git-svn-id: svn://10.0.0.236/trunk@300 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 09:09:52 +00:00
ramiro
3c4997aaed Use DLL_SUFFIX from ns/config instead of random hack.
git-svn-id: svn://10.0.0.236/trunk@299 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 09:08:25 +00:00
rpotts
492f37556e Added netlib to the list of public directories to doc++
git-svn-id: svn://10.0.0.236/trunk@298 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 07:59:46 +00:00
nisheeth
2db6cf3ed9 Fix for text overflowing inside nested tables. Fix for background colors not
being inherited properly inside tables.


git-svn-id: svn://10.0.0.236/trunk@296 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 05:28:39 +00:00
nisheeth
6d0478a85d Fix for nested comments. Thanks to Jan Kroken (jankr@nntp.ifi.uio.no) for the
patch.


git-svn-id: svn://10.0.0.236/trunk@295 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 04:13:55 +00:00
nisheeth
e31dc91228 LO_UnlockLayout() was being called multiple times in LO_Reflow().
Thanks to Nicholas A. Ambrose (nicka@interdyn.com) for the patch.


git-svn-id: svn://10.0.0.236/trunk@294 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 04:01:00 +00:00
nisheeth
d5f9edd671 Documentation patch. Thanks to Pete Bevin (moose@bestiary.com) for submitting
it.


git-svn-id: svn://10.0.0.236/trunk@293 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 03:54:08 +00:00
ramiro
be8f9bec65 Remove unuised XfeToolBoxForm*() hackery. Chrome widget does all the
magic now.


git-svn-id: svn://10.0.0.236/trunk@292 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 02:08:30 +00:00
ramiro
5bc5ea684f The Great Chrome Rewrite of 1998. Use a chrome manager instead of
doAttachments().  Fixes numerous toolbox bugs and completely simplifies
the way xfe does chrome.  Reviewed by slamm.


git-svn-id: svn://10.0.0.236/trunk@291 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 02:06:22 +00:00
wtc
eab23cb735 In ConvertUnixPathToMacPath, removed the checks that disallow path names
that begin with /bin, /dev, and /etc.  These directories don't have
any special meaning on the Mac and should be allowed.  Thanks to
Mike Pinkerton <pinkerton@netscape.com> for reporting this bug and
providing the fix.


git-svn-id: svn://10.0.0.236/trunk@290 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 01:28:33 +00:00
kipp
b0d9aab4a8 fixed a few typos in the raptor rules
git-svn-id: svn://10.0.0.236/trunk@289 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 01:07:46 +00:00
kipp
75823b0beb Added raptor modules
git-svn-id: svn://10.0.0.236/trunk@288 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 01:05:29 +00:00
wtc
869c2f44aa Ported to HP-UX 9. We acknowledge Richard K. Lloyd <rkl@csc.liv.ac.uk>
for his help.

Files changed: HP-UX.mk, pr/src/Makefile, hpux.c, unix.c, and uxproces.c.
HP-UX.mk: Compare $(basename $(OS_RELEASE)) with A.09 to cover all HP-UX
9 revisions.  Define _PR_NEED_H_ERRNO for HP-UX 9.


git-svn-id: svn://10.0.0.236/trunk@287 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 01:02:00 +00:00
troy
8dd8213152 Removed previous hack, because the real problem with nsHTMLTokens.h was
discovered and fixed


git-svn-id: svn://10.0.0.236/trunk@286 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:35:41 +00:00
troy
ce68d1535f Moved inline code for CCommentToken::GetClassName to the .cpp file. This
makes doc++ happy


git-svn-id: svn://10.0.0.236/trunk@285 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:33:06 +00:00
pinkerton
5e2a2aeefa First Checked In.
git-svn-id: svn://10.0.0.236/trunk@284 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:06:11 +00:00
pinkerton
056ec80331 Draw correctly when in a scroller. Fixed to use local coords correctly and set image size (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@283 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:05:39 +00:00
pinkerton
4c5fa0d90e Added CScrollerWithArrows.cp (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@282 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:04:52 +00:00
pinkerton
fe25a89339 Added CStandardFlexTable and CScrollerWithArrows CTYPs. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@281 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:04:02 +00:00
pinkerton
a8e2a2dbf5 removed CTYP and CPPB's for CStandardFlexTable because it is no longer just a mail/news thing. It has been moved over to Mozilla_Custom_CPPBs. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@280 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:03:33 +00:00
pinkerton
5409f24638 NavCenter selector view now a subview of a custom scroller (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@279 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:02:39 +00:00
pinkerton
0e3304d6b5 added registration of new CScrollerWithArrows classes. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@278 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 00:01:56 +00:00
scullin
cab6b9f131 Put stuff back in that kipp callously destroyed, including our legal
documents.


git-svn-id: svn://10.0.0.236/trunk@277 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 23:50:51 +00:00
troy
7bc10ed2cf Changed doc_raptor to rm nsHTMLTokens.h before running doc++, because that
file is confusing doc++


git-svn-id: svn://10.0.0.236/trunk@276 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 23:27:31 +00:00
kmcclusk
7e317fe3f6 Added doc++ comments to ns/widget/src/windows
git-svn-id: svn://10.0.0.236/trunk@275 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 23:20:49 +00:00
briano
cf0953bd14 Minor addition of some platform-specific PATH info, and some rewording.
git-svn-id: svn://10.0.0.236/trunk@274 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 22:48:20 +00:00
michaelp
7d5df72783 fixed clip region state popping bug.
git-svn-id: svn://10.0.0.236/trunk@273 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 22:42:24 +00:00
dcone
ce477682f7 Added documentation
git-svn-id: svn://10.0.0.236/trunk@272 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 22:20:32 +00:00
kipp
853c1a68c6 one more cleanup of the tarball rules
git-svn-id: svn://10.0.0.236/trunk@271 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:54:00 +00:00
michaelp
c0608bc4dd fixed bug where we would double paint any frame that had a view.
git-svn-id: svn://10.0.0.236/trunk@270 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:49:29 +00:00
buster
cd9cbaa5c4 documentation changes
git-svn-id: svn://10.0.0.236/trunk@269 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:45:28 +00:00
kipp
3f101446d4 Updated tarball rules
git-svn-id: svn://10.0.0.236/trunk@268 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:44:21 +00:00
kipp
2b7a6addfa Updated tarball rules
git-svn-id: svn://10.0.0.236/trunk@267 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:43:59 +00:00
kipp
99f7bd2235 Updated tarball rules
git-svn-id: svn://10.0.0.236/trunk@266 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:43:16 +00:00
kipp
dd8cc4de86 snapshot for win95 test
git-svn-id: svn://10.0.0.236/trunk@265 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:38:20 +00:00
danm
8dbba5c5ae clear main frame's tab focus during layout only if laying out the active context r=blythe,hyatt
git-svn-id: svn://10.0.0.236/trunk@264 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:34:47 +00:00
kmcclusk
1d0febb8ee Made comments DOC++ compatible
git-svn-id: svn://10.0.0.236/trunk@263 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 21:33:43 +00:00
rods
cf4be90a5b fixed comments
git-svn-id: svn://10.0.0.236/trunk@262 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:59:07 +00:00
ftang
a8e7fd2214 Fix bug for FrontPage generated Chinese/Korean pages could not be view by non native system
git-svn-id: svn://10.0.0.236/trunk@261 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:49:47 +00:00
kmcclusk
dc0e16b2e8 Modified comments
git-svn-id: svn://10.0.0.236/trunk@260 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:49:25 +00:00
ftang
f014fcdab8 Fix bug for FrontPage generated Chinese/Korean page could not be view
on Non Native system


git-svn-id: svn://10.0.0.236/trunk@259 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:48:29 +00:00
rods
b376400ee3 fixed comment
git-svn-id: svn://10.0.0.236/trunk@258 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:48:14 +00:00
ftang
0afc16de94 Fix CP1250 and CP1253. Thanks Tomas Brodsky <brodsky@cfar.umd.edu> from the net
git-svn-id: svn://10.0.0.236/trunk@257 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 20:42:55 +00:00
dcone
2e165099a3 Added documentation
git-svn-id: svn://10.0.0.236/trunk@256 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:56:15 +00:00
rods
7481ae875e fixed comments
git-svn-id: svn://10.0.0.236/trunk@253 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:26:42 +00:00
ftang
c0235d8f5f fix feCharSetInfoArray warnning. Thanks djm@indirect.com (Dan McGuirk) from the net
git-svn-id: svn://10.0.0.236/trunk@252 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:24:53 +00:00
montulli
07e82980fa bump revision number
git-svn-id: svn://10.0.0.236/trunk@251 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:13:11 +00:00
montulli
7532eec4e9 bump rev number
git-svn-id: svn://10.0.0.236/trunk@250 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:12:57 +00:00
dario
8c0f85c945 fixing text to be proper terminated
git-svn-id: svn://10.0.0.236/trunk@249 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:05:09 +00:00
dario
2cd60a4c27 fixing the js console
git-svn-id: svn://10.0.0.236/trunk@248 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:04:25 +00:00
dario
ec37b06fe8 few fixes
git-svn-id: svn://10.0.0.236/trunk@247 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:03:54 +00:00
scullin
1436a8c063 Pulls LICENSE and LEGAL, now.
git-svn-id: svn://10.0.0.236/trunk@246 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 19:02:09 +00:00
montulli
f599ffb5d4 initial add of files for additional pics functionality
git-svn-id: svn://10.0.0.236/trunk@245 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 18:48:28 +00:00
ramiro
3466e08171 Mark the hardcoded geometry as HACKERY. We sill fix this later. Its
important that we get the new chrome mechanism out soon.


git-svn-id: svn://10.0.0.236/trunk@244 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 18:26:31 +00:00
dario
62a353f3c9 signing
git-svn-id: svn://10.0.0.236/trunk@243 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 18:24:53 +00:00
dario
406f1e60f7 adding NPL
git-svn-id: svn://10.0.0.236/trunk@242 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 18:16:23 +00:00
dario
85b6df8b9b another js example
git-svn-id: svn://10.0.0.236/trunk@241 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 18:14:55 +00:00
scullin
05329aa11d Pull XP_COM branch of libpref instead of trunk to match UNIX makefile.
git-svn-id: svn://10.0.0.236/trunk@240 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 17:48:47 +00:00
hardts
365c35265b added doc_raptor to makefile
git-svn-id: svn://10.0.0.236/trunk@239 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 17:29:44 +00:00
ramiro
8e3d8ad789 Make the frame shell dimensions something reasonable for the time being.
git-svn-id: svn://10.0.0.236/trunk@238 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 17:01:41 +00:00
karnaze
5e791d5a8a added doc++ comments
git-svn-id: svn://10.0.0.236/trunk@237 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 16:53:16 +00:00
slamm
492a2f3cbf Allocate memory for the url window target because we free it later. Fix from Dan McGuirk <djm@indirect.com>. a=ramiro.
git-svn-id: svn://10.0.0.236/trunk@236 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 16:49:20 +00:00
ramiro
68c20c6807 Update REQUIRES to properly include Microline and XfeWidgets.
git-svn-id: svn://10.0.0.236/trunk@235 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 15:03:50 +00:00
ramiro
2df2135816 Request geometry request when geom flag gets set in the ConstraintSetValues
operation.


git-svn-id: svn://10.0.0.236/trunk@234 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 14:59:44 +00:00
ramiro
e84b770526 XfeChrome is now a used widget.
git-svn-id: svn://10.0.0.236/trunk@233 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 14:58:51 +00:00
ramiro
b67236dcde Add a blurb for previous checkin.
git-svn-id: svn://10.0.0.236/trunk@232 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 14:45:39 +00:00
ramiro
006183c1ef Layout children/components on geometry management.
git-svn-id: svn://10.0.0.236/trunk@231 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 14:43:52 +00:00
ramiro
7a4cf23d4b Implement PreferredGeometry(). Add a good GeometryManager().
git-svn-id: svn://10.0.0.236/trunk@230 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 14:43:12 +00:00
ramiro
8b793bfe7c Add _XfeLiberalGeometryManager() and _XfeMakeGeometryRequest().
git-svn-id: svn://10.0.0.236/trunk@229 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 10:49:34 +00:00
scullin
c10fecc3bc clobber -> clobber_all
git-svn-id: svn://10.0.0.236/trunk@228 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 05:56:38 +00:00
scullin
8434312c2a Fix pref pull
git-svn-id: svn://10.0.0.236/trunk@227 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 02:57:21 +00:00
selmer
7ccd35ae17 Reworked to defeat LiveConnect unsatisfied link error
git-svn-id: svn://10.0.0.236/trunk@226 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 02:51:39 +00:00
scullin
b51bdc3146 Added standalone image lib define, mirrors one in config.mak. Approved
by briano.


git-svn-id: svn://10.0.0.236/trunk@225 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 02:01:29 +00:00
scullin
2c442cc28e IRIX build fixes.
git-svn-id: svn://10.0.0.236/trunk@224 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:58:11 +00:00
scullin
3300083588 Signed.
git-svn-id: svn://10.0.0.236/trunk@222 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:49:52 +00:00
scullin
054293fc6d UNIX version of raptor.mak
git-svn-id: svn://10.0.0.236/trunk@221 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:49:20 +00:00
rjc
31b9249a6d Appletalk is Mac only.
git-svn-id: svn://10.0.0.236/trunk@220 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:31:02 +00:00
rjc
886a1806eb (Mac) Appletalk data source.
git-svn-id: svn://10.0.0.236/trunk@219 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:26:35 +00:00
rjc
77014e9638 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@218 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:24:59 +00:00
rjc
f2d7ac5a6b Fix bugs with makeNewID().
git-svn-id: svn://10.0.0.236/trunk@217 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:24:06 +00:00
wtc
97add7e185 Deleted the unused variable 'count' in _PR_MD_INTERVAL_PER_SEC(). We
acknowledge Rick Osborne <rick@spacey.net> for reporting this problem
and suggesting a fix.


git-svn-id: svn://10.0.0.236/trunk@216 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 01:06:32 +00:00
kmcclusk
aeb4450f82 Added/Improved header file comments
git-svn-id: svn://10.0.0.236/trunk@215 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:31:59 +00:00
briano
ac0ed0fba1 Added support for M68k Linux. Thanks to Jes Sorensen (Jes.Sorensen@cern.ch) for the patch.
git-svn-id: svn://10.0.0.236/trunk@214 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:26:45 +00:00
briano
50d7e27245 Changed 'MACLINUX' back to 'MKLINUX' so the MkLinux builds will work.
Added support for M68k Linux.  Thanks to Jes Sorensen (Jes.Sorensen@cern.ch) for the patch.


git-svn-id: svn://10.0.0.236/trunk@213 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:24:56 +00:00
briano
2ab50be569 Changed the 'MACLINUX' macro reference to 'MKLINUX'. Again.
git-svn-id: svn://10.0.0.236/trunk@212 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:15:11 +00:00
relliott
69177801f3 Bumping revision number to 3.0
git-svn-id: svn://10.0.0.236/trunk@211 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:04:23 +00:00
briano
1a367fdb4e Changed the 'MACLINUX' macro reference to 'MKLINUX'.
git-svn-id: svn://10.0.0.236/trunk@210 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:00:42 +00:00
ftang
55366425af (This is for the previous checkin) Fix warnning. Thanks tenthumbs@cybernex.net
git-svn-id: svn://10.0.0.236/trunk@209 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-14 00:00:06 +00:00
ftang
ff934ff85d Fix one warning. Thanks for
git-svn-id: svn://10.0.0.236/trunk@208 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:58:48 +00:00
briano
08aac7ea86 Changed the 'MACLINUX' macro reference to 'MKLINUX'. Again.
git-svn-id: svn://10.0.0.236/trunk@207 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:56:35 +00:00
relliott
767fcda0dd First release of universal localization program kits
git-svn-id: svn://10.0.0.236/trunk@206 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:32:42 +00:00
cyeh
442958e53d add the README directory to all platforms by adding it to MozillaCommon
git-svn-id: svn://10.0.0.236/trunk@205 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:26:12 +00:00
cyeh
605596111c First Checked In.
git-svn-id: svn://10.0.0.236/trunk@204 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:10:06 +00:00
cyeh
da3e5b6210 adding build documentation to tree
git-svn-id: svn://10.0.0.236/trunk@203 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 23:08:30 +00:00
pinkerton
91dd9f2a06 Draw menu separators in tree with icon, but no text (used to have text that said "<Separator>" and no icon). (rev sdagley, appr sdagley).
git-svn-id: svn://10.0.0.236/trunk@202 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:55:56 +00:00
wtc
c0ff862b36 Got rid of compiler warnings. We acknowledge the help of Nathan
Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@201 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:55:27 +00:00
pinkerton
0f2d6fead4 Fix for dragging toolbar over the finder and releasing mouse, which before would crash the Finder. (rev sdagley, appr sdagley)
git-svn-id: svn://10.0.0.236/trunk@200 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:54:57 +00:00
wtc
95bc804e1c Got rid of compiler warnings. We acknoweldge the help of Nathan
Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@199 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:49:10 +00:00
wtc
0846173c2b localtime_r is declared on Solaris only if _REENTRANT is defined.
git-svn-id: svn://10.0.0.236/trunk@198 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:48:07 +00:00
wtc
faee9ac904 Got rid of compiler warnings. We acknowledge the help of Nathan
Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@197 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:46:48 +00:00
cyeh
a925c92350 checking in sources to customized version of gmake
git-svn-id: svn://10.0.0.236/trunk@196 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:35:47 +00:00
cyeh
ee9cb51517 adding source to shmsdos
git-svn-id: svn://10.0.0.236/trunk@195 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:30:34 +00:00
cyeh
ca95fefb7a adding in source for uname
git-svn-id: svn://10.0.0.236/trunk@194 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:29:30 +00:00
wtc
3bf56ac245 Fixed printf format mismatch problems. We acknowledge the help of
Nathan Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@193 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:26:32 +00:00
kipp
e92090ec86 made more robust by cd'ing into the correct top level dir before each build rule
git-svn-id: svn://10.0.0.236/trunk@192 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:25:36 +00:00
wtc
d701ff30a1 In PR_GetSpecialFD, cast the PRSpecialFD variable 'osfd' to int
because some compilers make the enum PRSpecialFD an unsigned int
type and complain that 'osfd' is always >= PR_StandardInput, which
has the value 0.


git-svn-id: svn://10.0.0.236/trunk@191 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:25:13 +00:00
wtc
213ccbabb3 Added function declarations to eliminate compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@190 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:22:43 +00:00
wtc
81662fa460 Added declaration of _MD_YIELD.
git-svn-id: svn://10.0.0.236/trunk@189 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:21:00 +00:00
wtc
e34d99abe7 Fixed compiler warnings, mostly by adding function declarations.
git-svn-id: svn://10.0.0.236/trunk@188 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:19:51 +00:00
wtc
cad5ce2d27 Fixed compiler warnings, mostly undeclared functions. We acknoweldge
the help of Nathan Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@187 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:04:19 +00:00
wtc
bc812c4978 Fixed printf format mismatches. Fixed are provided by Nathan Torkington
<gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@186 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:02:11 +00:00
wtc
6be980a494 Fixed compiler warnings, mostly in printf format mismatches. Most of
the fixes are supplied by Nathan Torkington <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@185 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 22:00:47 +00:00
hshaw
99904c2c02 Remainder of softupdt has been checked into the pub tree. Add the modules references back
git-svn-id: svn://10.0.0.236/trunk@184 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:57:19 +00:00
wtc
dd0343d6f1 Removed the -Wno-format compiler switch. We do want to get printf
format mismatch warnings.


git-svn-id: svn://10.0.0.236/trunk@180 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:44:55 +00:00
wtc
84996761f9 Do not build pr/tests by default. This shortens the default build
time.  Also, use 'rm -r -f' instead of 'rm -rf' because the 'rm'
command of tcsh.exe on Win32 does not understand clustered command
line options.


git-svn-id: svn://10.0.0.236/trunk@179 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:40:18 +00:00
kipp
18cc12f1cc signed
git-svn-id: svn://10.0.0.236/trunk@178 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:32:58 +00:00
kipp
5cc8a4677b Removed woofer
git-svn-id: svn://10.0.0.236/trunk@177 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:27:25 +00:00
kipp
f2f1dac566 nuked
git-svn-id: svn://10.0.0.236/trunk@176 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:27:12 +00:00
kipp
67a9893806 pubbed
git-svn-id: svn://10.0.0.236/trunk@175 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:23:46 +00:00
hshaw
dec4926da0 bump rev to 3.1
git-svn-id: svn://10.0.0.236/trunk@173 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:12:08 +00:00
kipp
3974563c5e another makefile tweak
git-svn-id: svn://10.0.0.236/trunk@172 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:08:14 +00:00
hshaw
ecfecf7a81 Free the lizard
git-svn-id: svn://10.0.0.236/trunk@171 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 21:07:10 +00:00
kipp
68ac3f39fe Repaired build problems w/ layout/base dependencies
git-svn-id: svn://10.0.0.236/trunk@170 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 20:56:42 +00:00
kipp
b821fd8fd2 more files to pull
git-svn-id: svn://10.0.0.236/trunk@168 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 20:50:21 +00:00
kipp
e742fdad6c bug fixed
git-svn-id: svn://10.0.0.236/trunk@167 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 20:39:27 +00:00
kipp
fb1503758e moved to pub
git-svn-id: svn://10.0.0.236/trunk@165 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 20:24:54 +00:00
cyeh
964e345ac3 Add ns/cmd/dialup to Mac and Windows
git-svn-id: svn://10.0.0.236/trunk@164 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 19:18:52 +00:00
guha
3c72e5a9cd Fix the problem with sitemaps going away on page
transition


git-svn-id: svn://10.0.0.236/trunk@163 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 02:00:34 +00:00
ramiro
2e963b1145 Make the local file system browser work on unix. The 'file:///' url
prefix was missing.
Thanks to Dan McGuirk <djm@indirect.com>.


git-svn-id: svn://10.0.0.236/trunk@162 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 01:38:17 +00:00
ramiro
e6edb16eff Add editor back to the preferences and fix the editor startup problem.
Thanks to Dan McGuirk <djm@indirect.com>


git-svn-id: svn://10.0.0.236/trunk@161 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 01:30:26 +00:00
guha
bb88621ddd Sitemap bugfixes.
git-svn-id: svn://10.0.0.236/trunk@147 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-10 21:00:30 +00:00
wtc
3b8b53b99f Declare _MD_EarlyInit() to eliminate 'undeclared function' compiler warning.
Contributed by Nat <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@138 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 19:50:19 +00:00
wtc
be7a3234b7 Fixed 'unused variable' warning for the variable 'nfds' in select()
on local-threads-only platforms.  This is pointed out by many people,
including Nat <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@137 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 19:44:46 +00:00
wtc
e5a65835ea Fixed 'unused variable' compiler warning in prsocket.c. This is pointed
out by many people, including Nat <gnat@frii.com>.


git-svn-id: svn://10.0.0.236/trunk@136 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 19:41:13 +00:00
selmer
d3c93b9f3f Add dialup to free source
git-svn-id: svn://10.0.0.236/trunk@131 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 04:22:42 +00:00
selmer
b4b851f192 add the ascii files
git-svn-id: svn://10.0.0.236/trunk@130 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 04:11:30 +00:00
selmer
91d277d401 add ascii files
git-svn-id: svn://10.0.0.236/trunk@129 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 04:07:52 +00:00
selmer
c630e46deb Add binaries with -kb
git-svn-id: svn://10.0.0.236/trunk@128 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 03:54:33 +00:00
ramiro
bafa1dd826 Dont change the cursor to a watch when space-ing through a document.
thanks to Darrell Kindred <dkindred@cmu.edu>
reviewed by djw@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@127 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 02:41:49 +00:00
cyeh
4d77375663 fix windows bustage removing libcnv compression.
git-svn-id: svn://10.0.0.236/trunk@126 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 02:02:37 +00:00
ramiro
8b6045b383 make sure XmNlist gets defined
git-svn-id: svn://10.0.0.236/trunk@125 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 01:47:59 +00:00
cyeh
b11c803590 change log, with proper . extension
git-svn-id: svn://10.0.0.236/trunk@124 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 01:18:48 +00:00
cyeh
1653020b32 change name to have .html extension
git-svn-id: svn://10.0.0.236/trunk@123 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 01:12:31 +00:00
cyeh
67c2ebfd7c add ns/CHANGELOG (history of changes to the repository to default build)
git-svn-id: svn://10.0.0.236/trunk@122 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 00:39:10 +00:00
cyeh
ff6653b3bb Remove for legal reasons.
git-svn-id: svn://10.0.0.236/trunk@120 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 00:33:14 +00:00
valeski
a885ac9a54 various null checks, fixes 107730, rev'd by malmer
git-svn-id: svn://10.0.0.236/trunk@117 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-09 00:07:08 +00:00
montulli
8612e7e168 fix really small pics bug by calling Illegal_to_underscore
Rev: gagan


git-svn-id: svn://10.0.0.236/trunk@109 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 21:23:19 +00:00
pinkerton
644f0dd2e1 Added public DoInlineEditing() (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@108 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:30:13 +00:00
pinkerton
213e41d92d added public DoInlineEdit for the node edit HT event and made RefreshCellRange public (it was protected, but is public in LTreeView). (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@107 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:29:54 +00:00
pinkerton
e942eae6ca Redid workspace selection/shelf notification to fix some bugs. Also now responds to HT's node edit event, though it is still commented out because of redraw problems. Added a slew of comments to make the class (and the messaging scheme) understandable and point out where redraw bugs are. (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@106 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:29:18 +00:00
pinkerton
9abf2be0fa now an LBroadcaster to tell the title area about a change to the current workspace so the name is always correct. (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@105 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:27:48 +00:00
pinkerton
57f4e78bd7 Now current with rewrite of FE/HT messages for opening/closing shelf and setting current workspace. (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@104 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:27:24 +00:00
pinkerton
ceef1596f7 The LCaption in the title area was not correctly bound to the left and the right so it did not grow when the window grew. (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@103 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:26:26 +00:00
pinkerton
1bb93b42df Added a stack-based class for setting/restoring the HT event notification mask (rev sdagley, appr don)
git-svn-id: svn://10.0.0.236/trunk@102 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 20:25:51 +00:00
guha
3dbdfee941 2.1 vs 3.1 lossage
git-svn-id: svn://10.0.0.236/trunk@100 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 05:34:52 +00:00
guha
2e7ea0fb68 makefile.win fix
git-svn-id: svn://10.0.0.236/trunk@99 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 05:06:33 +00:00
cyeh
df6db40c05 Add ns/modules/xml to MozillaAll. per dp. approved donm, ltabb.
git-svn-id: svn://10.0.0.236/trunk@98 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 04:59:56 +00:00
guha
17bf49c7a3 Spankage for new XML to build on Mac
git-svn-id: svn://10.0.0.236/trunk@97 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 04:48:26 +00:00
guha
107906a9eb Fix Mac bustage by adding required casts
git-svn-id: svn://10.0.0.236/trunk@96 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-08 04:44:28 +00:00
5315 changed files with 8847 additions and 1594612 deletions

View File

@@ -1,247 +0,0 @@
# Three different line formats are valid:
# key -a aliases...
# key [options] directory
# key [options] directory files...
#
# Where "options" are composed of:
# -i prog Run "prog" on "cvs commit" from top-level of module.
# -o prog Run "prog" on "cvs checkout" of module.
# -e prog Run "prog" on "cvs export" of module.
# -t prog Run "prog" on "cvs rtag" of module.
# -u prog Run "prog" on "cvs update" of module.
# -d dir Place module in directory "dir" instead of module name.
# -l Top-level directory only -- do not recurse.
#
# NOTE: If you change any of the "Run" options above, you'll have to
# release and re-checkout any working directories of these modules.
#
# And "directory" is a path to a directory relative to $CVSROOT.
#
# The "-a" option specifies an alias. An alias is interpreted as if
# everything on the right of the "-a" had been typed on the command line.
#
# You can encode a module within a module by using the special '&'
# character to interpose another module into the current module. This
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.
ClientSourceProduct -a \
ClientSourceProductWin \
ClientSourceProductMac \
ClientSourceProductUnix \
ClientSourceProductWin -a MozillaCommon MozillaWinOnly
ClientSourceProductMac -a MozillaCommon MozillaMacOnly
ClientSourceProductUnix -a MozillaCommon MozillaUnixOnly
MozillaCommon -a \
ns/LEGAL \
ns/LICENSE \
ns/build \
ns/include \
ns/jpeg \
ns/js \
ns/lib/htmldlgs \
ns/lib/layout \
ns/lib/libcnv \
ns/lib/libi18n \
ns/lib/liblayer \
ns/lib/libmisc \
ns/lib/libmime \
ns/lib/libmocha \
ns/lib/libnet \
ns/lib/libparse \
ns/lib/libpics \
ns/lib/libpwcac \
ns/lib/libstyle \
ns/lib/plugin \
ns/lib/xlate \
ns/lib/xp \
ns/modules/edtplug/classes \
ns/modules/edtplug/src \
ns/modules/edtplug/include \
ns/modules/libfont/classes \
ns/modules/libfont/public \
ns/modules/libfont/src \
ns/modules/libhook \
ns/modules/libimg \
ns/modules/libpref \
ns/modules/libreg \
ns/modules/libutil \
ns/modules/progress/src \
ns/modules/rdf \
ns/modules/schedulr \
ns/modules/security/freenav \
ns/modules/zlib/src \
ns/nav-java/stubs \
ns/nsprpub \
ns/xpcom \
ns/l10n \
ns/nsprpub \
ns/dbm \
ns/modules/schedulr
MozillaWinOnly -a \
ns/client.mak \
ns/cmd/makefile.win \
ns/cmd/wincom \
ns/cmd/winfe \
ns/config \
ns/lib/makefile.win \
ns/modules/coreincl \
ns/modules/edtplug/makefile.win \
ns/makefile.win \
ns/modules/libfont/jmcgen \
ns/modules/libfont/makefile.win \
ns/modules/libfont/producers/makefile.win \
ns/modules/libfont/producers/win \
ns/modules/libfont/producers/win/classes \
ns/modules/libfont/producers/win/classes/netscape \
ns/modules/libfont/producers/win/classes/netscape/fonts \
ns/modules/libfont/producers/win/src \
ns/modules/makefile.win \
ns/modules/progress/makefile.win \
ns/modules/progress/public \
ns/modules/security/makefile.win \
ns/modules/zlib/makefile.win \
ns/nav-java/makefile.win \
JavaStubWin
MozillaUnixOnly -a \
ns/cmd/Makefile \
ns/cmd/stubfe \
ns/cmd/xfe \
ns/config/.cvsignore \
ns/config/AIX.mk \
ns/config/BSD_OS.mk \
ns/config/bsdecho.c \
ns/config/bsdecho.c \
ns/config/clobber_miss.pl \
ns/config/clobber_miss.pl \
ns/config/common.mk \
ns/config/common.mk \
ns/config/config.guess \
ns/config/config.mk \
ns/config/coreconf.mk \
ns/config/coreconf.mk \
ns/config/cvsco.pl \
ns/config/cvsco.pl \
ns/config/fastcwd.pl \
ns/config/fastcwd.pl \
ns/config/FreeBSD.mk \
ns/config/gtscc.c \
ns/config/HP-UX.mk \
ns/config/IRIX.mk \
ns/config/Linux.mk \
ns/config/makecopy.c \
ns/config/makecopy.c \
ns/config/Makefile \
ns/config/Makefile \
ns/config/mangle.c \
ns/config/mangle.c \
ns/config/mantomak.c \
ns/config/mantomak.c \
ns/config/mkdepend \
ns/config/NCR.mk \
ns/config/NEC.mk \
ns/config/NEWS-OS.mk \
ns/config/NEXTSTEP.mk \
ns/config/nfspwd.pl \
ns/config/nfspwd.pl \
ns/config/nodl.pl \
ns/config/nodl.pl \
ns/config/nsinstall.c \
ns/config/nsinstall.c \
ns/config/OSF1.mk \
ns/config/outofdate.pl \
ns/config/outofdate.pl \
ns/config/pathsub.c \
ns/config/pathsub.c \
ns/config/pathsub.h \
ns/config/pathsub.h \
ns/config/pkg2dpth.pl \
ns/config/pkg2dpth.pl \
ns/config/ports \
ns/config/revdepth.pl \
ns/config/revdepth.pl \
ns/config/Rhapsody.mk \
ns/config/rules.mk \
ns/config/SCOOS.mk \
ns/config/SINIX.mk \
ns/config/sj.pl \
ns/config/sj.pl \
ns/config/SunOS.mk \
ns/config/SunOS4.mk \
ns/config/SunOS5.mk \
ns/config/UNIXWARE.mk \
ns/config/xmversion.sh \
ns/lib/Makefile \
ns/Makefile \
ns/modules/edtplug/Makefile \
ns/modules/libfont/jmcgen \
ns/modules/libfont/Makefile \
ns/modules/libfont/producers/Makefile \
ns/modules/Makefile \
ns/modules/progress/Makefile \
ns/modules/progress/public \
ns/modules/security/Makefile \
ns/modules/zlib/Makefile \
ns/nav-java/Makefile \
ns/lib/mariner \
JavaStubUnix
MozillaMacOnly -a \
ns/cmd/macfe \
ns/lib/mac/AutoAdmin \
ns/lib/mac/Includes \
ns/lib/mac/MacMemoryAllocator \
ns/lib/mac/Misc \
ns/lib/mac/MoreFiles \
ns/lib/mac/NSRuntime \
ns/lib/mac/NSStdLib \
ns/lib/mac/patches \
ns/lib/mac/PowerPlant \
ns/lib/mac/UserInterface \
ns/modules/coreincl \
ns/modules/edtplug/macbuild \
ns/modules/libfont/jmcgen/include \
ns/modules/libfont/jmcgen/src \
ns/modules/libfont/macbuild \
ns/modules/progress/macbuild \
ns/modules/progress/public \
ns/modules/zlib/macbuild \
ns/lib/mariner \
JavaStubMac
JavaStubAll -a \
JavaStubWin \
JavaStubMac \
JavaStubUnix
JavaStubCore -a \
ns/sun-java/stubs/include \
ns/sun-java/stubs/src
JavaStubMac -a \
JavaStubCore \
ns/sun-java/stubs/macbuild \
ns/sun-java/stubs/macjri
JavaStubUnix -a \
JavaStubCore \
ns/sun-java/Makefile \
ns/sun-java/stubs/jri \
ns/sun-java/stubs/Makefile
JavaStubWin -a \
JavaStubCore \
ns/sun-java/makefile.win \
ns/sun-java/stubs/jri \
ns/sun-java/stubs/makefile.win

View File

@@ -1,37 +0,0 @@
Please be apprised of the following Legal Notices:
A) Wang contends that its U.S. Patent No. 4, 751,669 ("the '669
Patent") disclosing a "video text" system, is infringed by the following
functionality in the Netscape Navigator code: 1) the animated logo and
status line indicators --See Claims 1,8 and 9; 2) the "File Save As"
function --See Claims 23-27; 3) Bookmarks and Rename Bookmarks in the
Properties window --See Claims 20-22; 4) storing HTML, GIF, and JPEG
files and adding filename extensions based on mime types (performed in
Windows OS) --See Claim 38. Netscape believes the '669 Patent is
invalid and non-infringed. Netscape is vigorously defending against
Wang's claims.
B) Intermind owns pending U.S. patent applications on communications
systems which employ metadata ("channel objects") to define a control
structure for information transfer. The Netscape code does not infringe
as released; however, modifications which utilize channel objects as
described by Intermind should be considered carefully. The following is
a statement from Intermind: "Intermind's claims fundamentally involve
the use of a control structure to automate communications. ...The
essence of Intermind's top claim is that two devices sender and
receiver have persistent storage, communicate over a network,
and exchange a control structure including metadata which describes: 1)
what information is to be updated, 2) when to update this information,
and 3) how to transfer the updated information. In addition, at least
the receiving device must be able to process the metadata in order to
perform the update determination and transfer. Any digital
communications system which incorporates all of these elements will be
covered by Intermind's patents." See Intermind.com.
C) Stac, Inc., and its licensing agent Hi/fn, own several patents which
disclose data compression methods implementing an LZS compression
algorithm, including U.S. Patent Nos. 4,701,745 and 5,016, 009 ("the
Stac Patents"). The Netscape Communicator code does not perform
compression. If you modify the Netscape source code to perform
compression, please take notice of the Stac Patents.

View File

@@ -1,421 +0,0 @@
NETSCAPE PUBLIC LICENSE
Version 1.0
----------------
1. Definitions.
1.1. ``Contributor'' means each entity that creates or contributes to
the creation of Modifications.
1.2. ``Contributor Version'' means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. ``Covered Code'' means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. ``Electronic Distribution Mechanism'' means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. ``Executable'' means Covered Code in any form other than Source
Code.
1.6. ``Initial Developer'' means the individual or entity identified as
the Initial Developer in the Source Code notice required by Exhibit A.
1.7. ``Larger Work'' means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. ``License'' means this document.
1.9. ``Modifications'' means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. ``Original Code'' means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this License
is not already Covered Code governed by this License.
1.11. ``Source Code'' means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus any
associated interface definition files, scripts used to control
compilation and installation of an Executable, or a list of source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. ``You'' means an individual or a legal entity exercising rights
under, and complying with all of the terms of, this License or a future
version of this License issued under Section 6.1. For legal entities,
``You'' includes any entity which controls, is controlled by, or is
under common control with You. For purposes of this definition,
``control'' means (a) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (b) ownership of fifty percent (50%) or more of the
outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Original Code (or portions thereof) with or without
Modifications, or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by Initial
Developer, to make, have made, use and sell (``Utilize'') the
Original Code (or portions thereof), but solely to the extent that
any such patent is reasonably necessary to enable You to Utilize
the Original Code (or portions thereof) and not to any greater
extent that may be necessary to Utilize further Modifications or
combinations.
2.2. Contributor Grant.
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) to use, reproduce, modify, display, perform, sublicense and
distribute the Modifications created by such Contributor (or
portions thereof) either on an unmodified basis, with other
Modifications, as Covered Code or as part of a Larger Work; and
(b) under patents now or hereafter owned or controlled by
Contributor, to Utilize the Contributor Version (or portions
thereof), but solely to the extent that any such patent is
reasonably necessary to enable You to Utilize the Contributor
Version (or portions thereof), and not to any greater extent that
may be necessary to Utilize further Modifications or combinations.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be distributed
only under the terms of this License or a future version of this
License released under Section 6.1, and You must include a copy of this
License with every copy of the Source Code You distribute. You may not
offer or impose any terms on any Source Code version that alters or
restricts the applicable version of this License or the recipients'
rights hereunder. However, You may include an additional document
offering the additional rights described in Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which you contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that the
Modification is derived, directly or indirectly, from Original Code
provided by the Initial Developer and including the name of the Initial
Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If You have knowledge that a party claims an intellectual property
right in particular functionality or code (or its utilization
under this License), you must include a text file with the source
code distribution titled ``LEGAL'' which describes the claim and
the party making the claim in sufficient detail that a recipient
will know whom to contact. If you obtain such knowledge after You
make Your Modification available as described in Section 3.2, You
shall promptly modify the LEGAL file in all copies You make
available thereafter and shall take other steps (such as notifying
appropriate mailing lists or newsgroups) reasonably calculated to
inform those who received the Covered Code that new knowledge has
been obtained.
(b) Contributor APIs.
If Your Modification is an application programming interface and
You own or control patents which are reasonably necessary to
implement that API, you must also include this information in the
LEGAL file.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code, and this License in any documentation for the Source Code, where
You describe recipients' rights relating to Covered Code. If You
created one or more Modification(s), You may add your name as a
Contributor to the notice described in Exhibit A. If it is not possible
to put such notice in a particular Source Code file due to its
structure, then you must include such notice in a location (such as a
relevant directory file) where a user would be likely to look for such
a notice. You may choose to offer, and to charge a fee for, warranty,
support, indemnity or liability obligations to one or more recipients
of Covered Code. However, You may do so only on Your own behalf, and
not on behalf of the Initial Developer or any Contributor. You must
make it absolutely clear than any such warranty, support, indemnity or
liability obligation is offered by You alone, and You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
warranty, support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of the
Covered Code is available under the terms of this License, including a
description of how and where You have fulfilled the obligations of
Section 3.2. The notice must be conspicuously included in any notice in
an Executable version, related documentation or collateral in which You
describe recipients' rights relating to the Covered Code. You may
distribute the Executable version of Covered Code under a license of
Your choice, which may contain terms different from this License,
provided that You are in compliance with the terms of this License and
that the license for the Executable version does not attempt to limit
or alter the recipient's rights in the Source Code version from the
rights set forth in this License. If You distribute the Executable
version under a different license You must make it absolutely clear
that any terms which differ from this License are offered by You alone,
not by the Initial Developer or any Contributor. You hereby agree to
indemnify the Initial Developer and every Contributor for any liability
incurred by the Initial Developer or such Contributor as a result of
any such terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to statute
or regulation then You must: (a) comply with the terms of this License
to the maximum extent possible; and (b) describe the limitations and
the code they affect. Such description must be included in the LEGAL
file described in Section 3.4 and must be included with all
distributions of the Source Code. Except to the extent prohibited by
statute or regulation, such description must be sufficiently detailed
for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A, and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation (``Netscape'') may publish revised
and/or new versions of the License from time to time. Each version will
be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If you create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), you must (a) rename Your license so that the
phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or
any confusingly similar phrase do not appear anywhere in your license
and (b) otherwise make it clear that your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial Developer,
Original Code or Contributor in the notice described in Exhibit A shall
not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER
PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND
ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT
EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a ``commercial item,'' as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer
software'' and ``commercial computer software documentation,'' as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if any,
provides otherwise), excluding its conflict-of-law provisions. With
respect to disputes in which at least one party is a citizen of, or an
entity chartered or registered to do business in, the United States of
America: (a) unless otherwise agreed in writing, all disputes relating
to this License (excepting any dispute relating to intellectual
property rights) shall be subject to final and binding arbitration,
with the losing party paying all costs of arbitration; (b) any
arbitration relating to this Agreement shall be held in Santa Clara
County, California, under the auspices of JAMS/EndDispute; and (c) any
litigation relating to this Agreement shall be subject to the
jurisdiction of the Federal Courts of the Northern District of
California, with venue lying in Santa Clara County, California, with
the losing party responsible for costs, including without limitation,
court costs and reasonable attorneys fees and expenses. The application
of the United Nations Convention on Contracts for the International
Sale of Goods is expressly excluded. Any law or regulation which
provides that the language of a contract shall be construed against the
drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
Except in cases where another Contributor has failed to comply with
Section 3.4, You are responsible for damages arising, directly or
indirectly, out of Your utilization of rights under this License, based
on the number of copies of Covered Code you made available, the
revenues you received from utilizing such rights, and other relevant
factors. You agree to work with affected parties to distribute
responsibility on an equitable basis.
AMENDMENTS
Additional Terms applicable to the Netscape Public License.
I. Effect.
These additional terms described in this Netscape Public License --
Amendments shall apply to the Mozilla Communicator client code and to
all Covered Code under this License.
II. ``Netscape's Branded Code'' means Covered Code that Netscape
distributes and/or permits others to distribute under one or more
trademark(s) which are controlled by Netscape but which are not
licensed for use under this License.
III. Netscape and logo.
This License does not grant any rights to use the trademark
``Netscape'', the ``Netscape N and horizon'' logo or the Netscape
lighthouse logo, even if such marks are included in the Original Code.
IV. Inability to Comply Due to Contractual Obligation.
Prior to licensing the Original Code under this License, Netscape has
licensed third party code for use in Netscape's Branded Code. To the
extent that Netscape is limited contractually from making such third
party code available under this License, Netscape may choose to
reintegrate such code into Covered Code without being required to
distribute such code in Source Code form, even if such code would
otherwise be considered ``Modifications'' under this License.
V. Use of Modifications and Covered Code by Initial Developer.
V.1. In General.
The obligations of Section 3 apply to Netscape, except to the
extent specified in this Amendment, Section V.2 and V.3.
V.2. Other Products.
Netscape may include Covered Code in products other than the
Netscape's Branded Code which are released by Netscape during the
two (2) years following the release date of the Original Code,
without such additional products becoming subject to the terms of
this License, and may license such additional products on
different terms from those contained in this License.
V.3. Alternative Licensing.
Netscape may license the Source Code of Netscape's Branded Code,
including Modifications incorporated therein, without such
additional products becoming subject to the terms of this License,
and may license such additional products on different terms from
those contained in this License.
VI. Arbitration and Litigation.
Notwithstanding the limitations of Section 11 above, the provisions
regarding arbitration and litigation in Section 11(a), (b) and (c) of
the License shall apply to all disputes relating to this License.
EXHIBIT A.
``The contents of this file are subject to the Netscape Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is Mozilla Communicator client code, released March
31, 1998.
The Initial Developer of the Original Code is Netscape Communications
Corporation. Portions created by Netscape are Copyright (C) 1998
Netscape Communications Corporation. All Rights Reserved.
Contributor(s): ______________________________________.''
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. This is due
to time constraints encountered in simultaneously finalizing the
License and in preparing the Original Code for release. You should use
the text of this Exhibit A rather than the text found in the Original
Code Source Code for Your Modifications.]

View File

@@ -1,83 +0,0 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = .
NSPRDIR = nsprpub
NSPR20 = 1
MOZILLA_CLIENT = 1
ifndef NO_MOCHA
DIRS_JS = js
endif
DIRS = config coreconf $(NSPRDIR) jpeg dbm xpcom
ifdef MOZ_NETCAST
DIRS += netcast
endif
ifdef MOZ_JAVA
DIRS += sun-java ldap ifc $(DIRS_JS) nav-java ifc/tools js/jsd
else
DIRS += sun-java nav-java $(DIRS_JS)
endif
ifndef NO_SECURITY
DIRS += security
endif
DIRS += modules lib l10n cmd
ifeq ($(STAND_ALONE_JAVA),1)
DIRS = config lib/xp $(NSPRDIR) jpeg modules/zlib sun-java ifc js ifc/tools sun-java/java
endif
include $(DEPTH)/config/rules.mk
export:: $(OBJS)
# Running this rule assembles all the SDK source pieces into dist/sdk.
# You'll need to run this rule on every platform to get all the
# binaries (e.g. javah) copied there. You'll also have to do special
# magic on a Mac.
sdk-src::
$(SDKINSTALL) include/npapi.h $(SDK)/include/
$(SDKINSTALL) include/jri_md.h $(SDK)/include/
$(SDKINSTALL) include/jritypes.h $(SDK)/include/
$(SDKINSTALL) include/jri.h $(SDK)/include/
$(SDKINSTALL) lib/plugin/npupp.h $(SDK)/include/
$(SDKINSTALL) sdk/common/*.c* $(SDK)/common/
$(SDKINSTALL) sun-java/classsrc/$(ZIP_NAME).x $(SDK)/classes/$(ZIP_NAME)
$(SDKINSTALL) sdk/examples/simple/Source/*.c $(SDK)/examples/simple/Source/
$(SDKINSTALL) sdk/examples/simple/Source/*.java $(SDK)/examples/simple/Source/
$(SDKINSTALL) sdk/examples/simple/Source/*.class $(SDK)/examples/simple/Source/
$(SDKINSTALL) sdk/examples/simple/Source/_gen/*.h $(SDK)/examples/simple/Source/_gen/
$(SDKINSTALL) sdk/examples/simple/Source/_stubs/*.c $(SDK)/examples/simple/Source/_stubs/
$(SDKINSTALL) sdk/examples/simple/Unix/makefile.* $(SDK)/examples/simple/Unix/
$(SDKINSTALL) sdk/examples/simple/Testing/SimpleExample.html $(SDK)/examples/simple/Testing/
$(SDKINSTALL) sdk/examples/simple/readme.html $(SDK)/examples/simple/
$(SDKINSTALL) sdk/examples/UnixTemplate/Source/*.c $(SDK)/examples/UnixTemplate/Source/
$(SDKINSTALL) sdk/examples/UnixTemplate/Testing/Test.html $(SDK)/examples/UnixTemplate/Testing/
$(SDKINSTALL) sdk/examples/UnixTemplate/Unix/makefile.* $(SDK)/examples/UnixTemplate/Unix/
$(SDKINSTALL) sdk/examples/UnixTemplate/readme.html $(SDK)/examples/UnixTemplate/
sdk-bin::
cd sdk; $(MAKE); cd ..
$(SDKINSTALL) $(DIST)/bin/javah$(BIN_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/
$(SDKINSTALL) sdk/examples/simple/Source/$(OBJDIR)/npsimple.$(DLL_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/
$(SDKINSTALL) sdk/examples/UnixTemplate/Source/$(OBJDIR)/nptemplate.$(DLL_SUFFIX) $(SDK)/bin/$(OS_CONFIG)/

View File

@@ -1 +0,0 @@
5009808600

View File

@@ -1,25 +0,0 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DATATYPE="$1"
INFILE="$2"
echo "${DATATYPE} RCDATA"
sed 's/"/""/g' ${INFILE} | awk 'BEGIN { printf("BEGIN\n") } { printf("\"%s\\r\\n\",\n", $0) } END { printf("\"\\0\"\nEND\n") }'
exit 0

View File

@@ -1,45 +0,0 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
#
# Fix brain-damaged compilers that don't understand -o and -c together
#
DASH_C=0
DASH_O=0
for i in $*
do
case $i in
-c) DASH_C=1;;
-o) DASH_O=1;;
*.c) C_SRC=$i;;
*.s) S_SRC=$i;;
*.o) OBJECT=$i;;
esac
done
cc $* || exit $?
# if there was no -c and -o we're done
[ $DASH_C = 1 -a $DASH_O = 1 ] || exit 0
# cc always creates the .o from the .c name
[ $C_SRC ] && OBJ=`basename $C_SRC .c`.o
# or the .o from the .s name
[ $S_SRC ] && OBJ=`basename $S_SRC .s`.o
[ -f $OBJECT ] || [ -f $OBJ ] && mv -f $OBJ $OBJECT

View File

@@ -1,86 +0,0 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
#
# Wrapper for brain-damaged compilers that don't understand -o and -c together.
#
DUMMY="XxxXxxX"
DASH_C=0
DASH_O=0
GET_OBJECT=0
C_SRC="${DUMMY}"
CC_SRC="${DUMMY}"
CPP_SRC="${DUMMY}"
S_SRC="${DUMMY}"
OBJECT="${DUMMY}"
for i in $*
do
if [ ${GET_OBJECT} -eq 1 ]; then
OBJECT="$i"
GET_OBJECT=0
fi
case $i in
-c)
DASH_C=1
;;
-o)
DASH_O=1
GET_OBJECT=1
;;
*.c)
C_SRC="$i"
;;
+.*)
;;
*.cpp)
CPP_SRC="$i"
;;
*.cc)
CC_SRC="$i"
;;
*.s)
S_SRC="$i"
;;
esac
done
CC $* || exit $?
# LAME!!!
if [ -f -O ]; then
mv -f -- -O ${OBJECT}
fi
# if there was no -c and -o we're done
[ ${DASH_C} -eq 1 -a ${DASH_O} -eq 1 ] || exit 0
# cc always creates the .o from the .c name
if [ "${C_SRC}" != "${DUMMY}" ]; then
OBJ=`basename ${C_SRC} .c`.o
elif [ "${CPP_SRC}" != "${DUMMY}" ]; then
OBJ=`basename ${CPP_SRC} .cpp`.o
elif [ "${CC_SRC}" != "${DUMMY}" ]; then
OBJ=`basename ${CC_SRC} .cc`.o
# or the .o from the .s name
elif [ "${S_SRC}" != "${DUMMY}" ]; then
OBJ=`basename ${S_SRC} .s`.o
fi
[ -f ${OBJECT} ] || [ -f ${OBJ} ] && mv -f ${OBJ} ${OBJECT}

View File

@@ -1,88 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
This file overrides all option settings in the IDE. It is an attempt to allow all builds
to have the same options.
Note: We can't use ConditionalMacros.h in this file because it will conflict with
the PowerPlant precompiled headers.
*/
/* warning pragmas */
#pragma warn_hidevirtual on
#pragma check_header_flags on
/* Language features that must be the same across libraries... */
#pragma enumsalwaysint on
#pragma unsigned_char off
#pragma exceptions on
#pragma bool on
/* Save as much space as possible with strings... */
#pragma pool_strings on
#pragma dont_reuse_strings off
#pragma options align=native
#pragma sym on /* Takes no memory. OK in non-debug. */
#ifdef powerc /* ...generating PowerPC */
#pragma toc_data on
#pragma fp_contract on
#pragma readonly_strings on
#ifdef DEBUG
#pragma traceback on
#pragma global_optimizer off
#pragma scheduling off
#pragma peephole off
#pragma optimize_for_size off
#else
#pragma traceback off
#pragma global_optimizer on
#pragma optimization_level 4
#pragma scheduling 604
#pragma peephole on
#pragma optimize_for_size on
#endif
#else /* ...generating 68k */
#pragma code68020 on
#pragma code68881 off
/* Far everything... */
#pragma far_code
#pragma far_data on
#pragma far_strings on
#pragma far_vtables on
#pragma fourbyteints on /* 4-byte ints */
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
#ifdef DEBUG
#pragma macsbug on
#pragma oldstyle_symbols off
#else
#pragma macsbug off
#endif
#endif

View File

@@ -1,38 +0,0 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define OLDROUTINELOCATIONS 0
#define XP_MAC 1
#ifndef NSPR20
#define NSPR20 1
#endif
#define _NSPR 1
#define _NO_FAST_STRING_INLINES_ 1
#define HAVE_BOOLEAN 1
#define NETSCAPE 1
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
/*
This compiles in heap dumping utilities and other good stuff
for developers -- maybe we only want it in for a special SDK
nspr/java runtime(?):
*/
#define DEVELOPER_DEBUG 1
#define MAX(_a,_b) ((_a) < (_b) ? (_b) : (_a))
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))

Binary file not shown.

View File

@@ -1,246 +0,0 @@
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#//------------------------------------------------------------------------
#// Figure out how to do the pull.
#//------------------------------------------------------------------------
!if "$(MOZ_BRANCH)" != ""
CVS_BRANCH=-r $(MOZ_BRANCH)
HAVE_BRANCH=1
!else
HAVE_BRANCH=0
!endif
#//
#// Temporary hardcode (while we figure out how to do this)
#// to support the Core modularity efforts...
#//
!ifndef MOZ_JAVAVER
!ifdef MOZ_MEDIUM
MOZ_JAVAVER =-r JAVA_STUB_RELEASE_19980319
!else
MOZ_JAVAVER =-r JAVA_RELEASE_19980304
!endif
!endif
NSPR20_BRANCH =-r NSPR20_RELEASE_19980304_BRANCH
SECURITY_BRANCH=-r SECURITY_RELEASE_19980210
CORECONF_BRANCH=-r CFG_1_6
DBM_BRANCH =-r DBM_RELEASE_19980319
!if "$(MOZ_DATE)" != ""
CVS_BRANCH=-D "$(MOZ_DATE)"
HAVE_DATE=1
!else
HAVE_DATE=0
!endif
!if $(HAVE_DATE) && $(HAVE_BRANCH)
ERR_MESSAGE=$(ERR_MESSAGE)^
Cannot specify both MOZ_BRANCH and MOZ_DATE
!endif
NMAKE=@nmake -nologo -$(MAKEFLAGS)
#//------------------------------------------------------------------------
#//
#// Stuff a do complete pull and build
#//
#//------------------------------------------------------------------------
default:: build_all
pull_and_build_all:: pull_all \
build_all
#// Do this when you pull a new tree, or else you will often get bugs
#// when replaceing an old dist with a new dist.
pull_clobber_build_all:: pull_all \
clobber_all \
build_all
clobber_build_all:: clobber_all \
build_all
# In theory, we should use some symbol in ns/config/liteness.mak,
# but we haven't pulled the file yet. So, refer to MOZ_LITE and
# MOZ_MEDIUM explicitly .
!if defined(MOZ_LITE) || defined(MOZ_MEDIUM)
pull_all:: pull_client_source_product
!else
pull_all:: pull_client
!endif
!ifndef NO_SECURITY
pull_security:
-cvs -q co $(CORECONF_BRANCH) ns/coreconf
-cvs -q co $(SECURITY_BRANCH) CoreSecurity
!else
pull_security:
!endif
pull_client: pull_security
@echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
cd $(MOZ_SRC)\.
-cvs -q co $(DBM_BRANCH) ns/dbm
-cvs -q co $(CVS_BRANCH) Client50Win
-cvs -q co $(MOZ_JAVAVER) JavaWin
-cvs -q co $(NSPR20_BRANCH) CoreNSPR20
pull_client_source_product:
@echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
cd $(MOZ_SRC)\.
-cvs -q co $(DBM_BRANCH) ns/dbm
-cvs -q co $(CVS_BRANCH) ClientSourceProductWin
-cvs -q co $(MOZ_JAVAVER) JavaStubWin
build_all: build_ldap \
build_dist \
build_client
build_dist:
@echo +++ client.mak: building dist
cd $(MOZ_SRC)\ns
$(NMAKE) -f makefile.win
!if defined(MOZ_LITE) || defined(MOZ_MEDIUM)
build_ldap:
!else
build_ldap:
@echo +++ client.mak: building ldap
cd $(MOZ_SRC)\ns\netsite\ldap\libraries\msdos\winsock
$(NMAKE) -f nsldap.mak DEPEND=1
$(NMAKE) -f nsldap.mak
$(NMAKE) -f nsldap.mak EXPORT=1
!endif
build_client:
@echo +++ client.mak: building client
cd $(MOZ_SRC)\ns\cmd\winfe\mkfiles32
!if "$(MOZ_BITS)" == "16"
$(NMAKE) -f mozilla.mak exports
!endif
$(NMAKE) -f mozilla.mak DEPEND=1
$(NMAKE) -f mozilla.mak
#
# remove all source files from the tree and print a report of what was missed
#
clobber_all:
cd $(MOZ_SRC)\ns
$(NMAKE) -f makefile.win clobber_all
cd $(MOZ_SRC)\ns\cmd\winfe\mkfiles32
$(NMAKE) -f mozilla.mak clobber_all
!if !defined(MOZ_MEDIUM)
cd $(MOZ_SRC)\ns\netsite\ldap\libraries\msdos\winsock
$(NMAKE) -f nsldap.mak clobber_all
!endif
depend:
-del /s /q make.dep
$(NMAKE) -f makefile.win depend
quick:
@cd $(MOZ_SRC)\.
@cvs -q co ns/quickup
@cd $(MOZ_SRC)\ns\quickup
@$(MOZ_TOOLS)\perl5\perl doupdate.pl
#//------------------------------------------------------------------------
#// Utility stuff...
#//------------------------------------------------------------------------
#//------------------------------------------------------------------------
# Verify that MOZ_SRC is set correctly
#//------------------------------------------------------------------------
# Check to see if it is set at all
!if "$(MOZ_SRC)"!=""
#
# create a temp file at the root and make sure it is visible from MOZ_SRC
#
!if [copy $(MAKEDIR)\client.mak $(MAKEDIR)\xyzzy.tmp > NUL] == 0
!endif
!if !EXIST( $(MOZ_SRC)\ns\xyzzy.tmp )
ERR_MESSAGE=$(ERR_MESSAGE)^
MOZ_SRC isn't set correctly: [$(MOZ_SRC)\ns]!=[$(MAKEDIR)]
!endif
!if [del $(MAKEDIR)\xyzzy.tmp]
!endif
!else
# MOZ_SRC isn't set at all
ERR_MESSAGE=$(ERR_MESSAGE)^
Environment variable MOZ_SRC isn't set.
!endif
#//------------------------------------------------------------------------
# Verify that MOZ_BITS is set
#//------------------------------------------------------------------------
!if !defined(MOZ_BITS)
ERR_MESSAGE=$(ERR_MESSAGE)^
Environment variable MOZ_BITS isn't set.
!endif
!if !defined(MOZ_TOOLS)
ERR_MESSAGE=$(ERR_MESSAGE)^
Environment variable MOZ_TOOLS isn't set.
!endif
#//------------------------------------------------------------------------
#// Display error
#//------------------------------------------------------------------------
!if "$(ERR_MESSAGE)" != ""
ERR_MESSAGE = ^
client.mak: ^
$(ERR_MESSAGE) ^
^
client.mak: usage^
^
nmake -f client.mak [MOZ_BRANCH=<cvs_branch_name>] ^
[MOZ_DATE=<cvs_date>]^
[pull_and_build_all]^
[pull_all]^
[pull_dist]^
[pull_client]^
[build_all]^
[build_dist]^
[build_ldap]^
[build_client]^
^
Environment variables:^
^
MOZ_BITS set to either 32 or 16 ^
MOZ_SRC set to the directory above ns or "$(MAKEDIR)\.."^
MOZ_TOOLS set to the directory containing the java compiler see ^
http://warp/tools/nt^
JAVA_HOME set to the same thing as MOZ_TOOLS^
!ERROR $(ERR_MESSAGE)
!endif

View File

@@ -1,21 +0,0 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ..
DIRS = xfe patcher
include $(DEPTH)/config/rules.mk

View File

@@ -1,788 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// CColorPopup.cp
// ===========================================================================
#include "CColorPopup.h"
#include "UGraphicGizmos.h"
#include "UGraphicsUtilities.h"
#include "CTargetedUpdateMenuRegistry.h"
#include "CEditView.h" // constant for menu string resource
#include "edt.h" // EDT calls
#include "prefapi.h"
#include "StSetBroadcasting.h"
#include "CBrowserContext.h" // MWContext
// prototypes
pascal void
colorPopupMDEFProc( short message, MenuHandle theMenu,
Rect *menuRect, Point hitPt, short *whichItem );
// functionality
static
void
colorPopupGetBox( Rect *menuRect, Rect *itemBox, short numItems, short theItem )
{
Rect box;
SetRect( itemBox, 0, 0, 0, 0 );
if ( theItem <= numItems )
{
if ( theItem == CColorPopup::CURRENT_COLOR_ITEM )
{
box.bottom = menuRect->bottom - CColorPopup::COLOR_FRAME_BORDER;
box.top = box.bottom - CColorPopup::COLOR_BOX_HEIGHT;
box.left = menuRect->left + CColorPopup::COLOR_FRAME_BORDER;
box.right = box.left + CColorPopup::COLOR_BOX_HEIGHT;
}
else if ( theItem == CColorPopup::DEFAULT_COLOR_ITEM )
{
box.bottom = menuRect->bottom - CColorPopup::COLOR_FRAME_BORDER
- CColorPopup::COLOR_BOX_HEIGHT;
box.top = box.bottom - CColorPopup::COLOR_BOX_HEIGHT;
box.left = menuRect->left + CColorPopup::COLOR_FRAME_BORDER;
box.right = box.left + CColorPopup::COLOR_BOX_HEIGHT;
}
else if ( theItem == CColorPopup::LAST_COLOR_PICKED_ITEM )
{
box.top = menuRect->top + CColorPopup::COLOR_FRAME_BORDER;
box.bottom = box.top + CColorPopup::COLOR_BOX_HEIGHT;
box.left = menuRect->left + CColorPopup::COLOR_FRAME_BORDER;
box.right = box.left + CColorPopup::COLOR_BOX_HEIGHT;
}
else
{
box.top = menuRect->top /* + CColorPopup::COLOR_FRAME_BORDER */ + CColorPopup::COLOR_HEX_DISPLAY_SIZE;
box.left = menuRect->left + CColorPopup::COLOR_FRAME_BORDER;
box.bottom = box.top + CColorPopup::COLOR_BOX_HEIGHT;
box.right = box.left + CColorPopup::COLOR_BOX_WIDTH;
while ( --theItem > 1 ) // 1 is # menuItems preceding color chip matrix
{
OffsetRect( &box, CColorPopup::COLOR_BOX_WIDTH, 0 );
if ( box.left >= menuRect->right - CColorPopup::COLOR_FRAME_BORDER )
{
box.left = menuRect->left + CColorPopup::COLOR_FRAME_BORDER;
box.right = box.left + CColorPopup::COLOR_BOX_WIDTH;
OffsetRect( &box, 0, CColorPopup::COLOR_BOX_HEIGHT );
}
}
}
*itemBox = box;
}
}
static
Boolean
colorPopupParseColor( Str255 menuStr, RGBColor *theColor )
{
Boolean foundColorFlag = false;
unsigned short part;
short loop;
theColor->red = theColor->green = theColor->blue = 0;
for ( loop = 1; loop <= (unsigned)menuStr[ 0 ] - 6; ++loop )
{
if ( menuStr[0] > 1
&& ( menuStr[ loop ] == CColorPopup::COLOR_CHIP_CHAR
|| menuStr[ loop ] == CColorPopup::LAST_COLOR_PICKED_CHAR
|| menuStr[ loop ] == CColorPopup::DEFAULT_COLOR_CHAR
|| menuStr[ loop ] == CColorPopup::CURRENT_COLOR_CHAR ) )
{
// Converting from ASCII to Hex
// This is BAD code...
part = menuStr[ loop + 1 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 1 ] - 'A' + 10;
theColor->red = part << 4;
part = menuStr[ loop + 2 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 2 ] - 'A' + 10;
theColor->red |= part;
theColor->red = theColor->red << 8;
part = menuStr[ loop + 3 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 3 ] - 'A' + 10;
theColor->green = part << 4;
part = menuStr[ loop + 4 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 4 ] - 'A' + 10;
theColor->green |= part;
theColor->green = theColor->green << 8;
part = menuStr[ loop + 5 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 5 ] - 'A' + 10;
theColor->blue = part << 4;
part = menuStr[ loop + 6 ] - '0';
if ( part > 9 )
part = menuStr[ loop + 6 ] - 'A' + 10;
theColor->blue |= part;
theColor->blue = theColor->blue << 8;
foundColorFlag = true;
break;
}
}
return foundColorFlag;
}
static
void
colorPopupDrawBox( MenuHandle theMenu, Rect *menuRect, short numItems )
{
Boolean wildcardFlag;
CIconHandle cicnHandle;
RGBColor theColor;
const RGBColor black = {0,0,0}, white = {0xFFFF,0xFFFF,0xFFFF};
Rect box;
Str255 menuStr;
short theItem;
for ( theItem = 1; theItem <= numItems; ++theItem )
{
menuStr[ 0 ] = 0;
GetMenuItemText( theMenu, theItem, menuStr );
wildcardFlag = ((menuStr[0] == 0x01 && menuStr[1] == CColorPopup::COLOR_PICKER_CHAR)) ? true : false;
colorPopupGetBox( menuRect, &box, numItems, theItem );
// text (if any)
int stringNum;
switch ( menuStr[1] )
{
default: stringNum = 0; break;
case CColorPopup::LAST_COLOR_PICKED_CHAR: stringNum = 20; break;
case CColorPopup::DEFAULT_COLOR_CHAR: stringNum = 21; break;
case CColorPopup::CURRENT_COLOR_CHAR: stringNum = 22; break;
}
if ( stringNum )
{
Point baseLinePoint;
baseLinePoint.v = box.top + CColorPopup::COLOR_BOX_HEIGHT - 4;
baseLinePoint.h = box.right + CColorPopup::COLOR_FRAME_BORDER;
Str255 menuItemStr;
menuItemStr[ 0 ] = 0;
::GetIndString( menuItemStr, CEditView::STRPOUND_EDITOR_MENUS, stringNum );
::RGBBackColor( &white );
::RGBForeColor( &black );
::MoveTo( baseLinePoint.h, baseLinePoint.v );
::DrawString( menuItemStr );
}
// draw color chip
if ( (true == wildcardFlag ) || (colorPopupParseColor( menuStr, &theColor ) == true))
{
::InsetRect( &box, 1, 1 );
::RGBForeColor( &black );
::MoveTo( box.left, box.bottom - 1 );
::LineTo( box.left, box.top );
::LineTo( box.right - 1, box.top );
#ifdef THREE_D_EFFECT_ON_COLOR_POPUP
::RGBForeColor( &white );
#endif
::LineTo( box.right - 1, box.bottom - 1 );
::LineTo( box.left, box.bottom - 1 );
if ( true == wildcardFlag )
{
RGBForeColor( &black );
if ( (cicnHandle = GetCIcon(11685)) != NULL )
{
// don't scale, plot into same size rect
Rect r = (**cicnHandle).iconPMap.bounds;
box.bottom = box.top + r.bottom - r.top;
box.right = box.left + r.right - r.left;
::PlotCIcon( &box, cicnHandle );
::DisposeCIcon( cicnHandle );
}
}
else
{
InsetRect( &box, 1, 1 );
RGBForeColor( &theColor );
PaintRect( &box );
::RGBForeColor( &black );
box.left += ( box.right-box.left ) / 2;
box.right = box.left;
box.top += ( box.bottom - box.top ) / 2;
box.bottom = box.top;
InsetRect( &box, -4, -4 );
}
}
}
}
static
void
colorPopupChooseColor( Rect *menuRect, Point hitPt,
short *whichItem, short numItems, RGBColor *backColor )
{
RGBColor aColor;
Rect box, oldBox;
short newItem = 0, loop;
colorPopupGetBox( menuRect, &oldBox, numItems, *whichItem );
if ( PtInRect( hitPt, menuRect ) )
{
for ( loop = 1; loop <= numItems; loop++ )
{
colorPopupGetBox( menuRect, &box, numItems, loop );
if ( PtInRect( hitPt, &box ) )
{
newItem = loop;
break;
}
}
if ( *whichItem != newItem )
{
// deselect old menu item, select new menu item
if ( *whichItem > 0 )
{
RGBForeColor( backColor );
FrameRect( &oldBox );
}
if ( newItem > 0 )
{
aColor.red = aColor.blue = aColor.green = 0;
RGBForeColor( &aColor );
FrameRect( &box );
}
#if COLOR_DISPLAY_TEXT
box = *menuRect;
box.top = box.bottom - COLOR_HEX_DISPLAY_SIZE;
EraseRect( &box );
if ( newItem > 0 )
{
menuStr[ 0 ] = 0;
GetMenuItemText( theMenu, newItem, menuStr );
if ( colorPopupParseColor( menuStr, &aColor ) == true )
{
if ( menuStr[ 0 ] )
{
// XXX should save/restore current font info, and set a particular (system?) font
MoveTo( box.left + ((box.right-box.left) / 2) - ( ::StringWidth(menuStr) / 2),
box.bottom - 4);
DrawString( menuStr );
}
}
}
#endif
*whichItem = newItem;
}
}
else if ( *whichItem > 0 )
{
// deselect old menu item
RGBForeColor( backColor );
FrameRect( &oldBox );
#if COLOR_DISPLAY_TEXT
box = *menuRect;
box.top = box.bottom - COLOR_HEX_DISPLAY_SIZE;
EraseRect( &box );
#endif
*whichItem = 0; // clear old item
}
}
pascal void
colorPopupMDEFProc(short message, MenuHandle theMenu,
Rect *menuRect, Point hitPt, short *whichItem)
{
if ( theMenu == NULL )
return;
PenState pnState;
RGBColor foreColor, backColor;
#if 0
Boolean growRowsFlag = false;
#endif
short numItems, numCols, numRows;
numItems = ::CountMItems( theMenu );
::GetPenState( &pnState );
::GetForeColor( &foreColor );
::PenNormal();
switch( message )
{
case mDrawMsg:
colorPopupDrawBox( theMenu, menuRect, numItems );
break;
case mChooseMsg:
::GetBackColor( &backColor );
colorPopupChooseColor( menuRect, hitPt, whichItem, numItems, &backColor );
::RGBBackColor( &backColor );
break;
case mSizeMsg:
// determine # of rows/cols needed
#if 0
if ( numItems > 0 )
{
numRows = numCols = 1;
while( numItems > (numRows * numCols) )
{
if ( growRowsFlag )
++numRows;
else
++numCols;
growRowsFlag = (!growRowsFlag);
}
}
#endif
#if 1
// hard code these for now
numRows = 10;
numCols = 10;
#endif
// why are the width and height backwards? If they are switched, the menu is wrong shape
(**theMenu).menuHeight = (numRows * CColorPopup::COLOR_BOX_HEIGHT) + (2 * CColorPopup::COLOR_FRAME_BORDER);
(**theMenu).menuWidth = (numCols * CColorPopup::COLOR_BOX_WIDTH) + CColorPopup::COLOR_FRAME_BORDER;
#if COLOR_DISPLAY_TEXT
(**theMenu).menuWidth += CColorPopup::COLOR_HEX_DISPLAY_SIZE;
#endif
break;
case mPopUpMsg:
::SetRect( menuRect, hitPt.v, hitPt.h,
hitPt.v + (**theMenu).menuWidth, hitPt.h + (**theMenu).menuHeight );
break;
/*
case mDrawItemMsg:
break;
case mCalcItemMsg:
break;
*/
}
::RGBForeColor( &foreColor );
SetPenState( &pnState );
}
// This class overrides CPatternButtonPopup to provide a popup menu which
// changes the descriptor based on the menu selection
// assumes left-justified text in DrawButtonTitle()
// ---------------------------------------------------------------------------
// ¥ CColorPopup
// ---------------------------------------------------------------------------
// Stream-based ctor
CColorPopup::CColorPopup(LStream* inStream)
: CPatternButtonPopupText(inStream)
{
}
void CColorPopup::FinishCreateSelf()
{
LView *superview = NULL, *view = GetSuperView();
while ( view )
{
view = view->GetSuperView();
if ( view )
superview = view;
}
mEditView = (CEditView *)superview->FindPaneByID( CEditView::pane_ID );
mDoSetLastPickedPreference = false;
// need to Finish FinishCreateSelf to get menus set for retrieval
super::FinishCreateSelf();
// set the control by adjusting the menu and then getting the current color
// unfortunately, when this is called, the editView doesn't have an mwcontext
// so we can't query to find out what the current color is to set it properly
}
void
CColorPopup::InitializeCurrentColor()
{
MenuHandle menuh;
menuh = GetMenu()->GetMacMenuH();
MWContext *mwcontext;
if ( mEditView )
mwcontext = mEditView->GetNSContext()
? mEditView->GetNSContext()->operator MWContext*()
: NULL;
else
mwcontext = NULL;
char colorstr[9];
LO_Color color;
Boolean isColorFound = false;
// first try to get the color out of the character data
EDT_CharacterData* chardata;
chardata = EDT_GetCharacterData( mwcontext );
if ( chardata && chardata->pColor )
{
isColorFound = true;
color = *chardata->pColor;
XP_SPRINTF( &colorstr[2], "%02X%02X%02X", color.red, color.green, color.blue);
}
if ( chardata )
EDT_FreeCharacterData( chardata );
// if we still haven't found it, let's try the page data
if ( !isColorFound )
{
EDT_PageData *pagedata = EDT_GetPageData( mwcontext );
if ( pagedata && pagedata->pColorText )
{
isColorFound = true;
color = *pagedata->pColorText;
XP_SPRINTF( &colorstr[2], "%02X%02X%02X", color.red, color.green, color.blue);
}
if ( pagedata )
EDT_FreePageData( pagedata );
}
// if we still haven't found the color, get the browser preference
if ( !isColorFound )
{
// editor.text_color
int iSize = 9;
int result = PREF_GetCharPref( "browser.foreground_color", &colorstr[1], &iSize );
if ( result != PREF_NOERROR )
colorstr[1] = 0; // zero string if error is encountered
}
colorstr[1] = CURRENT_COLOR_CHAR; // put in leading character
colorstr[0] = strlen( &colorstr[1] );
::SetMenuItemText( menuh, CURRENT_COLOR_ITEM, (unsigned char *)&colorstr );
// set descriptor of control
if ( GetValue() == CURRENT_COLOR_ITEM )
{
SetDescriptor( (const unsigned char *)colorstr );
Refresh(); // inval the control's visible pane area
}
}
// ---------------------------------------------------------------------------
// ¥ AdjustMenuContents
// ---------------------------------------------------------------------------
// Set last color picked (first item).
void
CColorPopup::AdjustMenuContents()
{
MenuHandle menuh;
menuh = GetMenu()->GetMacMenuH();
// initialize last color picked
char colorstr[9];
int iSize = 9;
int result;
// note hack to avoid converting c-string to p-string
result = PREF_GetCharPref( "editor.last_color_used", &colorstr[1], &iSize );
if ( result == PREF_NOERROR )
{
colorstr[1] = LAST_COLOR_PICKED_CHAR; // replace '#' with '<'
colorstr[0] = strlen( &colorstr[1] );
::SetMenuItemText( menuh, LAST_COLOR_PICKED_ITEM, (unsigned char *)&colorstr );
}
// initialize the default color
result = PREF_GetCharPref( "browser.foreground_color", &colorstr[1], &iSize );
if ( result == PREF_NOERROR )
{
colorstr[1] = DEFAULT_COLOR_CHAR; // replace '#' with '<'
colorstr[0] = strlen( &colorstr[1] );
::SetMenuItemText( menuh, DEFAULT_COLOR_ITEM, (unsigned char *)&colorstr );
}
// initialize the current color
InitializeCurrentColor();
}
void CColorPopup::HandlePopupMenuSelect( Point inPopupLoc, Int16 inCurrentItem,
Int16& outMenuID, Int16& outMenuItem )
{
super::HandlePopupMenuSelect( inPopupLoc, inCurrentItem, outMenuID, outMenuItem );
// check if we need to set the preference here...
mDoSetLastPickedPreference = ( outMenuID && outMenuItem != DEFAULT_COLOR_ITEM );
}
void CColorPopup::SetValue(Int32 inValue)
{
if ( inValue == 0 )
inValue = CURRENT_COLOR_ITEM;
Boolean shouldBroadcast;
// Handle color picker item special
if ( inValue == COLOR_PICKER_ITEM )
{
mValue = inValue; // Store new value to broadcast it
BroadcastValueMessage(); // Inform Listeners of value change
inValue = CURRENT_COLOR_ITEM; // Reset value to current color
shouldBroadcast = false; // Already broadcast above; don't do again
}
else
shouldBroadcast = IsBroadcasting();
// broadcast only if it's not a color picker item (handled above)
StSetBroadcasting setBroadcasting( this, shouldBroadcast );
super::SetValue( inValue );
}
// ---------------------------------------------------------------------------
// ¥ HandleNewValue
// ---------------------------------------------------------------------------
// Hook for handling value changes. Called by SetValue.
// Note that the setting of the new value is done by CPatternButtonPopup::SetValue.
// Therefore, GetValue() will still return the old value here, so the old value is
// still available in this method.
Boolean
CColorPopup::HandleNewValue(Int32 inNewValue)
{
Str255 str;
MenuHandle menuh;
menuh = GetMenu()->GetMacMenuH();
::GetMenuItemText ( menuh, inNewValue, str );
if ( str[1] != COLOR_PICKER_CHAR )
SetDescriptor( str );
if ( mDoSetLastPickedPreference
&& str[1] != LAST_COLOR_PICKED_CHAR && str[1] != COLOR_PICKER_CHAR )
{
mDoSetLastPickedPreference = false;
// skip over any text which might preceed color
int index;
for ( index = 1; index <= str[0]
&& str[index] != LAST_COLOR_PICKED_CHAR
&& str[index] != COLOR_CHIP_CHAR
&& str[index] != COLOR_PICKER_CHAR
&& str[index] != DEFAULT_COLOR_CHAR
&& str[index] != CURRENT_COLOR_CHAR; ++index )
;
if ( index + 7 < str[0] )
str[index + 7] = 0; // null terminate after symbol + 6chars of color
str[ index ] = COLOR_CHIP_CHAR; // prefs assume #-format color
p2cstr( str );
int result;
result = PREF_SetCharPref( "editor.last_color_used", (char *)&str[index-1] );
// skip past initial symbol; index-1 since now c-string
}
return false;
}
const Int16 cPopupArrowHeight = 5; // height of the arrow
const Int16 cPopupArrowWidth = 9; // widest width of the arrow
void
CColorPopup::DrawButtonContent(void)
{
CPatternButtonPopupText::DrawButtonContent();
DrawPopupArrow();
}
void
CColorPopup::DrawButtonTitle(void)
{
}
void
CColorPopup::DrawButtonGraphic(void)
{
ResIDT theSaveID = GetGraphicID();
ResIDT theNewID = theSaveID;
RGBColor foreColor, theColor;
const RGBColor black={0,0,0};
Int32 theValue = GetValue();
if (theValue > 0)
{
if ( theValue == COLOR_PICKER_ITEM )
theValue = CURRENT_COLOR_ITEM;
if (GetMenuItemRGBColor((short)theValue, &theColor) == true)
{
CButton::CalcGraphicFrame();
InsetRect(&mCachedGraphicFrame, (mCachedGraphicFrame.right-mCachedGraphicFrame.left-12)/2,
(mCachedGraphicFrame.bottom-mCachedGraphicFrame.top-12)/2);
::GetForeColor(&foreColor);
::RGBForeColor(&black);
::FrameRect(&mCachedGraphicFrame);
::RGBForeColor(&foreColor);
::InsetRect(&mCachedGraphicFrame,1,1);
::RGBForeColor(&theColor);
::PaintRect(&mCachedGraphicFrame);
}
else
theValue = CURRENT_COLOR_ITEM; // not sure this is the right thing;
// it'd be nice if GetMenuItemRGBColor always returned true
}
}
void
CColorPopup::DrawPopupArrow(void)
{
Rect theFrame;
CalcLocalFrameRect(theFrame);
Int16 width = theFrame.right - theFrame.left;
Int16 height = theFrame.bottom - theFrame.top;
theFrame.top += ((height - cPopupArrowHeight) / 2);
theFrame.left = theFrame.right - cPopupArrowWidth - 7;
theFrame.right = theFrame.left + cPopupArrowWidth - 1;
theFrame.bottom = theFrame.top + cPopupArrowHeight - 1;
// check if we have moved past the right edge of the button
// if so, adjust it back to the right edge of the button
if ( theFrame.right > mCachedButtonFrame.right - 4 )
{
theFrame.right = mCachedButtonFrame.right - 4;
theFrame.left = theFrame.right - cPopupArrowWidth - 1;
}
UGraphicGizmos::DrawPopupArrow(
theFrame,
IsEnabled(),
IsActive(),
IsTrackInside());
}
#pragma mark -
// always call ProcessCommandStatus for popup menus which can change values
void
CColorPopup::HandleEnablingPolicy()
{
LCommander* theTarget = LCommander::GetTarget();
MessageT buttonCommand = GetValueMessage();
Boolean enabled = false;
Boolean usesMark = false;
Str255 outName;
Char16 outMark;
if (!CTargetedUpdateMenuRegistry::UseRegistryToUpdateMenus() ||
CTargetedUpdateMenuRegistry::CommandInRegistry(buttonCommand))
{
if (!IsActive() || !IsVisible())
return;
if (!theTarget)
return;
CPatternButtonPopup::HandleEnablingPolicy();
if (buttonCommand)
theTarget->ProcessCommandStatus(buttonCommand, enabled, usesMark, outMark, outName);
}
CPatternButtonPopup::Enable();
}
Boolean
CColorPopup::GetMenuItemRGBColor(short menuItem, RGBColor *theColor)
{
Str255 str;
MenuHandle menuh;
Boolean colorFoundFlag;
menuh = GetMenu()->GetMacMenuH();
::GetMenuItemText( menuh, menuItem, str );
colorFoundFlag = colorPopupParseColor( str, theColor );
return colorFoundFlag;
}
short
CColorPopup::GetMenuItemFromRGBColor(RGBColor *theColor)
{
MenuHandle menuh;
RGBColor tempColor;
Str255 str;
short loop,numItems,retVal=CURRENT_COLOR_ITEM; // return current color if not found
if ((menuh = GetMenu()->GetMacMenuH()) != NULL)
{
numItems = ::CountMItems(menuh);
for (loop=1; loop<= numItems; loop++)
{
::GetMenuItemText( menuh, loop, str);
if (colorPopupParseColor(str, &tempColor) == true)
{
if ((tempColor.red == theColor->red) && (tempColor.blue == theColor->blue) && (tempColor.green == theColor->green))
{
retVal = loop;
break;
}
}
}
}
return retVal;
}

View File

@@ -1,74 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CPatternButtonPopupText.h"
class CEditView;
class CColorPopup : public CPatternButtonPopupText
{
public:
enum { class_ID = 'Cpop' };
enum { COLOR_DISPLAY_TEXT = 0, // need to fix "*" bug before turning on (among other things)
COLOR_FRAME_BORDER = 2,
COLOR_BOX_WIDTH = 14,
COLOR_BOX_HEIGHT = 14,
COLOR_HEX_DISPLAY_SIZE = 16
};
enum {
LAST_COLOR_PICKED_CHAR = '<',
LAST_COLOR_PICKED_ITEM = 1,
COLOR_CHIP_CHAR = '#',
COLOR_PICKER_CHAR = '*',
COLOR_PICKER_ITEM = 62,
DEFAULT_COLOR_CHAR = '@',
DEFAULT_COLOR_ITEM = 72,
CURRENT_COLOR_CHAR = '.',
CURRENT_COLOR_ITEM = 73
};
typedef CPatternButtonPopupText super;
static void* CreateCColorPopupStream( LStream *inStream ) {return( new CColorPopup (inStream ));};
CColorPopup( LStream *inStream ); // ¥ Constructor
virtual void FinishCreateSelf();
// ¥ drawing
void DrawButtonContent(void);
void DrawButtonTitle(void);
void DrawPopupArrow(void);
void DrawButtonGraphic(void);
// ¥ hooks
virtual void SetValue( Int32 inValue );
virtual void AdjustMenuContents();
virtual void HandlePopupMenuSelect( Point inPopupLoc, Int16 inCurrentItem,
Int16& outMenuID, Int16& outMenuItem );
virtual Boolean HandleNewValue(Int32 inNewValue);
virtual Boolean GetMenuItemRGBColor(short menuItem, RGBColor *theColor);
virtual short GetMenuItemFromRGBColor(RGBColor *theColor);
void InitializeCurrentColor();
protected:
virtual void HandleEnablingPolicy();
CEditView *mEditView;
Boolean mDoSetLastPickedPreference;
};

View File

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// CComposerDragTask.cp
// ===========================================================================
#include "CComposerDragTask.h"
// ---------------------------------------------------------------------------
// ¥ CComposerDragTask
// ---------------------------------------------------------------------------
CComposerDragTask::CComposerDragTask(
const EventRecord& inEventRecord,
const Rect& inGlobalFrame,
CHTMLView& inHTMLView)
: mGlobalFrame(inGlobalFrame),
mHTMLView(inHTMLView),
super(inEventRecord)
{
}
// ---------------------------------------------------------------------------
// ¥ ~CComposerDragTask
// ---------------------------------------------------------------------------
CComposerDragTask::~CComposerDragTask()
{
}
// ---------------------------------------------------------------------------
// ¥ AddFlavors
// ---------------------------------------------------------------------------
void
CComposerDragTask::AddFlavors( DragReference /* inDragRef */ )
{
OSErr theErr;
theErr = ::AddDragItemFlavor( mDragRef, (ItemReference)this, emComposerNativeDrag,
nil, 0, flavorNotSaved | flavorSenderTranslated );
ThrowIfOSErr_(theErr);
}
void
CComposerDragTask::MakeDragRegion( DragReference /* inDragRef */, RgnHandle /* inDragRegion */ )
{
AddRectDragItem((ItemReference)&mHTMLView, mGlobalFrame);
}

View File

@@ -1,56 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// CComposerDragTask.h
// ===========================================================================
#ifndef CComposerDragTask_H
#define CComposerDragTask_H
#pragma once
// Includes
#include <LDragTask.h>
class CHTMLView;
#define emComposerNativeDrag 'CNDr' // others defined in "resgui.h"
// Class declaration
class CComposerDragTask : public LDragTask
{
public:
typedef LDragTask super;
CComposerDragTask( const EventRecord& inEventRecord,
const Rect& inGlobalFrame, CHTMLView& inHTMLView );
virtual ~CComposerDragTask();
protected:
virtual void AddFlavors( DragReference inDragRef );
virtual void MakeDragRegion( DragReference inDragRef, RgnHandle inDragRegion );
Rect mGlobalFrame;
CHTMLView& mHTMLView;
};
#endif

View File

@@ -1,320 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CEditDictionary.h"
#include "CLargeEditField.h" // msg_EditField2
#include "LGAPushButton.h"
#include "resgui.h" // msg_Help
#include "macutil.h" // ShowHelp
#include "CSpellChecker.h" // ISpellChecker
// need to include "ntypes.h" before "xp_help.h" because
// "xp_help.h" doesn't include definition of MWContext though it should
#include "ntypes.h"
#include "xp_help.h" // HELP_SPELL_CHECK
// If user has changed the word field, figure out the length and enable/disable appropriately
void CEditDictionary::ListenToMessage ( MessageT inMessage,
void* ioParam ) {
Assert_(mWordNameField);
Assert_(mAddButton);
// This happens when user types
if (inMessage == msg_EditField2) {
if ((**(mWordNameField->GetMacTEH())).teLength) {
mAddButton->Enable();
} else {
mAddButton->Disable();
}
// User clicked in words table
} else if (inMessage == WordsTableID) {
Boolean atleastoneselected = false;
// Must have at least one cell selected for remove to be valid
STableCell selchecker(0,0);
if (mWordsView->GetNextSelectedCell(selchecker)) {
atleastoneselected = true;
mRemoveButton->Enable();
} else {
mRemoveButton->Disable();
}
// Replace is enabled if there is a valid word in New Word Edit Field
// And exactly one word is selected
if ((**(mWordNameField->GetMacTEH())).teLength && atleastoneselected &&
!mWordsView->GetNextSelectedCell(selchecker) ) {
mReplaceButton->Enable();
} else {
mReplaceButton->Disable();
}
// User left words table
} else if (inMessage == msg_LeaveDictionaryTable) {
mRemoveButton->Disable();
mReplaceButton->Disable();
// If user clicks on Remove Button
} else if (inMessage == RemoveButtonID) {
RemoveSelectedWords();
// If user clicks on Replace Button
} else if (inMessage == ReplaceButtonID) {
ReplaceSelectedWord();
// If user clicks on OK Button
} else if (inMessage == msg_OK) {
MakeDictionaryChangesPermanent();
AttemptClose();
// If user clicks on Cancel Button
} else if (inMessage == msg_Cancel) {
AttemptClose();
// User clicks on Help Button
} else if (inMessage == msg_Help) {
ShowHelp(HELP_SPELL_CHECK);
// This is the case when something important happens (selection, deselection, etc.)
// to the New Word edit field. Check status of word
} else if (inMessage == WordID) {
if ((**(mWordNameField->GetMacTEH())).teLength) {
mAddButton->Enable();
} else {
mAddButton->Disable();
}
// Add word to dictionary
} else if (inMessage == AddButtonID) {
AddNewWord();
} else {
LGADialogBox::ListenToMessage(inMessage, ioParam);
}
}
//-------------------------------------------------------------------------------------
// CEditDictionary::MakeDictionaryChangesPermanent
// Take words in view and set in dictionary
//-------------------------------------------------------------------------------------
void CEditDictionary::MakeDictionaryChangesPermanent() {
STableCell currCellLoc(1,1);
Str255 currCellData;
int maxsize = 255;
mISpellChecker->ResetPersonalDictionary();
for (currCellLoc.row = 1; currCellLoc.row <= mNumWords; currCellLoc.row++) {
maxsize = 255;
mWordsView->GetCellData(currCellLoc, currCellData, maxsize);
mISpellChecker->AddWordToPersonalDictionary(p2cstr(currCellData));
}
}
//-------------------------------------------------------------------------------------
// CEditDictionary::RemoveSelectedWord
// Remove words that are currently selected
//-------------------------------------------------------------------------------------
void CEditDictionary::RemoveSelectedWords() {
STableCell currCellLoc(0,0);
int rowstodelete = 0;
while (mWordsView->GetNextSelectedCell(currCellLoc)) {
rowstodelete++;
}
currCellLoc = mWordsView->GetFirstSelectedCell();
mWordsView->RemoveRows(rowstodelete, currCellLoc.row, true);
mNumWords-=rowstodelete;
}
//-------------------------------------------------------------------------------------
// CEditDictionary::ReplaceSelectedWord
// Remove currently selected word with word in New Word box
//-------------------------------------------------------------------------------------
void CEditDictionary::ReplaceSelectedWord() {
STableCell currCellLoc;
Str255 theWord;
mWordNameField->GetDescriptor(theWord);
currCellLoc = mWordsView->GetFirstSelectedCell();
if (mWordsView->IsValidCell(currCellLoc)) {
mWordsView->SetCellData(currCellLoc, theWord, theWord[0] + 1);
mWordsView->RefreshCell(currCellLoc);
}
}
//-------------------------------------------------------------------------------------
// CEditDictionary::AddNewWord
// Add the word in "New Word" edit field to personal dictionary
//-------------------------------------------------------------------------------------
void CEditDictionary::AddNewWord() {
Str255 theWord;
Str255 currWord;
Assert_(mWordNameField);
Assert_(mISpellChecker);
STableCell cell(1,1);
Uint32 maxbytes;
mWordNameField->GetDescriptor(theWord);
/*
Check to make sure word is not already in the list. If it is, then highlight that word
and return so we don't insert.
*/
for (cell.row = 1; cell.row <= mNumWords; cell.row++) {
maxbytes = 255;
mWordsView->GetCellData(cell, currWord, maxbytes);
if (currWord[0] == theWord[0] &&
!strncmp(reinterpret_cast<const char *>(&(currWord[1])), reinterpret_cast<const char *>(&(theWord[1])), theWord[0]) ) { // If word already exists exit
mWordsView->UnselectAllCells();
mWordsView->SelectCell(cell);
return;
}
}
mWordsView->InsertRows(1, mNumWords, theWord, theWord[0] + 1, Refresh_Yes);
mNumWords++;
cell.row = mNumWords;
mWordsView->UnselectAllCells();
mWordsView->SelectCell(cell);
}
//-------------------------------------------------------------------------------------
// CEditDictionary::FinishCreateSelf
// Setup object references
//-------------------------------------------------------------------------------------
void CEditDictionary::FinishCreateSelf () {
mAddButton = dynamic_cast<LGAPushButton *>(FindPaneByID(AddButtonID));
mReplaceButton = dynamic_cast<LGAPushButton *>(FindPaneByID(ReplaceButtonID));
mRemoveButton = dynamic_cast<LGAPushButton *>(FindPaneByID(RemoveButtonID));
mHelpButton = dynamic_cast<LGAPushButton *>(FindPaneByID(HelpButtonID));
mWordNameField = dynamic_cast<CLargeEditFieldBroadcast *>(FindPaneByID(WordID));
mWordsView = dynamic_cast<CTextTable *>(FindPaneByID( WordsTableID ));
ThrowIfNil_(mAddButton);
ThrowIfNil_(mReplaceButton);
ThrowIfNil_(mRemoveButton);
ThrowIfNil_(mHelpButton);
ThrowIfNil_(mWordNameField);
ThrowIfNil_(mWordsView);
LGADialogBox::FinishCreateSelf();
PenState penState;
::GetPenState( &penState );
mWordsView->AddAttachment( new LColorEraseAttachment( &penState, NULL, NULL, true ) );
mAddButton->Disable(); // Add button should be originally disabled
mReplaceButton->Disable();
mRemoveButton->Disable();
mAddButton->AddListener( this );
mReplaceButton->AddListener( this );
mRemoveButton->AddListener( this );
mWordNameField->AddListener( this );
mWordsView->AddListener( this );
mHelpButton->AddListener( this );
}
// Constructor
CEditDictionary::CEditDictionary(LStream *inStream) : mNumWords(0),
mWordNameField(NULL), mISpellChecker(NULL), mAddButton(NULL), mWordsView(NULL),
mHelpButton(NULL), LGADialogBox (inStream) {
}
//-------------------------------------------------------------------------------------
// CEditDictionary::SetISPellChecker
// Sets personal dictionary and inserts into GUI
//-------------------------------------------------------------------------------------
void CEditDictionary::SetISpellChecker(ISpellChecker *i) {
STableCell cell(0, 1);
int unusedNumber;
char word_buffer[max_word_length];
int curr_word_length;
mISpellChecker = i;
cell.row = 0;
if ((mISpellChecker->GetFirstPersonalDictionaryWord(word_buffer, max_word_length) >= 0) && mWordsView) {
mWordsView->FocusDraw();
do {
mNumWords++;
cell.row++;
curr_word_length = strlen(word_buffer);
CStr255 pascalstring( word_buffer );
mWordsView->InsertRows(1, cell.row-1, NULL ,0, Refresh_Yes);
mWordsView->SetCellData(cell, pascalstring, curr_word_length + 1);
// Insert the words into dialog box here!
} while (mISpellChecker->GetNextPersonalDictionaryWord(word_buffer, max_word_length) >= 0);
}
mWordsView->GetTableSize(mNumWords, unusedNumber);
}
//-------------------------------------------------------------------------------------
// CEditDictionary::GetISPellChecker
// Get the Personal Dictionary
//-------------------------------------------------------------------------------------
ISpellChecker *CEditDictionary::GetISpellChecker() {
return mISpellChecker;
}
//-------------------------------------------------------------------------------------
// CEditDictionaryTable::BeTarget()
// Broadcast messages when we become target so we can setup buttons
//-------------------------------------------------------------------------------------
void CEditDictionaryTable::BeTarget() {
CTextTable::BeTarget();
BroadcastMessage(CEditDictionary::WordsTableID, NULL);
}
//-------------------------------------------------------------------------------------
// CEditDictionaryTable::DontBeTarget()
// Broadcast messages when we lose target so we can setup buttons
//-------------------------------------------------------------------------------------
void CEditDictionaryTable::DontBeTarget() {
CTextTable::DontBeTarget();
BroadcastMessage(CEditDictionary::msg_LeaveDictionaryTable, NULL);
}
//-------------------------------------------------------------------------------------
// HiliteSelection
// Setup back/front colors. Otherwise we sometimes get the de-highlighting
// wrong when switching selection
//-------------------------------------------------------------------------------------
void CEditDictionaryTable::HiliteSelection( Boolean inActively, Boolean inHilite )
{
if (inActively) {
StColorPenState::Normalize();
}
LTableView::HiliteSelection( inActively, inHilite );
}

View File

@@ -1,76 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "CTextTable.h"
#include <LGADialogBox.h>
class LGAPushButton;
class CLargeEditFieldBroadcast;
class ISpellChecker;
class CEditDictionary : public LGADialogBox {
public:
virtual void ListenToMessage ( MessageT inMessage,
void* ioParam );
virtual void FinishCreateSelf();
CEditDictionary(LStream *inStream);
void SetISpellChecker(ISpellChecker *i);
ISpellChecker *GetISpellChecker();
enum { class_ID = 'CEdD', res_ID = 5298 };
enum { AddButtonID = 201 , WordID = 200, WordsTableID = 202, ReplaceButtonID = 203,
RemoveButtonID = 204, HelpButtonID = 205, msg_LeaveDictionaryTable = 208 };
enum { max_word_length = 50 }; // Max length of a word
protected:
void MakeDictionaryChangesPermanent();
virtual void AddNewWord();
virtual void RemoveSelectedWords();
virtual void ReplaceSelectedWord();
CLargeEditFieldBroadcast *mWordNameField; // The field where user edits word
LGAPushButton *mAddButton; // Add new word button
LGAPushButton *mReplaceButton;
LGAPushButton *mRemoveButton;
LGAPushButton *mHelpButton;
CTextTable *mWordsView; // The Personal Dictionary view
int mNumWords;
ISpellChecker *mISpellChecker;
};
class CEditDictionaryTable : public CTextTable {
public:
enum {class_ID = 'CEDT' };
virtual void BeTarget();
virtual void DontBeTarget();
CEditDictionaryTable(LStream *inStream) : CTextTable(inStream) { }
void HiliteSelection( Boolean inActively, Boolean inHilite );
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,272 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include <TextServices.h>
#include "CHTMLView.h"
// dangling prototype
Boolean GetCaretPosition(MWContext *context, LO_Element * element, int32 caretPos,
int32* caretX, int32* caretYLow, int32* caretYHigh );
class LGAPopup;
class CPatternButtonPopup;
class CColorPopup;
class CComposeSession;
class CFontMenuPopup;
class HTMLInlineTSMProxy;
class HoldUpdatesProxy;
class CEditView: public CHTMLView
{
#if !defined(__MWERKS__) || (__MWERKS__ >= 0x2000)
typedef CHTMLView inherited;
#endif
public:
enum { pane_ID = 'html', class_ID = 'Edtp', dashMark = '-' };
enum {
STRPOUND_EDITOR_MENUS = 5101,
EDITOR_MENU_SHOW_PARA_SYMBOLS = 1,
EDITOR_MENU_HIDE_PARA_SYMBOLS = 2,
EDITOR_MENU_UNDO = 3,
EDITOR_MENU_REDO = 4,
EDITOR_MENU_SHOW_COMP_TOOLBAR = 5,
EDITOR_MENU_HIDE_COMP_TOOLBAR = 6,
EDITOR_MENU_SHOW_FORMAT_TOOLBAR = 7,
EDITOR_MENU_HIDE_FORMAT_TOOLBAR = 8,
EDITOR_MENU_SHOW_TABLE_BORDERS = 9,
EDITOR_MENU_HIDE_TABLE_BORDERS = 10,
EDITOR_MENU_CHARACTER_ATTRIBS = 11,
EDITOR_MENU_IMAGE_ATTRIBUTES = 12,
EDITOR_MENU_LINK_ATTRIBUTES = 13,
EDITOR_MENU_LINE_ATTRIBUTES = 14,
EDITOR_MENU_TABLE_ATTRIBUTES = 15,
EDITOR_MENU_UNKNOWN_ATTRIBUTES = 16,
EDITOR_MENU_TARGET_ATTRIBUTES = 17
};
enum {
eMouseHysteresis = 6,
eSelectionBorder = 3
};
// ¥¥ Constructors
CEditView(LStream * inStream);
~CEditView();
virtual void FinishCreateSelf(void);
// ¥¥ Command handling
virtual Boolean ObeyCommand( CommandT inCommand, void *ioParam );
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void FindCommandStatus( CommandT inCommand,
Boolean& outEnabled, Boolean& outUsesMark,
Char16& outMark,Str255 outName );
Boolean FindCommandStatusForContextMenu( CommandT inCommand,
Boolean &outEnabled, Boolean &outUsesMark,
Char16 &outMark, Str255 outName );
Boolean IsPastable(Char16 theChar);
int FindQueuedKeys( char *keys_in_q );
virtual Boolean HandleKeyPress( const EventRecord& inKeyEvent );
virtual void AdaptToSuperFrameSize( Int32 inSurrWidthDelta,
Int32 inSurrHeightDelta, Boolean inRefresh );
virtual void BeTarget();
virtual void DontBeTarget();
void HandleCut();
void HandleCopy();
void HandlePaste();
TSMDocumentID midocID;
virtual void CreateFindWindow();
virtual void SetContext( CBrowserContext* inNewContext );
virtual URL_Struct *GetURLForPrinting( Boolean& outSuppressURLCaption, MWContext *printingContext );
void TakeOffDuty();
virtual void PutOnDuty(LCommander*);
Bool PtInSelectedRegion(SPoint32 cpPoint );
virtual void DrawSelf( void );
virtual Boolean EstablishPort();
virtual void ActivateSelf();
virtual void DeactivateSelf();
Bool SaveDocument();
Bool SaveDocumentAs();
Bool VerifySaveUpToDate();
// ¥¥ cursor calls and caret functionality
virtual void AdjustCursorSelf( Point inPortPt, const EventRecord& inMacEvent );
virtual void SpendTime( const EventRecord& inMacEvent );
void DrawCaret( Boolean doErase );
void EraseCaret();
void HideCaret( Boolean mhide ) { EraseCaret(); mHideCaret = mhide; }
void PlaceCaret(int32 caretX, int32 caretYLow, int32 caretYHigh);
void RemoveCaret();
void DisplayGenericCaret( MWContext *context, LO_Element * pLoAny,
ED_CaretObjectPosition caretPos );
// ¥¥ Drag and Drop
virtual Boolean ItemIsAcceptable (DragReference dragRef, ItemReference itemRef);
virtual void ReceiveDragItem( DragReference inDragRef, DragAttributes inDragAttr,
ItemReference inItemRef, Rect& inItemBounds );
virtual void DoDragSendData( FlavorType inFlavor, ItemReference inItemRef,
DragReference inDragRef );
virtual void ClickSelf (const SMouseDownEvent& where );
virtual Boolean ClickTrackSelection( const SMouseDownEvent& inMouseDown,
CHTMLClickRecord& inClickRecord );
virtual Boolean SetDefaultCSID( Int16 inPreferredCSID );
CBrowserContext *GetNSContext() { return mContext; };
void SetHoldUpdates(HoldUpdatesProxy* inHoldUpdates) {mHoldUpdates = inHoldUpdates;};
Boolean mEditorDoneLoading;
Boolean IsDoneLoading() const { return mEditorDoneLoading; }
// ¥¥ FE_* calls
void DocumentChanged( int32 iStartY, int32 iHeight );
void GetDocAndWindowPosition( SPoint32 &frameLocation, SPoint32 &imageLocation, SDimension16 &frameSize );
// ¥¥ formatting query calls
void UseCharFormattingCache() { CanUseCharFormatting(); mUseCharFormattingCache = true; }
void DontUseCharFormattingCache() { mUseCharFormattingCache = false; }
class StUseCharFormattingCache
{
public:
StUseCharFormattingCache( CEditView& p ) : view(p) { view.UseCharFormattingCache(); }
~StUseCharFormattingCache() { view.DontUseCharFormattingCache(); }
private:
CEditView &view;
};
LGAPopup * mParagraphToolbarPopup;
LGAPopup * mSizeToolbarPopup;
CFontMenuPopup * mFontToolbarPopup;
CPatternButtonPopup * mAlignToolbarPopup;
CColorPopup * mColorPopup;
protected:
virtual Boolean IsGrowCachingEnabled() const { return !mEditorDoneLoading; }
virtual void LayoutNewDocument( URL_Struct *inURL, Int32 *inWidth,
Int32 *inHeight, Int32 *inMarginWidth, Int32 *inMarginHeight );
// ¥¥ FE_* calls
virtual void SetDocPosition( int inLocation, Int32 inX, Int32 inY,
Boolean inScrollEvenIfVisible = false);
virtual void DisplayLineFeed( int inLocation, LO_LinefeedStruct *inLinefeedStruct, XP_Bool inNeedBG );
virtual void DisplayHR( int inLocation, LO_HorizRuleStruct *inRuleStruct );
virtual void DisplaySubtext( int inLocation, LO_TextStruct *inText,
Int32 inStartPos, Int32 inEndPos, XP_Bool inNeedBG );
virtual void EraseBackground( int inLocation, Int32 inX, Int32 inY,
Uint32 inWidth, Uint32 inHeight, LO_Color *inColor );
virtual void GetDefaultBackgroundColor(LO_Color* outColor) const;
virtual void DisplayTable( int inLocation, LO_TableStruct *inTableStruct );
virtual void DisplayCell( int inLocation, LO_CellStruct *inCellStruct );
virtual void InvalidateEntireTableOrCell( LO_Element* inElement );
virtual void DisplayAddRowOrColBorder( XP_Rect* inRect, XP_Bool inDoErase );
virtual void UpdateEnableStates();
virtual void DisplayFeedback( int inLocation, LO_Element *inElement );
virtual void DisplaySelectionFeedback( uint16 ele_attrmask, const Rect &inRect );
virtual void InsideDropArea( DragReference inDragRef );
virtual void EnterDropArea( DragReference inDragRef, Boolean inDragHasLeftSender );
DragReference mDragRef;
enum {
ED_SELECTION_BORDER = 3
};
enum { MAX_Q_SIZE = 12 }; // Used for checking out key strokes waiting in FindQueuedKeys
void InsertDefaultLine();
void DoReload( void );
void ToFromList( intn listType, ED_ListType elementType );
void NoteEditorRepagination( void );
Boolean CanUseCharFormatting();
Boolean IsMouseInSelection( SPoint32 pt, CL_Layer *curLayer, Rect& selectRect );
Boolean mDoContinueSelection;
HTMLInlineTSMProxy* mProxy;
HoldUpdatesProxy* mHoldUpdates;
// more caret blinking and related stuff
Boolean mCaretDrawn, mCaretActive;
Boolean mHideCaret;
Boolean mDisplayParagraphMarks;
Point mOldPoint; // Last place cursor was adjusted. No initializing
long mOldLastElementOver; // id of the last element the cursor was over
unsigned long mLastBlink;
int32 mCaretX;
int32 mCaretYLow;
int32 mCaretYHigh;
Boolean mUseCharFormattingCache;
Boolean mIsCharFormatting;
// these are only to be used during drag of data in composer
char *mDragData; // warning this really isn't a "char" but void* data!!!
int32 mDragDataLength;
}; // class CEditView
//======================================
class CMailEditView : public CEditView
//======================================
{
public:
enum { pane_ID = 'html', class_ID = 'MEdp' };
// ¥¥ Constructors
CMailEditView(LStream * inStream);
virtual void InstallBackgroundColor();
virtual void GetDefaultBackgroundColor(LO_Color* outColor) const;
virtual void InitMailCompose();
void SetComposeSession( CComposeSession *c ) { mComposeSession = c; };
void SetInitialText( const char *textp );
void InsertMessageCompositionText( const char* text,
XP_Bool leaveCursorBeginning, XP_Bool isHTML );
void DisplayDefaultTextBody();
private:
Int32 mStartQuoteOffset;
Int32 mEndQuoteOffset;
Boolean mHasAutoQuoted;
Boolean mHasInsertSignature;
Boolean mCursorSet;
char *mInitialText; // Draft text
CComposeSession *mComposeSession;
}; // class CMailEditView

View File

@@ -1,610 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CEditorWindow.h"
#include "CBrowserContext.h"
#include "resgui.h"
#include "CFormattingToolBar.h"
#include "CFontMenuAttachment.h"
#include "CToolbarPopup.h"
#include "CPatternButtonPopupText.h"
#include "COpenRecentlyEditedPopup.h"
#include "CColorPopup.h"
#include "CEditDictionary.h"
#include "CTextTable.h"
#include "CTableKeySingleSelector.h"
// macfe
#include "mversion.h" // ID_STRINGS
#include "URobustCreateWindow.h"
#include "uprefd.h"
#include "uerrmgr.h"
#include "uapp.h"
#include "meditdlg.h" // CTabbedDialog
#include "meditor.h" // HandleModalDialog
#include "CEditView.h"
// Netscape
#include "net.h" // NET_cinfo_find_type
#include "proto.h" // XP_IsContextBusy
#include "edt.h"
#include "shist.h"
#include "prefapi.h" // PREF_GetBoolPref
#ifdef PROFILE
#pragma profile on
#endif
// pane id constants - for ShowOneDragBar
const PaneIDT Paragraph_Bar_PaneID = 'DBar';
const PaneIDT Character_Bar_PaneID = 'NBar';
const char* Pref_ShowParagraphBar = "editor.show_paragraph_toolbar";
const char* Pref_ShowCharacterBar = "editor.show_character_toolbar";
enum { eParagraphBar,
eCharacterBar };
CEditorWindow::CEditorWindow( LStream* inStream )
:CBrowserWindow(inStream)
{
SetWindowType( WindowType_Editor );
}
static // PRIVATE
CMediatedWindow* GetFrontWindowByType( OSType windowType )
{
CMediatedWindow* theWindow = NULL;
CWindowIterator iter(windowType);
iter.Next(theWindow);
return theWindow;
}
// given an mwcontext (non-busy, with a history), select the matching editor window
// or open an editor window based on that mwcontext
// if all else fails (and memory is not low), create an empty editor window
void CEditorWindow::MakeEditWindowFromBrowser( MWContext* mwcontext )
{
if ( Memory_MemoryIsLow() )
return;
History_entry* entry = NULL;
if ( mwcontext && !XP_IsContextBusy( mwcontext ) )
entry = SHIST_GetCurrent(&mwcontext->hist);
if ( entry && entry->address)
{
// If there is already an editor window open for this url
// just switch to it and keep this browser window open.
CMediatedWindow * win;
CWindowIterator iter(WindowType_Editor);
while (iter.Next(win))
{
CNSContext* curContext = ((CBrowserWindow *)win)->GetWindowContext();
MWContext* context;
context = curContext ? curContext->operator MWContext*() : NULL;
if (context && EDT_IS_EDITOR(context))
{
History_entry* newEntry = SHIST_GetCurrent(&context->hist);
if (newEntry && newEntry->address && !strcmp(newEntry->address, entry->address))
{
win->Show();
win->Select();
return;
}
}
}
if (CEditorWindow::MakeEditWindow(mwcontext, NULL) == NULL) // new window based on history of this window
return; // don't close this one on error.
}
else
{
CEditorWindow::MakeEditWindow(NULL, NULL); // make a completely new window
}
}
// EDT_PreOpenCallbackFn
static void createEditorWindowCallback( XP_Bool userCanceled, char* pURL, void* hook )
{
if ( !userCanceled )
{
EditorCreationStruct *edtCreatePtr = (EditorCreationStruct *)hook;
if ( hook )
{
if ( edtCreatePtr->existingURLstruct && edtCreatePtr->existingURLstruct->address )
{
XP_FREE( edtCreatePtr->existingURLstruct->address );
edtCreatePtr->existingURLstruct->address = XP_STRDUP( pURL );
}
}
// substitute new URL
CEditorWindow::CreateEditorWindowStage2( edtCreatePtr );
}
}
CEditorWindow* CEditorWindow::MakeEditWindow( MWContext* old_context, URL_Struct* url )
{
Boolean urlCameInNULL = (url == NULL);
// if we don't have an URL, try to get it from the old_context's window history
if (url == NULL && old_context != NULL)
{
CBrowserContext *browserContext = (CBrowserContext *)old_context->fe.newContext;
History_entry* entry = browserContext->GetCurrentHistoryEntry(); // Take the last instead of the first history entry.
if ( entry )
{
url = SHIST_CreateURLStructFromHistoryEntry( old_context, entry );
if ( url )
url->force_reload = NET_NORMAL_RELOAD;
}
// if we don't have a history entry, we're kind of screwed-->just load a blank page
}
// we want to open a new blank edit window
// or we are still having troubles... fall back to our old tried and true blank page
if (url == NULL)
url = NET_CreateURLStruct ("about:editfilenew", NET_NORMAL_RELOAD );
// FIX THIS!!! the above line should use "XP_GetString(XP_EDIT_NEW_DOC_NAME)"
// time of reckoning. We really, really need an URL and address at this point...
// I don't know what an url without an address is anyway...
if (url == NULL || url->address == NULL)
return NULL;
// now make sure that the url is a valid type to edit.
NET_cinfo *cinfo = NET_cinfo_find_type (url->address);
if (cinfo == NULL || cinfo->type == NULL ||
(strcasecomp (cinfo->type, TEXT_HTML)
&& strcasecomp (cinfo->type, UNKNOWN_CONTENT_TYPE)
&& strcasecomp (cinfo->type, TEXT_PLAIN)))
{
ErrorManager::PlainAlert( NOT_HTML );
return NULL;
}
EditorCreationStruct *edtCreatePtr = (EditorCreationStruct *)XP_ALLOC( sizeof( EditorCreationStruct ) );
if ( edtCreatePtr )
{
edtCreatePtr->context = old_context;
edtCreatePtr->existingURLstruct = url;
edtCreatePtr->isEmptyPage = old_context == NULL && urlCameInNULL;
}
if ( urlCameInNULL && old_context == NULL )
{
return CreateEditorWindowStage2( edtCreatePtr );
}
else
{
EDT_PreOpen( old_context, url->address, createEditorWindowCallback, edtCreatePtr );
return NULL;
}
}
CEditorWindow *CEditorWindow::CreateEditorWindowStage2( EditorCreationStruct *edtCreatePtr )
{
// now we can create an editor window since we don't already have one for this url.
/* instead of just calling LWindow::CreateWindow(), we do it ourselves by hand here
* so that we can set the window bounds before we call FinishCreate().
*/
if ( edtCreatePtr == NULL )
return NULL;
CEditorWindow* newWindow = NULL;
SetDefaultCommander(CFrontApp::GetApplication());
try {
OSErr error;
URobustCreateWindow::ReadObjects( 'PPob', CEditorWindow::res_ID, &newWindow, &error );
Assert_(newWindow);
FailOSErr_(error);
if (newWindow == NULL)
{
XP_FREE( edtCreatePtr );
return NULL;
}
newWindow->FinishCreate();
if (newWindow->HasAttribute(windAttr_ShowNew))
newWindow->Show();
UReanimator::LinkListenerToControls( newWindow, newWindow, CEditorWindow::res_ID );
}
catch(...)
{
if ( newWindow )
delete newWindow;
XP_FREE( edtCreatePtr );
return NULL;
}
Boolean hasURLstruct = edtCreatePtr->existingURLstruct && edtCreatePtr->existingURLstruct->address;
CBrowserContext *nscontext = new CBrowserContext();
newWindow->SetWindowContext( nscontext );
CURLDispatcher::DispatchURL( edtCreatePtr->existingURLstruct, nscontext, false, false, CEditorWindow::res_ID );
if ( edtCreatePtr->context )
{
nscontext->InitHistoryFromContext( (CBrowserContext *)edtCreatePtr->context->fe.newContext );
}
else
{
// the url will eventually be freed when the load is complete.
}
// set window title here (esp. for "open")
if ( !edtCreatePtr->isEmptyPage
&& edtCreatePtr->existingURLstruct && edtCreatePtr->existingURLstruct->address )
{
char *pSlash = strrchr( edtCreatePtr->existingURLstruct->address, '/' );
if ( pSlash )
pSlash += 1; // move past '/'
newWindow->NoteDocTitleChanged( pSlash );
}
XP_FREE( edtCreatePtr );
return newWindow;
}
void CEditorWindow::SetWindowContext(CBrowserContext* inContext)
{
if ( inContext )
{
MWContext *context;
context = inContext->operator MWContext*();
if ( context )
{
context->is_editor = true;
NET_CheckForTimeBomb( context );
}
}
CBrowserWindow::SetWindowContext( inContext );
}
void CEditorWindow::NoteDocTitleChanged( const char* inNewTitle )
{
// there is one bogus set-title from layout that we want to skip...
// We are hard coding "editfilenew" here because it is already hardcoded
// a million other places...
if ( inNewTitle && XP_STRCMP( inNewTitle, "editfilenew" ) == 0 )
return;
CNSContext *theContext = GetWindowContext();
CStr255 title( inNewTitle );
char *baseName = LO_GetBaseURL( theContext->operator MWContext*() ); // don't free this...
// strip out username and password so user doesn't see them in window title
char *location = NULL;
if ( baseName )
NET_ParseUploadURL( baseName, &location, NULL, NULL );
CStr255 csBaseURL(location);
// if this page has a local "file:" url, then just show the file name (skip the url and directory crap.)
if ( location && NET_IsLocalFileURL(location) )
{
char *localName = NULL;
XP_ConvertUrlToLocalFile( location, &localName );
if (localName)
{
#if 0
char *pSlash = strrchr(localName, '/');
if (pSlash)
{ // is there is a slash, move everything AFTER the last slash to the front
pSlash++;
XP_STRCPY(localName, pSlash);
}
#endif
csBaseURL = localName;
XP_FREE(localName);
}
}
CStr255 netscapeTitle;
CStr255 subTitle;
::GetIndString( netscapeTitle, ID_STRINGS, APPNAME_STRING_INDEX );
::GetIndString( subTitle, WINDOW_TITLES_RESID, 3 );
netscapeTitle += " ";
netscapeTitle += subTitle;
netscapeTitle += " - [";
if ( inNewTitle && *inNewTitle )
{
netscapeTitle += title;
if (csBaseURL.Length())
netscapeTitle += " : ";
}
netscapeTitle += csBaseURL;
netscapeTitle += "]";
SetDescriptor( netscapeTitle );
if ( location )
XP_FREE( location );
}
void CEditorWindow::RegisterViewTypes()
{
// Registers all its view types
RegisterClass_( CEditorWindow);
RegisterClass_( CEditView);
RegisterClass_( MultipleSelectionSingleColumn); // newer, better class?
RegisterClass_( CTarget);
RegisterClass_( CLineProp);
RegisterClass_( CFormattingToolBar);
RegisterClass_( CToolbarPopup); // newer, better class?
RegisterClass_( CIconToolbarPopup); // newer, better class?
RegisterClass_( CColorPopup);
RegisterClass_( CFontMenuPopup );
RegisterClass_( CChameleonCaption); // newer, better class?
RegisterClass_( CChameleonView); // newer, better class?
CTabbedDialog::RegisterViewTypes();
RegisterClass_( CTextTable); // newer, better class?
RegisterClass_( CTableKeySingleSelector); // newer, better class?
RegisterClass_( CPatternButtonPopupText); // newer, better class?
RegisterClass_( LOffscreenView);
RegisterClass_( COpenRecentlyEditedPopup );
RegisterClass_( CEditDictionary);
RegisterClass_( CEditDictionaryTable);
}
void CEditorWindow::FinishCreateSelf()
{
CBrowserWindow::FinishCreateSelf();
// Show/hide toolbars based on preference settings
XP_Bool value;
PREF_GetBoolPref(Pref_ShowParagraphBar, &value);
mToolbarShown[eParagraphBar] = value;
ShowOneDragBar(Paragraph_Bar_PaneID, value);
PREF_GetBoolPref(Pref_ShowCharacterBar, &value);
mToolbarShown[eCharacterBar] = value;
ShowOneDragBar(Character_Bar_PaneID, value);
}
void CEditorWindow::ListenToMessage( MessageT inMessage, void* ioParam )
{
switch (inMessage)
{
case msg_NSCDocTitleChanged:
NoteDocTitleChanged((const char*)ioParam);
break;
default:
{
if ( inMessage == 'Para' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_Format_Paragraph_Normal; break;
case 2: inMessage = cmd_Format_Paragraph_Head1; break;
case 3: inMessage = cmd_Format_Paragraph_Head2; break;
case 4: inMessage = cmd_Format_Paragraph_Head3; break;
case 5: inMessage = cmd_Format_Paragraph_Head4; break;
case 6: inMessage = cmd_Format_Paragraph_Head5; break;
case 7: inMessage = cmd_Format_Paragraph_Head6; break;
case 8: inMessage = cmd_Format_Paragraph_Address; break;
case 9: inMessage = cmd_Format_Paragraph_Formatted; break;
case 10: inMessage = cmd_Format_Paragraph_List_Item; break;
case 11: inMessage = cmd_Format_Paragraph_Desc_Title; break;
case 12: inMessage = cmd_Format_Paragraph_Desc_Text; break;
}
}
else if ( inMessage == 'Size' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_Format_Font_Size_N2; break;
case 2: inMessage = cmd_Format_Font_Size_N1; break;
case 3: inMessage = cmd_Format_Font_Size_0; break;
case 4: inMessage = cmd_Format_Font_Size_P1; break;
case 5: inMessage = cmd_Format_Font_Size_P2; break;
case 6: inMessage = cmd_Format_Font_Size_P3; break;
case 7: inMessage = cmd_Format_Font_Size_P4; break;
}
}
else if ( inMessage == 'Algn' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_JustifyLeft; break;
case 2: inMessage = cmd_JustifyCenter; break;
case 3: inMessage = cmd_JustifyRight; break;
}
}
// GetHTMLView() guaranteed not to fail
GetHTMLView()->ObeyCommand( inMessage, ioParam );
break;
}
}
}
// EDT_PreCloseCallbackFn
static void closeEditorWindowCallback( void* hook )
{
CEditorWindow *editorWindow = (CEditorWindow *)hook;
if ( editorWindow )
editorWindow->SetPluginDoneClosing();
}
Boolean CEditorWindow::ObeyCommand( CommandT inCommand, void *ioParam )
{
switch ( inCommand )
{
case cmd_NewWindowEditor:
CEditorWindow::MakeEditWindow( NULL, NULL );
break;
case cmd_ViewSource:
// Delegate this to the view.
if ( ((CEditView *)GetHTMLView())->IsDoneLoading() )
GetHTMLView()->ObeyCommand(inCommand, ioParam);
break;
case cmd_Toggle_Paragraph_Toolbar:
ToggleDragBar(Paragraph_Bar_PaneID, eParagraphBar, Pref_ShowParagraphBar);
break;
case cmd_Toggle_Character_Toolbar:
ToggleDragBar(Character_Bar_PaneID, eCharacterBar, Pref_ShowCharacterBar);
break;
case cmd_Close:
case cmd_Quit: // we'll just intercept these and then send them on to the default case
MWContext *mwcontext = GetWindowContext()->operator MWContext*();
History_entry* newEntry = SHIST_GetCurrent(&mwcontext->hist);
CStr255 fileName;
if ( newEntry && newEntry->address )
fileName = newEntry->address;
if ( ((CEditView *)GetHTMLView())->IsDoneLoading() && EDT_DirtyFlag( *GetWindowContext() ) )
{
Select(); // This helps during a quit or "close all"
MessageT itemHit = HandleModalDialog( EDITDLG_SAVE_BEFORE_QUIT, fileName, NULL );
if (itemHit == cancel)
return true;
if (itemHit == ok)
{ // save
if ( !((CEditView *)GetHTMLView())->SaveDocument() )
return true;
}
EDT_SetDirtyFlag( mwcontext, false ); // we have to do this or else when we quit, we will be asked twice to save
}
// need to let this work asynchronously; make our own internal loop
if ( ((CEditView *)GetHTMLView())->IsDoneLoading() && newEntry && newEntry->address )
{
mPluginDoneClosing = false;
EDT_PreClose( mwcontext, newEntry->address, closeEditorWindowCallback, this );
do
{
CFrontApp::GetApplication()->ProcessNextEvent();
} while ( !mPluginDoneClosing );
}
// fall through
default:
{
return CBrowserWindow::ObeyCommand (inCommand, ioParam);
}
}
return TRUE;
}
void CEditorWindow::FindCommandStatus( CommandT inCommand,
Boolean& outEnabled, Boolean& outUsesMark, Char16& outMark,
Str255 outName )
{
short index;
outUsesMark = FALSE;
outEnabled = false;
switch ( inCommand )
{
case cmd_ViewSource:
// Delegate this to the view.
if ( ((CEditView *)GetHTMLView())->IsDoneLoading() )
GetHTMLView()->FindCommandStatus(inCommand, outEnabled, outUsesMark, outMark, outName);
break;
case cmd_Toggle_Character_Toolbar:
outEnabled = ((CEditView *)GetHTMLView())->IsDoneLoading();
index = mToolbarShown[eCharacterBar] ? CEditView::EDITOR_MENU_HIDE_COMP_TOOLBAR
: CEditView::EDITOR_MENU_SHOW_COMP_TOOLBAR;
::GetIndString( outName, CEditView::STRPOUND_EDITOR_MENUS, index );
break;
case cmd_Toggle_Paragraph_Toolbar:
outEnabled = ((CEditView *)GetHTMLView())->IsDoneLoading();
index = mToolbarShown[eParagraphBar] ? CEditView::EDITOR_MENU_HIDE_FORMAT_TOOLBAR
: CEditView::EDITOR_MENU_SHOW_FORMAT_TOOLBAR;
::GetIndString( outName, CEditView::STRPOUND_EDITOR_MENUS, index );
break;
default:
CBrowserWindow::FindCommandStatus(inCommand, outEnabled, outUsesMark, outMark, outName );
}
}
// Called when we are trying to quit the application
Boolean CEditorWindow::AttemptQuitSelf( long inSaveOption )
{
MWContext *mwcontext = GetWindowContext()->operator MWContext*();
if ( EDT_DirtyFlag( mwcontext ) )
{
History_entry* newEntry = SHIST_GetCurrent(&mwcontext->hist);
CStr255 fileName;
if ( newEntry && newEntry->address )
fileName = newEntry->address;
if ( kAEAsk == inSaveOption )
{
MessageT itemHit = HandleModalDialog( EDITDLG_SAVE_BEFORE_QUIT, fileName, NULL );
if ( cancel == itemHit )
return false;
}
// save
if ( !((CEditView *)GetHTMLView())->SaveDocument() )
return false;
}
return true;
}
#ifdef PROFILE
#pragma profile off
#endif

View File

@@ -1,67 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "CBrowserWindow.h"
struct EditorCreationStruct {
MWContext *context; // may be NULL
URL_Struct *existingURLstruct;
Boolean isEmptyPage;
};
/******************************************************************************
* CEditorWindow is really just a CBrowserWindow with some changes for an editor window.
******************************************************************************/
class CEditorWindow: public CBrowserWindow
{
public:
enum {class_ID = 'edtw', res_ID = 10000};
// ¥¥ Constructors
static void RegisterViewTypes(); // Registers all its view types
static CEditorWindow *MakeEditWindow( MWContext* old_context, URL_Struct* url );
static CEditorWindow *CreateEditorWindowStage2( EditorCreationStruct *edtCreatePtr);
static void MakeEditWindowFromBrowser( MWContext* mwcontext );
CEditorWindow(LStream * inStream);
virtual void FinishCreateSelf();
virtual void SetWindowContext(CBrowserContext* inContext);
// ¥¥ Command handling
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual Boolean ObeyCommand( CommandT inCommand, void *ioParam );
virtual void FindCommandStatus( CommandT inCommand,
Boolean& outEnabled, Boolean& outUsesMark,
Char16& outMark,Str255 outName );
virtual void NoteDocTitleChanged( const char* title );
virtual Boolean AttemptQuitSelf( long inSaveOption );
static CEditorWindow* FindAndShow(Boolean inMakeNew = false);
virtual void SetPluginDoneClosing() { mPluginDoneClosing = true; }
protected:
virtual ResIDT GetStatusResID(void) const { return CEditorWindow::res_ID; }
Boolean mPluginDoneClosing;
};

View File

@@ -1,299 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CFontMenuAttachment.h"
#include "CEditView.h"
#include "CBrowserContext.h" // operator MWContext*()
#include "resgui.h" // cmd_FormatViewerFont, cmd_FormatFixedFont, FONT_MENU_BASE
#include "macutil.h" // CMediatedWindow
#include "edt.h"
LMenu *CFontMenuAttachment::sMenu = NULL;
//===========================================================
// CFontMenuAttachment
//===========================================================
CFontMenuAttachment::CFontMenuAttachment()
{
UpdateMenu();
}
MWContext *CFontMenuAttachment::GetTopWindowContext()
{
// Ok, ok. I know this is skanky,
// but there is no common way to get the context from a window: it depends on the window type.
// So, we look around for a CEditView somewhere in the top window.
// A CEditView we understand (and get an MWContext from).
CMediatedWindow* topWin = NULL; // find the top window to use the plugin in
CWindowIterator iter(WindowType_Any);
iter.Next(topWin);
if (topWin == NULL
|| ! (topWin->GetWindowType() == WindowType_Editor || topWin->GetWindowType() == WindowType_Compose) )
return NULL;
CEditView *editView = (CEditView *)(topWin->FindPaneByID(CEditView::pane_ID));
if (editView == NULL || editView->GetNSContext() == NULL)
return NULL;
return editView->GetNSContext()->operator MWContext*();
}
// Processes:
//
void CFontMenuAttachment::ExecuteSelf( MessageT inMessage, void* ioParam )
{
mExecuteHost = FALSE;
switch ( inMessage )
{
case msg_CommandStatus:
{
SCommandStatus* status = (SCommandStatus*)ioParam;
EDT_CharacterData* better;
if ( status->command == cmd_FormatViewerFont || status->command == cmd_FormatFixedFont
|| ( status->command >= FONT_MENU_BASE && status->command <= FONT_MENU_BASE_LAST ) )
{
*(status->enabled) = true;
*(status->usesMark) = false;
better = NULL;
MWContext *cntxt = GetTopWindowContext();
if ( cntxt )
better = EDT_GetCharacterData( cntxt );
if ( better == NULL )
{
*(status->enabled) = false;
return;
}
}
switch ( status->command )
{
case cmd_FormatViewerFont:
*(status->usesMark) = ( ! ( better->values & TF_FIXED ) && !( better->values & TF_FONT_FACE ) );
*(status->mark) = *(status->usesMark) ? checkMark : 0;
*(status->usesMark) = true;
EDT_FreeCharacterData(better);
mExecuteHost = false;
return;
break;
case cmd_FormatFixedFont:
*(status->usesMark) = ( better->values & TF_FIXED ) != 0;
*(status->mark) = *(status->usesMark) ? checkMark : 0;
*(status->usesMark) = true;
EDT_FreeCharacterData(better);
mExecuteHost = false;
return;
break;
default:
if ( status->command >= FONT_MENU_BASE && status->command <= FONT_MENU_BASE_LAST )
{
// get font menu item
Str255 fontItemString;
fontItemString[0] = 0;
MenuHandle menuh = GetMenu()->GetMacMenuH();
::GetMenuItemText ( menuh, status->command - FONT_MENU_BASE + PERM_FONT_ITEMS + 1, fontItemString );
p2cstr( fontItemString );
// in mixed situation the mask bit will be cleared
*(status->usesMark) = ( better->values & TF_FONT_FACE && better->pFontFace && XP_STRLEN((char *)fontItemString) > 0
&& XP_STRSTR( better->pFontFace, (char *)fontItemString ) != NULL );
*(status->mark) = *(status->usesMark) ? checkMark : 0;
*(status->usesMark) = true;
EDT_FreeCharacterData(better);
mExecuteHost = false;
return;
}
}
}
break;
case cmd_FormatViewerFont:
MWContext *cntxt2 = GetTopWindowContext();
if ( cntxt2 )
EDT_SetFontFace( cntxt2, NULL, 0, NULL );
break;
case cmd_FormatFixedFont:
MWContext *cntxt3 = GetTopWindowContext();
if ( cntxt3 )
EDT_SetFontFace( cntxt3, NULL, 1, NULL );
break;
default:
{
if ( inMessage >= FONT_MENU_BASE && inMessage <= FONT_MENU_BASE_LAST )
{
MWContext *cntxt2 = GetTopWindowContext();
if ( cntxt2 )
{
// get font menu item
Str255 newFontItemString;
newFontItemString[0] = 0;
MenuHandle menuh = GetMenu()->GetMacMenuH();
::GetMenuItemText ( menuh, inMessage - FONT_MENU_BASE + PERM_FONT_ITEMS + 1, newFontItemString );
p2cstr( newFontItemString );
EDT_SetFontFace( cntxt2, NULL, -1, (char *)newFontItemString );
mExecuteHost = false;
return;
}
}
}
break;
}
mExecuteHost = TRUE; // Let application handle it
}
LMenu *CFontMenuAttachment::GetMenu()
{
if (!sMenu)
sMenu = new LMenu(cFontMenuID);
return sMenu;
}
// build the font menu from the system
void CFontMenuAttachment::UpdateMenu()
{
if (!GetMenu() || !LMenuBar::GetCurrentMenuBar())
return;
int i;
// ¥ delete all the menu items after the separator line
MenuHandle menu = sMenu->GetMacMenuH();
if ( menu )
{
for ( i = ::CountMItems( menu ); i > PERM_FONT_ITEMS; i-- )
sMenu->RemoveItem( i );
}
Try_
{
ThrowIfNil_( menu );
// Add fonts to menu
::InsertResMenu( menu, 'FONT', PERM_FONT_ITEMS );
int commandNum = FONT_MENU_BASE;
int newHowMany = ::CountMItems( menu );
for (i = PERM_FONT_ITEMS + 1; i <= newHowMany; i++ )
sMenu->SetCommand( i, commandNum++ );
}
Catch_( inErr )
{
}
EndCatch_
}
void CFontMenuAttachment::RemoveMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
currentMenuBar->RemoveMenu(sMenu);
}
}
void CFontMenuAttachment::InstallMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(sMenu, hierMenu);
ResIDT resID;
MenuHandle menuh;
Int16 whichItem;
currentMenuBar->FindMenuItem( cmd_ID_toSearchFor, resID, menuh, whichItem );
if ( menuh )
{
// make it hierarchical
::SetItemCmd( menuh, whichItem, hMenuCmd );
::SetItemMark( menuh, whichItem, menu_ID );
}
}
}
}
#pragma mark -
CFontMenuPopup::CFontMenuPopup( LStream *inStream ) : CPatternButtonPopupText( inStream )
{
}
CFontMenuPopup::~CFontMenuPopup()
{
}
void CFontMenuPopup::FinishCreateSelf( void )
{
CPatternButtonPopupText::FinishCreateSelf();
int i;
// ¥ delete all the menu items after the separator line
LMenu *ppmenu = GetMenu();
MenuHandle menuh = ppmenu ? ppmenu->GetMacMenuH() : NULL;
if ( menuh )
{
for ( i = ::CountMItems( menuh ); i > CFontMenuAttachment::PERM_FONT_ITEMS; i-- )
ppmenu->RemoveItem( i );
}
Try_
{
ThrowIfNil_( menuh );
// Add fonts to menu
::InsertResMenu( menuh, 'FONT', CFontMenuAttachment::PERM_FONT_ITEMS );
int commandNum = FONT_MENU_BASE;
int newHowMany = ::CountMItems( menuh );
for (i = CFontMenuAttachment::PERM_FONT_ITEMS + 1; i <= newHowMany; i++ )
ppmenu->SetCommand( i, commandNum++ );
SetMaxValue( newHowMany );
}
Catch_( inErr )
{
}
EndCatch_
}

View File

@@ -1,73 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#ifndef CFONTMENUATTACHMENT_H_
#define CFONTMENUATTACHMENT_H_
#include <LAttachment.h>
#include "CPatternButtonPopupText.h"
#include "ntypes.h" // MWContext
class LMenu;
/***********************************************************************************
* CFontMenuAttachment
* Processes Font menu commands -- should be attached to application
* Currently, this menu is only used in the Editor and mail compose window
***********************************************************************************/
class CFontMenuAttachment: public LAttachment
{
public:
enum { menu_ID = 13, PERM_FONT_ITEMS = 3, cmd_ID_toSearchFor = 'FONT' };
// ¥¥ constructors
CFontMenuAttachment();
// ¥¥Êevents
virtual void ExecuteSelf( MessageT inMessage, void* ioParam );
static LMenu* GetMenu();
static void UpdateMenu();
static void RemoveMenus();
static void InstallMenus();
protected:
static MWContext* GetTopWindowContext();
static LMenu* sMenu;
};
class CFontMenuPopup : public CPatternButtonPopupText
{
public:
enum { class_ID = 'Fpop' };
static void* CreateCFontMenuPopupStream( LStream *inStream ) {return( new CFontMenuPopup (inStream ));};
CFontMenuPopup( LStream *inStream ); // ¥ Constructor
~CFontMenuPopup(); // ¥ Destructor
// ¥ drawing
void FinishCreateSelf(void);
};
#endif

View File

@@ -1,124 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CFormattingToolBar.h"
#include "CEditView.h"
#include "resgui.h"
#include "edt.h"
CFormattingToolBar::CFormattingToolBar(LStream * inStream)
: CPatternBevelView(inStream)
{
}
CFormattingToolBar::~CFormattingToolBar()
{
mEditView = NULL;
}
void CFormattingToolBar::FinishCreateSelf()
{
if ( GetSuperView() )
{
// get SuperView (we start with "this" so we're guaranteed non-0)
LView *superView = (LView *)this;
while (superView->GetSuperView() != NULL)
superView = superView->GetSuperView();
mEditView = dynamic_cast<CEditView*>(superView->FindPaneByID( CEditView::pane_ID ));
}
else
mEditView = dynamic_cast<CEditView*>(FindPaneByID( CEditView::pane_ID ));
// if we have a mailcompose window show insert object popup menu
// check for presence of insert menu within CFormattingToolBar
LPane *pane = FindPaneByID('InsO');
if ( pane )
{
CMailEditView *mailview = dynamic_cast<CMailEditView*>( mEditView );
if ( mailview )
pane->Show();
else
pane->Hide();
}
UReanimator::LinkListenerToControls(this, this, 11616);
}
void CFormattingToolBar::ListenToMessage( MessageT inMessage, void* ioParam )
{
PaneIDT paneID = CEditView::pane_ID;
if ( mEditView == NULL )
return;
if ( inMessage == 'Para' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_Format_Paragraph_Normal; break;
case 2: inMessage = cmd_Format_Paragraph_Head1; break;
case 3: inMessage = cmd_Format_Paragraph_Head2; break;
case 4: inMessage = cmd_Format_Paragraph_Head3; break;
case 5: inMessage = cmd_Format_Paragraph_Head4; break;
case 6: inMessage = cmd_Format_Paragraph_Head5; break;
case 7: inMessage = cmd_Format_Paragraph_Head6; break;
case 8: inMessage = cmd_Format_Paragraph_Address; break;
case 9: inMessage = cmd_Format_Paragraph_Formatted; break;
case 10: inMessage = cmd_Format_Paragraph_List_Item; break;
case 11: inMessage = cmd_Format_Paragraph_Desc_Title; break;
case 12: inMessage = cmd_Format_Paragraph_Desc_Text; break;
}
}
else if ( inMessage == 'Size' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_Format_Font_Size_N2; break;
case 2: inMessage = cmd_Format_Font_Size_N1; break;
case 3: inMessage = cmd_Format_Font_Size_0; break;
case 4: inMessage = cmd_Format_Font_Size_P1; break;
case 5: inMessage = cmd_Format_Font_Size_P2; break;
case 6: inMessage = cmd_Format_Font_Size_P3; break;
case 7: inMessage = cmd_Format_Font_Size_P4; break;
}
}
else if ( inMessage == 'Algn' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_JustifyLeft; break;
case 2: inMessage = cmd_JustifyCenter; break;
case 3: inMessage = cmd_JustifyRight; break;
}
}
else if ( inMessage == 'InsO' )
{
switch (*(long*)ioParam)
{
case 1: inMessage = cmd_Insert_Link; break;
case 2: inMessage = cmd_Insert_Target; break;
case 3: inMessage = cmd_Insert_Image; break;
case 4: inMessage = cmd_Insert_Line; break;
case 5: inMessage = cmd_Insert_Table; break;
}
}
mEditView->ObeyCommand( inMessage, ioParam );
}

View File

@@ -1,42 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "CPatternBevelView.h"
#include <LListener.h>
class CEditView;
// used in Editor window and Mail Compose windows
class CFormattingToolBar : public CPatternBevelView, public LListener
{
public:
enum {class_ID = 'FoTB'};
CFormattingToolBar(LStream * inStream);
~CFormattingToolBar();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void FinishCreateSelf();
protected:
CEditView* mEditView;
};

View File

@@ -1,184 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// COpenRecentlyEditedPopup.cp
// ===========================================================================
#include "COpenRecentlyEditedPopup.h"
#include "CWindowMediator.h"
#include "CBrowserContext.h"
#include "CEditorWindow.h"
#include "UMenuUtils.h"
#include "PascalString.h"
#include "net.h" // NET_CreateURLStruct
#include "structs.h" // TagType which is needed in edt.h
#include "edt.h"
// ---------------------------------------------------------------------------
// ¥ CreateNavigationButtonPopupStream [static]
// ---------------------------------------------------------------------------
COpenRecentlyEditedPopup*
COpenRecentlyEditedPopup::CreateOpenRecentlyEditedPopupStream( LStream* inStream )
{
return new COpenRecentlyEditedPopup(inStream);
}
// ---------------------------------------------------------------------------
// ¥ COpenRecentlyEditedPopup
// ---------------------------------------------------------------------------
COpenRecentlyEditedPopup::COpenRecentlyEditedPopup( LStream* inStream )
: mBrowserContext(nil),
super(inStream)
{
}
// ---------------------------------------------------------------------------
// ¥ ~COpenRecentlyEditedPopup
// ---------------------------------------------------------------------------
COpenRecentlyEditedPopup::~COpenRecentlyEditedPopup()
{
}
#pragma mark -
// ---------------------------------------------------------------------------
// ¥ AdjustMenuContents
// ---------------------------------------------------------------------------
void
COpenRecentlyEditedPopup::AdjustMenuContents()
{
if (!GetMenu() || !GetMenu()->GetMacMenuH())
return;
if (!AssertPreconditions())
return;
// Purge the menu
UMenuUtils::PurgeMenuItems(GetMenu()->GetMacMenuH(), PERM_OPEN_ITEMS);
// Fill the menu
int i;
char *urlp = NULL, *titlep = NULL;
for ( i = 0; i < MAX_EDIT_HISTORY_LOCATIONS
&& EDT_GetEditHistory( ((MWContext *)(*mBrowserContext)), i, &urlp, &titlep ); i++ )
{
// strange logic: if we have no URL (then how do we go there???) then use title if it exists
if ( urlp == NULL )
urlp = titlep;
if ( urlp )
{
NET_UnEscape( urlp );
InsertItemIntoMenu( urlp, PERM_OPEN_ITEMS + i );
}
else
break;
}
// delete menu break line if we don't have any history items
if ( i == 0 )
{
::DeleteMenuItem( GetMenu()->GetMacMenuH(), PERM_OPEN_ITEMS );
}
// Set the min/max values of the control since we populated the menu
SetPopupMinMaxValues();
}
// ---------------------------------------------------------------------------
// ¥ InsertItemIntoMenu
// ---------------------------------------------------------------------------
void
COpenRecentlyEditedPopup::InsertItemIntoMenu( char *urlp, Int16 inAfterItem )
{
Assert_(GetMenu() && GetMenu()->GetMacMenuH());
Assert_(mBrowserContext);
CStr255 thePString( urlp );
// Insert a "blank" item first...
::InsertMenuItem( GetMenu()->GetMacMenuH(), "\p ", inAfterItem + 1 );
// Then change it. We do this so that no interpretation of metacharacters will occur.
::SetMenuItemText( GetMenu()->GetMacMenuH(), inAfterItem + 1, thePString );
}
#pragma mark -
// ---------------------------------------------------------------------------
// ¥ HandleNewValue
// ---------------------------------------------------------------------------
Boolean
COpenRecentlyEditedPopup::HandleNewValue( Int32 inNewValue )
{
if ( inNewValue >= 1 && inNewValue < PERM_OPEN_ITEMS )
{
// someone else will handle this
return false;
}
if ( AssertPreconditions() && inNewValue )
{
MWContext *cntxt = ((MWContext *)(*mBrowserContext));
if ( cntxt )
{
char *aURLtoOpen = NULL;
// EDT_GetEditHistory is 0-based so deduct 1 from 2nd parameter
if ( EDT_GetEditHistory( cntxt, inNewValue - PERM_OPEN_ITEMS - 1, &aURLtoOpen, NULL) )
{
URL_Struct* theURL = NET_CreateURLStruct( aURLtoOpen, NET_NORMAL_RELOAD );
if ( theURL )
CEditorWindow::MakeEditWindow( NULL, theURL );
}
}
}
return true;
}
// ---------------------------------------------------------------------------
// ¥ AssertPreconditions
// ---------------------------------------------------------------------------
// Assert preconditions and fill in interesting member data
Boolean
COpenRecentlyEditedPopup::AssertPreconditions()
{
CMediatedWindow* topWindow = CWindowMediator::GetWindowMediator()->FetchTopWindow( WindowType_Any, regularLayerType );
if (!topWindow || topWindow->GetWindowType() != WindowType_Editor)
return false;
CEditorWindow* composerWindow = dynamic_cast<CEditorWindow*>(topWindow);
if ( !composerWindow )
return false;
if ( !(mBrowserContext = (CBrowserContext*)composerWindow->GetWindowContext()) )
return false;
return true;
}

View File

@@ -1,63 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// COpenRecentlyEditedPopup.h
// ===========================================================================
#ifndef COpenRecentlyEditedPopup_H
#define COpenRecentlyEditedPopup_H
#pragma once
// Includes
#include "CPatternButtonPopup.h"
// Forward declarations
class CBrowserContext;
// Class declaration
class COpenRecentlyEditedPopup : public CPatternButtonPopup
{
public:
enum { class_ID = 'PbRc', PERM_OPEN_ITEMS = 3 };
typedef CPatternButtonPopup super;
static COpenRecentlyEditedPopup* CreateOpenRecentlyEditedPopupStream(LStream* inStream);
COpenRecentlyEditedPopup(LStream* inStream);
virtual ~COpenRecentlyEditedPopup();
protected:
virtual void AdjustMenuContents();
virtual void InsertItemIntoMenu( char *urlp,
Int16 inAfterItem );
virtual Boolean HandleNewValue(Int32 inNewValue);
Boolean AssertPreconditions();
CBrowserContext* mBrowserContext;
};
#endif

View File

@@ -1,210 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//===========================================================
// CRecentEditMenuAttachment.cp
//===========================================================
#include "CRecentEditMenuAttachment.h"
#include "CEditView.h"
#include "CBrowserContext.h" // operator MWContext*()
#include "resgui.h"
#include "macutil.h" // CMediatedWindow
#include "UMenuUtils.h"
#include "edt.h"
#include "CEditorWindow.h"
LMenu *CRecentEditMenuAttachment::sMenu = NULL;
CRecentEditMenuAttachment::CRecentEditMenuAttachment()
{
UpdateMenu();
}
MWContext *CRecentEditMenuAttachment::GetTopWindowContext()
{
// Ok, ok. I know this is skanky,
// but there is no common way to get the context from a window: it depends on the window type.
// So, we look around for a CEditView somewhere in the top window.
// A CEditView we understand (and get an MWContext from).
CMediatedWindow* topWin = NULL; // find the top window to use the plugin in
CWindowIterator iter(WindowType_Any);
iter.Next(topWin);
if (topWin == NULL
|| ! (topWin->GetWindowType() == WindowType_Editor || topWin->GetWindowType() == WindowType_Compose) )
return NULL;
CEditView *editView = (CEditView *)(topWin->FindPaneByID(CEditView::pane_ID));
if (editView == NULL || editView->GetNSContext() == NULL)
return NULL;
return editView->GetNSContext()->operator MWContext*();
}
// Processes
void CRecentEditMenuAttachment::ExecuteSelf( MessageT inMessage, void* ioParam )
{
switch ( inMessage )
{
case msg_CommandStatus:
{
SCommandStatus* status = (SCommandStatus*)ioParam;
if ( status->command >= RECENT_EDIT_MENU_BASE && status->command <= RECENT_EDIT_MENU_BASE_LAST )
{
*(status->enabled) = true;
mExecuteHost = false;
return;
}
}
break;
default:
{
if ( inMessage >= RECENT_EDIT_MENU_BASE && inMessage <= RECENT_EDIT_MENU_BASE_LAST )
{
MWContext *cntxt2 = GetTopWindowContext();
if ( cntxt2 )
{
char *aURLtoOpen = NULL;
if ( EDT_GetEditHistory( cntxt2, inMessage - RECENT_EDIT_MENU_BASE - 1, &aURLtoOpen, NULL) )
{
URL_Struct* theURL = NET_CreateURLStruct( aURLtoOpen, NET_NORMAL_RELOAD );
if ( theURL )
CEditorWindow::MakeEditWindow( NULL, theURL );
mExecuteHost = false;
return;
}
}
}
}
break;
}
mExecuteHost = true; // Let application handle it
}
LMenu *CRecentEditMenuAttachment::GetMenu()
{
if (!sMenu)
sMenu = new LMenu( menu_ID );
return sMenu;
}
// build the font menu from the system
void CRecentEditMenuAttachment::UpdateMenu()
{
if (!GetMenu() || !LMenuBar::GetCurrentMenuBar())
return;
int i;
// ¥ delete all the menu items after the separator line
MenuHandle menu = sMenu->GetMacMenuH();
if ( menu )
{
for ( i = ::CountMItems( menu ); i > 0; i-- )
sMenu->RemoveItem( i );
}
Try_
{
ThrowIfNil_( menu );
// Add recently edited URLs to menu
int i;
char *urlp = NULL, *titlep = NULL;
for ( i = 0; i < MAX_EDIT_HISTORY_LOCATIONS
&& EDT_GetEditHistory( GetTopWindowContext(), i, &urlp, &titlep ); i++ )
{
NET_UnEscape( urlp );
// convert string to pascal-string for menu
CStr255 menuStr(urlp);
if ( menuStr.IsEmpty() )
menuStr = titlep;
if ( !menuStr.IsEmpty() )
{
// Insert a "blank" item first...
::InsertMenuItem( GetMenu()->GetMacMenuH(), "\p ", i );
// Then change it. We do this so that no interpretation of metacharacters will occur.
::SetMenuItemText( GetMenu()->GetMacMenuH(), i + 1, menuStr );
// SetCommand for menu item
sMenu->SetCommand( i, RECENT_EDIT_MENU_BASE + i );
sMenu->SetUsed( true );
}
else
break;
}
}
Catch_( inErr )
{
}
EndCatch_
}
void CRecentEditMenuAttachment::RemoveMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
currentMenuBar->RemoveMenu(sMenu);
}
}
void CRecentEditMenuAttachment::InstallMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(sMenu, hierMenu);
ResIDT resID;
MenuHandle menuh;
Int16 whichItem;
currentMenuBar->FindMenuItem( cmd_ID_toSearchFor, resID, menuh, whichItem );
if ( menuh )
{
// make it hierarchical
::SetItemCmd( menuh, whichItem, hMenuCmd );
::SetItemMark( menuh, whichItem, menu_ID );
}
}
}
}

View File

@@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#ifndef CRECENTEDITMENUATTACHMENT_H_
#define CRECENTEDITMENUATTACHMENT_H_
#include <LAttachment.h>
#include <LMenu.h>
#include "ntypes.h"
/***********************************************************************************
* CRecentEditMenuAttachment
* Processes Recent-Edited files menu commands -- should be attached to application
* Currently, this menu is only used in the Editor window
***********************************************************************************/
class CRecentEditMenuAttachment: public LAttachment
{
public:
enum { menu_ID = 24, cmd_ID_toSearchFor = 'Rece' };
// ¥¥ constructors
CRecentEditMenuAttachment();
// ¥¥Êevents
virtual void ExecuteSelf( MessageT inMessage, void* ioParam );
static LMenu* GetMenu();
static void UpdateMenu();
static void RemoveMenus();
static void InstallMenus();
protected:
static MWContext* GetTopWindowContext();
static LMenu* sMenu;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,83 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "spellchk.h"
#include "ntypes.h" // MWContext
class CEditView;
class LEditField;
class CTextTable;
class CSimpleTextView;
// public definitions
void do_spellcheck( MWContext *mwcontext, CEditView *editView, CSimpleTextView *textView );
#define cmd_CheckSpelling 'ChSp'
// internal
const int SpellCheckerResource = 5109;
const int ChangeStringIndex = 1;
const int DoneStringIndex = 2;
const int NSDictionaryNameIndex = 3;
const int UserDictionaryNameIndex = 4;
// UI management class
class CMacSpellChecker
{
public:
enum { class_ID = 'Spel', res_ID = 5299 };
enum { pane_NewWord = 'NewW', pane_SuggestionList = 'AltW',
msg_Change = 'Chng', msg_Change_All = 'CAll',
msg_Ignore = 'Ignr', msg_Ignore_All = 'IAll',
msg_Add_Button = 'AddB', msg_Check = 'Chck',
msg_Stop = 'Stop', msg_NewLanguage = 'Lang',
msg_SelectionChanged = 'SelC', msg_EditDictionary = 'EdDc' };
CMacSpellChecker( MWContext *context,
CEditView *editView, CSimpleTextView *textView );
char *GetTextBuffer();
void GetSelection( int32 &selStart, int32 &selEnd );
void ReplaceHilitedText( char *newText, Boolean doAll );
void IgnoreHilitedText( Boolean doAll );
void SetNextMisspelledWord( char *textP, LEditField *typoField, CTextTable *t, LCommander *c );
Boolean GetNextMisspelledWord( Boolean doFirstWord );
void ClearReplacementWord( LEditField *newWord, CTextTable *table );
void GetAlternativesForWord( LEditField *newWord, CTextTable *table, LCommander *c );
Boolean StartProcessing( Boolean startOver );
void ShowDialog( char *textP );
MWContext *GetMWContext() { return mMWContext; };
ISpellChecker *GetISpellChecker() { return mISpellChecker; };
void SetISpellChecker( ISpellChecker *i ) { mISpellChecker = i; };
Boolean isHTMLeditor() { return mEditView != NULL; };
private:
ISpellChecker *mISpellChecker;
MWContext *mMWContext; // only if mEditView; ignored if mTextView
Str255 mOrigMisspelledWord;
// we should have one and only one of these-->evidence that this class is mis-designed
CEditView *mEditView;
CSimpleTextView *mTextView;
};

View File

@@ -1,338 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CToolsAttachment.h"
#include "CEditView.h"
#include "CBrowserContext.h" // operator MWContext*()
#include "resgui.h" // TOOLS_MENU_BASE_LAST
#include "macutil.h" // CMediatedWindow
#include "UMenuUtils.h"
#include "edt.h"
//#include "CSpellChecker.h"
#include <LArray.h>
#define PERM_TOOLS_ITEMS 2
#define PERM_TOOLS_END_ITEMS 1
const CommandT cmd_ToolsHierItem = TOOLS_MENU_BASE_LAST;
LMenu *CToolsAttachment::sMenu = NULL;
Boolean CToolsAttachment::sInvalidMenu = true;
LArray CToolsAttachment::sMenusList;
//===========================================================
// CToolsAttachment
//===========================================================
CToolsAttachment::CToolsAttachment()
{
}
MWContext *CToolsAttachment::GetTopWindowContext()
{
// Ok, ok. I know this is skanky,
// but there is no common way to get the context from a window: it depends on the window type.
// So, we look around for a CEditView somewhere in the top window.
// A CEditView we understand (and get an MWContext from).
CMediatedWindow* topWin = NULL; // find the top window to use the plugin in
CWindowIterator iter(WindowType_Any);
// do {
iter.Next(topWin);
// } while (topWin && topWin->GetWindowType() != WindowType_Editor && topWin->GetWindowType() != WindowType_Compose);
if (topWin == NULL)
return NULL;
if ( topWin->GetWindowType() != WindowType_Editor && topWin->GetWindowType() != WindowType_Compose )
return NULL;
CEditView *editView = (CEditView *)(topWin->FindPaneByID(CEditView::pane_ID));
if (editView == NULL || editView->GetNSContext() == NULL)
return NULL;
return editView->GetNSContext()->operator MWContext*();
}
// Processes:
void CToolsAttachment::ExecuteSelf( MessageT inMessage, void* ioParam )
{
mExecuteHost = FALSE;
switch ( inMessage )
{
// case cmd_CheckSpelling: // spell checker
// return;
case cmd_EditorPluginStop:
MWContext *cntxt = GetTopWindowContext();
if (cntxt)
EDT_StopPlugin(cntxt);
return;
case msg_CommandStatus:
{
SCommandStatus* status = (SCommandStatus*)ioParam;
switch ( status->command )
{
case cmd_EditorPluginStop:
MWContext *cntxt = GetTopWindowContext();
*(status->enabled) = cntxt && EDT_IsPluginActive(cntxt);
*(status->usesMark) = FALSE;
return;
default:
if ( status->command >= TOOLS_MENU_BASE && status->command <= TOOLS_MENU_BASE_LAST )
{
*(status->enabled) = TRUE;
*(status->usesMark) = FALSE;
return;
}
break;
}
}
break;
default:
{
if ( inMessage >= TOOLS_MENU_BASE && inMessage <= TOOLS_MENU_BASE_LAST )
{
int32 index = inMessage - TOOLS_MENU_BASE;
for (int32 CategoryIndex = 0; CategoryIndex < EDT_NumberOfPluginCategories(); CategoryIndex++)
for (int32 PluginIndex = 0; PluginIndex < EDT_NumberOfPlugins(CategoryIndex); PluginIndex++)
if (index-- == 0)
{ // count down until we find which one...
MWContext *cntxt = GetTopWindowContext();
if (cntxt)
EDT_PerformPlugin(cntxt, CategoryIndex, PluginIndex, 0, 0); // what is the result for?
return;
}
}
}
break;
}
mExecuteHost = TRUE; // Let application handle it
}
LMenu *CToolsAttachment::GetMenu()
{
if (!sMenu)
sMenu = new LMenu(cToolsMenuID);
return sMenu;
}
void CToolsAttachment::UpdateMenu()
{
if (!sInvalidMenu || !GetMenu() || !LMenuBar::GetCurrentMenuBar())
return;
int i;
// ¥ delete all the dynamically created menus
// ¥Êdelete all the hierarchical menus we have added from the menubar
for ( i = 1; i <= sMenusList.GetCount(); i++ )
{
LMenu* m;
sMenusList.FetchItemAt( i, &m );
if ( m )
LMenuBar::GetCurrentMenuBar()->RemoveMenu( m );
delete m;
}
// ¥ delete all the menu items after the line in Tools menu
MenuHandle menu = sMenu->GetMacMenuH();
if ( menu )
{
int howMany = ::CountMItems( menu );
for ( i = howMany - PERM_TOOLS_END_ITEMS; i > PERM_TOOLS_ITEMS; i-- )
sMenu->RemoveItem( i );
}
sMenusList.RemoveItemsAt( sMenusList.GetCount(), 1 );
int whichItem = PERM_TOOLS_ITEMS;
int commandNum = TOOLS_MENU_BASE;
int nextMenuID = cEditorPluginsFirstHierMenuID;
Try_
{
ThrowIfNil_( sMenu );
MenuHandle mHand = sMenu->GetMacMenuH();
ThrowIfNil_( mHand );
for (int32 CategoryIndex = 0; CategoryIndex < EDT_NumberOfPluginCategories(); CategoryIndex++) {
CStr255 headerName( EDT_GetPluginCategoryName( CategoryIndex ) );
CreateMenuString( headerName ); // make sure it isn't too long
whichItem = UMenuUtils::InsertMenuItem(mHand, headerName, whichItem); // returns actual insert loc
sMenu->SetCommand(whichItem, cmd_ToolsHierItem);
// ¥ Are there actually any menu items to put on this Hierarchical menu?
if (EDT_NumberOfPlugins(CategoryIndex)) {
// ¥ do we have any hierarchical menus left?
if (nextMenuID <= cEditorPluginsLastHierMenuID) {
LMenu* subMenu = (LMenuBar::GetCurrentMenuBar())->FetchMenu( nextMenuID );
if ( !subMenu )
{
StringHandle menuStringH = GetString( NEW_RESID );
Assert_(menuStringH);
if (menuStringH)
{
StHandleLocker locker((Handle)menuStringH);
subMenu = new LMenu( nextMenuID,
(unsigned char *)*menuStringH );
LMenuBar::GetCurrentMenuBar()->InstallMenu( subMenu, hierMenu );
}
}
else
SysBeep( 1 );
nextMenuID++;
if ( subMenu )
{
sMenusList.InsertItemsAt( 1, sMenusList.GetCount(), &subMenu );
// ¥Êmake item hierarchical
::SetItemCmd( mHand, whichItem, hMenuCmd );
::SetItemMark( mHand, whichItem, subMenu->GetMenuID() );
FillMenu(
CategoryIndex,
subMenu,
commandNum,
0 );
}
} else {
// ¥ There are no hierarchical menus left,
// so we will just add these onto the bottom of the main tools menu.
// We have already put the (disabled) category name in the main tools menu
FillMenu(
CategoryIndex,
sMenu,
commandNum,
whichItem );
whichItem += EDT_NumberOfPlugins(CategoryIndex);
}
}
}
// this is a hack. The menu item "Stop Active Plug-in" gets pushed around and loses its command. So, reset it.
sMenu->SetCommand(++whichItem, cmd_EditorPluginStop);
}
Catch_( inErr )
{
}
EndCatch_
sInvalidMenu = true;
}
void CToolsAttachment::FillMenu(
int32 CategoryIndex,
LMenu* newMenu,
int& commandNum, // next menu to create
int whichItem ) // id of the first item to insert
{
Try_
{
ThrowIfNil_( newMenu );
MenuHandle mHand = newMenu->GetMacMenuH();
ThrowIfNil_( mHand );
for (int32 PluginIndex = 0; PluginIndex < EDT_NumberOfPlugins(CategoryIndex); PluginIndex++) {
// ¥ should really convert this to sMenu chars
CStr255 pluginName( EDT_GetPluginName( CategoryIndex, PluginIndex) );
CreateMenuString( pluginName );
whichItem = UMenuUtils::InsertMenuItem(mHand, pluginName, whichItem); // returns actual insert loc
newMenu->SetCommand(whichItem, commandNum++);
}
}
Catch_( inErr )
{
}
EndCatch_
}
void CToolsAttachment::RemoveMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
currentMenuBar->RemoveMenu(sMenu);
for (ArrayIndexT index = 1; index <= sMenusList.GetCount(); ++index)
{
LMenu *menu;
sMenusList.FetchItemAt(index, &menu);
if (menu)
currentMenuBar->RemoveMenu(menu);
}
}
}
}
void CToolsAttachment::InstallMenus()
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
for (ArrayIndexT index = sMenusList.GetCount(); index > 0; --index)
{
LMenu *menu;
sMenusList.FetchItemAt(index, &menu);
if (menu)
{
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(menu, hierMenu);
}
}
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(sMenu, InstallMenu_AtEnd);
}
}
}

View File

@@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#ifndef CTOOLSATTACHMENT_H_
#define CTOOLSATTACHMENT_H_
#include <LAttachment.h>
#include "ntypes.h"
class LMenu;
class LArray;
/***********************************************************************************
* CToolsAttachment
* Processes Tools menu commands -- should be attached to application
* Currently, this menu is only used in the Editor window
***********************************************************************************/
class CToolsAttachment: public LAttachment
{
public:
// ¥¥ constructors
CToolsAttachment();
// ¥¥Êevents
virtual void ExecuteSelf( MessageT inMessage, void* ioParam );
static LMenu* GetMenu();
static void InvalidateMenu() { sInvalidMenu = true; }
static void UpdateMenu();
static void RemoveMenus();
static void InstallMenus();
protected:
static void FillMenu(
int32 CategoryIndex,
LMenu* newMenu,
int& commandNum,
int whichItem );
static MWContext* GetTopWindowContext();
static LMenu* sMenu;
static Boolean sInvalidMenu;
static LArray sMenusList;
};
#endif

View File

@@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Composer_DebugPrefix.h
//
// NOTE:
// You typically won't need to change anything in this file.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "Moz_DebugConfig.h"
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ When we split out the procompiled headers seperately, we will not
// be including them here. We will instead define things like
// PowerPlant_PCH and include them at the top of the applicable source
// modules
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#ifdef __powerc
#ifdef __cplusplus
#include "Composer_HeadersPPC++"
#else
#include "Composer_HeadersPPC"
#endif
#else
#ifdef __cplusplus
#include "Composer_Headers68K++"
#else
#include "Composer_Headers68K"
#endif
#endif

View File

@@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Composer_Headers.pch
//
// NOTE:
//
// You will typically not need to edit this file. If you want to add
// a file to the C/C++ precompiled header, do it in Comm_Headers.c
// or Borwser_Headers.cp respectively.
//
// If you're doing a non-debug build, use the non-debug project which
// will has pch files that generate non-debug dumps.
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "Moz_Config.h"
#ifdef powerc
#pragma precompile_target "Composer_HeadersPPC"
#else
#pragma precompile_target "Composer_Headers68K"
#endif
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ Include the list of headers.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "Comm_Headers.c"

View File

@@ -1,52 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Composer_Headers.pch++
//
// NOTE:
//
// You will typically not need to edit this file. If you want to add
// a file to the C/C++ precompiled header, do it in Comm_Headers.c
// or Borwser_Headers.cp respectively.
//
// If you're doing a non-debug build, use the non-debug project which
// will has pch files that generate non-debug dumps.
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "Moz_Config.h"
#ifdef powerc
#pragma precompile_target "Composer_HeadersPPC++"
#else
#pragma precompile_target "Composer_Headers68K++"
#endif
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ Include the headers.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
extern "C" {
#include "Comm_Headers.c"
}
#include "Comm_Headers.cp"

View File

@@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Composer_DebugPrefix.h
//
// NOTE:
// You typically won't need to change anything in this file.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "Moz_Config.h"
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥ When we split out the procompiled headers seperately, we will not
// be including them here. We will instead define things like
// PowerPlant_PCH and include them at the top of the applicable source
// modules
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#ifdef __powerc
#ifdef __cplusplus
#include "Composer_HeadersPPC++"
#else
#include "Composer_HeadersPPC"
#endif
#else
#ifdef __cplusplus
#include "Composer_Headers68K++"
#else
#include "Composer_Headers68K"
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,839 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "CTabSwitcher.h"
#include "ntypes.h" // MWContext
#include "lo_ele.h" // LO_Color
#include "intl_csi.h" // INTL_GetCSIWinCSID
#ifdef COOL_IMAGE_RADIO_BUTTONS
# include "CBevelButton.h"
#endif
class OneRowLListBox;
class CColorButton;
class CTabControl;
class CLargeEditField;
class LGAEditField;
class LGAPopup;
class CChameleonView: public LView
{
public:
enum { class_ID = 'cviw' };
CChameleonView(LStream * inStream) : LView(inStream) {};
virtual void SetColor(RGBColor textColor);
virtual void DrawSelf();
protected:
RGBColor fTextColor;
};
class CChameleonCaption: public LCaption
{
public:
enum {class_ID = 'ccpt' };
CChameleonCaption(LStream * inStream) : LCaption(inStream) {};
virtual void SetColor(RGBColor textColor, RGBColor backColor);
protected:
RGBColor fTextColor;
RGBColor fBackColor;
virtual void DrawSelf();
};
// This class simply creates a dialog and extracts the context from the SuperCommand so
// that we can set the values of the controls in the dialog based on the context which created it.
class CEditDialog: public LDialogBox
{
public:
CEditDialog( LStream* inStream ): LDialogBox( inStream ), mUndoInited(false) { pExtra = NULL; }
~CEditDialog() { XP_FREEIF(pExtra); }
static Boolean Start(ResIDT inWindowID, MWContext * context = NULL, short initTabValue = 0, Boolean insert = FALSE);
Boolean AllowSubRemoval( LCommander *inSub );
void FindCommandStatus( CommandT inCommand, Boolean &outEnabled,
Boolean&, Char16&, Str255);
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void InitializeDialogControls() = NULL;
void SetContext(MWContext* context) {fContext = context;}
MWContext* GetContext() { return fContext;}
void SetInitTabValue(short initValue) {fInitTabValue = initValue;}
short GetInitTabValue() { return fInitTabValue;}
void SetInWindowID(ResIDT inWindowID) {fInWindowID = inWindowID;}
ResIDT GetInWindowID() { return fInWindowID;}
void SetInsertFlag(Boolean insert) {fInsert = insert;}
Boolean GetInsertFlag() { return fInsert;}
int16 GetWinCSID() { return INTL_GetCSIWinCSID(LO_GetDocumentCharacterSetInfo(fContext)); }
static void ChooseImageFile(CLargeEditField* editField);
protected:
virtual Boolean CommitChanges(Boolean allPanes) = NULL;
virtual void Help() = NULL;
MWContext* fContext;
short fInitTabValue;
Boolean fInsert;
ResIDT fInWindowID;
char* pExtra;
Boolean mUndoInited;
};
class CEditTabSwitcher: public CTabSwitcher
{
public:
enum { class_ID = 'EtSw' };
CEditTabSwitcher(LStream* inStream);
virtual ~CEditTabSwitcher();
virtual void DoPostLoad(LView* inLoadedPage, Boolean inFromCache);
void SetData(MWContext* context, Boolean insert);
void Help();
protected:
MWContext* fContext;
Boolean fInsert;
char* fLinkName; // need to share between link and image pages
};
class CTableInsertDialog: public CEditDialog
{
public:
enum { class_ID = 'ETBT' };
CTableInsertDialog( LStream* inStream );
virtual ~CTableInsertDialog();
virtual Boolean CommitChanges(Boolean allPanes);
void AdjustEnable();
virtual void FinishCreateSelf();
virtual void InitializeDialogControls();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
protected:
virtual void Help();
LGAEditField* fNumRowsEditText;
LGAEditField* fNumColsEditText;
LControl* fBorderCheckBox;
LGAEditField* fBorderWidthEditText;
LGAEditField* fCellSpacingEditText;
LGAEditField* fCellPaddingEditText;
LControl* fCustomWidth;
LGAEditField* fWidthEditText;
LControl* fWidthPopup;
LControl* fCustomHeight;
LGAEditField* fHeightEditText;
LControl* fHeightPopup;
LControl* fCustomColor;
CColorButton* fColorCustomColor;
LControl* fIncludeCaption;
LControl* fCaptionAboveBelow;
LGAPopup* mTableAlignment;
LControl* mFastLayout;
LControl* mUseImage;
CLargeEditField* mImageFileName;
LControl* mLeaveImage;
};
class CFormatMsgColorAndImageDlog: public CEditDialog
{
public:
enum { class_ID = 'Ec+i' };
CFormatMsgColorAndImageDlog( LStream* inStream ) : CEditDialog( inStream ) {;}
virtual ~CFormatMsgColorAndImageDlog() {;}
virtual Boolean CommitChanges(Boolean allPanes);
virtual void InitializeDialogControls();
protected:
virtual void Help();
};
class CTarget: public CEditDialog
{
public:
enum { class_ID = 'ETRG' };
CTarget( LStream* inStream );
virtual ~CTarget();
void CleanUpTargetString(char *target);
Boolean AlreadyExistsInDocument(char *anchor);
virtual Boolean CommitChanges(Boolean allPanes);
virtual void InitializeDialogControls();
protected:
virtual void Help() {;} // Sorry, no help.
char* fOriginalTarget;
CLargeEditField* fTargetName;
};
class CLineProp: public CEditDialog
{
public:
enum { class_ID = 'EDL0' };
CLineProp( LStream* inStream );
virtual ~CLineProp( );
virtual Boolean CommitChanges(Boolean allPanes);
virtual void FinishCreateSelf();
virtual void InitializeDialogControls();
// virtual void ListenToMessage( MessageT inMessage, void* ioParam );
protected:
virtual void Help();
LControl* fLeftAlign;
LControl* fCenterAlign;
LControl* fRightAlign;
LGAEditField* fHeightEditText;
LGAEditField* fWidthEditText;
LControl* fPixelPercent;
LControl* fShading;
};
class CUnknownTag: public CEditDialog
{
public:
enum { class_ID = 'EDUT' };
CUnknownTag( LStream* inStream );
virtual ~CUnknownTag();
virtual Boolean CommitChanges(Boolean allPanes);
virtual void InitializeDialogControls();
virtual void FinishCreateSelf();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
protected:
virtual void Help();
CLargeEditField* fTargetName;
};
class MultipleSelectionSingleColumn: public LListBox
{
public:
enum { class_ID = 'MSSC' };
MultipleSelectionSingleColumn( LStream* inStream );
virtual int16 NumItems();
virtual void DeselectAll();
virtual void SelectAll();
virtual void AddItem( char* data, Boolean isSelected );
virtual StringPtr GetItem(Str255 outDescriptor, int32 rowNum) const; // rowNum is zero based
virtual void RemoveAllItems();
virtual Boolean IsSelected(int32 rowNum); // rowNum is zero based
};
class CPublishHistory
{
public:
// Do we have any history at all?
static Boolean IsTherePublishHistory();
// Get a particular entry
static char* GetPublishHistoryCharPtr(short whichone);
// Set a particular entry
static void SetPublishHistoryCharPtr(char* entry, short whichone);
// Put an entry at the top of the list (and remove any duplicate)
static void AddPublishHistoryEntry(char *entry);
};
class CPublish: public CEditDialog
{
public:
enum { class_ID = 'EPLS' };
CPublish( LStream* inStream );
virtual ~CPublish();
virtual Boolean CommitChanges(Boolean allPanes);
virtual void FinishCreateSelf();
virtual void InitializeDialogControls();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
protected:
virtual void Help();
char * DocName();
LCaption* fLocalLocation;
LControl* fImageFiles;
LControl* fFolderFiles;
LControl* fDefaultLocation;
MultipleSelectionSingleColumn* fFileList;
LGAEditField* fPublishLocation;
LGAEditField* fUserID;
LGAEditField* fPassword;
LControl* fSavePassword;
LGAPopup* mHistoryList;
};
// This is a dialog box which contains a Tab control.
// This code was written using Cmd-C & Cmd-V from the CPrefWindow class.
// We don't need everything in CPrefWindow though, and I'm too lazy to make
// a nice base class for both at the moment.
class CTabbedDialog : public CEditDialog
{
public:
enum {class_ID = 'EDTB'};
CTabbedDialog( LStream* inStream );
virtual ~CTabbedDialog();
static void RegisterViewTypes();
void FinishCreateSelf();
virtual void InitializeDialogControls();
virtual void SavePlace( LStream* ) { }
virtual void RestorePlace( LStream* ) { }
// virtual void ListenToMessage( MessageT inMessage, void* ioParam );
protected:
virtual void Help();
virtual Boolean CommitChanges(Boolean allPanes);
CTabControl* mTabControl;
CEditTabSwitcher* mTabSwitcher;
};
/*****************************************************************************
* class CEditorPrefContain. (used to be CPrefContain)
* Container for a related group of controls (1 pane of preference window)
* and know how to:
* - get proper variables from data, and assign the values to controls
* - get values from controls back into data.
*****************************************************************************/
class CEditorPrefContain : public LView, public LListener, public LTabGroup
{
public:
CEditorPrefContain( LStream* inStream ) : LView( inStream ) {};
virtual ~CEditorPrefContain() { };
// ¥ link to little controls, and reset their values
virtual void FinishCreateSelf() { LView::FinishCreateSelf(); UReanimator::LinkListenerToControls(this, this, GetPaneID()); ControlsFromPref();}
// ¥Êlistens to 'default' message
void ListenToMessage( MessageT, void* ) {};
// ¥ initialize from preferences
virtual void ControlsFromPref() = 0;
virtual void PrefsFromControls() = 0;
virtual void DrawSelf();
};
class CEditContain: public CEditorPrefContain, public LBroadcaster
{
public:
CEditContain(LStream* inStream): CEditorPrefContain( inStream ){ pExtra = NULL; }
~CEditContain(){ XP_FREEIF(pExtra); }
void SetContext(MWContext* context) {fContext = context;}
MWContext* GetContext() { return fContext;}
void SetInsertFlag(Boolean insert) {fInsert = insert;}
Boolean GetInsertFlag() { return fInsert;}
void SetLinkToLinkName(char** LinkNameLink) {fLinkName = LinkNameLink;}
void SetExtraHTMLString(char *s) { pExtra = s; };
virtual void Help() = NULL;
int16 GetWinCSID() { return INTL_GetCSIWinCSID(LO_GetDocumentCharacterSetInfo(fContext)); }
virtual Boolean AllFieldsOK() = NULL;
protected:
MWContext* fContext;
Boolean fInsert;
char** fLinkName;
char* pExtra;
};
class CEDCharacterContain: public CEditContain
{
public:
enum {class_ID = '1edl'};
CEDCharacterContain( LStream* inStream ) : CEditContain( inStream ){};
virtual void FinishCreateSelf();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK() { return TRUE;}
protected:
Boolean fColorChanged;
Boolean fSizeChanged;
LControl* fTextSizePopup;
LControl* mFontMenu;
Boolean mFontChanged;
LControl* fColorDefaultRadio;
LControl* fColorCustomRadio;
CColorButton* fColorCustomColor;
LControl* fTextBoldCheck;
LControl* fTextItalicCheck;
LControl* fTextSuperscriptCheck;
LControl* fTextSubscriptCheck;
LControl* fTextNoBreaksCheck;
LControl* fTextUnderlineCheck;
LControl* fTextStrikethroughCheck;
LControl* fTextBlinkingCheck;
LControl* fClearTextStylesButton;
LControl* fClearAllStylesButton;
};
class CEDParagraphContain: public CEditContain
{
public:
enum {class_ID = '2edl'};
CEDParagraphContain( LStream* inStream ) : CEditContain( inStream ){};
virtual void FinishCreateSelf();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK();
protected:
void AdjustPopupsVisibility();
LControl* fParagraphStylePopup;
LControl* fContainerStylePopup;
LControl* fListStylePopup;
LControl* fNumberPopup;
LControl* fBulletPopup;
LControl* fStartNumberCaption;
LGAEditField* fStartNumberEditText;
LControl* fLeftAlignRadio;
LControl* fCenterAlignRadio;
LControl* fRightAlignRadio;
};
#ifdef COOL_IMAGE_RADIO_BUTTONS
class CImageAlignButton: public CBevelButton
{
public:
enum { class_ID = 'BvRB' };
CImageAlignButton( LStream* inStream ) : CBevelButton( inStream ){};
virtual void SetValue(
Int32 inValue);
private:
virtual void HotSpotAction(
Int16 inHotSpot,
Boolean inCurrInside,
Boolean inPrevInside);
virtual void HotSpotResult(Int16 inHotSpot);
};
#endif
class CEDLinkContain: public CEditContain
{
public:
enum {class_ID = '3edl'};
CEDLinkContain( LStream* inStream ) : CEditContain( inStream ){};
virtual ~CEDLinkContain();
virtual void FinishCreateSelf();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void Show();
virtual void Hide();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK() { return TRUE;}
protected:
void SelectedFileUpdate();
void CurrentFileTargs();
CLargeEditField* fLinkedTextEdit;
LControl* fChooseFileLinkButton;
LControl* fRemoveLinkButton;
CLargeEditField* fLinkPageTextEdit;
LControl* fCurrentDocumentRadio;
LControl* fSelectedFileRadio;
OneRowLListBox* fTargetList;
char* fTargs;
};
class CEDImageContain: public CEditContain
{
public:
enum {class_ID = '4edl'};
CEDImageContain( LStream* inStream );
virtual ~CEDImageContain();
virtual void FinishCreateSelf();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
EDT_ImageData * ImageDataFromControls();
virtual void Show();
virtual void Hide();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK();
protected:
void AdjustEnable();
char * fSrcStr;
char * fLowSrcStr;
CLargeEditField* fImageFileName; // was CEditBroadcaster
CLargeEditField* fImageAltFileName;
CLargeEditField* fImageAltTextEdit;
LGAEditField* fHeightTextEdit;
LGAEditField* fWidthTextEdit;
LControl* fImageLockedCheckBox;
int32 fOriginalWidth; /* Width and Height we got on initial loading */
int32 fOriginalHeight;
LGAEditField* fLeftRightBorderTextEdit;
LGAEditField* fTopBottomBorderTextEdit;
LGAEditField* fSolidBorderTextEdit;
LControl* fCopyImageCheck;
LControl* fBackgroundImageCheck;
LControl* fRemoveImageMapButton;
LControl* fEditImageButton;
Boolean fLooseImageMap;
Boolean mBorderUnspecified;
LControl* mImageAlignmentPopup;
};
class CEDDocPropGeneralContain: public CEditContain
{
public:
enum {class_ID = '5edl'};
CEDDocPropGeneralContain( LStream* inStream ) : CEditContain( inStream ){};
virtual void FinishCreateSelf();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
void AddMeta(char *Name, CLargeEditField* value);
// virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK() { return TRUE;}
protected:
CLargeEditField* fLocation;
CLargeEditField* fTitle;
CLargeEditField* fAuthor;
CLargeEditField* fDescription;
CLargeEditField* fKeywords;
CLargeEditField* fClassification;
};
// This should be moved to XP code in the future
typedef struct _EDT_ColorSchemeData {
char * pSchemeName;
LO_Color ColorText;
LO_Color ColorLink;
LO_Color ColorActiveLink;
LO_Color ColorFollowedLink;
LO_Color ColorBackground;
char * pBackgroundImage;
} EDT_ColorSchemeData;
class AppearanceContain: public CEditContain
{
AppearanceContain( LStream* inStream ) : CEditContain( inStream ){};
virtual void FinishCreateSelf();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
void ChooseImageFile();
protected:
void UpdateTheWholeDamnDialogBox();
LControl* fCustomColor;
LControl* fBrowserColor;
LControl* fColorScheme;
CChameleonView* fExampleView;
CColorButton* fNormalText;
CColorButton* fLinkedText;
CColorButton* fActiveLinkedText;
CColorButton* fFollowedLinkedText;
CChameleonCaption* fExampleNormalText;
CChameleonCaption* fExampleLinkedTex;
CChameleonCaption* fExampleActiveLinkedText;
CChameleonCaption* fExampleFollowedLinkedText;
CColorButton* fSolidColor;
LControl* fImageFile;
CLargeEditField* fImageFileName;
XP_List* fSchemeData;
};
class CEDDocPropAppearanceContain: public AppearanceContain
{
public:
enum {class_ID = '6edl'};
CEDDocPropAppearanceContain( LStream* inStream ) : AppearanceContain( inStream ){};
virtual ~CEDDocPropAppearanceContain();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual Boolean AllFieldsOK() { return TRUE;}
virtual void Help();
};
class CEDDocAppearanceNoTab: public CEDDocPropAppearanceContain
{
public:
enum {class_ID = '6edL'};
CEDDocAppearanceNoTab( LStream* inStream ) : CEDDocPropAppearanceContain( inStream ){};
virtual ~CEDDocAppearanceNoTab() {;}
virtual void DrawSelf();
};
class CEDDocPropAdvancedContain: public CEditContain
{
public:
enum {class_ID = '7edl'};
CEDDocPropAdvancedContain( LStream* inStream ) : CEditContain( inStream ){};
virtual ~CEDDocPropAdvancedContain();
virtual void FinishCreateSelf();
void PutStringsInBuffer();
Boolean BufferUnique();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual void Help();
virtual Boolean AllFieldsOK() { return TRUE;}
protected:
int16 fbufferlen;
char* fbuffer;
OneRowLListBox* fSystemVariables;
OneRowLListBox* fUserVariables;
CLargeEditField* fName;
CLargeEditField* fValue;
};
class CEDTableContain: public CEditContain
{
public:
enum {class_ID = '8edl'};
CEDTableContain( LStream* inStream ) : CEditContain( inStream ) { pExtra = NULL; }
~CEDTableContain() { XP_FREEIF(pExtra); }
virtual void FinishCreateSelf();
virtual void Help();
void AdjustEnable();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual Boolean AllFieldsOK();
protected:
LControl* fBorderCheckBox;
LGAEditField* fBorderWidthEditText;
LGAEditField* fCellSpacingEditText;
LGAEditField* fCellPaddingEditText;
LControl* fCustomWidth;
LGAEditField* fWidthEditText;
LControl* fWidthPopup;
LControl* fCustomHeight;
LGAEditField* fHeightEditText;
LControl* fHeightPopup;
LControl* fCustomColor;
CColorButton* fColorCustomColor;
LControl* fIncludeCaption;
LControl* fCaptionAboveBelow;
LGAPopup* mTableAlignment;
LControl* mFastLayout;
LControl* mUseImage;
CLargeEditField* mImageFileName;
LControl* mLeaveImage;
char* pExtra;
};
class CEDTableCellContain: public CEditContain
{
public:
enum {class_ID = 'aedl'};
CEDTableCellContain( LStream* inStream ) : CEditContain( inStream ) { pExtra = NULL; }
~CEDTableCellContain() { XP_FREEIF(pExtra); }
virtual void FinishCreateSelf();
virtual void Help();
void AdjustEnable();
virtual void PrefsFromControls();
virtual void ControlsFromPref();
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
virtual Boolean AllFieldsOK();
protected:
LGAEditField* fRowSpanEditText;
LGAEditField* fColSpanEditText;
LGAPopup* fHorizontalAlignment;
LGAPopup* fVerticalAlignment;
LControl* fHeaderStyle;
LControl* fWrapText;
LControl* fCustomWidth;
LGAEditField* fWidthEditText;
LControl* fWidthPopup;
LControl* fCustomHeight;
LGAEditField* fHeightEditText;
LControl* fHeightPopup;
LControl* fCustomColor;
CColorButton* fColorCustomColor;
LControl* mUseImage;
CLargeEditField* mImageFileName;
LControl* mLeaveImage;
char* pExtra;
};

View File

@@ -1,342 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "meditor.h" // HandleModalDialog
#include "StBlockingDialogHandler.h"
#include "CEditView.h"
#include "macgui.h" // UGraphics::MakeLOColor
#include "CPaneEnabler.h"
#include "resgui.h" // EDITDLG_AUTOSAVE
#include "edt.h"
#include "fe_proto.h"
#include "prefapi.h" // PREF_GetBoolPref, PREF_GetIntPref
#include "shist.h" // SHIST_GetCurrent
#include "uapp.h" // CFrontApp
#include "CColorPopup.h"
extern "C" {
#include "xpgetstr.h"
#define WANT_ENUM_STRING_IDS
#include "allxpstr.h"
#undef WANT_ENUM_STRING_IDS
}
#include "CNSContext.h" // ExtractHyperView
// takes pascal-strings
MessageT HandleModalDialog( int id, const unsigned char *prompt1, const unsigned char* prompt2)
{
StPrepareForDialog prepare;
StBlockingDialogHandler handler( id, NULL );
LDialogBox* dialog = (LDialogBox *)handler.GetDialog();
if ( prompt1 )
{
LCaption *caption = (LCaption *)dialog->FindPaneByID( '^1 ' );
if ( caption )
caption->SetDescriptor( prompt1 );
}
if ( prompt2 )
{
LCaption *caption = (LCaption *)dialog->FindPaneByID( '^2 ' );
if ( caption )
caption->SetDescriptor( prompt2 );
}
MessageT message;
do {
message = handler.DoDialog();
}
while ( message == 0 );
return message;
}
/* Set default colors, background from user Preferences via the Page Data structure
*/
void FE_SetNewDocumentProperties(MWContext * pContext)
{
if ( pContext && pContext->is_editor && pContext->bIsComposeWindow )
return;
EDT_PageData *pageData = EDT_NewPageData();
if (pageData == NULL) return;
if (CPrefs::GetBoolean(CPrefs::EditorUseCustomColors )) {
LO_Color EditorText = UGraphics::MakeLOColor(CPrefs::GetColor(CPrefs::EditorText));
LO_Color EditorLink = UGraphics::MakeLOColor(CPrefs::GetColor(CPrefs::EditorLink));
LO_Color EditorActiveLink = UGraphics::MakeLOColor(CPrefs::GetColor(CPrefs::EditorActiveLink));
LO_Color EditorFollowedLink = UGraphics::MakeLOColor(CPrefs::GetColor(CPrefs::EditorFollowedLink));
LO_Color EditorBackground = UGraphics::MakeLOColor(CPrefs::GetColor(CPrefs::EditorBackground));
pageData->pColorText = &EditorText;
pageData->pColorLink= &EditorLink;
pageData->pColorActiveLink = &EditorActiveLink;
pageData->pColorFollowedLink = &EditorFollowedLink;
pageData->pColorBackground = &EditorBackground;
} else {
pageData->pColorText = NULL; // I assume this is how we get the browser defaults...
pageData->pColorLink= NULL;
pageData->pColorActiveLink = NULL;
pageData->pColorFollowedLink = NULL;
pageData->pColorBackground = NULL;
}
Bool hasBackgroundImage;
if ( ( PREF_GetBoolPref( "editor.use_background_image", &hasBackgroundImage ) == PREF_NOERROR )
&& hasBackgroundImage )
{
pageData->pBackgroundImage = CPrefs::GetCharPtr(CPrefs::EditorBackgroundImage);
if (pageData->pBackgroundImage && XP_STRLEN(pageData->pBackgroundImage) == 0) // if there is really nothing there, skip it.
pageData->pBackgroundImage = NULL;
}
else
pageData->pBackgroundImage = NULL;
if ( pContext && pContext->title )
pageData->pTitle = XP_STRDUP(pContext->title);
EDT_SetPageData(pContext, pageData);
pageData->pColorText = NULL; // don't free out lacal data!!!
pageData->pColorLink= NULL;
pageData->pColorActiveLink = NULL;
pageData->pColorFollowedLink = NULL;
pageData->pColorBackground = NULL;
pageData->pBackgroundImage = NULL;
EDT_FreePageData(pageData);
// Set Author name:
// CStr255 EditorAuthor(CPrefs::GetString(CPrefs::EditorAuthor));
// FE_UsersFullName();
EDT_MetaData *metaData = EDT_NewMetaData();
if (metaData == NULL) return;
metaData->bHttpEquiv = FALSE;
metaData->pName = XP_STRDUP("Author");
metaData->pContent = XP_STRDUP(CPrefs::GetString(CPrefs::EditorAuthor));
EDT_SetMetaData(pContext, metaData);
EDT_FreeMetaData(metaData);
}
/*
* Brings up a modal image load dialog and returns. Calls
* EDT_ImageLoadCancel() if the cancel button is pressed
*/
void FE_ImageLoadDialog( MWContext * /* pContext */ )
{
}
/*
* called by the editor engine after the image has been loaded
*/
void FE_ImageLoadDialogDestroy( MWContext * /* pContext */ )
{
}
void FE_EditorDocumentLoaded( MWContext *pContext )
{
if (pContext == NULL || !EDT_IS_EDITOR(pContext))
return;
CEditView *editView = (CEditView *)ExtractHyperView(pContext);
int32 iSave;
if ( pContext->bIsComposeWindow )
{
iSave = 0; // auto-save
CMailEditView *mailEditView = dynamic_cast<CMailEditView *>(editView);
if ( mailEditView )
mailEditView->InitMailCompose();
}
else
{
XP_Bool doAutoSave;
PREF_GetBoolPref( "editor.auto_save", &doAutoSave );
if ( doAutoSave )
PREF_GetIntPref( "editor.auto_save_delay", &iSave );
else
iSave = 0;
}
EDT_SetAutoSavePeriod(pContext, iSave );
// remember when the file was (last) modified
// initializes date/time stamp for external editor warning
EDT_IsFileModified(pContext);
// We had disabled everything, now we have to enable it again. This happens automatically on activate, but we might not get an activate
// if we don't have a dialog poping up (like if the user just creates a new document, there is no dialog...)
// set this after calling InitMailCompose
if ( editView )
{
editView->mEditorDoneLoading = true;
// set color popup control to show correct default color (now that we have an mwcontext)
editView->mColorPopup->InitializeCurrentColor();
}
InitCursor();
(CFrontApp::GetApplication())->UpdateMenus();
}
Bool FE_CheckAndAutoSaveDocument(MWContext *pContext)
{
if (pContext == NULL || !EDT_IS_EDITOR(pContext) || ExtractHyperView(pContext) == NULL )
return FALSE;
if ( pContext->bIsComposeWindow )
return FALSE;
CEditView *editView = (CEditView *)ExtractHyperView(pContext);
if ( FrontWindow() != editView->GetMacPort() )
return true;
if (!EDT_DirtyFlag(pContext) && !EDT_IS_NEW_DOCUMENT(pContext))
return TRUE;
History_entry* newEntry = SHIST_GetCurrent(&pContext->hist);
CStr255 fileName;
if ( newEntry && newEntry->address )
fileName = newEntry->address;
MessageT itemHit = HandleModalDialog(EDITDLG_AUTOSAVE, fileName, NULL );
if (itemHit != ok)
return FALSE;
return ((CEditView *)ExtractHyperView(pContext))->SaveDocument();
}
void FE_FinishedSave( MWContext * /* pMWContext */, int /* status */, char * /* pDestURL */, int /* iFileNumber */ )
{
}
// in xp_file.h
// Create a backup filename for renaming current file before saving data
// Input should be be URL file type "file:///..."
// Caller must free the string with XP_FREE
/*
* I don't know what the logic here should be, so I mostly copied this from the Windows code in:
* src/ns/cmd/winfe/fegui.cpp#XP_BackupFileName()
* (I didn't copy all the Windows code which deals with 8.3 filenames.)
*/
char * XP_BackupFileName( const char * szURL )
{
// Must have "file:" URL type and at least 1 character after "///"
if ( szURL == NULL || !NET_IsLocalFileURL((char*)szURL) || XP_STRLEN(szURL) <= 8 )
return NULL;
// Add extra space for '\0' and '.BAK', but subtract space for "file:///"
char *szFileName = (char *)XP_ALLOC((XP_STRLEN(szURL)+1+4-7)*sizeof(char));
if ( szFileName == NULL )
return NULL;
// Get filename but ignore "file:///"
// {
// char* filename = WH_FileName(szURL+7, xpURL);
// if (!filename) return NULL;
// XP_STRCPY(szFileName,filename);
// XP_FREE(filename);
// }
XP_STRCPY(szFileName, szURL+7);
// Add extension to the filename
XP_STRCAT( szFileName, ".BAK" );
return szFileName;
}
// If pszLocalName is not NULL, we return the full pathname
// in local platform syntax, even if file is not found.
// Caller must free this string.
// Returns TRUE if file already exists
//
/*
* I don't know what the logic here should be, so I mostly copied this from the Windows code in:
* src/ns/cmd/winfe/fegui.cpp#XP_ConvertUrlToLocalFile()
* (I didn't copy all the Windows code which deals with 8.3 filenames.)
*/
// The results of this call are passed directly to functions like XP_Stat and XP_FileOpen.
// brade--use xpURL format
Bool XP_ConvertUrlToLocalFile(const char * szURL, char **pszLocalName) // return TRUE if the file exists!! or return FALSE;
{
// Default assumes no file found - no local filename
Boolean bFileFound = FALSE;
if ( pszLocalName )
*pszLocalName = NULL;
// if "file:///Untitled" fail to convert
if ( szURL && XP_STRCMP( szURL, XP_GetString(XP_EDIT_NEW_DOC_NAME) ) == 0 )
return bFileFound;
// Must have "file:" URL type and at least 1 character after "///"
if ( szURL == NULL || !NET_IsLocalFileURL((char*)szURL) || XP_STRLEN(szURL) <= 8 )
return FALSE;
// Extract file path from URL: e.g. "/c|/foo/file.html"
char *szFileName = NET_ParseURL( szURL, GET_PATH_PART);
if (szFileName == NULL)
return FALSE;
// NET_UnEscape(szFileName); This will be done in WH_FileName, so don't unescape twice.
// Test if file exists
XP_StatStruct statinfo;
if ( -1 != XP_Stat(szFileName, &statinfo, xpURL) // if the file exists
&& statinfo.st_mode & S_IFREG ) // and its a normal file
bFileFound = TRUE; // We found it!
if ( pszLocalName )
{
// Pass string to caller
*pszLocalName = WH_FileName(szFileName, xpURL);
if (szFileName)
XP_FREE( szFileName );
}
else
XP_FREE(szFileName);
return bFileFound;
}

View File

@@ -1,19 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
MessageT HandleModalDialog( int id , const unsigned char *prompt0, const unsigned char* prompt1);

File diff suppressed because it is too large Load Diff

View File

@@ -1,133 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "np.h"
#include "npapi.h"
#include <Printing.h>
#include <Icons.h>
#include <LView.h>
#include <LPeriodical.h>
#include <LCommander.h>
#include <LDragAndDrop.h>
class StPluginFocus;
//
// Return the "plug-in descriptor" that we pass to XP code
// (this is really just a pointer to a CPluginHandler).
//
class CStr255;
extern void* GetPluginDesc(const CStr255& pluginName);
/*********************************************************************************
* CPluginView
* Embeds the plugin, and passes on the events to it
*********************************************************************************/
class CPluginView : public LView, // Drawing, etc
public LPeriodical, // Idling
public LCommander, // Key events
public LDragAndDrop // Dragging
{
public:
friend class StPluginFocus;
enum { class_ID = 'plug' };
// ¥¥ constructors
CPluginView(LStream *inStream);
virtual ~CPluginView();
void EmbedCreate(MWContext* context, LO_EmbedStruct* embed_struct);
void EmbedFree(MWContext* context, LO_EmbedStruct* embed_struct);
void EmbedSize(LO_EmbedStruct* embed_struct, SDimension16 hyperSize);
void EmbedDisplay(LO_EmbedStruct* embed_struct, Boolean isPrinting);
// ¥¥ access
NPWindow* GetNPWindow() { return &fNPWindow; }
NPEmbeddedApp* GetNPEmbeddedApp() { return fApp; }
// ¥¥ event processing
static CPluginView* sPluginTarget;
static void BroadcastPluginEvent(const EventRecord& event);
static Boolean PluginWindowEvent(const EventRecord& event);
virtual void ClickSelf(const SMouseDownEvent& inMouseDown);
virtual void EventMouseUp(const EventRecord &inMacEvent);
virtual Boolean HandleKeyPress(const EventRecord& inKeyEvent);
virtual void DrawSelf();
virtual void SpendTime(const EventRecord& inMacEvent);
virtual void ActivateSelf();
virtual void DeactivateSelf();
virtual void BeTarget();
virtual void DontBeTarget();
virtual void AdjustCursorSelf(Point inPortPt, const EventRecord& inMacEvent);
Boolean PassEvent(EventRecord& inEvent);
virtual Boolean HandleEmbedEvent(CL_Event *event);
// ¥¥ positioning
virtual void AdaptToNewSurroundings();
virtual void AdaptToSuperFrameSize(Int32 inSurrWidthDelta, Int32 inSurrHeightDelta, Boolean inRefresh);
virtual void MoveBy(Int32 inHorizDelta, Int32 inVertDelta, Boolean inRefresh);
Boolean IsPositioned() const { return fPositioned; }
// ¥¥Êdragging
virtual Boolean DragIsAcceptable(DragReference inDragRef);
virtual void HiliteDropArea(DragReference inDragRef);
virtual void UnhiliteDropArea(DragReference inDragRef);
// ¥¥ printing
Boolean PrintFullScreen(Boolean printOne, THPrint printRecHandle);
void PrintEmbedded();
// ¥¥ broken plugin
void SetBrokenPlugin();
void DrawBroken(Boolean hilite);
void SetPositioned() { fPositioned = true; }
// ¥¥ window control
void RegisterWindow(void* window);
void UnregisterWindow(void* window);
Boolean PassWindowEvent(EventRecord& inEvent, WindowPtr window);
private:
void ResetDrawRect();
NPEmbeddedApp* fApp;
NPWindow fNPWindow;
NP_Port fNPPort;
CPluginView* fOriginalView;
CIconHandle fBrokenIcon;
short fHorizontalOffset;
short fVerticalOffset;
Boolean fBrokenPlugin;
Boolean fPositioned;
Boolean fHidden;
Boolean fWindowed;
LO_EmbedStruct* fEmbedStruct;
Boolean fIsPrinting;
LArray* fWindowList;
static LArray* sPluginList;
};

View File

@@ -1,539 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// mregistr.cp
// Registry for AppleEvent notifiers
// Pretty clumsy right now, but separating this functionality out of uapp seems
// to be the right thing.
// It is just a collection of routines
// MacNetscape
#include "mregistr.h"
#include "macutil.h"
#include "CAppleEventHandler.h"
#include "resae.h"
#include "resgui.h"
#include "ufilemgr.h"
#include "uprefd.h"
#include "CNSContext.h"
#ifndef MOZ_MAIL_NEWS
#include "InternetConfig.h"
#endif
// xp
#include "client.h"
static LArray sURLEchoHandlers(sizeof(ProcessSerialNumber));
static LArray sProtocolHandlers;
/************************************************************************************
* class CProtocolHelper
* Holds the information about protocol helpers, and knows how to launch them
************************************************************************************/
class CProtocolHelper {
public:
char * fProtocolInfo; // String that specifies the protocol
OSType fApplSig; // Application to launch. Do not use these unless in saving/restoring
// ¥¥ constructors
CProtocolHelper(char * protocolInfo, OSType applSig);
virtual ~CProtocolHelper();
// ¥¥ access
Boolean AttemptLaunch(URL_Struct *url, MWContext *context);
Boolean EqualTo(char * protocolInfo, OSType applSig);
Boolean operator==(CProtocolHelper * p);
static void AddNewHelper(CProtocolHelper * helper);
};
CProtocolHelper::CProtocolHelper(char * protocolInfo, OSType applSig)
{
fProtocolInfo = protocolInfo;
fApplSig = applSig;
}
CProtocolHelper::~CProtocolHelper()
{
if (fProtocolInfo)
XP_FREE(fProtocolInfo);
}
Boolean CProtocolHelper::operator==(CProtocolHelper * p)
{
if (fProtocolInfo && p->fProtocolInfo)
return (strcmp(fProtocolInfo, p->fProtocolInfo) == 0);
return false;
}
// This is used for the helper removal
// It returns true if we do not have the protocol info
Boolean CProtocolHelper::EqualTo(char * protocolInfo, OSType applSig)
{
if (applSig != fApplSig)
return false;
if (protocolInfo && fProtocolInfo)
if (strcmp(protocolInfo, fProtocolInfo) == 0)
return true;
else
return false;
else
return true;
return false;
}
// Finds the running helper application
// Tries to send a OpenURL event to the registered protocol handler
// If this does not work, sends the standard GetURL event
Boolean CProtocolHelper::AttemptLaunch(URL_Struct *url, MWContext */*context*/)
{
if (!url->address)
return false;
if (strncasecomp(url->address, fProtocolInfo, strlen(fProtocolInfo)) != 0)
return false;
ProcessSerialNumber psn;
FSSpec dummy;
OSErr err = FindProcessBySignature(fApplSig,'APPL',psn,&dummy);
if (err != noErr)
{
FSSpec appSpec;
err = CFileMgr::FindApplication(fApplSig, appSpec);
if (err != noErr)
return false;
LaunchParamBlockRec launchParams;
launchParams.launchBlockID = extendedBlock;
launchParams.launchEPBLength = extendedBlockLen;
launchParams.launchFileFlags = 0;
launchParams.launchControlFlags = launchContinue + launchNoFileFlags;
launchParams.launchAppSpec = &appSpec;
launchParams.launchAppParameters = NULL;
err = LaunchApplication(&launchParams);
if (err != noErr)
return false;
err = FindProcessBySignature(fApplSig,'APPL',psn,&dummy);
if (err != noErr)
return false;
}
Try_ // Try the old Spyglass AE suite way first
{
AppleEvent event;
err = AEUtilities::CreateAppleEvent(AE_spy_send_suite, AE_spy_openURL, event, psn);
ThrowIfOSErr_(err);
// put in the URL
StAEDescriptor urlDesc(typeChar, url->address, url->address ? strlen(url->address) : 0);
err = ::AEPutParamDesc(&event,keyDirectObject,&urlDesc.mDesc);
ThrowIfOSErr_(err);
// Send it
AppleEvent reply;
Try_
{
err = ::AESend(&event, &reply, kAEWaitReply,kAENormalPriority,60,nil, nil);
AEDisposeDesc(&event);
err = AEUtilities::EventHasErrorReply(reply);
ThrowIfOSErr_(err);
AEDisposeDesc(&reply);
}
Catch_(inErr)
{
AEDisposeDesc(&reply);
// Bug #86055
// A -1 means the handler didn't want the event, not that it didn't handle it.
// In this case we should just return that the helper can't handle the protocol
// and Communicator/Navigator should handle it rather than also sending a GURL
// event to the helper app. This works around a problem under MacOS 8 where
// sending a GURL event to an app that didn't handle it could result in an infinite
// loop when the OS decided to re-direct the GURL back to us and we promptly sent
// it back to the handler that didn't handle it.
if (err == -1)
return false;
else
Throw_(inErr);
}
EndCatch_
}
Catch_(inErr) // old Spyglass AE suite way failed, try the standard event
{
AppleEvent reply;
Try_
{
AppleEvent event;
err = AEUtilities::CreateAppleEvent(AE_url_suite, AE_url_getURL, event, psn);
// put in the URL
StAEDescriptor urlDesc(typeChar, url->address, url->address ? strlen(url->address) : 0);
err = ::AEPutParamDesc(&event,keyDirectObject,&urlDesc.mDesc);
ThrowIfOSErr_(err);
err = ::AESend(&event, &reply, kAEWaitReply,kAENormalPriority,60,nil, nil);
AEDisposeDesc(&event);
ThrowIfOSErr_(AEUtilities::EventHasErrorReply(reply));
AEDisposeDesc(&reply);
}
Catch_(inErr)
{
AEDisposeDesc(&reply);
return false;
}
EndCatch_
}
EndCatch_
return true;
}
void CProtocolHelper::AddNewHelper(CProtocolHelper* helper)
{
if (helper == NULL)
return;
LArrayIterator iter(sProtocolHandlers);
CProtocolHelper * otherHelper;
while (iter.Next(&otherHelper)) // Delete duplicate registration for this protocol
if (*helper == otherHelper)
{
delete otherHelper;
sProtocolHandlers.Remove(&otherHelper);
}
sProtocolHandlers.InsertItemsAt(1,1, &helper);
NET_AddExternalURLType(helper->fProtocolInfo);
CPrefs::SetModified();
}
// Called from preferences, saves all the protocol handlers
void CNotifierRegistry::ReadProtocolHandlers()
{
// Add the bolo handler
CProtocolHelper *helper = new CProtocolHelper(strdup("bolo"), 'BOLO');
CProtocolHelper::AddNewHelper(helper);
CPrefs::UsePreferencesResFile();
Handle stringListHandle = ::Get1Resource('STR#', PROT_HANDLER_PREFS_RESID);
if (stringListHandle && *stringListHandle)
{
if (::GetHandleSize(stringListHandle) < sizeof(short))
{
::RemoveResource(stringListHandle);
::DisposeHandle(stringListHandle);
return;
}
}
CStringListRsrc stringRsrc(PROT_HANDLER_PREFS_RESID);
Int16 howMany = stringRsrc.CountStrings();
if (howMany == 0)
return;
// Each protocol handler is represented by 2 strings
// 1 - the application sig
// 2 - the protocol string
for (int i=1; i < howMany; i=i+2) // Increment by 2.
{
CStr255 applSigStr, protocol;
stringRsrc.GetString(i, applSigStr);
if (ResError()) return;
stringRsrc.GetString(i+1, protocol);
if (ResError()) return;
OSType appSig;
LString::PStrToFourCharCode(applSigStr, appSig);
CProtocolHelper * newHelper = new CProtocolHelper(XP_STRDUP((char*)protocol), appSig);
CProtocolHelper::AddNewHelper(newHelper);
}
}
// Called from preferences, writes all the protocol handlers
void CNotifierRegistry::WriteProtocolHandlers()
{
Int32 howMany = sProtocolHandlers.GetCount();
if (howMany <= 1)
return;
Handle stringListHandle = ::Get1Resource('STR#', PROT_HANDLER_PREFS_RESID);
if (!stringListHandle) {
stringListHandle = ::NewHandle(0);
::AddResource(stringListHandle, 'STR#',
PROT_HANDLER_PREFS_RESID, CStr255::sEmptyString);
}
if (stringListHandle && *stringListHandle)
{
SInt8 flags = ::HGetState(stringListHandle);
::HNoPurge(stringListHandle);
CStringListRsrc stringRsrc(PROT_HANDLER_PREFS_RESID);
stringRsrc.ClearAll();
for (int i=1; i<=howMany - 1; i++)
{
CProtocolHelper * helper = NULL;
if (sProtocolHandlers.FetchItemAt(i, &helper))
{
CStr255 protocol(helper->fProtocolInfo);
Str255 sig;
LString::FourCharCodeToPStr(helper->fApplSig, sig);
stringRsrc.AppendString(sig);
stringRsrc.AppendString(protocol);
}
}
::WriteResource(stringListHandle);
::HSetState(stringListHandle, flags);
}
}
void CNotifierRegistry::HandleAppleEvent(const AppleEvent &inAppleEvent, AppleEvent &outAEReply,
AEDesc &outResult, long inAENumber)
{
switch(inAENumber) {
case AE_RegisterURLEcho:
HandleRegisterURLEcho(inAppleEvent, outAEReply, outResult, inAENumber);
break;
case AE_UnregisterURLEcho:
HandleUnregisterURLEcho(inAppleEvent, outAEReply, outResult, inAENumber);
break;
case AE_RegisterProtocol:
HandleRegisterProtocol(inAppleEvent, outAEReply, outResult, inAENumber);
break;
case AE_UnregisterProtocol:
HandleUnregisterProtocol(inAppleEvent, outAEReply, outResult, inAENumber);
break;
default:
ThrowOSErr_(errAEEventNotHandled);
}
}
// Always save the PSN
void CNotifierRegistry::HandleRegisterURLEcho(const AppleEvent &inAppleEvent, AppleEvent &outAEReply,
AEDesc &/*outResult*/, long /*inAENumber*/)
{
OSType appSignature;
ProcessSerialNumber psn;
Size realSize;
OSType realType;
OSErr err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeApplSignature, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err == noErr) // No parameters, extract the signature from the Apple Event
psn = GetPSNBySig(appSignature);
else
psn = MoreExtractFromAEDesc::ExtractAESender(inAppleEvent);
// Each application can register only once
LArrayIterator iter(sURLEchoHandlers);
ProcessSerialNumber newPSN;
while (iter.Next(&newPSN)) // If we are already registered, returns
if ((newPSN.highLongOfPSN == psn.highLongOfPSN) && (newPSN.lowLongOfPSN == psn.lowLongOfPSN))
ThrowOSErr_(errAECoercionFail);
sURLEchoHandlers.InsertItemsAt(1,1, &psn);
{
Boolean success = true;
StAEDescriptor replyDesc(success);
err = ::AEPutParamDesc(&outAEReply, keyAEResult, &replyDesc.mDesc);
}
}
void CNotifierRegistry::HandleUnregisterURLEcho(const AppleEvent &inAppleEvent,
AppleEvent &/*outAEReply*/, AEDesc &/*outResult*/, long /*inAENumber*/)
{
OSType appSignature;
ProcessSerialNumber psn;
Size realSize;
OSType realType;
OSErr err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeApplSignature, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err == noErr) // No parameters, extract the signature from the Apple Event
psn = GetPSNBySig(appSignature);
else
psn = MoreExtractFromAEDesc::ExtractAESender(inAppleEvent);
LArrayIterator iter(::sURLEchoHandlers);
ProcessSerialNumber newPSN;
while (iter.Next(&newPSN))
if ((newPSN.highLongOfPSN == psn.highLongOfPSN) && (newPSN.lowLongOfPSN == psn.lowLongOfPSN))
sURLEchoHandlers.Remove(&newPSN);
}
// Echoing of the URLs. For each registered application, send them the URLEcho AE
void FE_URLEcho(URL_Struct *url, int /*iStatus*/, MWContext *context)
{
ProcessSerialNumber psn;
OSErr err;
LArrayIterator iter(sURLEchoHandlers);
while (iter.Next(&psn))
Try_
{
// Create the event, fill in all the arguments, and send it
AEAddressDesc target; // Target the event
err = AECreateDesc(typeProcessSerialNumber, &psn,sizeof(psn), &target);
ThrowIfOSErr_(err);
AppleEvent echoEvent;
err = ::AECreateAppleEvent(AE_spy_send_suite, AE_spy_URLecho,
&target,
kAutoGenerateReturnID,
kAnyTransactionID,
&echoEvent);
ThrowIfOSErr_(err);
AEDisposeDesc(&target);
// Add the URL
if (url->address)
{
err = ::AEPutParamPtr(&echoEvent, keyDirectObject, typeChar, url->address, strlen(url->address));
ThrowIfOSErr_(err);
}
// Add the MIME type
if (url->content_type)
{
err = ::AEPutParamPtr(&echoEvent, AE_spy_URLecho_mime, typeChar, url->content_type, strlen(url->content_type));
ThrowIfOSErr_(err);
}
// Add the refererer
if (url->referer)
{
err = ::AEPutParamPtr(&echoEvent, AE_spy_URLecho_referer, typeChar, url->referer, strlen(url->referer));
ThrowIfOSErr_(err);
}
// Add the window ID
CNSContext* nsContext = ExtractNSContext(context);
ThrowIfNil_(context);
Int32 windowID = nsContext->GetContextUniqueID();
err = ::AEPutParamPtr(&echoEvent, AE_spy_URLecho_win, typeLongInteger, &windowID, sizeof(windowID));
ThrowIfOSErr_(err);
AppleEvent reply;
err = ::AESend(&echoEvent, &reply, kAENoReply,kAENormalPriority,0,nil, nil);
AEDisposeDesc(&echoEvent);
ThrowIfOSErr_(err);
}
Catch_(inErr){}
EndCatch_
}
// Registering the protocol
// The protocol is registered by application signature
void CNotifierRegistry::HandleRegisterProtocol(const AppleEvent &inAppleEvent,
AppleEvent &/*outAEReply*/, AEDesc &/*outResult*/, long /*inAENumber*/)
{
Size realSize;
DescType realType;
OSType appSignature;
char * protocol = nil;
CProtocolHelper * volatile helper;
Try_
{
OSErr err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeApplSignature, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err != noErr) // Signature was not passed appropriately typed, try as type
{
OSErr err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeType, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err != noErr) // No signature passed, extract it from the Apple Event
{
ProcessSerialNumber psn = MoreExtractFromAEDesc::ExtractAESender(inAppleEvent);
ProcessInfoRec pir;
FSSpec dummy;
pir.processAppSpec = &dummy;
err = ::GetProcessInformation(&psn, &pir);
ThrowIfOSErr_(err);
appSignature = pir.processSignature;
}
}
// Extract the protocol
MoreExtractFromAEDesc::GetCString(inAppleEvent, AE_spy_register_protocol_pro, protocol);
// Have app signature, and protocol, add them to the list
helper = new CProtocolHelper(protocol, appSignature);
CProtocolHelper::AddNewHelper(helper);
}
Catch_(inErr){}
EndCatch_
}
void CNotifierRegistry::HandleUnregisterProtocol(const AppleEvent &inAppleEvent,
AppleEvent &/*outAEReply*/, AEDesc &/*outResult*/, long /*inAENumber*/)
{
Size realSize;
DescType realType;
OSType appSignature;
char * protocol = nil;
Try_
{
OSErr err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeApplSignature, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err != noErr)
err = ::AEGetParamPtr(&inAppleEvent, keyDirectObject, typeType, &realType,
&appSignature, sizeof(appSignature), &realSize);
if (err != noErr) // No signature passed, extract it from the Apple Event
{
ProcessSerialNumber psn = MoreExtractFromAEDesc::ExtractAESender(inAppleEvent);
ProcessInfoRec pir;
FSSpec dummy;
pir.processAppSpec = &dummy;
err = ::GetProcessInformation(&psn, &pir);
ThrowIfOSErr_(err);
appSignature = pir.processSignature;
}
// Extract the protocol. Not necessary. If we only have the sig, remove all the registered protocols
Try_
{
MoreExtractFromAEDesc::GetCString(inAppleEvent, AE_spy_register_protocol_pro, protocol);
}
Catch_(inErr){}
EndCatch_
// Delete it from the list
LArrayIterator iter(sProtocolHandlers);
CProtocolHelper * helper;
while (iter.Next(&helper)) // Delete duplicate registration for this protocol
if (helper->EqualTo(protocol, appSignature))
{
delete helper;
sProtocolHandlers.Remove(&helper);
}
if (protocol)
NET_DelExternalURLType(protocol);
}
Catch_(inErr){}
EndCatch_
}
XP_Bool FE_UseExternalProtocolModule(MWContext *context,
FO_Present_Types /*iFormatOut*/, URL_Struct *url,
Net_GetUrlExitFunc */*pExitFunc*/)
{
#ifndef MOZ_MAIL_NEWS
if (url->address && CInternetConfigInterface::CurrentlyUsingIC()) {
ICError err = CInternetConfigInterface::SendInternetConfigURL(url->address);
if (err == noErr)
return true;
}
#endif
LArrayIterator iter(sProtocolHandlers);
CProtocolHelper * helper;
while (iter.Next(&helper))
if (helper->AttemptLaunch(url, context))
return true;
return false;
}

View File

@@ -1,57 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// mregistr.h
// Registry for AppleEvent notifiers
// Pretty clumsy right now, but separating this functionality out of uapp seems
// to be the right thing.
// It is just a collection of routines
#pragma once
#include <LArray.h>
class CNotifierRegistry {
public:
// ¥¥ÊAppleEvent handling
static void HandleAppleEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
static void ReadProtocolHandlers(); // Saving to prefs interface
static void WriteProtocolHandlers();
private:
static void HandleRegisterProtocol(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
static void HandleUnregisterProtocol(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
// ¥¥ url echo
static void HandleRegisterURLEcho(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
static void HandleUnregisterURLEcho(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
};

View File

@@ -1,487 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ulaunch.cp
// Launching of external applications through AppleEvents
// Created by atotic, June 14th, 1994
// Based on Apple's LaunchWithDoc example snippet
#include <Folders.h>
#include <AERegistry.h>
#include <Errors.h>
#include "BufferStream.h"
#include "PascalString.h"
#include "macutil.h"
#include "uprefd.h"
#include "ufilemgr.h"
#include "uerrmgr.h"
#include "reserr.h"
#include "ulaunch.h"
// ¥¥ PROTOTYPES
OSErr FindAppOnVolume(OSType sig, short vRefNum, FSSpec& thefile);
// Sends an ODOC event to creator in fndrInfo,
// with file in fileSpec
OSErr SendODOCEvent(OSType appSig,
LFileBufferStream * inFile);
// Launches the application with the given doc
void LaunchWithDoc(FInfo& fndrInfo,
FSSpec& appSpec,
LFileBufferStream * inFile,
const FSSpec inFileSpec);
// Displays a launching error alert.
int LaunchError(ResIDT alertID, OSType creator, const Str63& fileName, OSErr err);
// Creates Finder's OpenSelection event
OSErr BuildOpenSelectionEvent(FSSpec & fileSpec, AppleEvent& theEvent);
// Sends OpenSelection to Finder
OSErr SendOpenSelectionToFinder(FSSpec & fileSpec);
// ¥¥ Implementation
// Builds an ODOC event
OSErr BuildODOCEvent(OSType applSig,
FSSpec fileSpec,
AppleEvent& theEvent) {
// Builds all the arguments for the event
AEDesc myAddress;
AEDesc docDesc;
AEDescList theList;
AliasHandle withThis;
OSErr err;
// Anatomy of the event:
// Event class: kCoreEventClass
// Event ID: kAEOpenDocuments
// Event has target description (in the form of typeApplSignature)
// keyDirectObject is a list of aliases
err = AECreateDesc(typeApplSignature,
(Ptr)&applSig, sizeof(applSig),
&myAddress);
if (err) return err;
err = AECreateAppleEvent(kCoreEventClass, kAEOpenDocuments,
&myAddress,
kAutoGenerateReturnID, kAnyTransactionID,
&theEvent);
if (err) return err;
// create a list for the alaises. In this case, I only have one, but
// you still need a list
err = AECreateList(NULL, 0, FALSE, &theList);
if (err) return err;
/* create an alias out of the file spec */
/* I'm not real sure why I did this, since there is a system coercion handler for */
/* alias to FSSpec, but I'm paranoid */
err = NewAlias(NULL, &fileSpec, &withThis);
if (err) return err;
HLock((Handle)withThis);
/* now create an alias descriptor */
err = AECreateDesc(typeAlias, (Ptr) * withThis, GetHandleSize((Handle)withThis), &docDesc);
if (err) return err;
HUnlock((Handle)withThis);
/* put it in the list */
err = AEPutDesc(&theList, 0, &docDesc);
if (err) return err;
err = AEPutParamDesc(&theEvent, keyDirectObject, &theList);
err = AEDisposeDesc(&myAddress);
err = AEDisposeDesc(&docDesc);
err = AEDisposeDesc(&theList);
return err;
}
// Sends an ODOC event to appliation
OSErr SendODOCEvent(OSType appSig,
LFileBufferStream * inFile)
{
OSErr err;
Try_ {
AppleEvent openEvent;
FSSpec inFileSpec;
inFile->GetSpecifier(inFileSpec);
err = BuildODOCEvent(appSig,
inFileSpec,
openEvent);
ThrowIfOSErr_(err);
AppleEvent result;
err = AESend(&openEvent, &result,
kAENoReply + kAECanSwitchLayer,
kAENormalPriority, kAEDefaultTimeout,
NULL,NULL);
AEDisposeDesc(&openEvent);
// err could be memFullErr, app is out of memory
ThrowIfOSErr_(err);
}
Catch_(inErr) {
return inErr;
} EndCatch_
return err;
}
#define kDelete 2
#define kSave 1
#define kTryAgain 3
// Displays launch error dialogs with appropriate arguments.
// Alerts used are:
// ALRT_ODOCFailed
// ALRT_AppNotFound
// ALRT_AppMemFull
// ALRT_MiscLaunchError
// Returns: kDelete, kSave, or kTryAgain
int LaunchError(ResIDT alertID, OSType creator, const Str63& fileName, OSErr err)
{
CMimeMapper * map = CPrefs::sMimeTypes.FindCreator(creator);
ErrorManager::PrepareToInteract();
ParamText(map->GetAppName(), CStr255(fileName), ErrorManager::OSNumToStr(err), CStr255(""));
UDesktop::Deactivate();
int retVal = ::CautionAlert(alertID, NULL);
UDesktop::Activate();
return retVal;
}
// Launches an application with a given doc
OSErr StartDocInApp(FSSpec theDocument, FSSpec theApplication)
{
FInfo fndrInfo;
OSErr err;
HGetFInfo( theApplication.vRefNum,
theApplication.parID,
theApplication.name,
&fndrInfo);
FSSpec applSpecTemp;
ProcessSerialNumber processSN;
err = FindProcessBySignature(fndrInfo.fdCreator, 'APPL', processSN, &applSpecTemp);
if (err == noErr) // App is running. Send 'odoc'
{
Try_ {
AppleEvent theEvent;
err = BuildODOCEvent(fndrInfo.fdCreator, theDocument, theEvent);
ThrowIfOSErr_(err);
AppleEvent result;
err = AESend(&theEvent, &result,
kAENoReply + kAEAlwaysInteract + kAECanSwitchLayer,
kAENormalPriority, kAEDefaultTimeout,
NULL,NULL);
AEDisposeDesc(&theEvent);
// err could be memFullErr, app is out of memory
ThrowIfOSErr_(err);
if (IsFrontApplication())
SetFrontProcess(&processSN);
}
Catch_(inErr) {
return inErr;
} EndCatch_
return noErr;
}
Try_ {
LaunchParamBlockRec launchThis;
AEDesc launchDesc;
AppleEvent theEvent;
ThrowIfOSErr_(BuildODOCEvent(fndrInfo.fdCreator, theDocument, theEvent));
ThrowIfOSErr_(AECoerceDesc(&theEvent, typeAppParameters, &launchDesc));
launchThis.launchAppSpec = (FSSpecPtr)&theApplication;
launchThis.launchAppParameters = (AppParametersPtr)*(launchDesc.dataHandle);
launchThis.launchBlockID = extendedBlock;
launchThis.launchEPBLength = extendedBlockLen;
launchThis.launchFileFlags = NULL;
launchThis.launchControlFlags = launchContinue + launchNoFileFlags + launchUseMinimum;
if (!IsFrontApplication())
launchThis.launchControlFlags += launchDontSwitch;
err = LaunchApplication(&launchThis);
ThrowIfOSErr_(err);
}
Catch_(inErr)
{
} EndCatch_
return err;
}
// Launches the application with the given doc
void LaunchWithDoc(FInfo& fndrInfo,
FSSpec& appSpec,
LFileBufferStream * inFile,
const FSSpec inFileSpec)
{
OSErr err = CFileMgr::FindApplication(fndrInfo.fdCreator, appSpec);
if (err) // Application not found error
{
int whatToDo = ::LaunchError(ALRT_AppNotFound, fndrInfo.fdCreator,
inFileSpec.name, err);
if (whatToDo == kSave)
CFileMgr::sFileManager.CancelRegister(inFile); // Save the file
else // kDelete
CFileMgr::sFileManager.CancelAndDelete(inFile); // Delete the file
return;
}
Try_ {
LaunchParamBlockRec launchThis;
AEDesc launchDesc;
AppleEvent theEvent;
ThrowIfOSErr_(BuildODOCEvent(fndrInfo.fdCreator, inFileSpec, theEvent));
ThrowIfOSErr_(AECoerceDesc(&theEvent, typeAppParameters, &launchDesc));
launchThis.launchAppSpec = (FSSpecPtr)&appSpec;
launchThis.launchAppParameters = (AppParametersPtr)*(launchDesc.dataHandle);
/* launch the thing */
launchThis.launchBlockID = extendedBlock;
launchThis.launchEPBLength = extendedBlockLen;
launchThis.launchFileFlags = NULL;
launchThis.launchControlFlags = launchContinue + launchNoFileFlags + launchUseMinimum;
if (!IsFrontApplication())
launchThis.launchControlFlags += launchDontSwitch;
do // Launch until we succeed, or user gives up.
{
err = LaunchApplication(&launchThis);
if ((err == memFullErr) || (err == memFragErr))
// Launch failed because of low memory
{
int whatToDo = ::LaunchError(ALRT_AppMemFull, fndrInfo.fdCreator,
inFileSpec.name, err);
switch (whatToDo) {
case kSave:
CFileMgr::sFileManager.CancelRegister(inFile); // Save the file
err = noErr;
break;
case kDelete:
CFileMgr::sFileManager.CancelAndDelete(inFile); // Save the file
err = noErr;
break;
case kTryAgain: // Loop again
break;
}
}
else // Unknown launch error
ThrowIfOSErr_(err);
} while (err != noErr);
}
Catch_(inErr)
{
int whatToDo = ::LaunchError(ALRT_AppMiscError, fndrInfo.fdCreator,
inFileSpec.name, inErr);
if (whatToDo == kSave)
CFileMgr::sFileManager.CancelRegister(inFile); // Save the file
else // kDelete
CFileMgr::sFileManager.CancelAndDelete(inFile); // Delete the file
} EndCatch_
}
OSErr
CreateFinderAppleEvent( AEEventID eventID,
SInt16 returnID,
SInt32 transactionID,
AppleEvent & theEvent)
{
OSErr err;
FSSpec finder;
ProcessSerialNumber psn;
AEDesc finderAddress;
Boolean validAddress = false;
try
{
err = FindProcessBySignature('MACS', 'FNDR', psn, &finder);
ThrowIfOSErr_(err);
err = ::AECreateDesc(typeProcessSerialNumber, (Ptr)&psn, sizeof(psn), &finderAddress);
ThrowIfOSErr_(err);
validAddress = true;
err = ::AECreateAppleEvent( kAEFinderEvents,
eventID,
(const AEAddressDesc *) &finderAddress,
returnID,
transactionID,
&theEvent );
}
catch(long tErr)
{
if (validAddress)
::AEDisposeDesc(&finderAddress);
}
return err;
}
// Builds an OpenSelection event for Finder
OSErr BuildOpenSelectionEvent(FSSpec & fileSpec, AppleEvent& theEvent) {
FSSpec dirSpec, procSpec;
FSSpecPtr theFileToOpen = nil;
CStr63 processName;
AEDesc aeDirDesc, listElem;
AEDesc fileList;
ConstStr255Param * dummy = NULL;
// Create the event
OSErr err;
Try_ {
ProcessInfoRec pir;
pir.processInfoLength = sizeof(ProcessInfoRec);
pir.processName = (StringPtr)&processName;
pir.processAppSpec = &procSpec;
// Find a Finder, and create its description as an address for an apple event
err = CreateFinderAppleEvent(kAEOpenSelection, kAutoGenerateReturnID, kAnyTransactionID, theEvent);
ThrowIfOSErr_(err);
// Create a description of the file, and the enclosing folder
// keyDirectObject is directory description
//
err = CFileMgr::FolderSpecFromFolderID(fileSpec.vRefNum, fileSpec.parID, dirSpec);
ThrowIfOSErr_(err);
err = AECreateList(nil, 0, false, &fileList);
ThrowIfOSErr_(err);
AliasHandle DirAlias, FileAlias;
NewAlias(nil, &dirSpec, &DirAlias);
HLock((Handle)DirAlias);
err = AECreateDesc(typeAlias, (Ptr)*DirAlias, GetHandleSize((Handle)DirAlias), &aeDirDesc);
ThrowIfOSErr_(err);
HUnlock((Handle)DirAlias);
DisposeHandle((Handle)DirAlias);
err = AEPutParamDesc(&theEvent, keyDirectObject, &aeDirDesc);
ThrowIfOSErr_(err);
AEDisposeDesc(&aeDirDesc);
NewAlias(nil, &fileSpec, &FileAlias);
HLock((Handle)FileAlias);
err = AECreateDesc(typeAlias, (Ptr)*FileAlias, GetHandleSize((Handle)FileAlias), &listElem);
ThrowIfOSErr_(err);
HUnlock((Handle)FileAlias);
err = AEPutDesc(&fileList, 0, &listElem);
ThrowIfOSErr_(err);
DisposeHandle((Handle)FileAlias);
err = AEPutParamDesc( &theEvent, keySelection, &fileList);
ThrowIfOSErr_(err);
}
Catch_(inErr)
{
return inErr;
} EndCatch_
return noErr;
}
// Sends 'open selection event to Finder
OSErr SendOpenSelectionToFinder(FSSpec & fileSpec)
{
AppleEvent event;
AppleEvent result;
OSErr err = BuildOpenSelectionEvent(fileSpec, event);
if (err)
return err;
err = AESend(&event, &result,
kAENoReply + kAEAlwaysInteract + kAECanSwitchLayer,
kAENormalPriority, kAEDefaultTimeout,
NULL,NULL);
AEDisposeDesc(&event);
return err;
}
// A somewhat tricky way of opening a foreign document
// Algorithm:
// - if a process is not running, launch it with the document
// - if a process is running and AE aware, send it an AppleEvent
// - if a process is running and is not AE aware, send openSelection to the Finder.
void LaunchFile(LFileBufferStream * inFile)
{
FSSpec applSpec;
FInfo fndrInfo;
// Get file info
FSSpec inFileSpec;
inFile->GetSpecifier(inFileSpec);
HGetFInfo(inFileSpec.vRefNum,
inFileSpec.parID,
inFileSpec.name,
&fndrInfo);
// Find if the application is already running
ProcessSerialNumber processSN;
ProcessInfoRec infoRecToFill;
Str63 processName;
infoRecToFill.processInfoLength = sizeof(ProcessInfoRec);
infoRecToFill.processName = (StringPtr)&processName;
infoRecToFill.processAppSpec = &applSpec;
OSErr err = FindProcessBySignature(fndrInfo.fdCreator, 'APPL', processSN, &applSpec);
if (err == noErr) // App is running. Send 'odoc'
{
err = SendODOCEvent(fndrInfo.fdCreator, inFile);
if (err == noErr)
{
if (IsFrontApplication())
SetFrontProcess(&processSN);
}
else
{
// Application did not accept apple event for some reason (err = connectionInvalid)
// Send 'odoc' to Finder. Finder can figure out how to fake menu events when
// it tries to open the file
err = SendOpenSelectionToFinder(inFileSpec);
if (err == noErr)
{ // If finder launched the application successfully, find it and bring it to front
err = FindProcessBySignature(fndrInfo.fdCreator, 'APPL', processSN, &applSpec);
if (err == noErr && IsFrontApplication())
SetFrontProcess(&processSN);
}
else // Finder launch also failed. Notify the user
{
//Notify the user, try to handle the error
int whatToDo = LaunchError(ALRT_ODOCFailed,
fndrInfo.fdCreator,
inFileSpec.name, err);
if (whatToDo == 1)
CFileMgr::sFileManager.CancelRegister(inFile); // Save the file
else
CFileMgr::sFileManager.CancelAndDelete(inFile); // Delete the file
}
}
}
else // App is not running. Launch it with this file
LaunchWithDoc(fndrInfo, applSpec, inFile, inFileSpec);
}

View File

@@ -1,45 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ===========================================================================
// ulaunch.h
// External application launching routines
// ===========================================================================
#pragma once
class LFileBufferStream;
// Opens the file in its creator application
void LaunchFile(LFileBufferStream * inFile);
// Launches an application with a given doc
OSErr StartDocInApp(FSSpec theDocument, FSSpec theApplication);
// Builds an ODOC event for appliation specified by applSig,
// with file in fileSpec
OSErr BuildODOCEvent(OSType applSig,
FSSpec fileSpec,
AppleEvent& theEvent);
OSErr
CreateFinderAppleEvent( AEEventID eventID,
SInt16 returnID,
SInt32 transactionID,
AppleEvent & theEvent);

View File

@@ -1,60 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "BookmarksFile.h"
#include "resgui.h"
#include <LStream.h>
#include <algorithm>
//
// ReadBookmarksFile
//
// Given a file containing a single URL (probably dropped on the Finder), open it and
// create a bookmark entry for it so we can load it.
//
OSErr
ReadBookmarksFile ( vector<char> & oURL, FSSpec & inSpec )
{
FInfo info;
OSErr err = ::FSpGetFInfo (&inSpec, &info);
if (err != noErr)
return err;
if (info.fdType != emBookmarkFile)
return fnfErr;
try {
LFileStream stream(inSpec);
stream.OpenDataFork(fsRdPerm);
Int32 howMuch;
// Read in the URL, which is in the form URL\rTITLE
howMuch = stream.ReadData(oURL.begin(), oURL.size());
char* where = find(oURL.begin(), oURL.end(), '\r');
ThrowIfNil_(where);
*where = 0;
}
catch ( Uint32 inErr )
{
return inErr;
}
return noErr;
}

View File

@@ -1,27 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include <Files.h>
#include <vector.h>
OSErr ReadBookmarksFile( vector<char> & oURL, FSSpec & spec);
//OSErr WriteBookmarksFile(BM_Entry * entry, FSSpec & spec);
//OSErr WriteBookmarksFile(char * url, FSSpec & spec);

View File

@@ -1,322 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// BrowserClasses.cp
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#include "BrowserClasses.h"
// ¥¥¥ PowerPlant Classes
#include <URegistrar.h>
#include <LActiveScroller.h>
#include <LButton.h>
#include <LCaption.h>
#include <LDialogBox.h>
#include <LEditField.h>
#include <LGroupBox.h>
#include <LIconPane.h>
#include <LListBox.h>
#include <LPicture.h>
#include <LPlaceHolder.h>
#include <LPrintout.h>
#include <LScroller.h>
#include <LStdControl.h>
#include <LTable.h>
#include <LTextEdit.h>
#include <LWindow.h>
#include <LRadioGroup.h>
#include <LTabGroup.h>
#include <LTextColumn.h>
#include <LSubOverlapView.h>
// ¥¥¥ PowerPlant Grayscale Classes
#include <UGALibRegistry.h>
// ¥¥¥ General Purpose UI Classes
#include "CBevelButton.h"
#include "CPatternButton.h"
#include "CGrayBevelView.h"
#include "CPatternBevelView.h"
#include "CPatternButtonPopup.h"
#include "CGuidePopupMenu.h"
#include "CNavigationButtonPopup.h"
#include "CCloseAllAttachment.h"
#include "CColorEraseAttachment.h"
#include "CGABorderPane.h"
#include "CPatternPane.h"
#include "CIncludeView.h"
#include "CPlaceHolderView.h"
#include "COffscreenCaption.h"
#include "CClusterView.h"
#include "CTabSwitcher.h"
#include "CPatternTabControl.h"
#include "CProgressBar.h"
// #include "CProgressCaption.h"
#include "CTaskBarView.h"
#include "LTableHeader.h"
#include "LTableViewHeader.h"
#include "CSimpleDividedView.h"
#include "CKeyScrollAttachment.h"
#include "CToolTipAttachment.h"
#include "CDynamicTooltips.h"
#include "CPaneEnabler.h"
#include "CStringListToolTipPane.h"
#include "CSaveProgress.h"
#include "CPatternProgressBar.h"
#ifdef MOZ_MAIL_NEWS
#include "CBiffButtonAttachment.h"
#include "CSingleLineEditField.h"
#endif
// ¥¥¥ Browser Specific UI Classes
#include "CDragBar.h"
#include "CDragBarContainer.h"
#include "CDragBarDockControl.h"
#include "CPatternedGrippyPane.h"
#include "CDividerGrippyPane.h"
#include "CSwatchBrokerView.h"
#include "CToolbarDragBar.h"
#include "CToolbarPatternBevelView.h"
#include "CProxyPane.h"
#include "CProxyCaption.h"
#include "PopupBox.h"
#include "CPersonalToolbarTable.h"
#include "CNavCenterWindow.h"
#include "CNavCenterSelectorPane.h"
#include "CNavCenterContextMenuAtt.h"
#include "CNavCenterTitle.h"
#include "CInlineEditField.h"
#include "CConfigActiveScroller.h"
#include "CTSMEditField.h"
// #include "VEditField.h"
// #include "CSimpleTextView.h"
#include "CDownloadProgressWindow.h"
#include "CURLEditField.h"
#include "CURLCaption.h"
#include "CHyperScroller.h"
#include "CButtonEnablerReloadStop.h"
#include "CBrowserWindow.h"
#include "CHTMLView.h"
#include "CBrowserView.h"
#include "CSpinningN.h"
#include "CBrowserSecurityButton.h"
#include "CMiniSecurityButton.h"
#include "mprint.h"
#include "macgui.h"
#include "findw.h"
// #include "prefw.h"
#include "BookmarksDialogs.h"
#include "mplugin.h"
#include "divview.h"
// #include "mattach.h"
#include "UFormElementFactory.h"
#include "CMenuTable.h"
#include "CPrefsMediator.h"
#include "CAssortedMediators.h"
#if defined (JAVA)
#include "mjava.h"
#endif
#include "CEditorWindow.h"
// #include "mhistory.h"
#include "CContextMenuAttachment.h"
#include "CHyperTreeFlexTable.h"
#include "CRDFCoordinator.h"
#include "CHyperTreeHeader.h"
//-----------------------------------
void RegisterAllBrowserClasses(void)
//-----------------------------------
{
// AutoRegister classes
RegisterClass_(CProxyPane);
RegisterClass_(CProxyCaption);
RegisterClass_(CCloseAllAttachment);
RegisterClass_(CColorEraseAttachment);
RegisterClass_(CGABorderPane);
RegisterClass_(CPatternPane);
RegisterClass_(LSubOverlapView);
// ¥¥¥ PowerPlant Classes
RegisterClass_(LButton);
RegisterClass_(LCaption);
RegisterClass_(LDialogBox);
RegisterClass_(LEditField);
RegisterClass_(LListBox);
RegisterClass_(LPane);
RegisterClass_(LPicture);
RegisterClass_(LPlaceHolder);
RegisterClass_(LPrintout);
RegisterClass_(LScroller);
RegisterClass_(LStdControl);
RegisterClass_(LStdButton);
RegisterClass_(LStdCheckBox);
RegisterClass_(LStdRadioButton);
RegisterClass_(LStdPopupMenu);
RegisterClass_(LTextEdit);
RegisterClass_(LView);
RegisterClass_(LWindow);
RegisterClass_(LRadioGroup);
RegisterClass_(LTabGroup);
RegisterClass_(LActiveScroller);
//LRegistrar::RegisterClass('prto', (ClassCreatorFunc);LPrintout::CreateOldPrintoutStream);
#ifdef PP_NewClasses
#include <LCicnButton.h>
#include <LOffscreenView.h>
#include <LTextButton.h>
RegisterClass_(LCicnButton);
RegisterClass_(LOffscreenView);
RegisterClass_(LTextButton);
#endif
RegisterClass_(LTable);
RegisterClass_(LIconPane);
RegisterClass_(LGroupBox);
RegisterClass_(LTextColumn);
RegisterClass_(CGAPopupMenu);
// ¥¥¥ PowerPlant Grayscale Classes
RegisterGALibraryClasses();
// ¥¥¥ General Purpose UI Classes
RegisterClass_(CBevelButton);
RegisterClass_(CDeluxeBevelButton);
RegisterClass_(CPatternButton);
RegisterClass_(CPatternButtonPopup);
RegisterClass_(CGrayBevelView);
RegisterClass_(CPatternBevelView);
RegisterClass_(CIncludeView);
RegisterClass_(CPlaceHolderView);
RegisterClass_(COffscreenCaption);
RegisterClass_(CClusterView);
RegisterClass_(CPatternTabControl);
RegisterClass_(CTabSwitcher);
RegisterClass_(CProgressBar);
RegisterClass_(CKeyScrollAttachment);
RegisterClass_(CToolTipAttachment);
RegisterClass_(CDynamicTooltipPane);
RegisterClass_(CSharedToolTipAttachment);
RegisterClass_(CMenuTable);
RegisterClass_(CPaneEnabler);
RegisterClass_(CSlaveEnabler);
#ifdef MOZ_MAIL_NEWS
RegisterClass_(CSingleLineEditField);
RegisterClass_(CSelectFolderMenu);
//#else
// RegisterClass_(CBiffButtonAttachment);
#endif // MOZ_MAIL_NEWS
RegisterClass_(CSimpleDividedView);
//RegisterClass_(CProgressCaption);
RegisterClass_(CTaskBarView);
RegisterClass_(CToolTipPane);
RegisterClass_(CStringListToolTipPane);
RegisterClass_(LTableHeader);
RegisterClass_(LTableViewHeader);
RegisterClass_(CPatternProgressBar);
RegisterClass_(CPatternProgressCaption);
RegisterClass_(CTextEdit);
RegisterClass_(CEditBroadcaster);
RegisterClass_(CGuidePopupMenu);
RegisterClass_(CNavigationButtonPopup);
// *** Browser Specific UI Classes
RegisterClass_(CDragBar);
RegisterClass_(CDragBarContainer);
RegisterClass_(CDragBarDockControl);
RegisterClass_(CBrokeredView);
RegisterClass_(CSwatchBrokerView);
RegisterClass_(CToolbarDragBar);
RegisterClass_(CToolbarPatternBevelView);
RegisterClass_(CPersonalToolbarTable);
RegisterClass_(CConfigActiveScroller);
RegisterClass_(CTSMEditField);
// REGISTERV(EditField);
RegisterClass_(CDownloadProgressWindow);
RegisterClass_(CBrowserWindow);
RegisterClass_(CHTMLView);
RegisterClass_(CURLEditField);
RegisterClass_(CURLCaption);
RegisterClass_(CSaveProgress);
RegisterClass_(CHyperScroller);
RegisterClass_(CButtonEnablerReloadStop);
RegisterClass_(CBrowserView);
RegisterClass_(CPatternedGrippyPane);
RegisterClass_(CDividerGrippyPane);
RegisterClass_(CSpinningN);
RegisterClass_(CBrowserSecurityButton);
RegisterClass_(CMiniSecurityButton);
RegisterClass_(CHyperTreeFlexTable);
RegisterClass_(CNavCenterSelectorPane);
RegisterClass_(CRDFCoordinator);
RegisterClass_(CHyperTreeHeader);
RegisterClass_(CInlineEditField);
RegisterClass_(CNavCenterWindow);
RegisterClass_(CBookmarksFindDialog);
RegisterClass_(CPluginView);
RegisterClass_(LDividedView);
RegisterClass_(CNavCenterContextMenuAttachment);
RegisterClass_(CNavCenterSelectorContextMenuAttachment);
RegisterClass_(CNavCenterTitle);
#ifdef EDITOR
CEditorWindow::RegisterViewTypes();
#endif // EDITOR
CFindWindow::RegisterViewTypes();
UFormElementFactory::RegisterFormTypes();
UHTMLPrinting::RegisterHTMLPrintClasses();
CPrefsMediator::RegisterViewClasses();
CPrefsDialog::RegisterViewClasses();
UAssortedPrefMediators::RegisterViewClasses();
RegisterClass_(CContextMenuAttachment);
#ifdef JAVA
RegisterClass_(CJavaView);
#endif
} // RegisterAllBrowserClasses

View File

@@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// BrowserClasses.h
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#pragma once
void RegisterAllBrowserClasses(void);

View File

@@ -1,144 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "BufferStream.h"
#include "client.h"
#ifdef PROFILE
#pragma profile on
#endif
#define STREAM_BUFFER_SIZE 32000
LFileBufferStream::LFileBufferStream( FSSpec& inFileSpec ): LFileStream( inFileSpec )
{
fBuffer = NULL;
fBufferSize = 0;
fLastWritten = 0;
fUseBuffer = FALSE;
fURL = NULL;
fWriteFailed = FALSE;
}
LFileBufferStream::~LFileBufferStream()
{
Try_
{
FlushBuffer( FALSE );
}
Catch_(inErr)
{
}
EndCatch_
if ( fURL )
XP_FREE( fURL );
}
OSErr LFileBufferStream::FlushBuffer( Boolean allocateNew )
{
OSErr err = noErr;
if ( !fUseBuffer )
return err;
if ( fBuffer && ( fLastWritten > 0 ) )
{
HLock( fBuffer );
Try_
{
err = LFileStream::PutBytes( *fBuffer, fLastWritten );
ThrowIfOSErr_(err);
HUnlock( fBuffer );
}
Catch_(inErr)
{
HUnlock( fBuffer );
DisposeHandle(fBuffer);
fBuffer = NULL;
fWriteFailed = TRUE;
}
EndCatch_
fLastWritten = 0;
}
if (fWriteFailed)
return err;
if ( allocateNew && ( !fBuffer ) )
{
fBuffer = ::NewHandle( STREAM_BUFFER_SIZE );
fBufferSize = STREAM_BUFFER_SIZE;
fLastWritten = 0;
}
if ( !allocateNew && fBuffer )
{
DisposeHandle( fBuffer );
fBuffer = NULL;
}
return err;
}
Int32 LFileBufferStream::ReadData( void* outBuffer, Int32 inByteCount )
{
return LFileStream::ReadData( outBuffer, inByteCount );
}
void LFileBufferStream::DoUseBuffer()
{
fUseBuffer = TRUE;
}
void LFileBufferStream::CloseDataFork()
{
FlushBuffer( FALSE );
LFileStream::CloseDataFork();
}
Int32 LFileBufferStream::WriteData( const void* inFromBuffer, Int32 inByteCount )
{
OSErr err = noErr;
if ( fUseBuffer && ( fLastWritten + inByteCount ) > fBufferSize )
err = FlushBuffer( TRUE );
ThrowIfOSErr_(err);
if ( ( fBuffer ) && // If we have space, fill up the buffer
( ( fLastWritten + inByteCount ) <= fBufferSize ) )
{
::BlockMoveData( inFromBuffer, &( (*fBuffer)[fLastWritten] ), inByteCount );
fLastWritten += inByteCount;
return inByteCount;
}
// Otherwise, just do a normal write
else
{
err = LFileStream::PutBytes( inFromBuffer, inByteCount );
ThrowIfOSErr_(err);
}
return inByteCount;
}
#ifdef PROFILE
#pragma profile off
#endif

View File

@@ -1,54 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef __BUFFERSTREAM__
#define __BUFFERSTREAM__
#include <LFileStream.h>
#include <stddef.h>
// Does plain buffered read/writes
// Buffering strategy:
// reading: read all you can fit in the buffer
// give it to the client in small chunks
// writing: write all you can fit in the buffer
// on overflow, flush everything, then write the rest
// for now, we only buffer writing
class LFileBufferStream: public LFileStream
{
public:
LFileBufferStream( FSSpec& inFileSpec );
virtual ~LFileBufferStream();
virtual Int32 WriteData( const void *inFromBuffer, Int32 inByteCount );
virtual Int32 ReadData( void* outToBuffer, Int32 inByteCount );
virtual void CloseDataFork();
void DoUseBuffer();
void SetURL( char* url ) { fURL = url; }
char* GetURL() { return fURL; }
protected:
OSErr FlushBuffer( Boolean allocateNew );
Boolean fUseBuffer;
Handle fBuffer;
UInt32 fBufferSize;
UInt32 fLastWritten;
Boolean fWriteFailed;
char * fURL;
};
#endif // __BUFFERSTREAM__

File diff suppressed because it is too large Load Diff

View File

@@ -1,366 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CAppleEventHandler.h
#include "PascalString.h"
#include "xp_mem.h"
enum KioskEnum {KioskOff = 0, KioskOn = 1};
class CAppleEventHandler
{
public:
static CAppleEventHandler* sAppleEventHandler; // One and only instance of AEvents
// --- Standard Constructors and Destructors
CAppleEventHandler();
virtual ~CAppleEventHandler();
// virtual void Initialize();
// --- Top Level Apple Event Handling
virtual void HandleAppleEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
virtual void GetAEProperty(DescType inProperty,
const AEDesc &inRequestedType,
AEDesc &outPropertyDesc) const;
virtual void SetAEProperty(DescType inProperty,
const AEDesc &inRequestedType,
AEDesc &outPropertyDesc);
// --- AEOM support
void GetSubModelByUniqueID(DescType inModelID,
const AEDesc &inKeyData,
AEDesc &outToken) const;
static KioskEnum GetKioskMode(){return sAppleEventHandler->fKioskMode;}
protected:
private:
KioskEnum fKioskMode;
void HandleOpenURLEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
// spy Apple Event suite
// file/URL opening + misc
void HandleGetURLEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleGetWDEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleShowFile(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleParseAnchor(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
// Progress
void HandleCancelProgress(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
// Spy window events
void HandleSpyActivate(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleSpyListWindows(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleSpyGetWindowInfo(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleWindowRegistration(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
// Netscape suite
void HandleOpenBookmarksEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleReadHelpFileEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleGoEvent( const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleOpenAddressBookEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleOpenComponentEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleCommandEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
void HandleGetActiveProfileEvent(const AppleEvent &inAppleEvent,
AppleEvent &outAEReply,
AEDesc &outResult,
long inAENumber);
};
/*-------------------------------------------------------------*/
// class EudoraSuite
// Tools used to communicate with Eudora
// The only real use these have is if we are operating in
// Browser-only mode and the user wishes to use Eudora to
// handle mail functions.
//
/*-------------------------------------------------------------*/
// --------------------------------------------------------------
/* Some Constants used by the Eudora Suite */
// --------------------------------------------------------------
#define attachDouble 0
#define attachSingle 1
#define attachBinHex 2
#define attachUUencode 3
#define EU_Norm_Priority 0
#define EU_High_Priority 60
#define EU_Highest_Priority 1
#define EU_Low_Priority 160
#define EU_Lowest_Priority 200
class EudoraSuite
{
public:
// --------------------------------------------------------------
/* This makes a Null AppleEvent descriptor.
*/
// --------------------------------------------------------------
static void MakeNullDesc (AEDesc *theDesc);
// --------------------------------------------------------------
/* This makes a string AppleEvent descriptor.
*/
// --------------------------------------------------------------
static OSErr MakeStringDesc (Str255 theStr,AEDesc *theDesc);
// --------------------------------------------------------------
/* This stuffs the required parameters into the AppleEvent.
*/
// --------------------------------------------------------------
static OSErr CreateObjSpecifier (AEKeyword theClass,AEDesc theContainer,
AEKeyword theForm,AEDesc theData, Boolean disposeInputs,AEDesc *theSpec);
// --------------------------------------------------------------
/* This creates an AEDesc for the current message.
(The current message index = 1)
In: Pointer to AEDesc to return
Out: AEDesc constructed. */
// --------------------------------------------------------------
static OSErr MakeCurrentMsgSpec (AEDesc *theSpec);
// --------------------------------------------------------------
/* Send a given Apple Event. Special case for Eudora, should
be rewritten, but it works for the moment.
In: AppleEvent
Out: Event sent */
// --------------------------------------------------------------
static OSErr SendEvent (AppleEvent *theEvent);
// --------------------------------------------------------------
/* Create an Apple Event to be sent to Eudora
In: Event Class
Event ID
Ptr to Apple Event
Out: Event constructed and returned. */
// --------------------------------------------------------------
static OSErr MakeEvent (AEEventClass eventClass,AEEventID eventID,AppleEvent *theEvent);
// --------------------------------------------------------------
/* This sets the data in a specified field. It operates on the frontmost message
in Eudora. It is the equivalent of sending the following AppleScript:
set field "fieldname" of message 0 to "data"
Examples for setting up a complete mail message:
EudoraSuite::SendSetData("\pto",toRecipientPtr);
EudoraSuite::SendSetData("\pcc",ccRecipientPtr);
EudoraSuite::SendSetData("\pbcc",bccRecipientPtr);
EudoraSuite::SendSetData("\psubject",subjectPtr);
EudoraSuite::SendSetData("\p",bodyPtr);
In: Field to set the data in (Subject, Address, Content, etc)
Pointer to text data.
Size of pointer (allows us to work with XP_Ptrs.
Out: Apple Event sent to Eudora, setting a given field. */
// --------------------------------------------------------------
static OSErr SendSetData(Str31 theFieldName, Ptr thePtr, long thePtrSize);
// --------------------------------------------------------------
/* Everything you need to tell Eudora to construct a new message
and send it.
In: Pointer to the list of e mail addresses to send TO
Pointer to the list of e mail addresses to send CC
Pointer to the list of e mail addresses to send BCC
Pointer to the Subject text
Priority level of message.
XP_HUGE_CHAR_PTR to the contents of the mail
Pointer to an FSSpec (or null if none) for an enclosure.
Out: Apple Events sent to Eudora telling it to construct the
message and send it. */
// --------------------------------------------------------------
static OSErr SendMessage(
Ptr toRecipientPtr,
Ptr ccRecipientPtr,
Ptr bccRecipientPtr,
Ptr subjectPtr,
XP_HUGE_CHAR_PTR bodyPtr,
long thePriority,
FSSpec *theEnclosurePtr);
static OSErr Set_Eudora_Priority(long thePriority);
};
/*-------------------------------------------------------------*/
// class MoreExtractFromAEDesc
// Apple event helpers -- extension of UExtractFromAEDesc.h
// All the miscellaneous AppleEvent helper routines.
/*-------------------------------------------------------------*/
class MoreExtractFromAEDesc
{
public:
// --------------------------------------------------------------
/* Given an AppleEvent, locate a string given a keyword and
return the string
In: Event to search
AEKeyword assocaated with the string
C string ptr
Out: Pointer to a newly created C string returned */
// --------------------------------------------------------------
static void GetCString(const AppleEvent &inAppleEvent, AEKeyword keyword,
char * & s);
// --------------------------------------------------------------
/* Given an AEDesc of type typeChar, return it's string.
In: AEDesc containing a string
C string ptr
Out: Pointer to a newly created C string returned */
// --------------------------------------------------------------
static void TheCString(const AEDesc &inDesc, char * & outPtr);
// --------------------------------------------------------------
/* Add an error string and error code to an AppleEvent.
Typically used when constructing the return event when an
error occured
In: Apple Event to append to
Error string
Error code
Out: keyErrorNum and keyErrorSting AEDescs are added to the Event. */
// --------------------------------------------------------------
static void MakeErrorReturn(AppleEvent &event, const CStr255& errorString,
OSErr errorCode);
// --------------------------------------------------------------
/* Display an error dialog if the given AppleEvent contains
a keyErrorNumber. a keyErrorString is optional and will be
displayed if present
In: Apple Event
Out: Error dialog displayed if error data present. */
// --------------------------------------------------------------
static Boolean DisplayErrorReply(AppleEvent &reply);
// --------------------------------------------------------------
/* Return the process serial number of the sending process.
In: Apple Event send by some app.
Out: ProcessSerialNumber of the sending app. */
// --------------------------------------------------------------
static ProcessSerialNumber ExtractAESender(const AppleEvent &inAppleEvent);
static void DispatchURLDirectly(const AppleEvent &inAppleEvent);
}; // class MoreExtractFromAEDesc
/*-------------------------------------------------------------*/
// class AEUtilities
// Some more simple Apple Event utility routines.
/*-------------------------------------------------------------*/
class AEUtilities
{
public:
// --------------------------------------------------------------
/* CreateAppleEvent
Create a new Apple Event from scratch.
In: Apple Event suite
Apple Event ID
Ptr to return Apple Event
ProcessSerialNumber of the target app to send event to.
Out:A new Apple Event is created. More data may be added to
the event simply by calling AEPutParamDesc or AEPutParamPtr */
// --------------------------------------------------------------
static OSErr CreateAppleEvent(OSType suite, OSType id,
AppleEvent &event, ProcessSerialNumber targetPSN);
// --------------------------------------------------------------
/* Check to see if there is an error in the given AEvent.
We simply return an OSError equiv to the error value
in the event. If none exists (or an error took place
during access) we return 0.
In: Apple Event to test
Out:Error value returned */
// --------------------------------------------------------------
static OSErr EventHasErrorReply(AppleEvent & reply);
};

View File

@@ -1,389 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Handle creating and maintaining the top-level bookmarks menu. It pulls the info
// out of the RDF container the user designates as their "quickfile menu" and listens
// to the messages from RDF to update it.
#include "CBookmarksAttachment.h"
#include "htrdf.h"
#include "CNetscapeWindow.h"
#include "net.h"
#include "resgui.h"
#include "uapp.h"
#include "macutil.h"
#include "UMenuUtils.h"
#include <Icons.h>
#include <Sound.h>
#define PERM_BOOKMARK_ITEMS 4
const CommandT cmd_BookmarkHierItem = BOOKMARKS_MENU_BASE_LAST;
LMenu *CBookmarksAttachment::sMenu = NULL;
Boolean CBookmarksAttachment::sInvalidMenu = true;
LArray CBookmarksAttachment::sMenusList; // this will use the default constructor
HT_View CBookmarksAttachment::sQuickfileView = NULL;
//===========================================================
// CBookmarksAttachment
//===========================================================
CBookmarksAttachment::CBookmarksAttachment()
{
InitQuickfileView();
}
//
// InitQuickfileView
//
// Called at startup to get a new view from the HT backend that represents the
// bookmarks menu. This can be called multiple times without problems.
//
void
CBookmarksAttachment :: InitQuickfileView ( )
{
if ( ! sQuickfileView ) {
HT_Notification notifyStruct = CreateNotificationStruct();
HT_Pane quickfilePane = HT_NewQuickFilePane(notifyStruct);
sQuickfileView = HT_GetSelectedView(quickfilePane);
}
} // InitQuickfileView
void
CBookmarksAttachment :: HandleNotification( HT_Notification /* notifyStruct*/,
HT_Resource node, HT_Event event)
{
switch (event) {
case HT_EVENT_NODE_ADDED:
case HT_EVENT_VIEW_REFRESH:
// only update menu if the quickfile view changes
if ( HT_GetView(node) == sQuickfileView ) {
sInvalidMenu = true;
UpdateMenu();
}
break;
case HT_EVENT_NODE_VPROP_CHANGED:
// optimization: only update when the name column changes
break;
case HT_EVENT_NODE_DELETED_DATA:
case HT_EVENT_NODE_DELETED_NODATA:
// free FE data, but don't update the menu yet (HT not in good state)
break;
} // case of which event
} // HandleNotification
// Processes:
//
void CBookmarksAttachment::ExecuteSelf( MessageT inMessage, void* ioParam )
{
mExecuteHost = FALSE;
switch ( inMessage )
{
CNetscapeWindow *bookmarkableWindow = nil;
case msg_CommandStatus:
{
SCommandStatus* status = (SCommandStatus*)ioParam;
switch ( status->command )
{
default:
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
if ( status->command >= BOOKMARKS_MENU_BASE && status->command <= BOOKMARKS_MENU_BASE_LAST )
{
*(status->enabled) = TRUE;
*(status->usesMark) = FALSE;
return;
}
}
break;
}
}
break;
default:
{
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
if ( inMessage >= BOOKMARKS_MENU_BASE && inMessage <= BOOKMARKS_MENU_BASE_LAST )
{
Uint32 index = inMessage - BOOKMARKS_MENU_BASE;
char* url = HT_GetNodeURL( HT_GetNthItem(sQuickfileView, index) );
CFrontApp::DoGetURL ( url );
return;
}
}
}
break;
}
mExecuteHost = TRUE; // Let application handle it
}
void CBookmarksAttachment::AddToBookmarks( const char* url, const CStr255& title )
{
HT_Resource topNode = HT_TopNode ( sQuickfileView );
HT_AddBookmark ( const_cast<char*>(url), title );
}
LMenu *CBookmarksAttachment::GetMenu()
{
if (!sMenu)
{
sMenu = new LMenu(cBookmarksMenuID);
if (sMenu)
{
MenuHandle macMenu = sMenu->GetMacMenuH();
if (macMenu)
UMenuUtils::ConvertToIconMenu(macMenu, 15312);
}
}
return sMenu;
}
void CBookmarksAttachment::UpdateMenu()
{
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
if (!sInvalidMenu || !GetMenu() || !LMenuBar::GetCurrentMenuBar() )
return;
int i;
// ¥ delete all the dynamically created menus
// ¥Êdelete all the hierarchical menus we have added from the menubar
for ( i = 1; i <= sMenusList.GetCount(); i++ )
{
LMenu* m;
sMenusList.FetchItemAt( i, &m );
if ( m )
LMenuBar::GetCurrentMenuBar()->RemoveMenu( m );
delete m;
}
// ¥ delete all the menu items after the line in Bookmark menu
MenuHandle menu = sMenu->GetMacMenuH();
if ( menu )
{
int howMany = ::CountMItems( menu );
for ( i = howMany; i > PERM_BOOKMARK_ITEMS; i-- )
sMenu->RemoveItem( i );
}
sMenusList.RemoveItemsAt( sMenusList.GetCount(), 1 );
// ¥ walk through the list, and let the submenus be inserted recursively
int nextMenuID = cBookmarksFirstHierMenuID;
FillMenuFromList( HT_TopNode(sQuickfileView), sMenu, nextMenuID, PERM_BOOKMARK_ITEMS );
sInvalidMenu = false;
}
}
// ¥Êrecursively create submenus, given a list ptr
// returns NULL if the menu cannot be created
// it creates submenus recursively
void CBookmarksAttachment::FillMenuFromList(
HT_Resource top,
LMenu* newMenu,
int& nextMenuID, // next menu to create
int whichItem ) // id of the first item to insert
{
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
Try_
{
ThrowIfNil_( newMenu );
MenuHandle mHand = newMenu->GetMacMenuH();
ThrowIfNil_( mHand );
// ¥Êremove all the extra items if they exist
long removeThese = ::CountMItems( mHand ) - whichItem;
for ( long i = 1; i < removeThese; i++ )
newMenu->RemoveItem( whichItem );
MenuHandle theMacMenu = newMenu->GetMacMenuH();
// Open up the container and get an iterator on its contents (we have to open it before
// we can see anything inside it). If the cursor is null, it is probably because the container
// is locked so just put up a leaf item (disabled, of course) and bail.
HT_SetOpenState ( top, PR_TRUE );
HT_Cursor cursor = HT_NewCursor( top );
if ( !cursor ) {
whichItem = UMenuUtils::InsertMenuItem(theMacMenu, "\pLocked", whichItem);
newMenu->SetCommand(whichItem, 0);
return;
}
HT_Resource currNode = HT_GetNextItem(cursor);
while ( currNode )
{
if ( HT_IsSeparator(currNode) )
newMenu->InsertCommand( "\p-", cmd_Nothing, whichItem++ );
else if ( ! HT_IsContainer(currNode) )
{
// ¥ should really convert this to menu chars
CStr255 urlName( HT_GetNodeName(currNode) );
CreateMenuString( urlName );
whichItem = UMenuUtils::InsertMenuItem(theMacMenu, urlName, whichItem); // returns actual insert loc
newMenu->SetCommand(whichItem, BOOKMARKS_MENU_BASE + HT_GetNodeIndex(sQuickfileView, currNode) );
}
else
{
CStr255 headerName( HT_GetNodeName(currNode) );
CreateMenuString( headerName );
whichItem = UMenuUtils::InsertMenuItem(theMacMenu, headerName, whichItem); // returns actual insert loc
newMenu->SetCommand(whichItem, cmd_BookmarkHierItem);
// ¥Êdo we have space to create more?
if ( nextMenuID <= cBookmarksLastHierMenuID)
{
LMenu* subMenu = (LMenuBar::GetCurrentMenuBar())->FetchMenu( nextMenuID );
if ( !subMenu )
{
StringHandle menuStringH = GetString( NEW_RESID );
Assert_(menuStringH);
if (menuStringH)
{
StHandleLocker locker((Handle)menuStringH);
subMenu = new LMenu( nextMenuID,
(unsigned char *)*menuStringH );
LMenuBar::GetCurrentMenuBar()->InstallMenu( subMenu, hierMenu );
}
}
else
SysBeep( 1 );
nextMenuID++;
// Skip the "Apple" menu or we're in deep donuts.
if (nextMenuID == MENU_Apple)
nextMenuID++;
if ( subMenu )
{
sMenusList.InsertItemsAt( 1, LArray::index_Last, &subMenu );
// ¥Êmake item hierarchical
::SetItemCmd( mHand, whichItem, hMenuCmd );
::SetItemMark( mHand, whichItem, subMenu->GetMenuID() );
if ( currNode )
FillMenuFromList( currNode, subMenu, nextMenuID, 0 );
}
}
}
currNode = HT_GetNextItem ( cursor );
} // while
}
Catch_( inErr )
{
}
EndCatch_
}
}
void CBookmarksAttachment::RemoveMenus()
{
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
if (sMenu)
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
currentMenuBar->RemoveMenu(sMenu);
for (ArrayIndexT index = 1; index <= sMenusList.GetCount(); ++index)
{
LMenu *menu;
sMenusList.FetchItemAt(index, &menu);
if (menu)
currentMenuBar->RemoveMenu(menu);
}
}
}
}
}
void CBookmarksAttachment::InstallMenus()
{
if (CFrontApp::GetApplication()->HasBookmarksMenu())
{
if (GetMenu())
{
LMenuBar *currentMenuBar = LMenuBar::GetCurrentMenuBar();
if (currentMenuBar)
{
for (ArrayIndexT index = sMenusList.GetCount(); index > 0; --index)
{
LMenu *menu;
sMenusList.FetchItemAt(index, &menu);
if (menu)
{
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(menu, hierMenu);
}
}
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
currentMenuBar->InstallMenu(sMenu, InstallMenu_AtEnd);
LMenu *directoryMenu = currentMenuBar->FetchMenu(cDirectoryMenuID);
if (directoryMenu)
{
CFrontApp::BuildConfigurableMenu( directoryMenu->GetMacMenuH(), "menu.places.item" );
for (short index2 = CountMItems(directoryMenu->GetMacMenuH()); index2 > 0; --index2)
directoryMenu->SetCommand(index2, DIR_MENU_BASE + index2 - 1);
}
}
}
}
}

View File

@@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// Handle creating and maintaining the top-level bookmarks menu. It pulls the info
// out of the RDF container the user designates as their "quickfile menu" and listens
// to the messages from RDF to update it.
#pragma once
#ifndef CBOOKMARKSATTACHMENT_H_
#define CBOOKMARKSATTACHMENT_H_
#include "CRDFNotificationHandler.h"
#include "PascalString.h"
#include <LAttachment.h>
#include <LMenu.h>
#include <LArray.h>
/***********************************************************************************
* CBookmarksAttachment
* Processes bookmark menu commands -- should be attached to application
***********************************************************************************/
class CBookmarksAttachment: public LAttachment, public CRDFNotificationHandler
{
public:
// ¥¥ constructors
CBookmarksAttachment();
// ¥¥Êevents
virtual void ExecuteSelf( MessageT inMessage, void* ioParam );
// static void AddToBookmarks( BM_Entry* newBookmark );
static void AddToBookmarks( const char* url, const CStr255& title );
static LMenu* GetMenu();
static void InvalidateMenu() { sInvalidMenu = true; }
static void UpdateMenu();
static void RemoveMenus();
static void InstallMenus();
void InitQuickfileView ( ) ;
protected:
static void FillMenuFromList( HT_Resource top, LMenu* newMenu, int& nextMenuID, int whichItem );
virtual void HandleNotification( HT_Notification notifyStruct, HT_Resource node, HT_Event event);
static LMenu* sMenu;
static Boolean sInvalidMenu;
static LArray sMenusList;
static HT_View sQuickfileView; // called quickfile because of HT API
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,485 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CBrowserContext.h
#pragma once
#include <LBroadcaster.h>
#include <LSharable.h>
#include "CNSContext.h"
#include "structs.h"
#include "ctxtfunc.h"
#include "cstring.h"
class CHTMLView;
class CSharableCompositor;
const MessageT msg_SecurityState = 'SECS'; // ESecurityState
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
class CBrowserContext : public CNSContext
{
friend class CNSContextCallbacks;
friend class CPlainTextConversionContext;
public:
// history navigation
// these are special indices for LoadHistoryEntry
enum {
index_Reload = -2,
index_GoBack = -1,
index_GoForward = 0
};
CBrowserContext();
CBrowserContext(MWContextType inType);
CBrowserContext(const CBrowserContext& inOriginal);
virtual ~CBrowserContext();
virtual void NoMoreUsers(void);
operator MWContext*();
operator MWContext&();
virtual void SetCurrentView(CHTMLView* inView);
virtual CBrowserContext* GetTopContext();
virtual Boolean HasColorSpace(void) const;
virtual Boolean HasGridParent(void) const;
virtual Boolean HasFullPagePlugin(void) const;
virtual void SetLoadImagesOverride(Boolean inOverride);
virtual Boolean IsLoadImagesOverride(void) const;
virtual void SetDelayImages(Boolean inDelay);
virtual Boolean IsImageLoadingDelayed(void) const;
virtual Boolean IsRestrictedTarget(void) const;
virtual void SetRestrictedTarget(Boolean inIsRestricted);
virtual Boolean IsRootDocInfoContext();
virtual Boolean IsViewSourceContext();
virtual Boolean IsSpecialBrowserContext();
virtual Boolean SupportsPageServices();
// FIX ME!!! ACCESSOR for unique ID
// LAYERS / COMPOSITOR
virtual Boolean HasCompositor(void) const;
virtual CL_Compositor* GetCompositor(void) const;
virtual void SetCompositor(
CSharableCompositor* inCompositor);
virtual PRBool HandleLayerEvent(
CL_Layer* inLayer,
CL_Event* inEvent);
virtual PRBool HandleEmbedEvent(
LO_EmbedStruct* inEmbed,
CL_Event* inEvent);
// HISTORY
virtual void RememberHistoryPosition(
Int32 inX,
Int32 inY);
virtual void InitHistoryFromContext( CBrowserContext *parentContext);
// Image Observer
virtual Boolean IsContextLooping();
Boolean IsMochaLoadingImages() { return mMochaImagesLoading; }
void SetImagesLoading(Boolean inValue);
void SetImagesLooping(Boolean inValue);
void SetImagesDelayed(Boolean inValue);
void SetMochaImagesLoading(Boolean inValue);
void SetMochaImagesLooping(Boolean inValue);
void SetMochaImagesDelayed(Boolean inValue);
protected:
// we don't need to expose these
virtual History_entry* GetNextHistoryEntry(void);
virtual History_entry* GetPreviousHistoryEntry(void);
virtual Boolean IsContextLoopingRecurse();
public:
virtual Boolean CanGoForward(void);
virtual Boolean CanGoBack(void);
virtual Boolean HasGridChildren(void);
virtual Boolean IsGridChild(void);
virtual Boolean IsGridCell();
virtual void GoForwardOneHost();
virtual void GoBackOneHost();
virtual void GoForward(void);
virtual void GoBack(void);
virtual void LoadHistoryEntry( // one-based
Int32 inIndex,
Boolean inSuperReload = false);
virtual Boolean GoForwardInGrid(void);
virtual Boolean GoBackInGrid(void);
/*
// URL MANIPULATION
virtual cstring GetCurrentURL(void);
virtual void SwitchLoadURL(
URL_Struct* inURL,
FO_Present_Types inOutputFormat);
virtual void ImmediateLoadURL(
URL_Struct* inURL,
FO_Present_Types inOutputFormat);
*/
// REPAGINTAION
virtual void Repaginate(NET_ReloadMethod repage = NET_RESIZE_RELOAD);
virtual Boolean IsRepaginating(void) const;
virtual Boolean IsRepagintaitonPending(void) const;
// FRAME MANAGEMENT
virtual MWContext* CreateGridContext(
void* inHistList,
void* inHistEntry,
Int32 inX,
Int32 inY,
Int32 inWidth,
Int32 inHeight,
char* inURLString,
char* inWindowTarget,
Int8 inScrollMode,
NET_ReloadMethod inForceReload,
Bool inNoEdge);
virtual void* DisposeGridContext(
XP_Bool inSaveHistory);
virtual void DisposeGridChild(
CBrowserContext* inChildContext);
virtual void RestructureGridContext(
Int32 inX,
Int32 inY,
Int32 inWidth,
Int32 inHeight);
virtual void GetFullGridSize(
Int32& outWidth,
Int32& outHeight);
virtual void ReloadGridFromHistory(
void* inHistEntry,
NET_ReloadMethod inReload);
virtual Int32 CountGridChildren(void) const;
// save dialog for editor--Paul will fix some time
virtual CSaveProgress* GetSaveDialog() { return fSaveDialog; };
virtual void SetSaveDialog( CSaveProgress* theDialog ) { fSaveDialog = theDialog; };
// override for JavaScript foolishness
virtual void Alert(
const char* inAlertText);
virtual XP_Bool Confirm(
const char* inMessage);
protected:
CSaveProgress* fSaveDialog;
void ConstructJSDialogTitle(LStr255& outTitle);
// CALLBACK IMPLEMENTATION
// FIX ME!!! this needs to become an apple event
// virtual MWContext* CreateNewDocWindow(
// URL_Struct* inURL);
virtual void LayoutNewDocument(
URL_Struct* inURL,
Int32* inWidth,
Int32* inHeight,
Int32* inMarginWidth,
Int32* inMarginHeight);
virtual void SetDocTitle(
char* inTitle);
virtual void FinishedLayout(void);
virtual int GetTextInfo(
LO_TextStruct* inText,
LO_TextInfo* inTextInfo);
virtual int MeasureText(
LO_TextStruct* inText,
short* outCharLocs);
virtual void GetEmbedSize(
LO_EmbedStruct* inEmbedStruct,
NET_ReloadMethod inReloadMethod);
virtual void GetJavaAppSize(
LO_JavaAppStruct* inJavaAppStruct,
NET_ReloadMethod inReloadMethod);
virtual void GetFormElementInfo(
LO_FormElementStruct* inElement);
virtual void GetFormElementValue(
LO_FormElementStruct* inElement,
XP_Bool inHide);
virtual void ResetFormElement(
LO_FormElementStruct* inElement);
virtual void SetFormElementToggle(
LO_FormElementStruct* inElement,
XP_Bool inToggle);
virtual void FreeEmbedElement(
LO_EmbedStruct* inEmbedStruct);
virtual void CreateEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void SaveEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void RestoreEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void DestroyEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void FreeJavaAppElement(
LJAppletData* inAppletData);
virtual void HideJavaAppElement(
LJAppletData* inAppletData);
virtual void FreeEdgeElement(
LO_EdgeStruct* inEdgeStruct);
virtual void FormTextIsSubmit(
LO_FormElementStruct* inElement);
virtual void DisplaySubtext(
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG);
virtual void DisplayText(
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG);
virtual void DisplayEmbed(
int inLocation,
LO_EmbedStruct* inEmbedStruct);
virtual void DisplayJavaApp(
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
virtual void DisplayEdge (
int inLocation,
LO_EdgeStruct* inEdgeStruct);
virtual void DisplayTable(
int inLocation,
LO_TableStruct* inTableStruct);
virtual void DisplayCell(
int inLocation,
LO_CellStruct* inCellStruct);
virtual void InvalidateEntireTableOrCell(
LO_Element* inElement);
virtual void DisplayAddRowOrColBorder(
XP_Rect* inRect,
XP_Bool inDoErase);
virtual void DisplaySubDoc(
int inLocation,
LO_SubDocStruct* inSubdocStruct);
virtual void DisplayLineFeed(
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG);
virtual void DisplayHR(
int inLocation,
LO_HorizRuleStruct* inRuleStruct);
virtual void DisplayBullet(
int inLocation,
LO_BullettStruct* inBullettStruct);
virtual void DisplayFormElement(
int inLocation,
LO_FormElementStruct* inFormElement);
virtual void DisplayBorder(
int inLocation,
int inX,
int inY,
int inWidth,
int inHeight,
int inBW,
LO_Color* inColor,
LO_LineStyle inStyle);
virtual void UpdateEnableStates();
virtual void DisplayFeedback(
int inLocation,
LO_Element_struct *inElement);
virtual void ClearView(
int inWhich);
virtual void SetDocDimension(
int inLocation,
Int32 inWidth,
Int32 inLength);
virtual void SetDocPosition(
int inLocation,
Int32 inX,
Int32 inY);
virtual void GetDocPosition(
int inLocation,
Int32* outX,
Int32* outY);
virtual void SetBackgroundColor(
Uint8 inRed,
Uint8 inGreen,
Uint8 inBlue);
virtual void AllConnectionsComplete(void);
virtual void EraseBackground(
int inLocation,
Int32 inX,
Int32 inY,
Uint32 inWidth,
Uint32 inHieght,
LO_Color* inColor);
virtual void SetDrawable(
CL_Drawable* inDrawable);
virtual void GetTextFrame(
LO_TextStruct* inTextStruct,
Int32 inStartPos,
Int32 inEndPos,
XP_Rect* outFrame);
virtual void GetDefaultBackgroundColor(
LO_Color* outColor) const;
virtual void DrawJavaApp(
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
virtual void HandleClippingView(
struct LJAppletData *appletD,
int x,
int y,
int width,
int height);
virtual char* Prompt(
const char* inMessage,
const char* inDefaultText);
#if 0
Int32 GetTransactionID() { return fProgressID; }
Int32 GetContextUniqueID() { return fWindowID; }
// Window ID. Used to identify the context
static Int32 sWindowID; // Unique ID, incremented for each context
Int32 fWindowID; // ID of this window
private:
#endif
Boolean mIsRepaginating;
Boolean mIsRepaginationPending;
Boolean mLoadImagesOverride;
Boolean mDelayImages;
CSharableCompositor* mCompositor;
IL_GroupContext* mImageGroupContext;
Boolean mImagesLoading;
Boolean mImagesLooping;
Boolean mImagesDelayed;
Boolean mMochaImagesLoading;
Boolean mMochaImagesLooping;
Boolean mMochaImagesDelayed;
Boolean mInNoMoreUsers;
}; // class CBrowserContext
inline CBrowserContext::operator MWContext*()
{ return &mContext; };
inline CBrowserContext::operator MWContext&()
{ return mContext; };
inline CBrowserContext* ExtractBrowserContext(MWContext* inContext)
{ return dynamic_cast<CBrowserContext*>(inContext->fe.newContext); }
class CSharableCompositor : public LSharable
{
public:
CSharableCompositor(CL_Compositor* c = nil) : mCompositor(c) {}
void SetCompositor(CL_Compositor* c) { mCompositor = c; }
virtual ~CSharableCompositor();
operator CL_Compositor*() { return mCompositor; }
CL_Compositor* mCompositor;
}; // class CSharableCompositor

View File

@@ -1,157 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CBrowserDragTask.cp
#include "CBrowserDragTask.h"
#include "resgui.h"
// ---------------------------------------------------------------------------
// ¥ CBrowserDragTask
// ---------------------------------------------------------------------------
CBrowserDragTask::CBrowserDragTask(
const EventRecord& inEventRecord)
: super(inEventRecord)
{
}
// ---------------------------------------------------------------------------
// ¥ ~CBrowserDragTask
// ---------------------------------------------------------------------------
CBrowserDragTask::~CBrowserDragTask()
{
}
//
// AddFlavorBookmark
//
// This flavor is currently used by the Proxy Icon and the Personal Toolbar
// to shuttle around url/title information. The data format is plain text in
// the form of URL<cr>Title.
//
// This flavor may or may not contain data. The proxy icon, for example, would want to
// include the data so that if it is dropped in the NavCenter, the NC could
// determine if the drop was allowable based on the URL.
//
// NOTE: THIS FLAVOR WILL NOT BE USED BY THE PERSONAL TOOLBAR IN THE FUTURE
// AND WILL ONLY BE USED BY THE PROXY ICON. AS A RESULT, IT WILL BE MOVED
// INTO CProxyDragTask.
//
void
CBrowserDragTask::AddFlavorBookmark(ItemReference inItemRef, const char* inData)
{
OSErr theErr = ::AddDragItemFlavor(
mDragRef,
inItemRef,
emBookmarkDrag,
inData,
inData ? strlen(inData) + 1 : 0,
flavorSenderTranslated | flavorSenderOnly);
ThrowIfOSErr_(theErr);
}
//
// AddFlavorBookmarkFile
//
// This flavor is used for creating a bookmark file in the Finder instead of a clipping when
// icons are dragged to the desktop.
//
// The data will be fulfilled in a DoSendData proc.
//
void
CBrowserDragTask::AddFlavorBookmarkFile(ItemReference inItemRef)
{
// Promise a file of type emBookmarkFile
PromiseHFSFlavor promise;
promise.fileType = emBookmarkFile;
promise.fileCreator = emSignature;
promise.fdFlags = 0;
promise.promisedFlavor = emBookmarkFileDrag;
// Promise to create a file for the emBookmark flavor, where the actual
// FSSpec is promised in the emBookmark flavor below
OSErr theErr = ::AddDragItemFlavor(
mDragRef,
inItemRef,
flavorTypePromiseHFS,
&promise,
sizeof(PromiseHFSFlavor),
0);
ThrowIfOSErr_(theErr);
theErr = ::AddDragItemFlavor(
mDragRef,
inItemRef,
emBookmarkFileDrag,
nil,
0,
flavorNotSaved | flavorSenderTranslated);
ThrowIfOSErr_(theErr);
}
//
// AddFlavorURL
//
// This flavor is used to communicate the current URL with other applications, such
// as text editors, etc. It is basically the 'TEXT' flavor.
//
// No data is sent with this flavor, relying on a DoDragSendData() to get it out later.
// This prevents us from running into an odd problem where the CTheadView class wants to
// interpret the data as something that it isn't. This won't happen when no data is sent.
//
void
CBrowserDragTask::AddFlavorURL(ItemReference inItemRef)
{
// TEXT flavor (drag an URL within Netscape). Set flavorSenderTranslated
// so that the Finder *won't* try to put this in a clipping file.
// We'd rather save the file itself.
OSErr theErr = ::AddDragItemFlavor(
mDragRef,
inItemRef,
'TEXT',
nil,
0,
flavorSenderTranslated);
ThrowIfOSErr_(theErr);
}
// ---------------------------------------------------------------------------
// ¥ AddFlavors
// ---------------------------------------------------------------------------
void
CBrowserDragTask::AddFlavors( DragReference inDragRef )
{
// NOTE: I'm passing |this| as the item ref because that's the way it was in the past
// and i don't want to break anything.
AddFlavorBookmark(static_cast<ItemReference>(this));
AddFlavorBookmarkFile(static_cast<ItemReference>(this));
AddFlavorURL(static_cast<ItemReference>(this));
}

View File

@@ -1,49 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CBrowserDragTask.h
#ifndef CBrowserDragTask_H
#define CBrowserDragTask_H
#pragma once
// Includes
#include <LDragTask.h>
// Class declaration
class CBrowserDragTask : public LDragTask
{
public:
typedef LDragTask super;
CBrowserDragTask( const EventRecord& inEventRecord );
virtual ~CBrowserDragTask();
protected:
void AddFlavorBookmark(ItemReference inItemRef, const char* inData = nil);
void AddFlavorBookmarkFile(ItemReference inItemRef);
void AddFlavorURL(ItemReference inItemRef);
virtual void AddFlavors(DragReference inDragRef);
};
#endif

View File

@@ -1,351 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CExpandoDivider.h"
#include "prtypes.h"
#include "macutil.h"
#include "CDragBarDockControl.h"
#define kTwistieID 'Twst'
#define kCaptionID 'TwCp'
const Int16 kTwistiePixelDifference = 3; // difference in height (collapsed minus expanded).
//======================================
// CExpandoListener
//======================================
//-----------------------------------
void CExpandoListener::ListenToMessage(MessageT inMessage, void *ioParam)
//-----------------------------------
{
switch (inMessage)
{
case msg_TwistieMessage:
{
Int32 value = *(Int32*)ioParam;
SetExpandState((ExpandStateT)value);
break;
}
}
} // CExpandoListener::ListenToMessage
//======================================
// CExpandable
//======================================
//-----------------------------------
CExpandable::CExpandable(CExpansionData* closedState, CExpansionData* openState)
//-----------------------------------
: mExpandState(closed_state)
{
mStates[0] = closedState;
mStates[1] = openState;
}
//-----------------------------------
void CExpandable::StoreCurrentDimensions()
//-----------------------------------
{
StoreDimensions(*(mStates[GetExpandState()]));
}
//-----------------------------------
void CExpandable::RecallCurrentDimensions()
//-----------------------------------
{
RecallDimensions(*(mStates[GetExpandState()]));
}
//-----------------------------------
void CExpandable::RecallOtherDimensions()
//-----------------------------------
{
RecallDimensions(*mStates[1 - GetExpandState()]);
}
//-----------------------------------
void CExpandable::ReadStatus(LStream* inStream)
//-----------------------------------
{
if (!inStream) return;
*inStream >> mExpandState;
mStates[0]->ReadStatus(inStream);
mStates[1]->ReadStatus(inStream);
// Don't do anything with them here.
} // CExpandable::ReadStatus
//-----------------------------------
void CExpandable::WriteStatus(LStream* inStream)
//-----------------------------------
{
StoreCurrentDimensions();
if (!inStream) return;
*inStream << mExpandState;
mStates[0]->WriteStatus(inStream);
mStates[1]->WriteStatus(inStream);
} // CExpandable::ReadStatus
const Int16 kDefaultTopFrameHeight = 110;
// FIXME. A preference? This value shows 5 full message lines in geneva 9.
//-----------------------------------
inline CDividerData::CDividerData()
//-----------------------------------
: mDividerPosition(kDefaultTopFrameHeight)
{
} // CDividerData::CDividerData
//-----------------------------------
void CDividerData::ReadStatus(LStream* inStream)
//-----------------------------------
{
if (!inStream) return;
*inStream >> mDividerPosition;
} // CDividerData::ReadStatus
//-----------------------------------
void CDividerData::WriteStatus(LStream* inStream)
//-----------------------------------
{
if (!inStream) return;
*inStream << mDividerPosition;
} // CDividerData::WriteStatus
//======================================
// CExpandoDivider
//======================================
//-----------------------------------
CExpandoDivider::CExpandoDivider(LStream* inStream)
//-----------------------------------
: Inherited( inStream )
, CExpandable(&mClosedData, &mOpenData)
{
} // CExpandoDivider::CExpandoDivider
//-----------------------------------
CExpandoDivider::~CExpandoDivider()
//-----------------------------------
{
}
//-----------------------------------
void CExpandoDivider::FinishCreateSelf()
//-----------------------------------
{
Inherited::FinishCreateSelf();
mTwistie = FindPaneByID(kTwistieID);
mCaption = FindPaneByID(kCaptionID);
// CExpandable::InitializeStates();
StoreCurrentDimensions(); // get the closed state from PPOb
// Base class calls SyncFrameBinding which sets the "open" behavior. Undo this, then.
SetStickToBottom(true);
// Record the height of the status bar, so that we can preserve it on expansion.
LWindow* window = LWindow::FetchWindowObject(GetMacPort());
Rect windowRect;
window->CalcPortFrameRect(windowRect); // relative is fine
Rect expandoRect;
this->CalcPortFrameRect(expandoRect);
mDistanceFromWindowBottom = windowRect.bottom - expandoRect.bottom;
Assert_(mDistanceFromWindowBottom >= 0);
mDividerDistanceFromWindowBottom
= windowRect.bottom - (expandoRect.top + GetDividerPosition());
} // CExpandoDivider::FinishCreateSelf
//-----------------------------------
void CExpandoDivider::StoreDimensions(CExpansionData& outState)
//-----------------------------------
{
((CDividerData&)outState).mDividerPosition = GetDividerPosition();
} // CExpandoDivider::StoreDimensions
//-----------------------------------
void CExpandoDivider::RecallDimensions(const CExpansionData& inState)
//-----------------------------------
{
SInt32 dividerPosition = GetDividerPosition();
Int16 dividerDelta = ((CDividerData&)inState).mDividerPosition - dividerPosition;
this->ChangeDividerPosition(dividerDelta);
} // CExpandoDivider::RecallDimensions
//-----------------------------------
void CExpandoDivider::SetStickToBottom(LPane* inPane, Boolean inStick)
//-----------------------------------
{
SBooleanRect bindings;
inPane->GetFrameBinding(bindings);
bindings.bottom = inStick;
inPane->SetFrameBinding(bindings);
} // CExpandoDivider::SetStickToBottom
//-----------------------------------
void CExpandoDivider::SetStickToBottom(Boolean inStick)
//-----------------------------------
{
SetStickToBottom(mTwistie, inStick);
SetStickToBottom(mCaption, inStick);
SetStickToBottom(fFirstView, inStick);
SetStickToBottom(fSecondView, true);
} // CExpandoDivider::SetStickToBottom
//-----------------------------------
void CExpandoDivider::ClickSelf(const SMouseDownEvent& inMouseDown)
//-----------------------------------
{
if (GetExpandState() == open_state) Inherited::ClickSelf(inMouseDown);
}
//-----------------------------------
void CExpandoDivider::AdjustCursorSelf(Point inPortPt, const EventRecord& inMacEvent)
//-----------------------------------
{
if (GetExpandState() == open_state) Inherited::AdjustCursorSelf(inPortPt, inMacEvent);
}
//-----------------------------------
void CExpandoDivider::ChangeTwistiePosition(Int16 delta)
// Move the twistie and caption
//-----------------------------------
{
mTwistie->MoveBy(0, delta, FALSE);
mCaption->MoveBy(0, delta, FALSE);
} // CExpandoDivider::ChangeTwistiePosition
//-----------------------------------
void CExpandoDivider::ChangeDividerPosition(Int16 delta)
//-----------------------------------
{
if (mExpandState == open_state && delta > 0)
{
// If the user drags the divider to the bottom, it should close the twistie.
Int32 dividerPos = this->GetDividerPosition();
Int32 newPos = dividerPos + delta;
Rect secondFrame;
GetSubpaneRect(this, fSecondView, secondFrame);
if (newPos > secondFrame.bottom - 50)
{
mTwistie->SetValue(closed_state);
return;
}
}
Inherited::ChangeDividerPosition(delta);
ChangeTwistiePosition(delta);
} // CExpandoDivider::ChangeDividerPosition
//-----------------------------------
void CExpandoDivider::ResizeFrameBy(
Int16 inWidthDelta,
Int16 inHeightDelta,
Boolean inRefresh)
//-----------------------------------
{
Inherited::ResizeFrameBy(inWidthDelta, inHeightDelta, inRefresh);
// Unless we do this, there's no way to enforce the rule that the second pane's TOP
// sticks to the bottom when in the collapsed state.
if (mExpandState == closed_state && fFirstView && fSecondView)
{
SPoint32 loc1, loc2;
SDimension16 siz1, siz2;
fFirstView->GetFrameLocation(loc1);
fFirstView->GetFrameSize(siz1);
fSecondView->GetFrameLocation(loc2);
fSecondView->GetFrameSize(siz2);
Int32 secondViewOffset = siz1.height + loc1.v + mDivSize - loc2.v;
if (secondViewOffset)
{
fSecondView->MoveBy(0, secondViewOffset, false);
fSecondView->ResizeFrameBy(0, -secondViewOffset, false);
}
}
} // CExpandoDivider::ResizeFrameBy
//-----------------------------------
void CExpandoDivider::SetExpandState(ExpandStateT inExpanded)
//-----------------------------------
{
#if 0
// We now assume that the my view's bottom is flush with the bottom of the
// second subview.
SPoint32 locMe, loc2;
SDimension16 sizMe, siz2;
GetFrameSize(sizMe);
GetFrameLocation(locMe);
fSecondView->GetFrameLocation(loc2);
fSecondView->GetFrameSize(siz2);
Assert_(loc2.v + siz2.height == locMe.v + sizMe.height);
#endif // DEBUG
LWindow* win = LWindow::FetchWindowObject(GetMacPort());
Rect winRect;
win->CalcPortFrameRect(winRect); // relative is fine
const Int16 statusBarHeight = this->GetCorrectDistanceFromBottom();
const Int16 dividerDistanceFromBottom
= this->GetCorrectDividerDistanceFromBottom();
Rect expandoRect;
this->CalcPortFrameRect(expandoRect);
if (mExpandState != inExpanded)
StoreCurrentDimensions();
mExpandState = inExpanded;
if (inExpanded)
{
// When expanded, topview, twistie and caption do not stick to the bottom.
mCaption->Hide();
SetStickToBottom(false);
SyncFrameBindings();
// The expanded twistie is not as high as the collapsed one, and the following
// adjustment allows us to have a narrower divider bar.
ChangeTwistiePosition(- kTwistiePixelDifference);
// Now expand. The divider will pull the frame up.
RecallCurrentDimensions();
fSecondView->Show();
}
else
{
ChangeTwistiePosition(+ kTwistiePixelDifference);
fSecondView->Hide();
mCaption->Show();
RecallCurrentDimensions();
}
// The following is a kludge to fix cases where the bottom of Message view
// can disappear under the bottom of the window, or where the divider containing
// the twistie icon can be a one-inch thick grey area just over the bottom of the window.
short vertError = (winRect.bottom - statusBarHeight) - expandoRect.bottom;
if (vertError != 0)
{
this->ResizeFrameBy(0, vertError, false);
}
if (!inExpanded)
{
vertError = (winRect.bottom - (expandoRect.top + dividerDistanceFromBottom))
- this->GetDividerPosition();
if (vertError != 0)
this->ChangeDividerPosition(vertError);
// When collapsed, topview, twistie and caption stick to the bottom.
SetStickToBottom(true); //¥¥¥ this line is not part of the kludge
}
} // CExpandoDivider::SetExpandedState

View File

@@ -1,136 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "divview.h"
//-----------------------------------
class CExpansionData
// persistent data about both states of a CExpandable.
//-----------------------------------
{
public:
virtual void ReadStatus(LStream* inStream) = 0;
virtual void WriteStatus(LStream* inStream) = 0;
}; // class CExpansionData
enum { closed_state = false, open_state = true };
typedef Boolean ExpandStateT;
//======================================
class CExpandable
//======================================
{
public:
virtual void ReadStatus(LStream* inStream);
virtual void WriteStatus(LStream* inStream);
ExpandStateT GetExpandState() const { return mExpandState; }
void NoteExpandState(ExpandStateT inExpanded) { mExpandState = inExpanded; }
protected:
virtual void SetExpandState(ExpandStateT inExpanded) = 0;
private:
virtual void StoreDimensions(CExpansionData& outState) = 0;
virtual void RecallDimensions(const CExpansionData& inState) = 0;
protected:
CExpandable(CExpansionData* closedState, CExpansionData* openState);
// clients that mix this class in should have two members that are
// CExpansionData, and pass the references in here.
protected:
void StoreCurrentDimensions();
void RecallCurrentDimensions();
void RecallOtherDimensions();
protected:
ExpandStateT mExpandState;
CExpansionData* mStates[2];
}; // class CExpandable
//======================================
class CExpandoListener : public LListener, public CExpandable
//======================================
{
public:
enum { msg_TwistieMessage = 'Twst' }; // Broadcast by twistie control
CExpandoListener(
CExpansionData* closedState, CExpansionData* openState)
: CExpandable(closedState, openState) {}
virtual void ListenToMessage(MessageT inMessage, void *ioParam);
// Listen to the twistie
}; // class CExpandoListener
//======================================
class CDividerData : public CExpansionData
//======================================
{
public:
CDividerData();
// default is set for the open state, because the closed state is in the PPOb.
// Overrides
virtual void ReadStatus(LStream* inStream);
virtual void WriteStatus(LStream* inStream);
// Data
SInt32 mDividerPosition;
}; // class CDividerData
//======================================
class CExpandoDivider : public LDividedView, public CExpandable
// This class acts like a divider between two panes, one above the other.
// In addition to the LDividedView behavior, it also has an "expando" twistie, that
// hides/shows the bottom pane.
//======================================
{
private:
typedef LDividedView Inherited;
public:
enum { class_ID = 'Expo' };
CExpandoDivider(LStream* inStream);
virtual ~CExpandoDivider();
// PowerPlant overrides
protected:
virtual void FinishCreateSelf();
virtual void ClickSelf(const SMouseDownEvent& inMouseDown);
virtual void AdjustCursorSelf(Point inPortPt, const EventRecord& inMacEvent);
public:
virtual void ResizeFrameBy(
Int16 inWidthDelta,
Int16 inHeightDelta,
Boolean inRefresh);
// CExpandable overrides
public:
virtual void SetExpandState(ExpandStateT inExpanded);
virtual void StoreDimensions(CExpansionData& outState);
virtual void RecallDimensions(const CExpansionData& inState);
// Special interfaces
public:
Int16 GetCorrectDistanceFromBottom() const { return mDistanceFromWindowBottom; }
Int16 GetCorrectDividerDistanceFromBottom() const
{ return mDividerDistanceFromWindowBottom; }
// Down to business:
protected:
virtual void ChangeDividerPosition(Int16 delta); // also changes the twistie+caption
virtual void ChangeTwistiePosition(Int16 delta); // only changes the twistie+caption
void SetStickToBottom(LPane* inPane, Boolean inStick);
void SetStickToBottom(Boolean inStick);
// Data:
protected:
Int16 mDistanceFromWindowBottom;
Int16 mDividerDistanceFromWindowBottom;
LPane *mTwistie, *mCaption;
CDividerData mClosedData, mOpenData;
}; // class CExpandoDivider

View File

@@ -1,336 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* macmocha.cp
* MacFE mocha hacks
*
*/
#include "CMochaHacks.h"
#include "lo_ele.h"
#include "fe_proto.h" // for FE_DestroyWindow
#include "proto.h" // 1997-03-02 mjc
#include "layers.h"
#include "macutil.h"
LO_Element* CMochaHacks::sMouseOverElement = NULL; // layout element the cursor is over
MWContext* CMochaHacks::sMouseOverElementContext = NULL; // context associated with sMouseOverElement
LO_AnchorData* CMochaHacks::sMouseOverMapArea = NULL; // AREA tag the cursor is over
// <where> is document-relative
void
CMochaHacks::SendOutOfElementEvent(MWContext * winContext, CL_Layer* layer, SPoint32 where) // add layer param 1997-03-02 mjc
{
Assert_(winContext);
try
{
if ( sMouseOverElement )
{
// ET_SendEvent now takes a JSEvent struct instead of an int type
JSEvent* event = XP_NEW_ZAP(JSEvent);
if (event)
{
// 97-06-21 pkc -- If we have an sMouseOverElementContext then use it
// instead of winContext
MWContext* theContext = sMouseOverElementContext ? sMouseOverElementContext : winContext;
event->type = EVENT_MOUSEOUT;
event->x = where.h;
event->y = where.v;
event->docx = event->x + CL_GetLayerXOrigin(layer);
event->docy = event->y + CL_GetLayerYOrigin(layer);
int32 x_offset, y_offset;
FE_GetWindowOffset(theContext, &x_offset, &y_offset);
event->screenx = event->docx + x_offset;
event->screeny = event->docy + y_offset;
event->layer_id = LO_GetIdFromLayer(theContext, layer);
ET_SendEvent( theContext, sMouseOverElement, event, NULL, NULL );
sMouseOverElement = NULL;
sMouseOverElementContext = NULL;
}
}
}
catch(...)
{
}
}
void
CMochaHacks::SendOutOfMapAreaEvent(MWContext * winContext, CL_Layer* layer, SPoint32 where) // add layer param 1997-03-02 mjc
{
Assert_(winContext);
try
{
if ( sMouseOverMapArea )
{
CMochaEventCallback * cb = new CMochaEventCallback; // Need it because of LO_AnchorData
cb->SendEvent( winContext, sMouseOverMapArea, EVENT_MOUSEOUT, layer, where );
sMouseOverMapArea = NULL;
}
}
catch(...)
{
}
}
//
// CMochaEventCallback
//
void
CMochaHacks::ResetMochaMouse()
{
sMouseOverElement = NULL;
sMouseOverMapArea = NULL;
}
// Returns mocha modifier bitset given mac modifiers.
uint32
CMochaHacks::MochaModifiers(const UInt16 inModifiers)
{
return ((inModifiers & shiftKey) ? EVENT_SHIFT_MASK : 0) |
((inModifiers & controlKey) ? EVENT_CONTROL_MASK : 0) |
((inModifiers & optionKey) ? EVENT_ALT_MASK : 0) |
((inModifiers & cmdKey) ? EVENT_META_MASK : 0);
}
// Returns mocha modifiers by reading the keyboard.
uint32
CMochaHacks::MochaModifiersFromKeyboard(void)
{
union
{
KeyMap asMap;
Byte asBytes[16];
};
::GetKeys(asMap);
return ((asBytes[kShiftKey >> 3] & (1 << (kShiftKey & 0x07))) ? EVENT_SHIFT_MASK : 0) |
((asBytes[kCtlKey >> 3] & (1 << (kCtlKey & 0x07))) ? EVENT_CONTROL_MASK : 0) |
((asBytes[kOptionKey >> 3] & (1 << (kOptionKey & 0x07))) ? EVENT_ALT_MASK : 0) |
((asBytes[kCommandKey >> 3] & (1 << (kCommandKey & 0x07))) ? EVENT_META_MASK : 0);
}
// Returns true if the window is a dependent of another.
// Parameters:
// inContext: the context for this window.
Boolean
CMochaHacks::IsDependent(MWContext* inContext)
{
return (inContext->js_parent != nil);
}
// Add a window as a dependent of another.
// Called in FE_MakeNewWindow.
// Parameters:
// inParent: the parent context.
// inChild: the context for this window which will be made a dependent of the parent.
void
CMochaHacks::AddDependent(MWContext* inParent, MWContext* inChild)
{
// inParent could be a grid context, but dependencies are between windows so find root context.
MWContext* theParentRoot = XP_GetNonGridContext(inParent);
if (theParentRoot != nil && inChild != nil)
{
if (theParentRoot->js_dependent_list == NULL)
theParentRoot->js_dependent_list = XP_ListNew();
if (theParentRoot->js_dependent_list != NULL)
{
XP_ListAddObject(theParentRoot->js_dependent_list, inChild);
inChild->js_parent = theParentRoot;
}
}
}
// Remove dependents of the window.
// Called in destructor for window.
// Parameters:
// inContext: the context for this window.
void
CMochaHacks::RemoveDependents(MWContext* inContext)
{
// FE_DestroyWindow makes this recursive; keep track of how many levels deep we are.
static int recursionLevel = 0;
++recursionLevel;
if (inContext->js_dependent_list)
{
MWContext *depContext;
// destroy windows which are dependent on this window
for (int i = 1; i <= XP_ListCount(inContext->js_dependent_list); i++)
{
depContext = (MWContext *)XP_ListGetObjectNum(inContext->js_dependent_list, i);
FE_DestroyWindow(depContext);
}
XP_ListDestroy(inContext->js_dependent_list);
inContext->js_dependent_list = NULL;
}
--recursionLevel;
// remove self from parent's dependent list but only if we're the window
// at the top of the chain (don't alter lists we're iterating over).
if (recursionLevel == 0 && inContext->js_parent != nil)
{
if (XP_ListCount(inContext->js_parent->js_dependent_list) == 1)
{
// if the last element in the list, destroy the list.
XP_ListDestroy(inContext->js_parent->js_dependent_list);
inContext->js_parent->js_dependent_list = NULL;
}
else XP_ListRemoveObject(inContext->js_parent->js_dependent_list, inContext);
}
}
// Send move event to mocha every time a window or pane is moved.
void
CMochaHacks::SendMoveEvent(MWContext* inContext, int32 inX, int32 inY)
{
JSEvent *event;
event = XP_NEW_ZAP(JSEvent);
if (event)
{
event->type = EVENT_MOVE;
event->x = inX;
event->y = inY;
}
ET_SendEvent(inContext, 0, event, 0, 0);
}
// Send the event specified, with no callback.
void
CMochaHacks::SendEvent(MWContext* inContext, int32 inType, LO_Element* inElement)
{
JSEvent *event;
event = XP_NEW_ZAP(JSEvent);
if (event)
{
event->type = inType;
ET_SendEvent(inContext, inElement, event, 0, 0);
}
}
//
// CMochaEventCallback
//
#ifdef DEBUG
static int sCallbackCount = 0;
#endif
CMochaEventCallback::CMochaEventCallback()
{
#ifdef DEBUG
sCallbackCount++;
#endif
fDummyElement = NULL;
}
CMochaEventCallback::~CMochaEventCallback()
{
#ifdef DEBUG
sCallbackCount--;
#endif
if (fDummyElement != NULL)
XP_FREE( fDummyElement );
}
//
// Plain SendEvent
//
void
CMochaEventCallback::SendEvent(MWContext * context, LO_Element * element, int32 type, CL_Layer* layer, SPoint32 where)
{
// ET_SendEvent now takes a JSEvent struct instead of an int type
JSEvent* event = XP_NEW_ZAP(JSEvent);
if (event)
{
event->type = type;
event->x = where.h;
event->y = where.v;
event->docx = event->x + CL_GetLayerXOrigin(layer);
event->docy = event->y + CL_GetLayerYOrigin(layer);
int32 x_offset, y_offset;
FE_GetWindowOffset(context, &x_offset, &y_offset);
event->screenx = event->docx + x_offset;
event->screeny = event->docy + y_offset;
event->layer_id = LO_GetIdFromLayer(context, layer);
ET_SendEvent( context, element, event, MochaCallback, this);
// PR_Yield(); To speed up processing?
}
}
//
// LO_AnchorData SendEvent
//
void
CMochaEventCallback::SendEvent(MWContext * context, LO_AnchorData * data, int32 type, CL_Layer* layer, SPoint32 where)
{
// Create fake layout element
fDummyElement = XP_NEW_ZAP(LO_Element);
if (fDummyElement)
{
fDummyElement->type = LO_TEXT;
fDummyElement->lo_text.anchor_href = data;
fDummyElement->lo_text.text = data->anchor;
// ET_SendEvent now takes a JSEvent struct instead of an int type
JSEvent* event = XP_NEW_ZAP(JSEvent);
if (event)
{
event->type = type;
event->x = where.h;
event->y = where.v;
event->docx = event->x + CL_GetLayerXOrigin(layer);
event->docy = event->y + CL_GetLayerYOrigin(layer);
int32 x_offset, y_offset;
FE_GetWindowOffset(context, &x_offset, &y_offset);
event->screenx = event->docx + x_offset;
event->screeny = event->docy + y_offset;
event->layer_id = LO_GetIdFromLayer(context, layer);
ET_SendEvent( context, fDummyElement, event, MochaCallback, this);
}
}
}
//
// EventComplete, does nothing
//
void
CMochaEventCallback::Complete(MWContext * /*context*/, LO_Element * /*element*/,
int32 /*type*/, ETEventStatus /*status*/)
{
// EVENT_OK means we should handle the event/
// EVENT_CANCEL, EVENT_PANIC, means mocha has cancelled the click
}
//
// MochaCallback, called by mocha after event is processed
//
void CMochaEventCallback::MochaCallback(MWContext * context, LO_Element * element,
int32 type, void * inCallback, ETEventStatus status)
{
CMochaEventCallback * callback = (CMochaEventCallback *) inCallback;
callback->Complete( context, element, type, status );
delete callback;
}

View File

@@ -1,125 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* macmocha.h
* MacFE mocha hacks
*
*/
#include "structs.h" // mjc
#include "libevent.h"
/*
* static class that encapsulates most of the Macha hacks
*/
class CMochaHacks
{
private:
static LO_Element* sMouseOverElement; // layout element the cursor is over
static MWContext* sMouseOverElementContext; // context associated with sMouseOverElement
static LO_AnchorData* sMouseOverMapArea; // AREA tag the cursor is over
public:
static void ClearSelectionForContext( MWContext* context )
{
if (context == sMouseOverElementContext)
{
sMouseOverElement = NULL;
sMouseOverElementContext = NULL;
sMouseOverMapArea = NULL;
}
}
static void SendOutOfElementEvent(MWContext * winContext, CL_Layer* layer, SPoint32 where); // add layer param 1997-03-02 mjc
static void SendOutOfMapAreaEvent(MWContext * winContext, CL_Layer* layer, SPoint32 where); // add layer param 1997-03-02 mjc
static void ResetMochaMouse();
static Boolean IsMouseOverElement(LO_Element* inElement)
{ return inElement == sMouseOverElement; }
static Boolean IsMouseOverMapArea(LO_AnchorData* inAnchorData)
{ return inAnchorData == sMouseOverMapArea; }
static void SetMouseOverElement(LO_Element* inElement, MWContext* inElementContext = NULL)
{
sMouseOverElement = inElement;
sMouseOverElementContext = inElementContext;
}
static void RemoveReferenceToMouseOverElementContext(MWContext *context)
{
if (sMouseOverElementContext == context)
sMouseOverElementContext = NULL;
}
static void SetMouseOverMapArea(LO_AnchorData* inAnchorData)
{ sMouseOverMapArea = inAnchorData; }
static LO_Element* GetMouseOverElement()
{ return sMouseOverElement; }
static LO_AnchorData* GetMouseOverMapArea()
{ return sMouseOverMapArea; }
static uint32 MochaModifiers(const UInt16 inModifiers);
static uint32 MochaModifiersFromKeyboard(void);
// manage windows declared as dependent in javascript
static Boolean IsDependent(MWContext* inContext);
static void AddDependent(MWContext* inParent, MWContext* inChild);
static void RemoveDependents(MWContext* inContext);
// Whenever a window or frame moves or resizes send an event to javascript
static void SendMoveEvent(MWContext* inContext, int32 inX, int32 inY);
static void SendEvent(MWContext* inContext, int32 inType, LO_Element* inElement = nil);
// Send navigation events - currently not cancellable
static void SendBackEvent(MWContext* inContext)
{ SendEvent(inContext, EVENT_BACK); }
static void SendForwardEvent(MWContext* inContext)
{ SendEvent(inContext, EVENT_FORWARD); }
};
/*
* CMochaEventCallback
* class that encapsulates sending of mocha events
* Subclasses should override EventComplete
*/
class CMochaEventCallback {
public:
// Constructors
CMochaEventCallback();
virtual ~CMochaEventCallback();
// Mocha interface
void SendEvent(MWContext * context, LO_Element * element, int32 type, CL_Layer* layer, SPoint32 where);
void SendEvent(MWContext * context, LO_AnchorData * data, int32 type, CL_Layer* layer, SPoint32 where);
// MochaCallback calls EventComplete. You'll be deleted after this call
virtual void Complete(MWContext * context, LO_Element * element,
int32 type, ETEventStatus status);
static void MochaCallback(MWContext * context, LO_Element * element,
int32 type, void * inCallback, ETEventStatus status);
private:
// Old Mocha calls used to accept either LO_Element, or LO_AnchorData
// New ones only accept LO_Element, so sometimes we need to create/dispose
// dummy layout elements. This is encapsulated in this class
LO_Element * fDummyElement;
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,520 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CNSContext.h
#pragma once
#include <LBroadcaster.h>
#include <LSharable.h>
#include "structs.h"
#include "cstring.h"
class CHTMLView;
class CNSContext;
inline CNSContext* ExtractNSContext(MWContext* inContext)
{ return inContext->fe.newContext; }
inline const CNSContext* ExtractConstNSContext(const MWContext* inContext)
{ return inContext->fe.newContext; }
inline CHTMLView* ExtractHyperView(const MWContext* inContext)
{ return inContext->fe.newView; }
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// This enumeration contains all of the possible broadcast messages that
// a CNSContext can give.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
enum {
// These messages notify thge clients about the layout state.
msg_NSCDocTitleChanged = 'DTCG', // cstring* theNewTitle
msg_NSCLayoutNewDocument = 'LOND', // URL_Struct* theURL
msg_NSCFinishedLayout = 'FNLO', // < none >
// These messages notify thge clients about the repagination state.
msg_NSCPEmptyRepagination = 'NLPG', // < none >
msg_NSCPAboutToRepaginate = 'ABPG', // < none >
msg_NSCPEditorRepaginate = 'EDPG', // < none >
// These messages are key to the whole process of loading a URL.
// The start loading and all connections complete notifications are
// guaranteed to be symmetrical.
msg_NSCStartLoadURL = 'SLUB', // URL_Struct* theURL
msg_NSCConfirmLoadNewURL = 'CLNU', // Boolean*
msg_NSCAllConnectionsComplete = 'ACCP', // < none >
// A message to all context clients that this grid context is about to die.
// Clients should clean up and remove their shared references to the context
// upon receiving this message.
msg_NSCGridContextPreDispose = 'GCPD', // Boolean* isSavingHistory
// A message to all context clients that a child grid context has been
// created or disposed. Clients will want to know if a grid is created
// so that they can add themselves as a listener or add a shared reference
// to the new context.
msg_NSCGridContextCreated = 'GCCR', // CNSContext* new grid
msg_NSCGridContextDisposed = 'GCDP', // < none >
// Progress notifications, like the url loading notifications are
// guaranteed to be symmetric. There will always be one begin,
// n updates, and one end notification.
msg_NSCProgressBegin = 'PGST', // CContextProgress*
msg_NSCProgressUpdate = 'PGUP', // CContextProgress*
msg_NSCProgressEnd = 'PGED', // CContextProgress*
// These are progress messages that are not guaranteed to be sent
// between bind and end progress notifications.
// msg_NSCProgressMessageChanged = 'PGMC', // cstring* theNewMessage
msg_NSCProgressMessageChanged = 'PGMC', // const char* theNewMessage
msg_NSCProgressPercentChanged = 'PGPC' // Int32* theNewPercent
};
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// The progress of a particular url loading operation is encapsulated in the
// following object. Accessors are provided in the context to support this.
// This object is only instantiated during the actual load itself, begining
// with msg_NSCStartLoadURL notification and ending with the
// msg_NSCAllConnectionsComplete notification. At all other (inactive) times
// the accessors for this object will return NULL. See the accessor comments
// for further information.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
class CContextProgress : public LSharable
{
public:
CContextProgress();
Int32 mTotal; // Total bytes tracked
Int32 mRead; // How many have been read
Int32 mUnknownCount; // How many connections of the unknown length do we have
Int32 mPercent; // Percent complete
Int32 mInitCount;
Uint32 mStartTime;
cstring mAction;
cstring mMessage;
cstring mComment;
};
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
class CNSContext : public LBroadcaster, public LSharable
{
friend class CNSContextCallbacks;
friend class CPlainTextConversionContext;
public:
CNSContext(MWContextType inType);
CNSContext(const CNSContext& inOriginal);
virtual ~CNSContext();
virtual void NoMoreUsers();
operator MWContext*();
operator const MWContext*() const;
operator MWContext&();
operator const MWContext&() const;
virtual CContextProgress* GetContextProgress();
protected:
virtual void SetContextProgress(CContextProgress* inProgress);
public:
void EnsureContextProgress();
virtual cstring GetDescriptor() const;
virtual void SetDescriptor(const char* inDescriptor);
virtual Boolean IsCloneRequired() const;
virtual void SetRequiresClone(Boolean inClone);
virtual CContextProgress* GetCurrentProgressStats();
virtual void UpdateCurrentProgressStats();
virtual void WaitWhileBusy();
// FIX ME!!! ACCESSOR for unique ID
// CHARACTER SET ACCESSORS
void InitDefaultCSID();
virtual void SetDefaultCSID(Int16 inDefaultCSID);
virtual Int16 GetDefaultCSID() const;
virtual void SetDocCSID(Int16 inDocCSID);
virtual Int16 GetDocCSID() const;
virtual void SetWinCSID(Int16 inWinCSID);
virtual Int16 GetWinCSID() const;
virtual Int16 GetWCSIDFromDocCSID(
Int16 inDocCSID);
class IndexOutOfRangeException { };
virtual History_entry* GetCurrentHistoryEntry();
virtual Int32 GetHistoryListCount();
virtual cstring* GetHistoryEntryTitleByIndex(Int32 inIndex); // one-based index
virtual Int32 GetIndexOfCurrentHistoryEntry();
virtual void GetHistoryURLByIndex(cstring& outURL, Int32 inIndex); // one-based index
// URL MANIPULATION
virtual cstring GetCurrentURL();
virtual void SwitchLoadURL(
URL_Struct* inURL,
FO_Present_Types inOutputFormat);
virtual void ImmediateLoadURL(
URL_Struct* inURL,
FO_Present_Types inOutputFormat);
// Need to make Alert public because we need to be able to call it from FE_Alert
virtual void Alert(
const char* inAlertText);
// STATUS
virtual const char* GetDefaultStatus() const;
virtual void ClearDefaultStatus();
virtual void SetStatus(const char* inStatus);
// STUFF
virtual void CompleteLoad(URL_Struct* inURL, int inStatus);
virtual void ClearMWContextViewPtr();
virtual void CopyListenersToContext(CNSContext* aSubContext); // used when spawning grid contexts
protected:
// CALLBACK IMPLEMENTATION
virtual MWContext* CreateNewDocWindow(
URL_Struct* inURL);
virtual void LayoutNewDocument(
URL_Struct* inURL,
Int32* inWidth,
Int32* inHeight,
Int32* inMarginWidth,
Int32* inMarginHeight);
virtual void SetDocTitle(
char* inTitle);
virtual void FinishedLayout();
virtual char* TranslateISOText(
int inCharset,
char* inISOText);
virtual int GetTextInfo(
LO_TextStruct* inText,
LO_TextInfo* inTextInfo);
virtual int MeasureText(
LO_TextStruct* inText,
short* outCharLocs);
virtual void GetEmbedSize(
LO_EmbedStruct* inEmbedStruct,
NET_ReloadMethod inReloadMethod);
virtual void GetJavaAppSize(
LO_JavaAppStruct* inJavaAppStruct,
NET_ReloadMethod inReloadMethod);
virtual void GetFormElementInfo(
LO_FormElementStruct* inElement);
virtual void GetFormElementValue(
LO_FormElementStruct* inElement,
XP_Bool inHide);
virtual void ResetFormElement(
LO_FormElementStruct* inElement);
virtual void SetFormElementToggle(
LO_FormElementStruct* inElement,
XP_Bool inToggle);
virtual void FreeEmbedElement(
LO_EmbedStruct* inEmbedStruct);
virtual void CreateEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void SaveEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void RestoreEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void DestroyEmbedWindow(
NPEmbeddedApp* inEmbeddedApp);
virtual void FreeJavaAppElement(
LJAppletData* inAppletData);
virtual void HideJavaAppElement(
LJAppletData* inAppletData);
virtual void FreeEdgeElement(
LO_EdgeStruct* inEdgeStruct);
virtual void FormTextIsSubmit(
LO_FormElementStruct* inElement);
virtual void DisplaySubtext(
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG);
virtual void DisplayText(
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG);
virtual void DisplayEmbed(
int inLocation,
LO_EmbedStruct* inEmbedStruct);
virtual void DisplayJavaApp(
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
virtual void DisplayEdge (
int inLocation,
LO_EdgeStruct* inEdgeStruct);
virtual void DisplayTable(
int inLocation,
LO_TableStruct* inTableStruct);
virtual void DisplayCell(
int inLocation,
LO_CellStruct* inCellStruct);
virtual void InvalidateEntireTableOrCell(
LO_Element* inElement);
virtual void DisplayAddRowOrColBorder(
XP_Rect* inRect,
XP_Bool inDoErase);
virtual void DisplaySubDoc(
int inLocation,
LO_SubDocStruct* inSubdocStruct);
virtual void DisplayLineFeed(
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG);
virtual void DisplayHR(
int inLocation,
LO_HorizRuleStruct* inRuleStruct);
virtual void DisplayBullet(
int inLocation,
LO_BullettStruct* inBullettStruct);
virtual void DisplayFormElement(
int inLocation,
LO_FormElementStruct* inFormElement);
virtual void DisplayBorder(
int inLocation,
int inX,
int inY,
int inWidth,
int inHeight,
int inBW,
LO_Color* inColor,
LO_LineStyle inStyle);
virtual void UpdateEnableStates();
virtual void DisplayFeedback(
int inLocation,
LO_Element* inElement);
virtual void ClearView(
int inWhich);
virtual void SetDocDimension(
int inLocation,
Int32 inWidth,
Int32 inLength);
virtual void SetDocPosition(
int inLocation,
Int32 inX,
Int32 inY);
virtual void GetDocPosition(
int inLocation,
Int32* outX,
Int32* outY);
virtual void BeginPreSection();
virtual void EndPreSection();
virtual void SetProgressBarPercent(
Int32 inPercent);
virtual void SetBackgroundColor(
Uint8 inRed,
Uint8 inGreen,
Uint8 inBlue);
public:
virtual void Progress(
const char* inMessageText);
protected:
virtual void SetCallNetlibAllTheTime();
virtual void ClearCallNetlibAllTheTime();
virtual void GraphProgressInit(
URL_Struct* inURL,
Int32 inContentLength);
virtual void GraphProgressDestroy(
URL_Struct* inURL,
Int32 inContentLength,
Int32 inTotalRead);
virtual void GraphProgress(
URL_Struct* inURL,
Int32 inBytesReceived,
Int32 inBytesSinceLast,
Int32 inContentLength);
virtual XP_Bool UseFancyFTP();
virtual XP_Bool UseFancyNewsgroupListing();
virtual int FileSortMethod();
virtual XP_Bool ShowAllNewsArticles();
virtual XP_Bool Confirm(
const char* inMessage);
virtual char* Prompt(
const char* inMessage,
const char* inDefaultText);
virtual char* PromptWithCaption(
const char* inCaption,
const char* inMessage,
const char* inDefaultText);
virtual XP_Bool PromptUsernameAndPassword(
const char* inMessage,
char** outUserName,
char** outPassword);
virtual char* PromptPassword(
const char* inMessage);
virtual void EnableClicking();
virtual void AllConnectionsComplete();
virtual void EraseBackground(
int inLocation,
Int32 inX,
Int32 inY,
Uint32 inWidth,
Uint32 inHieght,
LO_Color* inColor);
virtual void SetDrawable(
CL_Drawable* inDrawable);
virtual void GetTextFrame(
LO_TextStruct* inTextStruct,
Int32 inStartPos,
Int32 inEndPos,
XP_Rect* outFrame);
virtual void GetDefaultBackgroundColor(
LO_Color* outColor) const;
virtual void DrawJavaApp(
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
virtual void HandleClippingView(
struct LJAppletData *appletD,
int x,
int y,
int width,
int height);
public:
static UInt32 sNSCWindowID; // Unique ID, incremented for each context
UInt32 fNSCWindowID; // ID of this window
Int32 fNSCProgressID; //
Int32 GetTransactionID() { return fNSCProgressID; }
Int32 GetContextUniqueID() { return fNSCWindowID; }
// Window ID. Used to identify the context
// There are listeners that listen to several contexts (eg, in mail windows).
// This works by reference counting, and such listeners assume calls to
// SwitchLoadURL and AllConnectionsComplete are balanced. Each context must
// therefore ensure that they are, even if it is done artificially.
Int32 mLoadRefCount;
protected:
MWContext mContext;
Int16 mDefaultCSID;
Boolean mRequiresClone;
CContextProgress* mProgress;
};
inline CNSContext::operator MWContext*()
{ return &mContext; };
inline CNSContext::operator const MWContext*() const
{ return &mContext; };
inline CNSContext::operator MWContext&()
{ return mContext; };
inline CNSContext::operator const MWContext&() const
{ return mContext; };

View File

@@ -1,745 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CNSContextCallbacks.cp
#include "CNSContextCallbacks.h"
#include "CNSContext.h"
CNSContextCallbacks* CNSContextCallbacks::sContextCallbacks = NULL; // singleton class
CNSContextCallbacks::CNSContextCallbacks()
{
#define MAKE_FE_FUNCS_PREFIX(f) CNSContextCallbacks::##f
#define MAKE_FE_FUNCS_ASSIGN mCallbacks.
#include "mk_cx_fn.h"
Assert_(sContextCallbacks == NULL);
sContextCallbacks = this;
}
CNSContextCallbacks::~CNSContextCallbacks()
{
sContextCallbacks = NULL;
}
MWContext* CNSContextCallbacks::CreateNewDocWindow(
MWContext* inContext,
URL_Struct* inURL)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->CreateNewDocWindow(inURL);
}
void CNSContextCallbacks::LayoutNewDocument(
MWContext* inContext,
URL_Struct* inURL,
int32* inWidth,
int32* inHeight,
int32* inMarginWidth,
int32* inMarginHeight)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->LayoutNewDocument(inURL, inWidth, inHeight, inMarginWidth, inMarginHeight);
}
void CNSContextCallbacks::SetDocTitle(
MWContext* inContext,
char* inTitle)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetDocTitle(inTitle);
}
void CNSContextCallbacks::FinishedLayout(MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->FinishedLayout();
}
char* CNSContextCallbacks::TranslateISOText(
MWContext* inContext,
int inCharset,
char* inISOText)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->TranslateISOText(inCharset, inISOText);
}
int CNSContextCallbacks::GetTextInfo(
MWContext* inContext,
LO_TextStruct* inText,
LO_TextInfo* inTextInfo)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->GetTextInfo(inText, inTextInfo);
}
int CNSContextCallbacks::MeasureText(
MWContext* inContext,
LO_TextStruct* inText,
short* outCharLocs)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->MeasureText(inText, outCharLocs);
}
void CNSContextCallbacks::GetEmbedSize(
MWContext* inContext,
LO_EmbedStruct* inEmbedStruct,
NET_ReloadMethod inReloadMethod)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetEmbedSize(inEmbedStruct, inReloadMethod);
}
void CNSContextCallbacks::GetJavaAppSize(
MWContext* inContext,
LO_JavaAppStruct* inJavaAppStruct,
NET_ReloadMethod inReloadMethod)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetJavaAppSize(inJavaAppStruct, inReloadMethod);
}
void CNSContextCallbacks::GetFormElementInfo(
MWContext* inContext,
LO_FormElementStruct* inElement)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetFormElementInfo(inElement);
}
void CNSContextCallbacks::GetFormElementValue(
MWContext* inContext,
LO_FormElementStruct* inElement,
XP_Bool inHide)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetFormElementValue(inElement, inHide);
}
void CNSContextCallbacks::ResetFormElement(
MWContext* inContext,
LO_FormElementStruct* inElement)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->ResetFormElement(inElement);
}
void CNSContextCallbacks::SetFormElementToggle(
MWContext* inContext,
LO_FormElementStruct* inElement,
XP_Bool inToggle)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetFormElementToggle(inElement, inToggle);
}
void CNSContextCallbacks::FreeEmbedElement(
MWContext* inContext,
LO_EmbedStruct* inEmbedStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->FreeEmbedElement(inEmbedStruct);
}
void CNSContextCallbacks::CreateEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->CreateEmbedWindow(inEmbeddedApp);
}
void CNSContextCallbacks::SaveEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SaveEmbedWindow(inEmbeddedApp);
}
void CNSContextCallbacks::RestoreEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->RestoreEmbedWindow(inEmbeddedApp);
}
void CNSContextCallbacks::DestroyEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DestroyEmbedWindow(inEmbeddedApp);
}
void CNSContextCallbacks::FreeJavaAppElement(
MWContext* inContext,
LJAppletData* inAppletData)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->FreeJavaAppElement(inAppletData);
}
void CNSContextCallbacks::HideJavaAppElement(
MWContext* inContext,
LJAppletData* inAppletData)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->HideJavaAppElement(inAppletData);
}
void CNSContextCallbacks::FreeEdgeElement(
MWContext* inContext,
LO_EdgeStruct* inEdgeStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->FreeEdgeElement(inEdgeStruct);
}
void CNSContextCallbacks::FormTextIsSubmit(
MWContext* inContext,
LO_FormElementStruct* inElement)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->FormTextIsSubmit(inElement);
}
void CNSContextCallbacks::DisplaySubtext(
MWContext* inContext,
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplaySubtext(inLocation, inText, inStartPos, inEndPos, inNeedBG);
}
void CNSContextCallbacks::DisplayText(
MWContext* inContext,
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayText(inLocation, inText, inNeedBG);
}
void CNSContextCallbacks::DisplayEmbed(
MWContext* inContext,
int inLocation,
LO_EmbedStruct* inEmbedStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayEmbed(inLocation, inEmbedStruct);
}
void CNSContextCallbacks::DisplayJavaApp(
MWContext* inContext,
int inLocation,
LO_JavaAppStruct* inJavaAppStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayJavaApp(inLocation, inJavaAppStruct);
}
void CNSContextCallbacks::DisplayEdge(
MWContext* inContext,
int inLocation,
LO_EdgeStruct* inEdgeStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayEdge(inLocation, inEdgeStruct);
}
void CNSContextCallbacks::DisplayTable(
MWContext* inContext,
int inLocation,
LO_TableStruct* inTableStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayTable(inLocation, inTableStruct);
}
void CNSContextCallbacks::DisplayCell(
MWContext* inContext,
int inLocation,
LO_CellStruct* inCellStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayCell(inLocation, inCellStruct);
}
void CNSContextCallbacks::InvalidateEntireTableOrCell(
MWContext* inContext,
LO_Element* inElement)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
if (inElement)
theNSContext->InvalidateEntireTableOrCell(inElement);
}
void CNSContextCallbacks::DisplayAddRowOrColBorder(
MWContext* inContext,
XP_Rect* inRect,
XP_Bool inDoErase)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayAddRowOrColBorder(inRect, inDoErase);
}
void CNSContextCallbacks::DisplaySubDoc(
MWContext* inContext,
int inLocation,
LO_SubDocStruct* inSubdocStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplaySubDoc(inLocation, inSubdocStruct);
}
void CNSContextCallbacks::DisplayLineFeed(
MWContext* inContext,
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayLineFeed(inLocation, inLinefeedStruct, inNeedBG);
}
void CNSContextCallbacks::DisplayHR(
MWContext* inContext,
int inLocation,
LO_HorizRuleStruct* inRuleStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayHR(inLocation, inRuleStruct);
}
void CNSContextCallbacks::DisplayBullet(
MWContext* inContext,
int inLocation,
LO_BullettStruct* inBullettStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayBullet(inLocation, inBullettStruct);
}
void CNSContextCallbacks::DisplayFormElement(
MWContext* inContext,
int inLocation,
LO_FormElementStruct* inFormElement)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayFormElement(inLocation, inFormElement);
}
void CNSContextCallbacks::DisplayBorder(
MWContext* inContext,
int inLocation,
int inX,
int inY,
int inWidth,
int inHeight,
int inBW,
LO_Color* inColor,
LO_LineStyle inStyle)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayBorder(inLocation, inX, inY, inWidth, inHeight, inBW, inColor, inStyle);
}
void CNSContextCallbacks::UpdateEnableStates( MWContext* inContext )
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->UpdateEnableStates();
}
void CNSContextCallbacks::DisplayFeedback(
MWContext* inContext,
int inLocation,
LO_Element* inElement)
{
// bail out if non-editor context
// this function is to be used only for the editor
if ( !inContext->is_editor )
return;
// called even if the element is not selected
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DisplayFeedback(inLocation, inElement);
}
void CNSContextCallbacks::ClearView(
MWContext* inContext,
int inWhich)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->ClearView(inWhich);
}
void CNSContextCallbacks::SetDocDimension(
MWContext* inContext,
int inLocation,
Int32 inWidth,
Int32 inLength)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetDocDimension(inLocation, inWidth, inLength);
}
void CNSContextCallbacks::SetDocPosition(
MWContext* inContext,
int inLocation,
Int32 inX,
Int32 inY)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetDocPosition(inLocation, inX, inY);
}
void CNSContextCallbacks::GetDocPosition(
MWContext* inContext,
int inLocation,
Int32* outX,
Int32* outY)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetDocPosition(inLocation, outX, outY);
}
void CNSContextCallbacks::BeginPreSection(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->BeginPreSection();
}
void CNSContextCallbacks::EndPreSection(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->EndPreSection();
}
void CNSContextCallbacks::SetProgressBarPercent(
MWContext* inContext,
Int32 inPercent)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetProgressBarPercent(inPercent);
}
void CNSContextCallbacks::SetBackgroundColor(
MWContext* inContext,
Uint8 inRed,
Uint8 inGreen,
Uint8 inBlue)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetBackgroundColor(inRed, inGreen, inBlue);
}
void CNSContextCallbacks::Progress(
MWContext* inContext,
const char* inMessageText)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->Progress(inMessageText);
}
void CNSContextCallbacks::Alert(
MWContext* inContext,
const char* inAlertText)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->Alert(inAlertText);
}
void CNSContextCallbacks::SetCallNetlibAllTheTime(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetCallNetlibAllTheTime();
}
void CNSContextCallbacks::ClearCallNetlibAllTheTime(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->ClearCallNetlibAllTheTime();
}
void CNSContextCallbacks::GraphProgressInit(
MWContext* inContext,
URL_Struct* inURL,
Int32 inContentLength)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GraphProgressInit(inURL, inContentLength);
}
void CNSContextCallbacks::GraphProgressDestroy(
MWContext* inContext,
URL_Struct* inURL,
Int32 inContentLength,
Int32 inTotalRead)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GraphProgressDestroy(inURL, inContentLength, inTotalRead);
}
void CNSContextCallbacks::GraphProgress(
MWContext* inContext,
URL_Struct* inURL,
Int32 inBytesReceived,
Int32 inBytesSinceLast,
Int32 inContentLength)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GraphProgress(inURL, inBytesReceived, inBytesSinceLast, inContentLength);
}
XP_Bool CNSContextCallbacks::UseFancyFTP(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->UseFancyFTP();
}
XP_Bool CNSContextCallbacks::UseFancyNewsgroupListing(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->UseFancyNewsgroupListing();
}
int CNSContextCallbacks::FileSortMethod(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->FileSortMethod();
}
XP_Bool CNSContextCallbacks::ShowAllNewsArticles(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->ShowAllNewsArticles();
}
XP_Bool CNSContextCallbacks::Confirm(
MWContext* inContext,
const char* inMessage)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->Confirm(inMessage);
}
char* CNSContextCallbacks::Prompt(
MWContext* inContext,
const char* inMessage,
const char* inDefaultText)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->Prompt(inMessage, inDefaultText);
}
char* CNSContextCallbacks::PromptWithCaption(
MWContext* inContext,
const char* inCaption,
const char* inMessage,
const char* inDefaultText)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->PromptWithCaption(inCaption, inMessage, inDefaultText);
}
XP_Bool CNSContextCallbacks::PromptUsernameAndPassword(
MWContext* inContext,
const char* inMessage,
char** outUserName,
char** outPassword)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->PromptUsernameAndPassword(inMessage, outUserName, outPassword);
}
char* CNSContextCallbacks::PromptPassword(
MWContext* inContext,
const char* inMessage)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
return theNSContext->PromptPassword(inMessage);
}
void CNSContextCallbacks::EnableClicking(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->EnableClicking();
}
void CNSContextCallbacks::AllConnectionsComplete(
MWContext* inContext)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
if (theNSContext)
theNSContext->AllConnectionsComplete();
}
void CNSContextCallbacks::EraseBackground(
MWContext* inContext,
int inLocation,
Int32 inX,
Int32 inY,
Uint32 inWidth,
Uint32 inHeight,
LO_Color* inColor)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->EraseBackground(inLocation, inX, inY, inWidth, inHeight, inColor);
}
void CNSContextCallbacks::SetDrawable(
MWContext* inContext,
CL_Drawable* inDrawable)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->SetDrawable(inDrawable);
}
void CNSContextCallbacks::GetTextFrame(
MWContext* inContext,
LO_TextStruct* inTextStruct,
Int32 inStartPos,
Int32 inEndPos,
XP_Rect* outFrame)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetTextFrame(inTextStruct, inStartPos, inEndPos, outFrame);
}
void CNSContextCallbacks::GetDefaultBackgroundColor(
MWContext* inContext,
LO_Color* outColor)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->GetDefaultBackgroundColor(outColor);
}
void CNSContextCallbacks::DrawJavaApp(
MWContext* inContext,
int inLocation,
LO_JavaAppStruct* inJavaAppStruct)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->DrawJavaApp(inLocation, inJavaAppStruct);
}
void CNSContextCallbacks::HandleClippingView(
MWContext* inContext,
struct LJAppletData *appletD,
int x,
int y,
int width,
int height)
{
CNSContext* theNSContext = ExtractNSContext(inContext);
Assert_(theNSContext != NULL);
theNSContext->HandleClippingView(appletD, x, y, width, height);
}

View File

@@ -1,393 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CNSContextCallbacks.h
#pragma once
#include "ntypes.h"
#include "structs.h"
#include "ctxtfunc.h"
class CNSContext;
class CNSContextCallbacks
{
public:
static CNSContextCallbacks* GetContextCallbacks(void); // singleton class accessor
CNSContextCallbacks();
virtual ~CNSContextCallbacks();
ContextFuncs& GetInternalCallbacks(void);
protected:
static MWContext* CreateNewDocWindow(
MWContext* inContext,
URL_Struct* inURL);
static void LayoutNewDocument(
MWContext* inContext,
URL_Struct* inURL,
Int32* inWidth,
Int32* inHeight,
Int32* inMarginWidth,
Int32* inMarginHeight);
static void SetDocTitle(
MWContext* inContext,
char* inTitle);
static void FinishedLayout(
MWContext* inContext);
static char* TranslateISOText(
MWContext* inContext,
int inCharset,
char* inISOText);
static int GetTextInfo(
MWContext* inContext,
LO_TextStruct* inText,
LO_TextInfo* inTextInfo);
static int MeasureText(
MWContext* inContext,
LO_TextStruct* inText,
short* outCharLocs);
static void GetEmbedSize(
MWContext* inContext,
LO_EmbedStruct* inEmbedStruct,
NET_ReloadMethod inReloadMethod);
static void GetJavaAppSize(
MWContext* inContext,
LO_JavaAppStruct* inJavaAppStruct,
NET_ReloadMethod inReloadMethod);
static void GetFormElementInfo(
MWContext* inContext,
LO_FormElementStruct* inElement);
static void GetFormElementValue(
MWContext* inContext,
LO_FormElementStruct* inElement,
XP_Bool inHide);
static void ResetFormElement(
MWContext* inContext,
LO_FormElementStruct* inElement);
static void SetFormElementToggle(
MWContext* inContext,
LO_FormElementStruct* inElement,
XP_Bool inToggle);
static void FreeEmbedElement(
MWContext* inContext,
LO_EmbedStruct* inEmbedStruct);
static void CreateEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp);
static void SaveEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp);
static void RestoreEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp);
static void DestroyEmbedWindow(
MWContext* inContext,
NPEmbeddedApp* inEmbeddedApp);
static void FreeJavaAppElement(
MWContext* inContext,
LJAppletData* inAppletData);
static void HideJavaAppElement(
MWContext* inContext,
LJAppletData* inAppletData);
static void FreeEdgeElement(
MWContext* inContext,
LO_EdgeStruct* inEdgeStruct);
static void FormTextIsSubmit(
MWContext* inContext,
LO_FormElementStruct* inElement);
static void DisplaySubtext(
MWContext* inContext,
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG);
static void DisplayText(
MWContext* inContext,
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG);
static void DisplayEmbed(
MWContext* inContext,
int inLocation,
LO_EmbedStruct* inEmbedStruct);
static void DisplayJavaApp(
MWContext* inContext,
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
static void DisplayEdge (
MWContext* inContext,
int inLocation,
LO_EdgeStruct* inEdgeStruct);
static void DisplayTable(
MWContext* inContext,
int inLocation,
LO_TableStruct* inTableStruct);
static void DisplayCell(
MWContext* inContext,
int inLocation,
LO_CellStruct* inCellStruct);
static void InvalidateEntireTableOrCell(
MWContext* inContext,
LO_Element* inElement);
static void DisplayAddRowOrColBorder(
MWContext* inContext,
XP_Rect* inRect,
XP_Bool inErase);
static void DisplaySubDoc(
MWContext* inContext,
int inLocation,
LO_SubDocStruct* inSubdocStruct);
static void DisplayLineFeed(
MWContext* inContext,
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG);
static void DisplayHR(
MWContext* inContext,
int inLocation,
LO_HorizRuleStruct* inRuleStruct);
static void DisplayBullet(
MWContext* inContext,
int inLocation,
LO_BullettStruct* inBullettStruct);
static void DisplayFormElement(
MWContext* inContext,
int inLocation,
LO_FormElementStruct* inFormElement);
static void DisplayBorder(
MWContext* inContext,
int inLocation,
int inX,
int inY,
int inWidth,
int inHeight,
int inBW,
LO_Color* inColor,
LO_LineStyle inStyle);
static void UpdateEnableStates(
MWContext* inContext);
static void DisplayFeedback(
MWContext* inContext,
int inLocation,
LO_Element* inElement);
static void ClearView(
MWContext* inContext,
int inWhich);
static void SetDocDimension(
MWContext* inContext,
int inLocation,
Int32 inWidth,
Int32 inLength);
static void SetDocPosition(
MWContext* inContext,
int inLocation,
Int32 inX,
Int32 inY);
static void GetDocPosition(
MWContext* inContext,
int inLocation,
Int32* outX,
Int32* outY);
static void BeginPreSection(
MWContext* inContext);
static void EndPreSection(
MWContext* inContext);
static void SetProgressBarPercent(
MWContext* inContext,
Int32 inPercent);
static void SetBackgroundColor(
MWContext* inContext,
Uint8 inRed,
Uint8 inGreen,
Uint8 inBlue);
static void Progress(
MWContext* inContext,
const char* inMessageText);
static void Alert(
MWContext* inContext,
const char* inAlertText);
static void SetCallNetlibAllTheTime(
MWContext* inContext);
static void ClearCallNetlibAllTheTime(
MWContext* inContext);
static void GraphProgressInit(
MWContext* inContext,
URL_Struct* inURL,
Int32 inContentLength);
static void GraphProgressDestroy(
MWContext* inContext,
URL_Struct* inURL,
Int32 inContentLength,
Int32 inTotalRead);
static void GraphProgress(
MWContext* inContext,
URL_Struct* inURL,
Int32 inBytesReceived,
Int32 inBytesSinceLast,
Int32 inContentLength);
static XP_Bool UseFancyFTP(
MWContext* inContext);
static XP_Bool UseFancyNewsgroupListing(
MWContext* inContext);
static int FileSortMethod(
MWContext* inContext);
static XP_Bool ShowAllNewsArticles(
MWContext* inContext);
static XP_Bool Confirm(
MWContext* inContext,
const char* inMessage);
static char* PromptWithCaption(
MWContext* inContext,
const char* inCaption,
const char* inMessage,
const char* inDefaultText);
static char* Prompt(
MWContext* inContext,
const char* inMessage,
const char* inDefaultText);
static XP_Bool PromptUsernameAndPassword(
MWContext* inContext,
const char* inMessage,
char** outUserName,
char** outPassword);
static char* PromptPassword(
MWContext* inContext,
const char* inMessage);
static void EnableClicking(
MWContext* inContext);
static void AllConnectionsComplete(
MWContext* inContext);
static void EraseBackground(
MWContext* inContext,
int inLocation,
Int32 inX,
Int32 inY,
Uint32 inWidth,
Uint32 inHeight,
LO_Color* inColor);
static void SetDrawable(
MWContext* inContext,
CL_Drawable* inDrawable);
static void GetTextFrame(
MWContext* inContext,
LO_TextStruct* inTextStruct,
Int32 inStartPos,
Int32 inEndPos,
XP_Rect* outFrame);
static void GetDefaultBackgroundColor(
MWContext* inContext,
LO_Color* outColor);
static void DrawJavaApp(
MWContext* inContext,
int inLocation,
LO_JavaAppStruct* inJavaAppStruct);
static void HandleClippingView(
MWContext* inContext,
struct LJAppletData *appletD,
int x,
int y,
int width,
int height);
ContextFuncs mCallbacks;
static CNSContextCallbacks* sContextCallbacks; // singleton class
};
inline _ContextFuncs& CNSContextCallbacks::GetInternalCallbacks(void)
{ return mCallbacks; }
inline CNSContextCallbacks* CNSContextCallbacks::GetContextCallbacks(void)
{ return sContextCallbacks; }

View File

@@ -1,252 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CPlainTextConversionContext.cp
// This might seem like a lot of work to go around the code in ns/lib/xlate/text.c,
// but doing this allows us not to have to put if (inContext == NULL) inside
// CNSContextCallbacks.cp; and by calling the TXFE_* functions from the overridden
// methods, we pickup any modifcations made for free.
//#include <yvals.h>
#include "CPlainTextConversionContext.h"
#include "xlate.h"
//_EXTERN_C
__extern_c
// prototypes for text.c functions
extern void TXFE_DisplayTable(MWContext *cx, int iLoc, LO_TableStruct *table);
extern void TXFE_DisplayLineFeed(MWContext *cx, int iLocation, LO_LinefeedStruct *line_feed, XP_Bool notused);
extern void TXFE_DisplayHR(MWContext *cx, int iLocation , LO_HorizRuleStruct *HR);
extern char *TXFE_TranslateISOText(MWContext *cx, int charset, char *ISO_Text);
extern void TXFE_DisplayBullet(MWContext *cx, int iLocation, LO_BullettStruct *bullet);
extern void TXFE_FinishedLayout(MWContext *cx);
extern void TXFE_AllConnectionsComplete(MWContext *cx);
extern void TXFE_DisplaySubtext(MWContext *cx, int iLocation, LO_TextStruct *text,
int32 start_pos, int32 end_pos, XP_Bool notused);
extern void TXFE_DisplayText(MWContext *cx, int iLocation, LO_TextStruct *text, XP_Bool needbg);
extern void TXFE_DisplaySubDoc(MWContext *cx, int iLocation, LO_SubDocStruct *subdoc_struct);
extern int TXFE_GetTextInfo(MWContext *cx, LO_TextStruct *text, LO_TextInfo *text_info);
extern void TXFE_LayoutNewDocument(MWContext *cx, URL_Struct *url, int32 *w, int32 *h, int32* mw, int32* mh);
// These are here because the backend files are .c files, which are only
// run through the C compiler. Thus we need to create and destroy the
// CPlainTextConversionContext from a .cp file
MWContext* CreatePlainTextConversionContext(MWContext* inUIContext);
void DisposePlainTextConversionContext(MWContext* inContext);
__end_extern_c
#pragma mark --- CALLBACKS ---
MWContext* CreatePlainTextConversionContext(MWContext* inUIContext)
{
try {
CPlainTextConversionContext* theContext = new CPlainTextConversionContext(inUIContext);
// Very slimey, but somebody needs to have an interest in the context
theContext->AddUser(theContext);
return theContext->operator MWContext*();
} catch (...) {
return NULL;
}
}
void DisposePlainTextConversionContext(MWContext* inContext)
{
CPlainTextConversionContext* theContext =
dynamic_cast<CPlainTextConversionContext*>(ExtractNSContext(inContext));
Assert_(theContext != NULL);
// One of these days, this call might break
theContext->RemoveUser(theContext);
}
CPlainTextConversionContext::CPlainTextConversionContext(MWContext* inUIContext) :
CNSContext(MWContextText)
{
mUIContext = ExtractNSContext(inUIContext);
Assert_(mUIContext != NULL);
}
#pragma mark --- OVERRIDES ---
void CPlainTextConversionContext::LayoutNewDocument(
URL_Struct* inURL,
Int32* inWidth,
Int32* inHeight,
Int32* inMarginWidth,
Int32* inMarginHeight)
{
TXFE_LayoutNewDocument(*this, inURL, inWidth, inHeight, inMarginWidth, inMarginHeight);
}
void CPlainTextConversionContext::DisplaySubtext(
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG)
{
TXFE_DisplaySubtext(*this, inLocation, inText, inStartPos, inEndPos, inNeedBG);
}
void CPlainTextConversionContext::DisplayText(
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG)
{
TXFE_DisplayText(*this, inLocation, inText, inNeedBG);
}
void CPlainTextConversionContext::DisplaySubDoc(
int inLocation,
LO_SubDocStruct* inSubdocStruct)
{
TXFE_DisplaySubDoc(*this, inLocation, inSubdocStruct);
}
void CPlainTextConversionContext::DisplayTable(
int inLocation,
LO_TableStruct* inTableStruct)
{
TXFE_DisplayTable(*this, inLocation, inTableStruct);
}
void CPlainTextConversionContext::DisplayLineFeed(
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG)
{
TXFE_DisplayLineFeed(*this, inLocation, inLinefeedStruct, inNeedBG);
}
void CPlainTextConversionContext::DisplayHR(
int inLocation,
LO_HorizRuleStruct* inRuleStruct)
{
TXFE_DisplayHR(*this, inLocation, inRuleStruct);
}
char* CPlainTextConversionContext::TranslateISOText(
int inCharset,
char* inISOText)
{
return TXFE_TranslateISOText(*this, inCharset, inISOText);
}
void CPlainTextConversionContext::DisplayBullet(
int inLocation,
LO_BullettStruct* inBulletStruct)
{
TXFE_DisplayBullet(*this, inLocation, inBulletStruct);
}
void CPlainTextConversionContext::FinishedLayout(void)
{
TXFE_FinishedLayout(*this);
}
int CPlainTextConversionContext::GetTextInfo(
LO_TextStruct* inText,
LO_TextInfo* inTextInfo)
{
return TXFE_GetTextInfo(*this, inText, inTextInfo);
}
int CPlainTextConversionContext::MeasureText(
LO_TextStruct* /*inText*/,
short* /*outCharLocs*/)
{
return 0;
}
void CPlainTextConversionContext::AllConnectionsComplete(void)
{
if (mProgress)
{
mProgress->RemoveUser(this);
mProgress = NULL;
}
TXFE_AllConnectionsComplete(*this);
mUIContext->AllConnectionsComplete();
CNSContext::AllConnectionsComplete();
}
void CPlainTextConversionContext::GraphProgressInit(
URL_Struct* inURL,
Int32 inContentLength)
{
try {
Assert_(mUIContext != NULL);
if (mUIContext && mUIContext->GetContextProgress())
mProgress = mUIContext->GetContextProgress();
else
{
mProgress = new CContextProgress;
mUIContext->SetContextProgress(mProgress);
}
mProgress->AddUser(this);
} catch (...) {
mProgress = NULL;
}
mUIContext->GraphProgressInit(inURL, inContentLength);
}
void CPlainTextConversionContext::Progress(const char* inMessageText )
{
Assert_(mUIContext != NULL);
mUIContext->Progress(inMessageText);
}
void CPlainTextConversionContext::GraphProgressDestroy(
URL_Struct* inURL,
Int32 inContentLength,
Int32 inTotalRead)
{
Assert_(mUIContext != NULL);
mUIContext->GraphProgressDestroy(inURL, inContentLength, inTotalRead);
}
void CPlainTextConversionContext::GraphProgress(
URL_Struct* inURL,
Int32 inBytesReceived,
Int32 inBytesSinceLast,
Int32 inContentLength)
{
Assert_(mUIContext != NULL);
mUIContext->GraphProgress(inURL, inBytesReceived, inBytesSinceLast, inContentLength);
}
#pragma mark --- STUBS ---
// FIX ME? Do we really wan't to override these methods?
void CPlainTextConversionContext::Alert(const char* /* inAlertText */) {}
XP_Bool CPlainTextConversionContext::Confirm(const char* /* inMessage */) { return false; }
char* CPlainTextConversionContext::Prompt(
const char* /* inMessage */,
const char* /* inDefaultText */) { return NULL; }
XP_Bool CPlainTextConversionContext::PromptUsernameAndPassword(
const char* /* inMessage */,
char** /* outUserName */,
char** /* outPassword */) { return false; }
char* CPlainTextConversionContext::PromptPassword(const char* /* inMessage */) { return NULL; }

View File

@@ -1,133 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CPlainTextConversionContext.h
// This is a subclass of CNSContext to handle plain text translation.
// This replaces code in ns/lib/xlate/text.c where a new text MWContext is
// created.
#pragma once
#include "CNSContext.h"
class CPlainTextConversionContext : public CNSContext
{
public:
CPlainTextConversionContext(MWContext* inUIContext);
virtual ~CPlainTextConversionContext() { }
protected:
// Overrides of base CNSContext methods
virtual void LayoutNewDocument(
URL_Struct* inURL,
Int32* inWidth,
Int32* inHeight,
Int32* inMarginWidth,
Int32* inMarginHeight);
virtual void DisplaySubtext(
int inLocation,
LO_TextStruct* inText,
Int32 inStartPos,
Int32 inEndPos,
XP_Bool inNeedBG);
virtual void DisplayText(
int inLocation,
LO_TextStruct* inText,
XP_Bool inNeedBG);
virtual void DisplaySubDoc(
int inLocation,
LO_SubDocStruct* inSubdocStruct);
virtual void DisplayTable(
int inLocation,
LO_TableStruct* inTableStruct);
virtual void DisplayLineFeed(
int inLocation,
LO_LinefeedStruct* inLinefeedStruct,
XP_Bool inNeedBG);
virtual void DisplayHR(
int inLocation,
LO_HorizRuleStruct* inRuleStruct);
virtual char* TranslateISOText(
int inCharset,
char* inISOText);
virtual int GetTextInfo(
LO_TextStruct* inText,
LO_TextInfo* inTextInfo);
virtual int MeasureText(
LO_TextStruct* inText,
short* outCharLocs);
virtual void DisplayBullet(
int inLocation,
LO_BulletStruct* inBulletStruct);
virtual void FinishedLayout(void);
virtual void AllConnectionsComplete(void);
virtual void Progress(
const char* inMessageText);
virtual void GraphProgressInit(
URL_Struct* inURL,
Int32 inContentLength);
virtual void GraphProgressDestroy(
URL_Struct* inURL,
Int32 inContentLength,
Int32 inTotalRead);
virtual void GraphProgress(
URL_Struct* inURL,
Int32 inBytesReceived,
Int32 inBytesSinceLast,
Int32 inContentLength);
// Methods to stub out.
virtual void Alert(
const char* inAlertText);
virtual XP_Bool Confirm(
const char* inMessage);
virtual char* Prompt(
const char* inMessage,
const char* inDefaultText);
virtual XP_Bool PromptUsernameAndPassword(
const char* inMessage,
char** outUserName,
char** outPassword);
virtual char* PromptPassword(
const char* inMessage);
CNSContext* mUIContext;
};

View File

@@ -1,205 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CProxyDragTask.cp
#include "CProxyDragTask.h"
#include <LDragAndDrop.h>
#include <UException.h>
#include <UTextTraits.h>
#include <UGAColorRamp.h>
#include <LView.h>
#include "CProxyPane.h"
#include "StCaptureView.h"
#include "CGWorld.h"
#include "StRegionHandle.h"
#include "CEnvironment.h"
// ---------------------------------------------------------------------------
// ¥ CProxyDragTask
// ---------------------------------------------------------------------------
CProxyDragTask::CProxyDragTask(
LView& inProxyView,
CProxyPane& inProxyPane,
LCaption& inPageProxyCaption,
const EventRecord& inEventRecord,
CExtraFlavorAdder* inExtraFlavorAdder)
: mProxyView(inProxyView),
mProxyPane(inProxyPane),
mPageProxyCaption(inPageProxyCaption),
mExtraFlavorAdder(inExtraFlavorAdder),
Inherited(inEventRecord)
{
}
// ---------------------------------------------------------------------------
// ¥ ~CProxyDragTask
// ---------------------------------------------------------------------------
CProxyDragTask::~CProxyDragTask()
{
delete mExtraFlavorAdder;
}
// ---------------------------------------------------------------------------
// ¥ DoDrag
// ---------------------------------------------------------------------------
OSErr
CProxyDragTask::DoDrag()
{
MakeDragRegion(mDragRef, mDragRegion);
AddFlavors(mDragRef);
if (UEnvironment::HasFeature(env_HasDragMgrImageSupport))
{
try
{
DoTranslucentDrag();
}
catch (...)
{
DoNormalDrag();
}
}
else
{
DoNormalDrag();
}
return noErr;
}
// ---------------------------------------------------------------------------
// ¥ DoNormalDrag
// ---------------------------------------------------------------------------
void
CProxyDragTask::DoNormalDrag()
{
::TrackDrag(mDragRef, &mEventRecord, mDragRegion);
}
// ---------------------------------------------------------------------------
// ¥ DoTranslucentDrag
// ---------------------------------------------------------------------------
void
CProxyDragTask::DoTranslucentDrag()
{
Rect theFrame;
StColorPortState theColorPortState(mProxyView.GetMacPort());
// Normalize the color state (to make CopyBits happy)
StColorState::Normalize();
// Build a GWorld containing the page proxy icon and title
mProxyView.FocusDraw();
mProxyView.CalcLocalFrameRect(theFrame);
CGWorld theGWorld(theFrame, 0, useTempMem);
StCaptureView theCaptureView(mProxyView);
mPageProxyCaption.Show();
try
{
theCaptureView.Capture(theGWorld);
mProxyView.FocusDraw();
Point theOffsetPoint = topLeft(theFrame);
::LocalToGlobal(&theOffsetPoint);
// Set the drag image
StRegionHandle theTrackMask;
mProxyPane.CalcLocalFrameRect(theFrame);
ThrowIfOSErr_(::IconSuiteToRgn(theTrackMask, &theFrame, kAlignAbsoluteCenter, mProxyPane.GetIconSuiteH()));
mPageProxyCaption.CalcLocalFrameRect(theFrame); // Use frame which bounds the actual text, not the frame bounds
theTrackMask += theFrame;
PixMapHandle theMap = ::GetGWorldPixMap(theGWorld.GetMacGWorld());
OSErr theErr = ::SetDragImage(mDragRef, theMap, theTrackMask, theOffsetPoint, kDragDarkerTranslucency);
ThrowIfOSErr_(theErr);
// Track the drag
::TrackDrag(mDragRef, &mEventRecord, mDragRegion);
}
catch (...)
{
}
mPageProxyCaption.Hide();
}
// ---------------------------------------------------------------------------
// ¥ AddFlavorURL
// ---------------------------------------------------------------------------
void
CProxyDragTask::AddFlavors(DragReference inDragRef)
{
Inherited::AddFlavors(inDragRef);
if (mExtraFlavorAdder)
mExtraFlavorAdder->AddExtraFlavorData(inDragRef, static_cast<ItemReference>(this));
}
// ---------------------------------------------------------------------------
// ¥ MakeDragRegion
// ---------------------------------------------------------------------------
void
CProxyDragTask::MakeDragRegion(
DragReference /*inDragRef*/,
RgnHandle /*inDragRegion*/)
{
Rect theFrame;
// Add the page proxy icon region
StRegionHandle theTrackMask;
mProxyPane.CalcLocalFrameRect(theFrame);
ThrowIfOSErr_(::IconSuiteToRgn(theTrackMask, &theFrame, kAlignAbsoluteCenter, mProxyPane.GetIconSuiteH()));
theFrame = (**(RgnHandle)theTrackMask).rgnBBox;
::LocalToGlobal(&topLeft(theFrame));
::LocalToGlobal(&botRight(theFrame));
AddRectDragItem(static_cast<ItemReference>(&mProxyPane), theFrame);
// Add the page proxy caption region
mPageProxyCaption.CalcLocalFrameRect(theFrame);
::LocalToGlobal(&topLeft(theFrame));
::LocalToGlobal(&botRight(theFrame));
AddRectDragItem(static_cast<ItemReference>(&mPageProxyCaption), theFrame);
}

View File

@@ -1,77 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CProxyDragTask.h
#ifndef CProxyDragTask_H
#define CProxyDragTask_H
#pragma once
// Includes
#include "CBrowserDragTask.h"
#include "CProxyPane.h"
// Forward declarations
class LView;
class CProxyPane;
class LCaption;
// Class declaration
class CExtraFlavorAdder // to be called by AddFlavor. Allows a window to add extra flavors.
{
public:
virtual void AddExtraFlavorData(DragReference inDragRef, ItemReference inItemRef) = 0;
};
class CProxyDragTask : public CBrowserDragTask
{
public:
typedef CBrowserDragTask Inherited;
CProxyDragTask(
LView& inProxyView,
CProxyPane& inProxyPane,
LCaption& inPageProxyCaption,
const EventRecord& inEventRecord,
CExtraFlavorAdder* inFlavorAdder = nil);
virtual ~CProxyDragTask();
virtual OSErr DoDrag();
virtual void AddFlavors(DragReference inDragRef);
protected:
virtual void DoNormalDrag();
virtual void DoTranslucentDrag();
virtual void MakeDragRegion(
DragReference inDragRef,
RgnHandle inDragRegion);
LView& mProxyView;
CProxyPane& mProxyPane;
LCaption& mPageProxyCaption;
CExtraFlavorAdder* mExtraFlavorAdder;
};
#endif

View File

@@ -1,125 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CSaveProgress.h"
#include "fe_proto.h"
#include "CBrowserContext.h"
#include "resgui.h" // needed for EDITDLG_SAVE_PROGRESS
#include "uapp.h"
#include "edt.h"
#include "PascalString.h" // CStr255
#include "proto.h" // XP_InterruptContext
#include "macutil.h" // TrySetCursor
#pragma mark CSaveProgress
void CSaveProgress::FinishCreateSelf()
{
fFilenameText = (LCaption*)this->FindPaneByID( 'flnm' );
LDialogBox::FinishCreateSelf();
}
void CSaveProgress::SetFilename(char *pFileName)
{
if ( fFilenameText && pFileName )
fFilenameText->SetDescriptor( CStr255(pFileName) );
}
void CSaveProgress::ListenToMessage( MessageT inMessage, void* ioParam )
{
switch ( inMessage )
{
case msg_Cancel:
if ( fContext )
{
TrySetCursor( watchCursor );
#ifdef EDITOR
if ( EDT_IS_EDITOR( fContext ) )
EDT_SaveCancel( fContext );
else
#endif // EDITOR
XP_InterruptContext( fContext );
SetCursor( &qd.arrow );
}
break;
default:
LDialogBox::ListenToMessage( inMessage, ioParam );
break;
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//
#pragma mark --- FTP Upload Dialog ---
//
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// FIX ME -- find way to use new CDownloadProgressWindow
// Most likely, we'll duplicate the code from downloading
void FE_SaveDialogCreate( MWContext *pContext, int /*iFileCount*/, ED_SaveDialogType /*saveType*/ )
{
try {
CSaveProgress * newWindow = (CSaveProgress*)LWindow::CreateWindow(
EDITDLG_SAVE_PROGRESS, CFrontApp::GetApplication());
if ( newWindow == NULL )
return;
UReanimator::LinkListenerToControls( newWindow, newWindow, EDITDLG_SAVE_PROGRESS );
newWindow->SetContext( pContext );
ExtractBrowserContext(pContext)->SetSaveDialog( newWindow );
newWindow->Show();
}
catch (...)
{
ExtractBrowserContext(pContext)->SetSaveDialog( NULL );
}
}
#ifdef EDITOR
void FE_SaveDialogSetFilename( MWContext *pContext, char *pFilename )
{
char *better = FE_URLToLocalName( pFilename );
if ( better )
{
if ( pContext && ExtractBrowserContext(pContext) && ExtractBrowserContext(pContext)->GetSaveDialog() )
ExtractBrowserContext(pContext)->GetSaveDialog()->SetFilename( better );
XP_FREE( better );
}
}
#endif // EDITOR
void FE_SaveDialogDestroy( MWContext *pContext, int /*status*/, char */*pFilename*/ )
{
if ( pContext && ExtractBrowserContext(pContext) && ExtractBrowserContext(pContext)->GetSaveDialog() )
{
ExtractBrowserContext(pContext)->GetSaveDialog()->ListenToMessage( cmd_Close, NULL );
ExtractBrowserContext(pContext)->SetSaveDialog( NULL );
}
}

View File

@@ -1,40 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include "CNSContext.h"
class CSaveProgress: public LDialogBox
{
public:
enum { class_ID = 'EDL4' };
CSaveProgress( LStream* inStream ): LDialogBox( inStream ){};
virtual void FinishCreateSelf();
void SetFilename( char *pFilename );
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
void SetContext( MWContext* context ) {fContext = context;}
protected:
LCaption* fFilenameText;
MWContext* fContext;
};

View File

@@ -1,42 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CSecureAttachment.h
// Initializes the random seed of the security library. Add this
// attachment to application startup.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
#pragma once
#include <LAttachment.h>
class CSecureAttachment : public LAttachment
{
public:
CSecureAttachment();
protected:
virtual void ExecuteSelf(
MessageT inMessage,
void *ioParam);
Uint32 mTickCounter;
};

View File

@@ -1,282 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CTSMEditField.h"
Boolean CTSMEditField::sInitialized = false;
Boolean CTSMEditField::sHasTSM = false;
TSMTEPreUpdateUPP CTSMEditField::sPreUpdateUPP = NewTSMTEPreUpdateProc( CTSMEditField::PreUpdate );
TSMTEPostUpdateUPP CTSMEditField::sPostUpdateUPP = NewTSMTEPostUpdateProc( CTSMEditField::PostUpdate );
// Default constructor
CTSMEditField::CTSMEditField ()
{
} // CTSMEditField::CTSMEditField
CTSMEditField::CTSMEditField( LStream* inStream )
: LEditField( inStream )
{
if ( !sInitialized )
Initialize();
OSErr result = noErr;
OSType theServiceTypes = kTSMTEInterfaceType;
mTSMDocID = 0;
mTSMTEHandle = NULL;
Try_
{
if ( sHasTSM )
{
result = ::NewTSMDocument( 1, &theServiceTypes, &mTSMDocID, static_cast<long>(&mTSMTEHandle) );
ThrowIfOSErr_( result );
if ( !mTSMTEHandle && mTSMDocID )
{
::DeleteTSMDocument( mTSMDocID );
mTSMDocID = 0;
Throw_( paramErr );
}
(*mTSMTEHandle)->textH = mTextEditH;
(*mTSMTEHandle)->preUpdateProc = sPreUpdateUPP;
(*mTSMTEHandle)->postUpdateProc = sPostUpdateUPP;
(*mTSMTEHandle)->updateFlag = kTSMTEAutoScroll;
(*mTSMTEHandle)->refCon = (Int32)this;
}
}
Catch_( inErr )
{
// Failure just means that this edit field won't support TSMTE
}
EndCatch_;
}
//
// Parameterized constructor
CTSMEditField::CTSMEditField ( const SPaneInfo& inPaneInfo,
Str255 inString,
ResIDT inTextTraitsID,
Int16 inMaxChars,
Uint8 inAttributes,
TEKeyFilterFunc inKeyFilter,
LCommander* inSuper)
: LEditField ( inPaneInfo,
inString,
inTextTraitsID,
inMaxChars,
inAttributes,
inKeyFilter,
inSuper )
{
} // CTSMEditField::CTSMEditField
CTSMEditField::~CTSMEditField()
{
OSErr result = noErr;
try
{
if ( mTSMDocID != 0 )
{
::FixTSMDocument( mTSMDocID );
::DeactivateTSMDocument( mTSMDocID ); // for a bug in TSM. See TE27
result = ::DeleteTSMDocument( mTSMDocID );
Assert_( result == noErr );
mTSMDocID = 0;
}
}
catch ( ... )
{
}
}
pascal void
CTSMEditField::PreUpdate( TEHandle inTEHandle, Int32 inRefCon )
{
CTSMEditField *theOwnerEditField = NULL;
if ( inRefCon != NULL )
{
theOwnerEditField = reinterpret_cast<CTSMEditField *>( inRefCon );
theOwnerEditField->FocusDraw();
}
}
pascal void
CTSMEditField::PostUpdate(
TEHandle inTEHandle,
Int32 fixLen,
Int32 inputAreaStart,
Int32 inputAreaEnd,
Int32 pinStart,
Int32 pinEnd,
Int32 inRefCon )
{
CTSMEditField *theOwnerEditField = NULL;
if ( inRefCon != NULL && fixLen > 0 )
{
theOwnerEditField = reinterpret_cast<CTSMEditField *>( inRefCon );
// Undo of TSM input is currently not supported.
//
if (theOwnerEditField->mTypingAction != NULL)
theOwnerEditField->mTypingAction->Reset();
}
}
void CTSMEditField::BeTarget( void )
{
OSErr result = noErr;
short oldScript = ::GetScriptManagerVariable(smKeyScript);
#ifdef Debug_Signal
OSErr err;
// check to see if a bug in TSM will be encountered
ProcessSerialNumber psn,
csn;
err = GetCurrentProcess(&psn);
err = GetFrontProcess(&csn);
Assert_((psn.highLongOfPSN == csn.highLongOfPSN) && (psn.lowLongOfPSN == csn.lowLongOfPSN));
#endif
FocusDraw();
LEditField::BeTarget();
if ( mTSMDocID != NULL )
{
result = ::ActivateTSMDocument( mTSMDocID );
Assert_( result == noErr );
}
if (oldScript != ::GetScriptManagerVariable(smKeyScript))
::KeyScript(oldScript);
}
void
CTSMEditField::DontBeTarget( void )
{
OSErr result = noErr;
FocusDraw();
if ( mTSMDocID != NULL )
{
::FixTSMDocument( mTSMDocID );
result = ::DeactivateTSMDocument( mTSMDocID );
Assert_( result == noErr );
}
LEditField::DontBeTarget();
}
void
CTSMEditField::Initialize()
{
OSErr result = noErr;
SInt32 gestaltResponse = 0;
Assert_( sInitialized == false );
if ( sInitialized == false )
{
sInitialized = true;
result = ::Gestalt( gestaltTSMgrVersion, &gestaltResponse );
if ( (result == noErr) && (gestaltResponse >= 1) )
{
result = ::Gestalt( gestaltTSMTEAttr, &gestaltResponse );
if ( (result == noErr) && ((gestaltResponse >> gestaltTSMTEPresent) & 1) )
{
sHasTSM = true;
}
}
}
}

View File

@@ -1,78 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#pragma once
#include <TextEdit.h>
#include <TextServices.h>
#include <TSMTE.h>
#include <LEditField.h>
class CTSMEditField : public LEditField
{
public:
enum
{
class_ID = 'Tedt'
};
CTSMEditField(); // ¥ Default Constructor
CTSMEditField( LStream *inStream); // ¥ Stream Constructor
CTSMEditField ( const SPaneInfo& inPaneInfo,
Str255 inString,
ResIDT inTextTraitsID,
Int16 inMaxChars,
Uint8 inAttributes,
TEKeyFilterFunc inKeyFilter,
LCommander* inSuper);
// ¥ Parameterized Constructor
virtual ~CTSMEditField();
static pascal void PreUpdate( TEHandle inTEHandle,
Int32 inRefCon);
static pascal void PostUpdate(
TEHandle inTEHandle,
Int32 fixLen,
Int32 inputAreaStart,
Int32 inputAreaEnd,
Int32 pinStart,
Int32 pinEnd,
Int32 inRefCon );
protected:
virtual void BeTarget(void);
virtual void DontBeTarget(void);
virtual void Initialize();
TSMDocumentID mTSMDocID;
TSMTERecHandle mTSMTEHandle;
static Boolean sInitialized;
static Boolean sHasTSM;
static TSMTEPreUpdateUPP sPreUpdateUPP;
static TSMTEPostUpdateUPP sPostUpdateUPP;
};

View File

@@ -1,92 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CTargetedUpdateMenuRegistry.cp
//
// CTargetedUpdateMenuRegistry is used in conjunction with LEventDispatchers
// which are CTargetedUpdateMenuRegistry-aware to enable a more targeted
// update of menus.
//
// One common example of this is menu items whose text should change when
// certain modifiers are held down (Close -> Close All when optionKey is
// held down, for example).
//
// Usage notes for callers of UpdateMenus:
//
// (1) Call SetCommands with a list of commands which should be updated.
// (2) Call UpdateMenus.
//
// Usage notes for implementors of UpdateMenus:
//
// (1) When looping through commands in menus, determine if the registry
// is active by calling UseRegistryToUpdateMenus.
// (2) If the registry is active, then check to see if the command is
// in the registry by calling CommandInRegistry before processing
// command status for the command.
//
// Note: For the targeted update to be useful, there should generally be
// a very small number of targeted commands. In fact, command lookup will
// slow down if there are too many commands.
#include "CTargetedUpdateMenuRegistry.h"
// === Static Members ===
Boolean CTargetedUpdateMenuRegistry::sUseRegistryToUpdateMenus = false;
list<CommandT> CTargetedUpdateMenuRegistry::sCommands;
// ---------------------------------------------------------------------------
// ¥ SetCommands
// ---------------------------------------------------------------------------
void
CTargetedUpdateMenuRegistry::SetCommands(
const list<CommandT>& inCommands)
{
sCommands = inCommands;
}
// ---------------------------------------------------------------------------
// ¥ UpdateMenus
// ---------------------------------------------------------------------------
void
CTargetedUpdateMenuRegistry::UpdateMenus()
{
if (LEventDispatcher::GetCurrentEventDispatcher())
{
StValueChanger<Boolean> setUseRegistryToUpdateMenus(sUseRegistryToUpdateMenus, true);
LEventDispatcher::GetCurrentEventDispatcher()->UpdateMenus();
}
}
// ---------------------------------------------------------------------------
// ¥ CommandInRegistry
// ---------------------------------------------------------------------------
Boolean
CTargetedUpdateMenuRegistry::CommandInRegistry(CommandT inCommand)
{
list<CommandT>::const_iterator theCommand = find(
sCommands.begin(),
sCommands.end(),
inCommand);
return (theCommand != sCommands.end());
}

View File

@@ -1,91 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CTargetedUpdateMenuRegistry.h
//
// CTargetedUpdateMenuRegistry is used in conjunction with LEventDispatchers
// which are CTargetedUpdateMenuRegistry-aware to enable a more targeted
// update of menus.
//
// One common example of this is menu items whose text should change when
// certain modifiers are held down (Close -> Close All when optionKey is
// held down, for example).
//
// Usage notes for callers of UpdateMenus:
//
// (1) Call SetCommands with a list of commands which should be updated.
// (2) Call UpdateMenus.
//
// Usage notes for implementors of UpdateMenus:
//
// (1) When looping through commands in menus, determine if the registry
// is active by calling UseRegistryToUpdateMenus.
// (2) If the registry is active, then check to see if the command is
// in the registry by calling CommandInRegistry before processing
// command status for the command.
//
// Note: For the targeted update to be useful, there should generally be
// a very small number of targeted commands. In fact, command lookup will
// slow down if there are too many commands.
#ifndef CTargetedUpdateMenuRegistry_H
#define CTargetedUpdateMenuRegistry_H
#pragma once
// Includes
#include <list>
#include <algorithm>
#include <LCommander.h>
#include <LEventDispatcher.h>
// Class declaration
class CTargetedUpdateMenuRegistry
{
public:
// Interface for callers of UpdateMenus
static void SetCommands(const list<CommandT>& inCommands);
static void UpdateMenus();
// Interface for implementors of UpdateMenus
static Boolean CommandInRegistry(CommandT inCommand);
static Boolean UseRegistryToUpdateMenus();
private:
static Boolean sUseRegistryToUpdateMenus;
static list<CommandT> sCommands;
};
// Inline methods
inline
Boolean
CTargetedUpdateMenuRegistry::UseRegistryToUpdateMenus()
{
return sUseRegistryToUpdateMenus;
}
#endif

View File

@@ -1,883 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CURLDispatcher.cp
#include "CURLDispatcher.h"
#include "CNSContext.h"
#include "CBrowserWindow.h"
#include "CDownloadProgressWindow.h"
#include "CWindowMediator.h"
#include "CBrowserContext.h"
#include "CBrowserWindow.h"
#ifdef MOZ_MAIL_NEWS
#include "CMailNewsWindow.h"
#include "CThreadWindow.h"
#include "CMessageWindow.h"
#endif
#include "URobustCreateWindow.h"
#include "uapp.h"
#include "CHTMLClickRecord.h"
#include "CAutoPtr.h"
#include "CAutoPtrXP.h"
#include "cstring.h"
#include "xp.h"
#include "macutil.h"
#include "umimemap.h"
#include "ufilemgr.h"
#include "uprefd.h"
#include "xlate.h"
#include "msv2dsk.h"
#include "msgcom.h"
#include "uerrmgr.h" // Need for GetCString
#include "resgui.h"
CBrowserWindow* CURLDispatcher::sLastBrowserWindowCreated = NULL;
CAutoPtr<CURLDispatcher> CURLDispatcher::sDispatcher;
CAutoPtr<CBrowserContext> CURLDispatcher::sDispatchContext;
// URL dispatch proc table
// URL types listed in net.h are indices into this table.
// **** NOTE: URL types in net.h start at 1 ****
const Uint32 cNumURLTypes = 39;
static DispatchProcPtr dispatchProcs[] =
{
CURLDispatcher::DispatchToBrowserWindow // Unknown URL type 0
, CURLDispatcher::DispatchToBrowserWindow // FILE_TYPE_URL 1
, CURLDispatcher::DispatchToBrowserWindow // FTP_TYPE_URL 2
, CURLDispatcher::DispatchToBrowserWindow // GOPHER_TYPE_URL 3
, CURLDispatcher::DispatchToBrowserWindow // HTTP_TYPE_URL 4
, CURLDispatcher::DispatchToLibNet // MAILTO_TYPE_URL 5
//, CURLDispatcher::DispatchToMailNewsWindow // NEWS_TYPE_URL 6
, CURLDispatcher::DispatchMailboxURL // NEWS_TYPE_URL 6 (use mailbox code)
, NULL // RLOGIN_TYPE_URL 7
, CURLDispatcher::DispatchToBrowserWindow // TELNET_TYPE_URL 8
, CURLDispatcher::DispatchToBrowserWindow // TN3270_TYPE_URL 9
, NULL // WAIS_TYPE_URL 10
, CURLDispatcher::DispatchToBrowserWindow // ABOUT_TYPE_URL 11
, NULL // FILE_CACHE_TYPE_URL 12
, NULL // MEMORY_CACHE_TYPE_URL 13
, CURLDispatcher::DispatchToBrowserWindow // SECURE_HTTP_TYPE_URL 14
, NULL // INTERNAL_IMAGE_TYPE_URL 15
, NULL // URN_TYPE_URL 16
, NULL // POP3_TYPE_URL 17
, CURLDispatcher::DispatchMailboxURL // MAILBOX_TYPE_URL 18
, NULL // INTERNAL_NEWS_TYPE_URL 19
, CURLDispatcher::DispatchToBrowserWindow // SECURITY_TYPE_URL 20
, CURLDispatcher::DispatchToBrowserWindow // MOCHA_TYPE_URL 21
, CURLDispatcher::DispatchToBrowserWindow // VIEW_SOURCE_TYPE_URL 22
, NULL // HTML_DIALOG_HANDLER_TYPE_URL 23
, NULL // HTML_PANEL_HANDLER_TYPE_URL 24
, NULL // INTERNAL_SECLIB_TYPE_URL 25
, NULL // MSG_SEARCH_TYPE_URL 26
, CURLDispatcher::DispatchMailboxURL // IMAP_TYPE_URL 27
, CURLDispatcher::DispatchToLibNet // LDAP_TYPE_URL 28
, NULL // SECURE_LDAP_TYPE_URL 29
, CURLDispatcher::DispatchToBrowserWindow // WYSIWYG_TYPE_URL 30
, CURLDispatcher::DispatchToLibNet // ADDRESS_BOOK_TYPE_URL 31
, NULL // CLASSID_TYPE_URL 32
, NULL // JAVA_TYPE_URL 33
, NULL // DATA_TYPE_URL 34
, CURLDispatcher::DispatchToLibNet // NETHELP_TYPE_URL 35
, NULL // NFS_TYPE_URL 36
, CURLDispatcher::DispatchToBrowserWindow // MARIMBA_TYPE_URL 37
, NULL // INTERNAL_CERTLDAP_TYPE_URL 38
};
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CURLDispatcher* CURLDispatcher::GetURLDispatcher() // singleton class
{
if (!sDispatcher.get())
{
sDispatcher.reset(new CURLDispatcher);
}
return sDispatcher.get();
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CURLDispatcher::CURLDispatcher()
: mDelayedURLs(sizeof(CURLDispatchInfo*))
{
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CURLDispatcher::~CURLDispatcher()
{
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToStorage(
URL_Struct* inURL,
const FSSpec& inDestSpec,
FO_Present_Types inOutputFormat,
Boolean inDelay)
{
Assert_((inOutputFormat == FO_SAVE_AS) || (inOutputFormat == FO_SAVE_AS_TEXT));
if (!inDelay)
{
CURLDispatchInfo* dispatchInfo =
new CURLDispatchInfo(inURL, nil, inOutputFormat, inDelay, false, true);
dispatchInfo->SetFileSpec(inDestSpec);
if (inOutputFormat == FO_SAVE_AS)
{
DispatchToDisk(dispatchInfo);
}
else
DispatchToDiskAsText(dispatchInfo);
}
else
{
CURLDispatchInfo* theDelay =
new CURLDispatchInfo(inURL, nil, inOutputFormat, true, false, true);
theDelay->SetFileSpec(inDestSpec);
GetURLDispatcher()->PostPendingDispatch(theDelay);
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToStorage(CURLDispatchInfo* inDispatchInfo)
{
Assert_((inDispatchInfo->GetOutputFormat() == FO_SAVE_AS) || (inDispatchInfo->GetOutputFormat() == FO_SAVE_AS_TEXT));
if (!inDispatchInfo->GetDelay())
{
if (inDispatchInfo->GetOutputFormat() == FO_SAVE_AS)
DispatchToDisk(inDispatchInfo);
else
DispatchToDiskAsText(inDispatchInfo);
}
else
{
GetURLDispatcher()->PostPendingDispatch(inDispatchInfo);
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::SpendTime(const EventRecord& /*inMacEvent*/)
{
if (mDelayedURLs.GetCount() > 0)
ProcessPendingDispatch();
else
StopIdling();
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::ListenToMessage(
MessageT inMessage,
void* ioParam)
{
if ((inMessage == msg_BroadcasterDied) && (mDelayedURLs.GetCount() > 0))
UpdatePendingDispatch((CNSContext*)ioParam);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
XP_List* gAppleDoubleSpecList = nil; // for the ad decoder (see ad_decode.c)
void CURLDispatcher::DispatchToDisk(CURLDispatchInfo* inDispatchInfo)
{
CBrowserContext* theContext = NULL;
CDownloadProgressWindow* theProgressWindow = NULL;
FSSpec& destSpec = inDispatchInfo->GetFileSpec();
URL_Struct* inURL = inDispatchInfo->GetURLStruct();
CAutoPtr<CURLDispatchInfo> info(inDispatchInfo);
Assert_(inURL != NULL);
try
{
theContext = new CBrowserContext(MWContextSaveToDisk);
StSharer theShareLock(theContext);
theProgressWindow = dynamic_cast<CDownloadProgressWindow*>(URobustCreateWindow::CreateWindow(WIND_DownloadProgress, LCommander::GetTopCommander()));
ThrowIfNULL_(theProgressWindow);
theProgressWindow->Show();
inURL->fe_data = StructCopy(&destSpec, sizeof(FSSpec));
if (destSpec.name[0] != '\0')
{
// Put the spec into our global variable where the ad decoder will find it.
if (!gAppleDoubleSpecList)
gAppleDoubleSpecList = XP_ListNew();
FSSpec* spec = (FSSpec*)XP_ALLOC(sizeof(FSSpec));
FailNIL_(spec);
OSErr err = CFileMgr::UniqueFileSpec(destSpec, destSpec.name, *spec);
if (err)
throw err;
XP_ListAddObjectToEnd(gAppleDoubleSpecList, spec);
}
theProgressWindow->SetWindowContext(theContext);
// the window will be shown on the first progress call.
theContext->ImmediateLoadURL(inDispatchInfo->ReleaseURLStruct(), FO_SAVE_AS);
}
catch (...)
{
delete theProgressWindow;
XP_ListDestroy(gAppleDoubleSpecList);
gAppleDoubleSpecList = nil;
throw;
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
extern "C" void SaveAsCompletionProc( PrintSetup* p );
void CURLDispatcher::DispatchToDiskAsText(CURLDispatchInfo* inDispatchInfo)
{
CNSContext* theContext = NULL;
CDownloadProgressWindow* theProgressWindow = NULL;
FSSpec& destSpec = inDispatchInfo->GetFileSpec();
URL_Struct* inURL = inDispatchInfo->GetURLStruct();
Assert_(inURL != NULL);
try
{
theContext = new CNSContext(MWContextSaveToDisk);
StSharer theShareLock(theContext);
theProgressWindow = dynamic_cast<CDownloadProgressWindow*>(URobustCreateWindow::CreateWindow(WIND_DownloadProgress, LCommander::GetTopCommander()));
ThrowIfNULL_(theProgressWindow);
theProgressWindow->SetWindowContext(theContext);
CMimeMapper *theMapper = CPrefs::sMimeTypes.FindMimeType(CMimeList::HTMLViewer);
OSType creator = emSignature, docType='TEXT';
if (theMapper != NULL && CMimeMapper::Launch == theMapper->GetLoadAction())
{
creator = theMapper->GetAppSig();
docType = theMapper->GetDocType();
}
OSErr theErr = ::FSpCreate(&destSpec, creator, docType, 0);
if ((theErr != noErr) && (theErr != dupFNErr))
ThrowIfOSErr_(theErr);
CFileMgr::FileSetComment(destSpec, NET_URLStruct_Address(inURL));
char* thePath = CFileMgr::EncodedPathNameFromFSSpec(destSpec, TRUE);
ThrowIfNULL_(thePath);
thePath = NET_UnEscape(thePath);
XP_File theFile = XP_FileOpen(thePath, xpURL, XP_FILE_WRITE);
XP_FREE(thePath);
ThrowIfNULL_(theFile);
PrintSetup print;
XL_InitializeTextSetup(&print);
print.width = 76;
print.out = theFile;
print.completion = (XL_CompletionRoutine) SaveAsCompletionProc;
print.carg = (void*)(theContext);
print.filename = nil;
print.url = inURL;
inURL->fe_data = theContext;
MWContext* textContext = (MWContext*) XL_TranslateText(*theContext, inURL, &print);
}
catch(...)
{
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::PostPendingDispatch(CURLDispatchInfo* inDispatchInfo)
{
mDelayedURLs.InsertItemsAt(1, LArray::index_Last, &inDispatchInfo, sizeof(CURLDispatchInfo*));
StartIdling();
if (inDispatchInfo->GetTargetContext() != NULL)
inDispatchInfo->GetTargetContext()->AddListener(this);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::UpdatePendingDispatch(
CNSContext* inForContext)
{
Assert_(inForContext != NULL);
CURLDispatchInfo* theInfo;
LArrayIterator theIter(mDelayedURLs, LArrayIterator::from_Start);
while (theIter.Next(&theInfo))
{
if (theInfo->GetTargetContext() == inForContext)
mDelayedURLs.RemoveItemsAt(1, theIter.GetCurrentIndex());
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::ProcessPendingDispatch(void)
{
if (CFrontApp::GetApplication()->HasProperlyStartedUp())
{
CURLDispatchInfo* theInfo;
mDelayedURLs.FetchItemAt(LArray::index_First, &theInfo);
// 97-06-10 pkc -- Hack to workaround trying to dispatch URL's on image
// anchors while mocha is loading image
CBrowserContext* browserContext =
dynamic_cast<CBrowserContext*>(theInfo->GetTargetContext());
if (theInfo->GetIsWaitingForMochaImageLoad() &&
theInfo->GetTargetContext())
{
if (browserContext && browserContext->IsMochaLoadingImages())
{
// The context is loading images for mocha, don't
// perform dispatch
return;
}
}
mDelayedURLs.RemoveItemsAt(1, LArray::index_First);
if (theInfo->GetTargetContext() != NULL)
theInfo->GetTargetContext()->RemoveListener(this);
theInfo->ClearDelay();
if (theInfo->GetIsSaving())
DispatchToStorage(theInfo);
else
{
// See if this delayed URL was for an ftp drag &drop
if (theInfo->GetURLStruct()->files_to_post)
{
// See if the user really meant to upload
if (browserContext && !browserContext->Confirm((const char*)GetCString(MAC_UPLOAD_TO_FTP))) /* l10n */
{
// Delete the info if not
delete theInfo;
}
else
{
// Ship it!
DispatchURL(theInfo);
}
}
else
{
// Plain ordinary delayed URL
DispatchURL(theInfo);
}
}
}
}
// 97-05-13 pkc
// New URL dispatch mechanism.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchURL(
const char* inURL,
CNSContext* inTargetContext,
Boolean inDelay,
Boolean inForceCreate,
ResIDT inWindowResID,
Boolean inInitiallyVisible,
FO_Present_Types inOutputFormat,
NET_ReloadMethod inReloadMethod)
{
CURLDispatchInfo* dispatchInfo =
new CURLDispatchInfo(
inURL,
inTargetContext,
inOutputFormat,
inReloadMethod,
inDelay,
inForceCreate,
false,
inWindowResID,
inInitiallyVisible
);
DispatchURL(dispatchInfo);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchURL(
URL_Struct* inURLStruct,
CNSContext* inTargetContext,
Boolean inDelay,
Boolean inForceCreate,
ResIDT inWindowResID,
Boolean inInitiallyVisible,
FO_Present_Types inOutputFormat,
Boolean inWaitingForMochaImageLoad)
{
CURLDispatchInfo* dispatchInfo =
new CURLDispatchInfo(
inURLStruct,
inTargetContext,
inOutputFormat,
inDelay,
inForceCreate,
false,
inWindowResID,
inInitiallyVisible,
inWaitingForMochaImageLoad
);
DispatchURL(dispatchInfo);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchURL(CURLDispatchInfo* inDispatchInfo)
{
XP_ASSERT(inDispatchInfo != NULL);
// FIX ME??? Does this go here?
sLastBrowserWindowCreated = NULL;
// paranoia
if (inDispatchInfo)
{
if (inDispatchInfo->GetDelay())
{
GetURLDispatcher()->PostPendingDispatch(inDispatchInfo);
}
// Check to make sure URL type index is within dispatch table bounds
else if (inDispatchInfo->GetURLType() < cNumURLTypes)
{
// Get dispatch proc from table
DispatchProcPtr dispatchProc = dispatchProcs[inDispatchInfo->GetURLType()];
if (dispatchProc)
{
(*dispatchProc)(inDispatchInfo);
}
}
}
}
#pragma mark -- Dispatch Procs --
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToLibNet(CURLDispatchInfo* inDispatchInfo)
{
CAutoPtr<CURLDispatchInfo> info(inDispatchInfo);
// If someone passed in a context, use it.
if (inDispatchInfo->GetTargetContext())
{
inDispatchInfo->GetTargetContext()->ImmediateLoadURL(inDispatchInfo->ReleaseURLStruct(), inDispatchInfo->GetOutputFormat());
}
else
{
try
{
if (!sDispatchContext.get())
{
sDispatchContext.reset(new CBrowserContext());
}
sDispatchContext->ImmediateLoadURL(inDispatchInfo->ReleaseURLStruct(), inDispatchInfo->GetOutputFormat());
}
catch (...)
{
}
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToBrowserWindow(CURLDispatchInfo* inDispatchInfo)
{
CAutoPtr<CURLDispatchInfo> info(inDispatchInfo);
if (!inDispatchInfo->GetDelay())
{
if (inDispatchInfo->GetForceCreate())
{
// Must create a new window
DispatchToNewBrowserWindow(info.release());
}
else if (inDispatchInfo->GetTargetContext())
{
// Use target context if passed in
// 97-09-18 pchen -- use target if it's not "_self"
// I found "_current" in npglue.c; do we need to filter that also?
if (inDispatchInfo->GetURLStruct()->window_target &&
XP_STRCASECMP(inDispatchInfo->GetURLStruct()->window_target, "_self"))
{
/* The thinking here is that if the URL specifies a preferred window target,
it's not safe to use the given context. There is a known case where
this is so; it involves a link in a subframe which links to an image
and contains a "target" tag. In this case, we use the only context
always known to be safe: the one belonging to the window itself.
This is precisely correct if the tag is "target = _top". I feel
queasy guaranteeing that it's correct for other values of target
as well, but pchen thinks it will always work. So: */
CBrowserContext *topContext;
topContext = ExtractBrowserContext(*inDispatchInfo->GetTargetContext());
inDispatchInfo->SetTargetContext(topContext->GetTopContext());
}
(inDispatchInfo->GetTargetContext())->SwitchLoadURL(inDispatchInfo->ReleaseURLStruct(), inDispatchInfo->GetOutputFormat());
}
else
{
// Find topmost "regular" browser window and dispatch into that window
CWindowMediator* theMediator = CWindowMediator::GetWindowMediator();
CBrowserWindow* theTopWindow =
dynamic_cast<CBrowserWindow*>(theMediator->FetchTopWindow(WindowType_Browser, regularLayerType, false));
if (theTopWindow)
{
theTopWindow->Select();
CNSContext* theCurrentContext = theTopWindow->GetWindowContext();
theCurrentContext->SwitchLoadURL(inDispatchInfo->ReleaseURLStruct(), inDispatchInfo->GetOutputFormat());
}
else
{
// No "regular" browser window available, so create one
DispatchToNewBrowserWindow(info.release());
}
}
}
else
{
GetURLDispatcher()->PostPendingDispatch(info.release());
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchMailboxURL(CURLDispatchInfo* inDispatchInfo)
{
#ifdef MOZ_MAIL_NEWS
const char* urlAddress = inDispatchInfo->GetURL();
// Test to see if this is an attachment URL
if (XP_STRSTR(urlAddress, "?part=") || XP_STRSTR(urlAddress, "&part="))
{
// This is a mail attachment, dispatch to browser window
CURLDispatcher::DispatchToBrowserWindow(inDispatchInfo);
}
else if (inDispatchInfo->GetForceCreate())
{
CMessageWindow::OpenFromURL (urlAddress);
/* note: we can't handle an internal link (as in the clause just below), so
we don't bother trying. Just load the message and let the user ask again
once that's completed, if it's really important to go to an internal link. */
}
else if (XP_STRCHR(urlAddress, '#'))
{
// 97-06-08 pkc -- handle internal links here
if (inDispatchInfo->GetTargetContext())
inDispatchInfo->GetTargetContext()->SwitchLoadURL(
inDispatchInfo->ReleaseURLStruct(),
inDispatchInfo->GetOutputFormat());
}
else
{
// Otherwise, call DispatchToMailNewsWindow
DispatchToMailNewsWindow(inDispatchInfo);
}
#endif // MOZ_MAIL_NEWS
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToMailNewsWindow(CURLDispatchInfo* inDispatchInfo)
{
#ifdef MOZ_MAIL_NEWS
CAutoPtr<CURLDispatchInfo> info(inDispatchInfo);
CAutoPtrXP<char> url(XP_STRDUP(inDispatchInfo->GetURL()));
const char* urlAddress = url.get();
// Otherwise, call CMessageWindow::OpenFromURL
switch (MSG_PaneTypeForURL(urlAddress))
{
case MSG_MAILINGLISTPANE:
// ? Open a list window to allow editing of this list?
// Ask someone. Phil? Michelle?
break;
case MSG_ADDRPANE:
// Can't happen, MSG_PaneTypeForURL doesn't return this type,
// but a future release should, and MSG_NewWindowRequired should
// then return true.
break;
case MSG_FOLDERPANE:
CMailNewsFolderWindow::FindAndShow(true);
break;
case MSG_THREADPANE:
CThreadWindow::OpenFromURL(urlAddress);
break;
case MSG_MESSAGEPANE:
CMessageWindow::OpenFromURL((char*)urlAddress);
break;
case MSG_SUBSCRIBEPANE:
// Can't happen, MSG_PaneTypeForURL doesn't return this type,
// but a future release should, and MSG_NewWindowRequired should
// then return true.
// CSubscribePane::FindAndShow();
break;
case MSG_ANYPANE: // this gets returned for most URLs
case MSG_COMPOSITIONPANE:
// presumably, this is from a mailto:, and we handle this already, below.
case MSG_SEARCHPANE:
// Already handled below.
default:
break;
}
#endif // MOZ_MAIL_NEWS
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void CURLDispatcher::DispatchToNewBrowserWindow(CURLDispatchInfo* inDispatchInfo)
{
CAutoPtr<CURLDispatchInfo> info(inDispatchInfo);
CBrowserWindow* theBrowserWindow = NULL;
CNSContext* theContext = NULL;
URL_Struct* theURLStruct = inDispatchInfo->GetURLStruct();
XP_ASSERT(inDispatchInfo != NULL);
if (inDispatchInfo)
{
theBrowserWindow = CreateNewBrowserWindow(inDispatchInfo->GetWindowResID(), false);
if (theBrowserWindow)
{
theContext = theBrowserWindow->GetWindowContext();
if (theURLStruct != nil)
{
if (theURLStruct->window_target && theURLStruct->window_target[0] != '_')
{
// ¥ do not assign special names
theContext->SetDescriptor(theURLStruct->window_target);
}
if (theURLStruct->window_target)
theURLStruct->window_target[0] = 0;
theContext->ImmediateLoadURL(inDispatchInfo->ReleaseURLStruct(), inDispatchInfo->GetOutputFormat());
}
if (inDispatchInfo->GetInitiallyVisible()) theBrowserWindow->Show();
}
}
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CBrowserWindow* CURLDispatcher::CreateNewBrowserWindow(
ResIDT inWindowResID,
Boolean inInitiallyVisible)
{
CBrowserWindow* theBrowserWindow = NULL;
CBrowserContext* theContext = NULL;
try
{
theContext = new CBrowserContext();
StSharer theShareLock(theContext);
theBrowserWindow =
dynamic_cast<CBrowserWindow*>(URobustCreateWindow::CreateWindow(inWindowResID, LCommander::GetTopCommander()));
ThrowIfNULL_(theBrowserWindow);
theBrowserWindow->SetWindowContext(theContext);
sLastBrowserWindowCreated = theBrowserWindow;
if (inInitiallyVisible)
theBrowserWindow->Show();
}
catch (...)
{
delete theBrowserWindow;
throw;
}
return theBrowserWindow;
}
#pragma mark -
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CURLDispatchInfo::CURLDispatchInfo()
: mURLType(HTTP_TYPE_URL),
mURLStruct(NULL),
mTargetContext(NULL),
mOutputFormat(NET_DONT_RELOAD),
mDelayDispatch(false),
mIsSaving(false),
mForceCreate(false),
mInitiallyVisible(true),
mIsWaitingForMochaImageLoad(false),
mWindowResID(1010)
{
}
CURLDispatchInfo::CURLDispatchInfo(
const char* inURL,
CNSContext* inTargetContext,
FO_Present_Types inOutputFormat,
NET_ReloadMethod inReloadMethod,
Boolean inDelay,
Boolean inForceCreate,
Boolean inIsSaving,
ResIDT inWindowResID,
Boolean inInitiallyVisible)
: mTargetContext(NULL),
mOutputFormat(inOutputFormat),
mDelayDispatch(inDelay),
mForceCreate(inForceCreate),
mIsSaving(inIsSaving),
mInitiallyVisible(inInitiallyVisible),
mIsWaitingForMochaImageLoad(false),
mWindowResID(inWindowResID)
{
mURLStruct = NET_CreateURLStruct(inURL, inReloadMethod);
if (inTargetContext)
{
cstring theReferer = inTargetContext->GetCurrentURL();
if (theReferer.length() > 0)
mURLStruct->referer = XP_STRDUP(theReferer);
mTargetContext = inTargetContext;
}
mURLType = NET_URL_Type(inURL);
}
CURLDispatchInfo::CURLDispatchInfo(
URL_Struct* inURLStruct,
CNSContext* inTargetContext,
FO_Present_Types inOutputFormat,
Boolean inDelay,
Boolean inForceCreate,
Boolean inIsSaving,
ResIDT inWindowResID,
Boolean inInitiallyVisible,
Boolean inWaitingForMochaImageLoad)
: mURLStruct(inURLStruct),
mTargetContext(inTargetContext),
mOutputFormat(inOutputFormat),
mDelayDispatch(inDelay),
mForceCreate(inForceCreate),
mIsSaving(inIsSaving),
mInitiallyVisible(inInitiallyVisible),
mIsWaitingForMochaImageLoad(inWaitingForMochaImageLoad),
mWindowResID(inWindowResID)
{
if (inTargetContext && mURLStruct->referer == NULL)
{
cstring theReferer = inTargetContext->GetCurrentURL();
if (theReferer.length() > 0)
mURLStruct->referer = XP_STRDUP(theReferer);
mTargetContext = inTargetContext;
}
if (inURLStruct)
mURLType = NET_URL_Type(NET_URLStruct_Address(inURLStruct));
else
mURLType = 0;
}
CURLDispatchInfo::~CURLDispatchInfo()
{
if (mURLStruct)
{
NET_FreeURLStruct(mURLStruct);
}
}
URL_Struct* CURLDispatchInfo::ReleaseURLStruct()
{
URL_Struct* url = mURLStruct;
mURLStruct = NULL;
return url;
}
char* CURLDispatchInfo::GetURL()
{
if (mURLStruct)
return NET_URLStruct_Address(mURLStruct);
else
return NULL;
}
void CURLDispatchInfo::SetFileSpec(const FSSpec& inFileSpec)
{
mFileSpec = inFileSpec;
}

View File

@@ -1,210 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// CURLDispatcher.h
#ifndef CURLDispatcher_H
#define CURLDispatcher_H
#pragma once
#include <LPeriodical.h>
#include <LListener.h>
#include "structs.h"
#include "CAutoPtr.h"
#include "ntypes.h"
#include "net.h" // for FO_CACHE_AND_PRESENT
class CNSContext;
class CBrowserContext;
class CBrowserWindow;
class CURLDispatchInfo;
// Dispatch function prototype
const ResIDT BrowserWindow_ResID = 1010;
typedef void (*DispatchProcPtr)(CURLDispatchInfo* inDispatchInfo);
class CURLDispatcher :
public LPeriodical,
public LListener
{
public:
static void DispatchToStorage(
URL_Struct* inURL,
const FSSpec& inDestSpec,
FO_Present_Types inOutputFormat = FO_SAVE_AS,
Boolean inDelay = false);
static void DispatchToStorage(CURLDispatchInfo* inDispatchInfo);
virtual void SpendTime(const EventRecord& inMacEvent);
virtual void ListenToMessage(
MessageT inMessage,
void* ioParam);
static Uint32 CountDelayedURLs() { return GetURLDispatcher()->GetCountDelayedURLs(); }
// 97-05-13 pkc -- New URL dispatch mechanism
static void DispatchURL(
const char* inURL,
CNSContext* inTargetContext,
Boolean inDelay = false,
Boolean inForceCreate = false,
ResIDT inWindowResID = BrowserWindow_ResID,
Boolean inInitiallyVisible = true,
FO_Present_Types inOutputFormat = FO_CACHE_AND_PRESENT,
NET_ReloadMethod inReloadMethod = NET_DONT_RELOAD);
static void DispatchURL(
URL_Struct* inURLStruct,
CNSContext* inTargetContext,
Boolean inDelay = false,
Boolean inForceCreate = false,
ResIDT inWindowResID = BrowserWindow_ResID,
Boolean inInitiallyVisible = true,
FO_Present_Types inOutputFormat = FO_CACHE_AND_PRESENT,
Boolean inWaitingForMochaImageLoad = false);
static void DispatchURL(CURLDispatchInfo* inDispatchInfo);
// Dispatch procs
static void DispatchToLibNet(CURLDispatchInfo* inDispatchInfo);
static void DispatchToBrowserWindow(CURLDispatchInfo* inDispatchInfo);
static void DispatchMailboxURL(CURLDispatchInfo* inDispatchInfo);
static void DispatchToMailNewsWindow(CURLDispatchInfo* inDispatchInfo);
// Utility functions
static void DispatchToNewBrowserWindow(CURLDispatchInfo* inDispatchInfo);
static CBrowserWindow* CreateNewBrowserWindow(
ResIDT inWindowResID = BrowserWindow_ResID,
Boolean inInitiallyVisible = true);
// Return the browser window created by the last call to DispatchToView. Note that
// if the dispatch was delayed, this will be null until the pending dispatch is processed.
static CBrowserWindow* GetLastBrowserWindowCreated() { return sLastBrowserWindowCreated; }
protected:
static CURLDispatcher* GetURLDispatcher(); // singleton class
static void DispatchToDisk(CURLDispatchInfo* inDispatchInfo);
static void DispatchToDiskAsText(CURLDispatchInfo* inDispatchInfo);
Uint32 GetCountDelayedURLs() const { return mDelayedURLs.GetCount(); }
virtual void PostPendingDispatch(CURLDispatchInfo* inDispatchInfo);
virtual void UpdatePendingDispatch(
CNSContext* inForContext);
virtual void ProcessPendingDispatch(void);
LArray mDelayedURLs;
// reset to NULL on entry in DispatchToView(), set in DispatchToNewBrowserWindow()
static CBrowserWindow* sLastBrowserWindowCreated;
static CAutoPtr<CURLDispatcher> sDispatcher;
static CAutoPtr<CBrowserContext> sDispatchContext;
private:
friend class CAutoPtr<CURLDispatcher>;
friend class CAutoPtr<CBrowserContext>;
CURLDispatcher();
virtual ~CURLDispatcher();
};
// Info needed to dispatch a URL
class CURLDispatchInfo
{
public:
CURLDispatchInfo();
CURLDispatchInfo(
const char* inURL,
CNSContext* inTargetContext,
FO_Present_Types inOutputFormat,
NET_ReloadMethod inReloadMethod = NET_DONT_RELOAD,
Boolean inDelay = false /* BLECH! */,
Boolean inForceCreate = false,
Boolean inIsSaving = false,
ResIDT inWindowResID = BrowserWindow_ResID,
Boolean inInitiallyVisible = true);
CURLDispatchInfo(
URL_Struct* inURLStruct,
CNSContext* inTargetContext,
FO_Present_Types inOutputFormat,
Boolean inDelay = false /* BLECH! */,
Boolean inForceCreate = false,
Boolean inIsSaving = false,
ResIDT inWindowResID = BrowserWindow_ResID,
Boolean inInitiallyVisible = true,
Boolean inWaitingForMochaImageLoad = false);
virtual ~CURLDispatchInfo();
Int32 GetURLType() { return mURLType; }
char* GetURL();
URL_Struct* GetURLStruct() { return mURLStruct; }
CNSContext* GetTargetContext() { return mTargetContext; }
FO_Present_Types GetOutputFormat() { return mOutputFormat; }
Boolean GetDelay() { return mDelayDispatch; }
Boolean GetIsSaving() { return mIsSaving; }
Boolean GetInitiallyVisible() { return mInitiallyVisible; }
FSSpec& GetFileSpec() { return mFileSpec; }
ResIDT GetWindowResID() { return mWindowResID; }
Boolean GetForceCreate() { return mForceCreate; }
Boolean GetIsWaitingForMochaImageLoad()
{ return mIsWaitingForMochaImageLoad; }
URL_Struct* ReleaseURLStruct();
void ClearDelay() { mDelayDispatch = false; }
void SetFileSpec(const FSSpec& inFileSpec);
void SetTargetContext(CNSContext* inTargetContext)
{ mTargetContext = inTargetContext; }
protected:
Int32 mURLType;
URL_Struct* mURLStruct;
CNSContext* mTargetContext;
FO_Present_Types mOutputFormat;
Boolean mDelayDispatch;
Boolean mForceCreate;
Boolean mIsSaving;
Boolean mInitiallyVisible;
Boolean mIsWaitingForMochaImageLoad;
FSSpec mFileSpec;
ResIDT mWindowResID;
};
#endif

View File

@@ -1,184 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
This file contains Navigator only code which supports "Send Page..." and
"mailto:" URLs using an external mail client registered with InternetConfig.
*/
#ifndef MOZ_MAIL_NEWS
#include "msgcom.h" // MSG_MailDocument()
#include "xlate.h" // PrintSetup
#include "shist.h" // SHIST_GetCurrent()
#include "xpgetstr.h" // XP_GetString()
#include "CURLDispatcher.h" // CURLDispatcher::DispatchURL()
#include "CNSContext.h" // ExtractNSContext()
#include "net.h" // NET_Escape()
extern int MK_MSG_MSG_COMPOSITION;
#define MAX_MAIL_SIZE 300000
extern "C" void FE_DoneMailTo(PrintSetup * print) ;
extern "C" void FE_DoneMailTo(PrintSetup * print)
{
const char * prefix = "mailto:?body=";
const char * blankLines = "\r\n\r\n";
XP_ASSERT(print);
if (!print)
return;
XP_ASSERT(print->url);
if (!print->url)
return;
fclose(print->out); // don't need this for writing anymore.
MWContext * context = (MWContext *) (print->carg);
if (!context) // we'll require this later
return;
char * buffer = (char *) malloc(MAX_MAIL_SIZE);
if (buffer) {
strcpy(buffer, print->url->address);
strcat(buffer, blankLines);
int buflen = strlen(buffer);
// now tack as much of the page onto the body as we have space for...
FILE * fp = fopen(print->filename, "r");
if (fp) {
int len = fread(buffer + buflen, 1, MAX_MAIL_SIZE - buflen - (5 /* slop? */), fp);
buffer[buflen + len] = '\0';
fclose(fp);
char *temp = NET_Escape (buffer, URL_XALPHAS);
XP_FREE(buffer);
buffer = temp;
} else {
XP_FREE(buffer);
buffer = NULL;
}
}
// get rid of the file and free the memory
remove(print->filename);
char *buffer2 = NULL;
if (buffer) {
buffer2 = (char *) malloc(strlen(prefix) + strlen(buffer) + 1);
if (buffer2) {
strcpy(buffer2, prefix); // start creating a "mailto:" URL
strcat(buffer2, buffer); // the message
}
}
if (buffer2 == NULL) { // no buffer, or we don't have enough memory to use it, try to just send the URL...
if (buffer)
XP_FREE(buffer); // if we're here, we can't use the buffer anyway...
buffer = NET_Escape (print->url->address, URL_XALPHAS);
if (buffer == NULL)
return; // not enough memory to do ANYTHING useful!
buffer2 = (char *) malloc(strlen(prefix) + strlen(buffer) + 1);
if (buffer2 == NULL) {
XP_FREE(buffer);
return; // not enough memory to do ANYTHING useful!
}
strcpy(buffer2, prefix); // start creating a "mailto:" URL
strcat(buffer2, buffer); // the message
}
XP_FREE(buffer);
// XP_FREE(print->filename);
// print->filename = NULL;
CURLDispatcher::DispatchURL(buffer2, ExtractNSContext(context));
XP_FREE(buffer2);
}
#ifndef MOZ_MAIL_COMPOSE
extern MSG_Pane* MSG_MailDocument(MWContext *context)
{
if(!context)
return NULL;
History_entry * hist_ent = SHIST_GetCurrent(&(context->hist));
// make sure there was a document loaded
if(!hist_ent)
return NULL;
//Set hist_ent to NULL if context->title is "Message Composition"
//This is a nasty way of determining if we're in here in response
//to "Mail Doc" or "New Mail Message".
//Also, if there's To: field info present(pBar->m_pszTo) then
//we know that it's a Mailto: and set hist_ent to NULL
//Without this differentiation the code always sends the contents
//of the previously mailed document even when someone chooses
//"New Mail Message" or "Mailto:"
if(!strcmp(XP_GetString(MK_MSG_MSG_COMPOSITION), context->title))
return NULL;
URL_Struct * URL_s = SHIST_CreateURLStructFromHistoryEntry(context, hist_ent);
if (!URL_s)
return NULL;
// Zero out the saved data
memset(&URL_s->savedData, 0, sizeof(URL_s->savedData));
PrintSetup print;
XL_InitializeTextSetup(&print);
print.width = 68;
print.prefix = "";
print.eol = "\r\n";
char * name = WH_TempName(xpTemporary, NULL);
if(!name) {
// Leak URL_s here
return(FALSE);
}
print.out = fopen(name, "w");
print.completion = (XL_CompletionRoutine) FE_DoneMailTo;
print.carg = context;
print.filename = name;
print.url = URL_s;
// leave pCompose window alive until completion routine
XL_TranslateText(context, URL_s, &print);
return NULL;
}
#endif // ! MOZ_MAIL_COMPOSE
#endif // !MOZ_MAIL_NEWS

View File

@@ -1,609 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// InternetConfig.cp
//
// Created by Tim Craycroft, 2/9/96
//
#include "InternetConfig.h"
#include <ICAPI.h>
#include <ICKeys.h>
#include <LListener.h>
#include <LPeriodical.h>
#include "xp_core.h"
#include "xp_str.h"
#include "uprefd.h"
#include "prefapi.h" // ns/modules/libpref
#include "resgui.h"
//
// InternetConfig class.
//
// Checks the IC seed on resume events
//
class CInternetConfig
{
public:
static void Connect();
static void Disconnect();
static ICError GetInternetConfigString(ConstStr255Param icKey,
Str255 s,
long *port = nil);
static ICError GetInternetConfigFileMapping( OSType fileType,
OSType creator,
ConstStr255Param fileName,
ICMapEntry *ent);
static ICError LaunchInternetConfigApplication(ConstStr255Param key);
#ifndef MOZ_MAIL_NEWS
static ICError SendInternetConfigURL(char *address);
#endif
static int UseICPrefCallback(const char *prefString, void *);
static void ResumeEvent();
static Boolean CurrentlyUsingIC();
static Boolean HaveICInstance();
private:
CInternetConfig();
~CInternetConfig();
void SynchIf(); // iff the seed has changed
void SynchFromIC();
ICError SynchStringFromIC( ConstStr255Param icKey,
CPrefs::PrefEnum netscapePref,
Boolean stripPort = false,
const char *xpPortPrefName = nil,
int32 defaultPort = 0);
ICError SynchSplitStringFromIC( ConstStr255Param icKey,
char divider,
CPrefs::PrefEnum firstString,
CPrefs::PrefEnum secondString,
Boolean stripPort = false);
ICError GetICString( ConstStr255Param icKey,
Str255 s,
int32 *port = nil);
ICError GetICFileMapping( OSType fileType,
OSType creator,
ConstStr255Param fileName,
ICMapEntry *ent);
ICError LaunchICApplication(ConstStr255Param key);
#ifndef MOZ_MAIL_NEWS
ICError SendICURL(char *address);
#endif
ICInstance fInstance;
SInt32 fSeed;
static CInternetConfig* sInternetConfigConnection;
};
void
CInternetConfigInterface::ResumeEvent()
{
CInternetConfig::ResumeEvent();
}
//
// ConnectToInternetConfig
//
// Only public entrypoint to this InternetConfig module.
//
// gets the folder from CPrefs::GetFilePrototype(prefSpec(, MainFolder)
//
void
CInternetConfigInterface::ConnectToInternetConfig()
{
// I assume that this is only called once, at startup.
const char *useICPrefName = "browser.mac.use_internet_config";
PREF_RegisterCallback(useICPrefName, CInternetConfig::UseICPrefCallback, nil);
try
{
if (CInternetConfig::CurrentlyUsingIC())
{
CInternetConfig::Connect();
}
}
catch(ICError err)
{
// do something ? a dialog perhaps ?
// only if there is a real problem, not if
// IC just isn't installed.
}
}
void
CInternetConfigInterface::DisconnectFromInternetConfig()
{
CInternetConfig::Disconnect();
}
Boolean
CInternetConfigInterface::CurrentlyUsingIC(void)
{
Boolean returnValue = TRUE;
returnValue = returnValue && CInternetConfig::CurrentlyUsingIC();
returnValue = returnValue && CInternetConfig::HaveICInstance();
return returnValue;
}
void
CInternetConfigInterface::GetInternetConfigString( ConstStr255Param icKey,
Str255 s,
long *port)
{
if (CInternetConfig::GetInternetConfigString(icKey, s, port))
{
s[0] = 0;
}
}
ICError
CInternetConfigInterface::GetInternetConfigFileMapping( OSType fileType,
OSType creator,
ConstStr255Param fileName,
ICMapEntry *ent)
{
return CInternetConfig::GetInternetConfigFileMapping(fileType, creator,
fileName, ent);
}
#ifndef MOZ_MAIL_NEWS
ICError
CInternetConfigInterface::SendInternetConfigURL(char *address)
{
return CInternetConfig::SendInternetConfigURL(address);
}
#endif
ICError
CInternetConfigInterface::LaunchInternetConfigApplication(ConstStr255Param key)
{
return CInternetConfig::LaunchInternetConfigApplication(key);
}
CInternetConfig*
CInternetConfig::sInternetConfigConnection = nil;
Boolean
CInternetConfig::CurrentlyUsingIC()
{
XP_Bool result;
const char *useICPrefName = "browser.mac.use_internet_config";
if (PREF_NOERROR != PREF_GetBoolPref(useICPrefName, &result))
{
result = false;
}
return (Boolean)result;
}
//
// CInternetConfig::Connect
//
// Call once to hook up with IC.
//
void
CInternetConfig::Connect()
{
if (!sInternetConfigConnection)
{
sInternetConfigConnection = new CInternetConfig();
}
}
//
// Bail
//
void
CInternetConfig::Disconnect()
{
if (sInternetConfigConnection != nil)
{
delete sInternetConfigConnection;
sInternetConfigConnection = nil;
}
}
Boolean
CInternetConfig::HaveICInstance(void)
{
Boolean returnValue = FALSE;
Connect();
if (sInternetConfigConnection != nil)
{
returnValue = (sInternetConfigConnection->fInstance != NULL);
}
return returnValue;
}
//
// CInternetConfig::CInternetConfig
//
CInternetConfig::CInternetConfig():
fInstance(NULL)
{
ICError err;
// Detect IC, if present
StValueChanger<EDebugAction> okayToFail(gDebugThrow, debugAction_Nothing);
err = ::ICStart(&fInstance, emSignature);
//ThrowIfOSErr_(err);
if (!err)
{
try
{
ICDirSpec prefDir[1];
ICDirSpecArrayPtr prefDirArray;
UInt32 dirCount = 0;
// what a wonderful api...
//
// Give IC the directory that contains the pref file we're using
// so it can look there for an IC config file.
prefDirArray = (ICDirSpecArrayPtr) &prefDir;
FSSpec prefSpec = CPrefs::GetFilePrototype(CPrefs::MainFolder);
prefDir[0].vRefNum = prefSpec.vRefNum;
prefDir[0].dirID = prefSpec.parID;
dirCount = 1;
err = ::ICFindConfigFile(fInstance, dirCount, prefDirArray);
ThrowIfOSErr_(err);
// Remember initial seed
err = ::ICGetSeed(fInstance, &fSeed);
ThrowIfOSErr_(err);
// Read prefs from IC
if (CurrentlyUsingIC())
{
SynchFromIC();
}
}
catch(ICError err)
{
// Close IC connection and pass the error along
::ICStop(fInstance);
fInstance = NULL;
// throw(err);
// we probably out to delete "this" as well
}
}
}
int
CInternetConfig::UseICPrefCallback(const char *, void *)
{
if (CInternetConfig::CurrentlyUsingIC())
{
Connect();
sInternetConfigConnection->SynchFromIC();
}
return 0; // You don't even want to know my opinion of this!
}
//
// CInternetConfig::~CInternetConfig
//
CInternetConfig::~CInternetConfig()
{
if (fInstance != NULL)
{
::ICStop(fInstance); // close IC connection
}
}
//
// CInternetConfig::SynchFromIC
//
// Reads IC settings and converts them to Netscape prefs
//
void
CInternetConfig::SynchFromIC()
{
ICError err;
err = ::ICBegin(fInstance, icReadOnlyPerm);
ThrowIfOSErr_(err);
// Again, this is lame.
//
// We should have a table of some sort
//
SynchStringFromIC(kICRealName, CPrefs::UserName);
SynchStringFromIC(kICEmail, CPrefs::UserEmail);
SynchStringFromIC(kICEmail, CPrefs::ReplyTo); // IC has no reply-to
SynchSplitStringFromIC(kICMailAccount, '@', CPrefs::PopID, CPrefs::PopHost, true);
SynchStringFromIC(kICSMTPHost, CPrefs::SMTPHost, true);
SynchStringFromIC(kICWWWHomePage, CPrefs::HomePage);
SynchStringFromIC(kICOrganization, CPrefs::Organization);
SynchStringFromIC(kICNNTPHost, CPrefs::NewsHost, true, "news.server_port", 119);
::ICEnd(fInstance);
}
void
CInternetConfig::SynchIf()
{
SInt32 seed;
if (::ICGetSeed(fInstance, &seed))
{
return;
}
if (seed != fSeed)
{
try
{
SynchFromIC();
}
catch(ICError err)
{
}
fSeed = seed;
}
}
//
// CInternetConfig::ResumeEvent
//
//
void
CInternetConfig::ResumeEvent()
{
if (CurrentlyUsingIC())
{
Connect();
sInternetConfigConnection->SynchIf();
}
}
//
// CInternetConfig::SynchStringFromIC
//
// Set a netscape string from an IC string
ICError
CInternetConfig::SynchStringFromIC( ConstStr255Param icKey,
CPrefs::PrefEnum netscapePref,
Boolean stripPort,
const char *xpPortPrefName,
int32 defaultPort)
{
char s[256];
ICError err;
int32 *portPtr = stripPort ? &defaultPort : nil;
err = GetICString(icKey, (unsigned char*) s, portPtr);
if (err == 0)
{
p2cstr((StringPtr)s);
CPrefs::SetString(s, netscapePref);
if (xpPortPrefName)
{
PREF_SetIntPref(xpPortPrefName, defaultPort);
}
}
return err;
}
//
// CInternetConfig::SynchSplitStringFromIC
//
// Takes a single IC string and splits it into two Netscape strings.
// Useful for machine@host.domain.com, or proxy.address:port type stuff
//
// If the divider can't be found, the entire string is put into the
// first netscape string and the second netscape string is set to '\0'
//
ICError
CInternetConfig::SynchSplitStringFromIC( ConstStr255Param icKey,
char divider,
CPrefs::PrefEnum firstString,
CPrefs::PrefEnum secondString,
Boolean stripPort)
{
char buffer[256];
char *s;
char *split;
ICError err;
s = buffer;
err = GetICString(icKey, (unsigned char *) s);
if (err != 0) return err;
p2cstr((StringPtr)s);
split = strchr(s, divider);
if (split != NULL)
{
*split = '\0';
if (stripPort)
{
char *colon = strchr(split+1, ':');
if (colon)
{
*colon = '\0';
}
}
CPrefs::SetString(split+1, secondString);
}
else
{
CPrefs::SetString('\0', secondString);
}
CPrefs::SetString(s, firstString);
return 0;
}
//
// CInternetConfig::GetICString
//
// Gets an IC string pref
//
ICError
CInternetConfig::GetInternetConfigString( ConstStr255Param icKey,
Str255 s,
long *port)
{
Connect();
return sInternetConfigConnection->GetICString(icKey, s, port);
}
//
// CInternetConfig::GetICString
//
// Gets an IC string pref
//
ICError
CInternetConfig::GetICString( ConstStr255Param icKey,
Str255 s,
int32 *port)
{
ICAttr attr;
long size = 256;
ICError result;
result = ::ICGetPref(fInstance, icKey, &attr, (Ptr)s, &size);
if (!result)
{
if (port)
{
char cString[256];
BlockMoveData(&s[1], cString, s[0]);
cString[s[0]] = '\0';
char *colon = strchr(cString, ':');
if (colon)
{
*colon = '\0';
s[0] = colon - cString;
++colon;
// IC supposedly supports notations like:
// news.netscape.com:nntp
// The protocol services don't seem to work in IC (or I'm to stupid
// to make them work), so we just check for this one value ("nntp")
// because that is the only protocol for which we support port numbers.
if (!XP_STRCASECMP("nntp", colon))
{
*port = 119;
}
else
{
// Add more protocols here if/when we suppor them.
long portFromICString;
int numargs = sscanf(colon, "%ld", &portFromICString);
if (1 == numargs)
{
if (portFromICString >= 0) // negative port numbers are not valid
{
*port = portFromICString;
}
}
// else we just use the default port
}
}
}
}
return result;
}
#ifndef MOZ_MAIL_NEWS
ICError
CInternetConfig::SendInternetConfigURL(char *address)
{
Connect();
return sInternetConfigConnection->SendICURL(address);
}
ICError
CInternetConfig::SendICURL(char *address)
{
if (address == NULL)
return icNoURLErr;
long selStart = 0;
long selEnd = strlen(address);
if( CInternetConfig::HaveICInstance() )
return ::ICLaunchURL(fInstance, "\p", address, selEnd, &selStart, &selEnd);
else
return icPrefNotFoundErr;
}
#endif
ICError
CInternetConfig::GetInternetConfigFileMapping( OSType fileType,
OSType creator,
ConstStr255Param filename,
ICMapEntry *ent)
{
Connect();
return sInternetConfigConnection->GetICFileMapping(fileType, creator, filename, ent);
}
ICError
CInternetConfig::GetICFileMapping( OSType fileType,
OSType creator,
ConstStr255Param filename,
ICMapEntry *ent)
{
if( CInternetConfig::HaveICInstance() )
return ::ICMapTypeCreator(fInstance, fileType, creator, filename, ent);
else
return icPrefNotFoundErr;
}
ICError
CInternetConfig::LaunchInternetConfigApplication(ConstStr255Param key)
{
Connect();
return sInternetConfigConnection->LaunchICApplication(key);
}
ICError
CInternetConfig::LaunchICApplication(ConstStr255Param key)
{
if (CInternetConfig::HaveICInstance())
return ::ICEditPreferences(fInstance, key);
else
return icPrefNotFoundErr;
}

View File

@@ -1,88 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
//
// InternetConfig.h
//
// MacFE interface to its support for Apple Internet Config
//
// Created by Tim Craycroft, 2/11/96
//
//
#pragma once
#include "ICAPI.h"
// Always call.
//
// This will determine if InternetConfig is present
// and do the right thing.
//
// Everything else is taken care of behind the scenes.
//
// Note:
//------
// It reads "Everything else is taken care of behind the scenes" and that's right:
// the API below is ok. That's the "everything else" which is sub optimal.
// If you need to add a method in CInternetConfigInterface, I recommend you to
// have a look at how LaunchInternetConfigApplication() and GetInternetConfigString()
// are implemented. For a single method here, you need two methods "behind the scenes".
class CInternetConfigInterface
{
public:
static Boolean CurrentlyUsingIC(void);
// returns true iff IC is installed and we're listening to it
static ICError LaunchInternetConfigApplication(ConstStr255Param key);
// Lauches the app and opens one of the config panels (if specified).
// The list of keys is in <ICKeys.h>.
static void ConnectToInternetConfig();
// gets the folder from CPrefs::GetFilePrototype(prefSpec(, MainFolder)
static void DisconnectFromInternetConfig();
// yeah, like this gets called
static void GetInternetConfigString(ConstStr255Param icKey,
Str255 s,
long *port= nil);
// If an error is encountered, s is set to "\p".
// If port is not nil, then the following assumptions are made:
// * The string is a server name that may be have a ":portnumber"
// appended to it.
// * The initial value of *port is the default port number.
// If port is not nil, then the returned string will have the ":number"
// stripped and the *port value will be the port specified by the
// user.
static ICError GetInternetConfigFileMapping( OSType fileType,
OSType creator,
ConstStr255Param filename,
ICMapEntry *ent);
#ifndef MOZ_MAIL_NEWS
static ICError SendInternetConfigURL(char *address);
#endif
static void ResumeEvent();
// somebody call me when I need to check the IC seed value
};

View File

@@ -1,260 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "LTSMSupport.h"
static Boolean mHasTextServices = false;
static Boolean mHasTSMTE = false;
static ScriptCode mSysScript = smRoman;
static Boolean mTSMTEisVersion1 = false;
static TSMTEPreUpdateUPP mTSMTEPreUpdateUPP = NULL;
static TSMTEPostUpdateUPP mTSMTEPostUpdateUPP = NULL;
static Boolean TrapAvailable(short theTrap);
static pascal void DefaultTSMTEPreUpdateProc(TEHandle textH, long refCon);
// ---------------------------------------------------------------------------
// Copy from InlineInputSample.c
// this TSMTEPreUpdateProc only works around a bug in TSMTE 1.0, which has
// been fixed in 1.1. For other possible uses, see technote TE 27.
// ---------------------------------------------------------------------------
static pascal void DefaultTSMTEPreUpdateProc(TEHandle textH, long refCon)
{
#pragma unused(refCon)
if (mTSMTEisVersion1) // Modified here for performance
{
ScriptCode keyboardScript;
short mode;
TextStyle theStyle;
keyboardScript = ::GetScriptManagerVariable(smKeyScript);
mode = doFont;
if (!(::TEContinuousStyle(&mode, &theStyle, textH) &&
::FontToScript(theStyle.tsFont) == keyboardScript))
{
theStyle.tsFont = ::GetScriptVariable(keyboardScript, smScriptAppFond);
::TESetStyle(doFont, &theStyle, false, textH);
};
};
}
// ---------------------------------------------------------------------------
// ¥ Initialization
// ---------------------------------------------------------------------------
// Default constructor
void LTSMSupport::Initialize()
{
mSysScript = ::GetScriptManagerVariable(smSysScript);
CheckForTextServices();
BeginTextServices();
TSMTENewUPP();
}
// ---------------------------------------------------------------------------
// ¥ CheckForTextServices
// Call by constructor
// From TE27 Page 4/14
// ---------------------------------------------------------------------------
void LTSMSupport::CheckForTextServices(void)
{
long gestaltResponse;
if (::TrapAvailable(_Gestalt))
{
if ((::Gestalt(gestaltTSMgrVersion, &gestaltResponse) == noErr) &&
(gestaltResponse >= 1))
{
mTSMTEisVersion1 = (gestaltResponse == gestaltTSMTE1);
mHasTextServices = true;
if (::Gestalt(gestaltTSMTEAttr, &gestaltResponse) == noErr)
mHasTSMTE = ((gestaltResponse >> gestaltTSMTEPresent) & 1);
};
};
}
// ---------------------------------------------------------------------------
// ¥ TSMTENewUPP
// Modified from InlineInputSample.c
// ---------------------------------------------------------------------------
void LTSMSupport::TSMTENewUPP()
{
if(mHasTSMTE) {
if(mTSMTEPreUpdateUPP == NULL )
mTSMTEPreUpdateUPP = NewTSMTEPreUpdateProc(DefaultTSMTEPreUpdateProc);
}
}
// ---------------------------------------------------------------------------
// ¥ BeginTextServices
// Call by constructor
// From TE27 Page 4/14
// ---------------------------------------------------------------------------
void LTSMSupport::BeginTextServices()
{
if (!(mHasTSMTE && ::InitTSMAwareApplication() == noErr))
{
// if this happens, just move on without text services
mHasTextServices = false;
mHasTSMTE = false;
};
}
// ---------------------------------------------------------------------------
// ¥ DoQuit
// Called by DoQuit()
// From TE27 Page 4/14
// ---------------------------------------------------------------------------
void LTSMSupport::DoQuit(Int32 inSaveOption)
{
if (mHasTextServices)
(void) ::CloseTSMAwareApplication();
}
// ---------------------------------------------------------------------------
// ¥ IntlTSMEvent
// From TE27 Page 11/14
// ---------------------------------------------------------------------------
Boolean
LTSMSupport::TSMEvent(const EventRecord &inMacEvent)
{
short oldFont;
ScriptCode keyboardScript;
if(mHasTextServices)
{
// make sure we have a port and it's not the Window Manager port
// if (qd.thePort != nil && ::FrontWindow() != nil)
// {
// oldFont = qd.thePort->txFont;
// keyboardScript = ::GetScriptManagerVariable(smKeyScript);
// if (::FontToScript(oldFont) != keyboardScript)
// ::TextFont(GetScriptVariable(keyboardScript, smScriptAppFond));
// };
return ::TSMEvent((EventRecord *)&inMacEvent);
}
else
{
return false;
}
}
// ---------------------------------------------------------------------------
// ¥ IntlTSMEvent
// From TE27 Page 11/14
// ---------------------------------------------------------------------------
Boolean LTSMSupport::SetTSMCursor(Point mousePos)
{
if(mHasTextServices)
return ::SetTSMCursor(mousePos);
else
return false;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
Boolean LTSMSupport::HasTextServices()
{
return mHasTextServices;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
Boolean LTSMSupport::HasTSMTE()
{
return mHasTSMTE;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
TSMTEPreUpdateUPP LTSMSupport::GetDefaultTSMTEPreUpdateUPP()
{
return mTSMTEPreUpdateUPP;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
TSMTEPostUpdateUPP LTSMSupport::GetDefaultTSMTEPostUpdateUPP()
{
return mTSMTEPostUpdateUPP;
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
void LTSMSupport::StartFontScriptLimit()
{
//short theFontScript = ::FontScript();
//StartFontScriptLimit(theFontScript);
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
void LTSMSupport::StartFontScriptLimit( ScriptCode scriptcode)
{
// We want to disable all the script except: Roman and the Font script
// 1. we have set the system script to the font script
// 2. disable all the script except Roman and System script by calling
// KeyScript(smDisablKybds);
// 3. Should we also switch input method to the font script ?
// 4. restore the system script.
//if(mSysScript != scriptcode)
//{
// ::SetScriptManagerVariable(smSysScript, scriptcode);
//}
//if(scriptcode != ::GetScriptManagerVariable(smKeyScript))
//{
// ::KeyScript(scriptcode);
//}
// ::KeyScript(smKeyDisableKybds);
// ::SetScriptManagerVariable(smSysScript, mSysScript);
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
void LTSMSupport::EndFontScriptLimit()
{
// Re-enable all the script
//::KeyScript(smKeyEnableKybds);
//::SetScriptManagerVariable(smSysScript, mSysScript);
}
// ---------------------------------------------------------------------------
// check to see if a given trap is implemented. We follow IM VI-3-8.
// ---------------------------------------------------------------------------
static
Boolean TrapAvailable(short theTrap)
{
TrapType theTrapType;
short numToolboxTraps;
if ((theTrap & 0x0800) > 0)
theTrapType = ToolTrap;
else
theTrapType = OSTrap;
if (theTrapType == ToolTrap)
{
theTrap = theTrap & 0x07ff;
if (NGetTrapAddress(_InitGraf, ToolTrap) == NGetTrapAddress(0xaa6e, ToolTrap))
numToolboxTraps = 0x0200;
else
numToolboxTraps = 0x0400;
if (theTrap >= numToolboxTraps)
theTrap = _Unimplemented;
};
return (NGetTrapAddress(theTrap, theTrapType) != NGetTrapAddress(_Unimplemented, ToolTrap));
}

View File

@@ -1,68 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include <TextServices.h>
#ifndef __LTSMSUPPORT__
#define __LTSMSUPPORT__
#include <TSMTE.h>
// ftang:
// LTSMSupport handle the following TSM stuff:
// InitTSMAwareApplication() - in Initalize() => BeginTextServices()
// CloseTSMAwareApplication() - in DoQuit() => EndTextServices()
// TSMEvent() - in TSMEvent()
// SetTSMCursor() - in SetTSMCursor()
//
// LTSMSupport handle the following TSM stuff:
// NewTSMDocument()
// DeleteTSMDocument()
// ActiveTSMDocument()
// DeactivateTSMDocument()
// FixTSMDocument()
//
// The following TSM stuff will not be handle:
// TSMMenuSelect() : We only deal with input method. Therefore, ignore it
// See IM-Text 7-22
class LTSMSupport {
public:
static void Initialize();
static void DoQuit(Int32 inSaveOption);
static Boolean TSMEvent(const EventRecord &inMacEvent);
static Boolean SetTSMCursor(Point mousePos);
static Boolean HasTextServices();
static Boolean HasTSMTE();
static TSMTEPreUpdateUPP GetDefaultTSMTEPreUpdateUPP();
static TSMTEPostUpdateUPP GetDefaultTSMTEPostUpdateUPP();
static void StartFontScriptLimit();
static void StartFontScriptLimit( ScriptCode scriptcode );
static void EndFontScriptLimit();
protected:
static void CheckForTextServices(void);
static void BeginTextServices(void);
static void TSMTENewUPP();
};
#endif

View File

@@ -1,685 +0,0 @@
//----------------------------------------------------------------------------------------
// PascalString.cp
// Copyright © 1985-1993 by Apple Computer, Inc. All rights reserved.
//----------------------------------------------------------------------------------------
#include "PascalString.h"
// #include "xpassert.h"
#ifndef __STDIO__
#include <stdio.h>
#endif
#ifndef __STRING__
#include <string.h>
#endif
#pragma segment Main
//========================================================================================
// CLASS CString
//========================================================================================
//----------------------------------------------------------------------------------------
// CString::InsertHelper(CString):
//----------------------------------------------------------------------------------------
void CString::InsertHelper(const CString& insStr,
short pos,
short maxLength)
{
if (pos > Length() + 1)
{
#if qDebugMsg
fprintf(stderr, "###CString::InsertHelper: Insert position greater than length of CString.\n");
#endif
if (Length() < maxLength)
pos = Length() + 1;
}
#if qDebugMsg
if (Length() + insStr.Length() > maxLength)
fprintf(stderr, "### CString::InsertHelper: CString truncated during insert call.\n");
#endif
short usableLengthOfInsertString;
short endPosOfInsertString;
short usableLengthOfShiftedString;
if (pos + insStr.Length() > maxLength)
usableLengthOfInsertString = maxLength - pos + 1;
else
usableLengthOfInsertString = insStr.Length();
endPosOfInsertString = pos + usableLengthOfInsertString - 1;
if ((endPosOfInsertString + 1) + (Length() - pos + 1) > maxLength)
usableLengthOfShiftedString = maxLength - endPosOfInsertString;
else
usableLengthOfShiftedString = Length() - pos + 1;
memmove(&fStr[endPosOfInsertString + 1], &fStr[pos], usableLengthOfShiftedString);
memmove(&fStr[pos], &insStr.fStr[1], usableLengthOfInsertString);
Length() = usableLengthOfShiftedString + endPosOfInsertString;
} // CString::InsertHelper(CString)
//----------------------------------------------------------------------------------------
// CString::InsertHelper(char*):
//----------------------------------------------------------------------------------------
void CString::InsertHelper(const char* insStr,
short pos,
short maxLength)
{
this->InsertHelper(CStr255(insStr), pos, maxLength);
} // CString::InsertHelper(char*)
//----------------------------------------------------------------------------------------
// CString::operator char*:
//----------------------------------------------------------------------------------------
CString::operator char*() const
{
static short currentCString = 0;
static char cStrings[kTempCStrings][kStr255Len+1];
currentCString = (currentCString + 1) % kTempCStrings;
strncpy(cStrings[currentCString], (char *) &fStr[1], Length());
cStrings[currentCString][Length()] = '\0';
return cStrings[currentCString];
} // CString::operator char*
//----------------------------------------------------------------------------------------
// CString::operator long:
//----------------------------------------------------------------------------------------
CString::operator long() const
{
// The following statement looks like it should work. Right?
//
// return *((long *) &fStr[1]);
//
// Wrong, the C compiler generates a MOVE.L starting on a odd byte boundary for the
// preceding statement. This is illegal on the 68000. But its _NOT_ a bug, because
// according to the ANSI C reference manual, "A pointer to one type may be converted
// to a pointer to another type. The resulting pointer may cause an addressing
// exception if the subject pointer does not refer to an object suitably aligned in
// storage".
long returnLong;
memcpy(&returnLong, &fStr[1], sizeof(long));
return returnLong;
} // CString::operator long
//----------------------------------------------------------------------------------------
// CString::Pos(char*):
//----------------------------------------------------------------------------------------
unsigned char CString::Pos(const char* subStr, unsigned char startPos)
{
char cStr[kStr255Len + 1];
char* ptr;
memcpy(cStr, &fStr[1], (size_t)Length());
cStr[Length()] = 0;
ptr = strstr(&cStr[startPos - 1], subStr);
return ptr != NULL ? (ptr - cStr) + 1 : 0;
} // CString::Pos(char*)
//----------------------------------------------------------------------------------------
// CString::Pos(CString):
//----------------------------------------------------------------------------------------
unsigned char CString::Pos(const CString& subStr, unsigned char startPos)
{
char cStr[kStr255Len + 1];
memcpy(cStr, &subStr.fStr[1], (size_t)(subStr.Length()));
cStr[subStr.Length()] = 0;
return this->Pos(cStr, startPos);
} // CString::Pos(CString)
//----------------------------------------------------------------------------------------
// CString::operator const unsigned char*
//----------------------------------------------------------------------------------------
CString::operator const unsigned char*() const
{
return (const unsigned char *) this;
} // CString::operator const unsigned char*
//----------------------------------------------------------------------------------------
// CString::Delete
//----------------------------------------------------------------------------------------
void CString::Delete(short pos, short length)
{
if ((pos > 0) && (length > 0) && (pos <= Length())) // should also check that pos <= kMaxLength
{
if (pos + length > Length())
fStr[0] = pos - 1;
else
{
::memcpy(&fStr[pos], &fStr[pos + length], Length() - (pos + length) + kLengthByte);
fStr[0] -= length;
}
}
} // CString::Delete
//========================================================================================
// CLASS CStr255
//========================================================================================
const CStr255 CStr255::sEmptyString("\p");
//----------------------------------------------------------------------------------------
// CStr255::CStr255(char*):
//----------------------------------------------------------------------------------------
CStr255::CStr255(const char* str)
{
// Truncate the C CString to 255 bytes if necessary.
size_t len = str == NULL ? 0 : strlen(str);
Length() = len > kStr255Len ? kStr255Len : len;
if (Length() > kStr255Len)
Length() = kStr255Len;
memcpy(&fStr[1], str, (size_t)Length());
} // CStr255::CStr255(char*)
//----------------------------------------------------------------------------------------
// CStr255::CStr255(long): Useful for converting OSType's into CStr255's.
//----------------------------------------------------------------------------------------
CStr255::CStr255(const long id)
{
Length() = 4;
memcpy(&fStr[1], &id, (size_t)Length());
} // CStr255::CStr255(long)
//----------------------------------------------------------------------------------------
// CStr255::Copy:
//----------------------------------------------------------------------------------------
CStr255 CStr255::Copy(short pos, short length)
{
CStr255 newString;
length = length > Length() - pos + kLengthByte ? Length() - pos + kLengthByte : length;
if (length > 0)
{
memcpy(&newString.fStr[1], &fStr[pos], (size_t)length);
newString.Length() = length;
}
else
newString = "";
return newString;
} // CStr255::Copy
//----------------------------------------------------------------------------------------
// CStr255::operator+:
//----------------------------------------------------------------------------------------
CStr255 operator+(const CString& s1,
const char* s2)
{
CStr255 newStr;
short s2Len = s2 == NULL ? 0 : (short)(strlen((const char *) s2));
if (s1.Length() + s2Len > kStr255Len)
newStr.Length() = kStr255Len;
else
newStr.Length() = s1.Length() + s2Len;
memcpy(&newStr.fStr[1], &s1.fStr[1], (size_t)(s1.Length()));
memcpy(&newStr.fStr[s1.Length() + kLengthByte], s2, newStr.Length() - s1.Length());
return newStr;
} // CStr255::operator+
//----------------------------------------------------------------------------------------
// CStr255::operator+(char*,CString):
//----------------------------------------------------------------------------------------
CStr255 operator+(const char* s1,
const CString& s2)
{
CStr255 newStr;
short s1Len = s1 == NULL ? 0 : (short)(strlen(s1));
if (s1Len + s2.Length() > kStr255Len)
newStr.Length() = kStr255Len;
else
newStr.Length() = s1Len + s2.Length();
memcpy(&newStr.fStr[1], s1, (size_t)s1Len);
memcpy(&newStr.fStr[s1Len + kLengthByte], s2.fStr + 1, newStr.Length() - s1Len);
return newStr;
} // CStr255::operator+(char*,CString)
//----------------------------------------------------------------------------------------
// CStr255::operator+(CString,CString):
//----------------------------------------------------------------------------------------
CStr255 operator+(const CString& s1,
const CString& s2)
{
CStr255 newStr;
if (s1.Length() + s2.Length() > kStr255Len)
newStr.Length() = kStr255Len;
else
newStr.Length() = s1.Length() + s2.Length();
memcpy(&newStr.fStr[1], &s1.fStr[1], (size_t)(s1.Length()));
memcpy(&newStr.fStr[s1.Length() + kLengthByte], s2.fStr + 1, newStr.Length() - s1.Length());
return newStr;
} // CStr255::operator+(CString,CString)
//----------------------------------------------------------------------------------------
// CStr255::operator +=(CString): Concatenate a string
//----------------------------------------------------------------------------------------
CStr255& CStr255::operator += (const CString& str)
{
InsertHelper (str, Length() + 1, kStr255Len);
return *this;
} // CStr255::operator +=(CString)
//----------------------------------------------------------------------------------------
// CStr255::operator +=(char*): Concatenate a string
//----------------------------------------------------------------------------------------
CStr255& CStr255::operator += (const char* str)
{
InsertHelper (str, Length() + 1, kStr255Len);
return *this;
} // CStr255::operator +=(char*)
//----------------------------------------------------------------------------------------
// CStr255::operator +=(char): Concatenate a single character
//----------------------------------------------------------------------------------------
CStr255& CStr255::operator += (const char ch)
{
if (++Length() <= kStr255Len)
fStr[Length()] = ch;
else
{
--Length();
#if qDebugMsg
fprintf(stderr, "###CStr255::operator+=: Concatenation produces CStr255 overflow.\n");
#endif
}
return *this;
} // CStr255::operator +=(char)
//----------------------------------------------------------------------------------------
// CStr255::operator =:
//----------------------------------------------------------------------------------------
CStr255& CStr255::operator = (const char* str)
{
if (str)
{
// Truncate the C CString to 255 bytes if necessary.
register size_t itsSize = strlen(str);
if (itsSize > kStr255Len)
Length() = kStr255Len;
else
Length() = (unsigned char)(itsSize);
memcpy(&fStr[1], str, (size_t)Length());
}
else
Length() = 0;
return *this;
} // CStr255::operator =
//========================================================================================
// CLASS CStr63
//========================================================================================
//----------------------------------------------------------------------------------------
// CStr63::CStr63(char*):
//----------------------------------------------------------------------------------------
CStr63::CStr63(const char* str)
{
// Truncate the C CString to 63 bytes if necessary.
Length() = str == NULL ? 0 : (unsigned char)(strlen(str));
if (Length() > kStr63Len)
Length() = kStr63Len;
memcpy(&fStr[1], str, (size_t)Length());
} // CStr63::CStr63(char*)
//----------------------------------------------------------------------------------------
// CStr63::CStr63(long):
//----------------------------------------------------------------------------------------
CStr63::CStr63(const long id)
{
Length() = 4;
memcpy(&fStr[1], &id, (size_t)Length());
} // CStr63::CStr63(long)
//----------------------------------------------------------------------------------------
// CStr63::Copy:
//----------------------------------------------------------------------------------------
CStr63 CStr63::Copy(short pos, short length)
{
CStr63 newString;
length = length > Length() - pos + kLengthByte ? Length() - pos + kLengthByte : length;
if (length > 0)
{
memcpy(&newString.fStr[1], &fStr[pos], (size_t)length);
newString.Length() = length;
}
else
newString = "";
return newString;
} // CStr63::Copy
//----------------------------------------------------------------------------------------
// CStr63::operator +=(CString): Concatenate a string
//----------------------------------------------------------------------------------------
CStr63& CStr63::operator += (const CString& str)
{
InsertHelper (str, Length() + 1, kStr63Len);
return *this;
} // CStr63::operator +=(CString)
//----------------------------------------------------------------------------------------
// CStr63::operator +=(char*): Concatenate a string
//----------------------------------------------------------------------------------------
CStr63& CStr63::operator += (const char* str)
{
InsertHelper (str, Length() + 1, kStr63Len);
return *this;
} // CStr63::operator +=(char*)
//----------------------------------------------------------------------------------------
// CStr63::operator +=(char): Concatenate a single character
//----------------------------------------------------------------------------------------
CStr63& CStr63::operator += (const char ch)
{
if (++Length() <= kStr63Len)
fStr[Length()] = ch;
else
{
--Length();
#if qDebugMsg
fprintf(stderr, "###CStr63::operator+=: Concatenation produces CStr63 overflow.\n");
#endif
}
return *this;
} // CStr63::operator +=(char)
//========================================================================================
// CLASS CStr32
//========================================================================================
//----------------------------------------------------------------------------------------
// CStr32::CStr32(char*):
//----------------------------------------------------------------------------------------
CStr32::CStr32(const char* str)
{
// Truncate the C CString to 32 bytes if necessary.
Length() = str == NULL ? 0 : (unsigned char)(strlen(str));
if (Length() > kStr32Len)
Length() = kStr32Len;
memcpy(&fStr[1], str, (size_t)Length());
} // CStr32::CStr32(char*)
//----------------------------------------------------------------------------------------
// CStr32::CStr32(long):
//----------------------------------------------------------------------------------------
CStr32::CStr32(const long id)
{
Length() = 4;
memcpy(&fStr[1], &id, (size_t)Length());
} // CStr32::CStr32(long)
//----------------------------------------------------------------------------------------
// CStr32::Copy:
//----------------------------------------------------------------------------------------
CStr32 CStr32::Copy(short pos, short length)
{
CStr32 newString;
length = length > Length() - pos + kLengthByte ? Length() - pos + kLengthByte : length;
if (length > 0)
{
memcpy(&newString.fStr[1], &fStr[pos], (size_t)length);
newString.Length() = length;
}
else
newString = "";
return newString;
} // CStr32::Copy
//----------------------------------------------------------------------------------------
// CStr32::operator +=(CString): Concatenate a string
//----------------------------------------------------------------------------------------
CStr32& CStr32::operator += (const CString& str)
{
InsertHelper (str, Length() + 1, kStr32Len);
return *this;
} // CStr32::operator +=(CString)
//----------------------------------------------------------------------------------------
// CStr32::operator +=(char*): Concatenate a string
//----------------------------------------------------------------------------------------
CStr32& CStr32::operator += (const char* str)
{
InsertHelper (str, Length() + 1, kStr32Len);
return *this;
} // CStr32::operator +=(char*)
//----------------------------------------------------------------------------------------
// CStr32::operator +=(char): Concatenate a single character
//----------------------------------------------------------------------------------------
CStr32& CStr32::operator += (const char ch)
{
if (++Length() <= kStr32Len)
fStr[Length()] = ch;
else
{
--Length();
#if qDebugMsg
fprintf(stderr,"###CStr32::operator+=: Concatenation produces CStr32 overflow.\n");
#endif
}
return *this;
} // CStr32::operator +=(char)
//========================================================================================
// CLASS CStr31
//========================================================================================
//----------------------------------------------------------------------------------------
// CStr31::CStr31(char*):
//----------------------------------------------------------------------------------------
CStr31::CStr31(const char* str)
{
// Truncate the C CString to 31 bytes if necessary.
Length() = str == NULL ? 0 : (unsigned char)(strlen(str));
if (Length() > kStr31Len)
Length() = kStr31Len;
memcpy(&fStr[1], str, (size_t)Length());
} // CStr31::CStr31(char*)
//----------------------------------------------------------------------------------------
// CStr31::CStr31(long):
//----------------------------------------------------------------------------------------
CStr31::CStr31(const long id)
{
Length() = 4;
memcpy(&fStr[1], &id, (size_t)Length());
} // CStr31::CStr31(long)
//----------------------------------------------------------------------------------------
// CStr31::CStr31(char*):
//----------------------------------------------------------------------------------------
void
CStr31::operator =(const CString& str)
{
Length() = str.Length();
if (Length() > kStr31Len)
Length() = kStr31Len;
memcpy(&fStr[1], &str.fStr[1], (size_t)Length());
}
void
CStr31::operator =(const unsigned char* str)
{
Length() = str == NULL ? 0 : str[0];
if (Length() > kStr31Len)
Length() = kStr31Len;
memcpy(&fStr[1], str + 1, (size_t)Length());
}
void
CStr31::operator =(const char* str)
{
Length() = str == NULL ? 0 : (unsigned char)(strlen(str));
if (Length() > kStr31Len)
Length() = kStr31Len;
memcpy(&fStr[1], str, (size_t)Length());
}
//----------------------------------------------------------------------------------------
// CStr31::Copy:
//----------------------------------------------------------------------------------------
CStr31 CStr31::Copy(short pos, short length)
{
CStr31 newString;
length = length > Length() - pos + kLengthByte ? Length() - pos + kLengthByte : length;
if (length > 0)
{
memcpy(&newString.fStr[1], &fStr[pos], (size_t)length);
newString.Length() = length;
}
else
newString = "";
return newString;
} // CStr31::Copy
//----------------------------------------------------------------------------------------
// CStr31::operator +=(CString): Concatenate a string
//----------------------------------------------------------------------------------------
CStr31& CStr31::operator += (const CString& str)
{
InsertHelper (str, Length() + 1, kStr31Len);
return *this;
} // CStr31::operator +=(CString)
//----------------------------------------------------------------------------------------
// CStr31::operator +=(char*): Concatenate a string
//----------------------------------------------------------------------------------------
CStr31& CStr31::operator += (const char* str)
{
InsertHelper (str, Length() + 1, kStr31Len);
return *this;
} // CStr31::operator +=(char*)
//----------------------------------------------------------------------------------------
// CStr31::operator +=(char): Concatenate a single character
//----------------------------------------------------------------------------------------
CStr31& CStr31::operator += (const char ch)
{
if (++Length() <= kStr31Len)
fStr[Length()] = ch;
else
{
--Length();
#if qDebugMsg
fprintf(stderr,"###CStr31::operator+=: Concatenation produces CStr31 overflow.\n");
#endif
}
return *this;
} // CStr31::operator +=(char)

View File

@@ -1,753 +0,0 @@
//----------------------------------------------------------------------------------------
// PascalString.h
// Copyright © 1985-1994 by Apple Computer, Inc. All rights reserved.
//----------------------------------------------------------------------------------------
// ¥ Updated by Jeroen Schalk - DTS
// ¥ Use MABlockMove, not memcpy(), memmove(), strncpy().
// ¥ Changed default constructors to initialize to empty string.
// ¥ Changed number of temporary strings from 4 to 8
// ¥ Make operator[] and unsigned char*() inline
// ¥ Fix bugs in constructors out of const unsigned char* str
// ¥ Optimized constructors to only move required data
// ¥ General cleanup of code for readability
#pragma once
#ifndef __PASCALSTRING__
#define __PASCALSTRING__
#ifndef __MEMORY__
#include <Memory.h>
#endif
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __TEXTUTILS__
#include <TextUtils.h>
#endif
#ifndef __OSUTILS__
#include <OSUtils.h>
#endif
#ifndef __STRING__
#include <string.h>
#endif
// Forward declaration for all the CString classes.
struct CString;
struct CStr255;
struct CStr63;
struct CStr32;
struct CStr31;
typedef const CStr255& ConstCStr255Param;
typedef const CStr63& ConstCStr63Param;
typedef const CStr32& ConstCStr32Param;
typedef const CStr31& ConstCStr31Param;
#ifdef Length
#undef Length
#endif
// Some constants defining the length of each of the CString types.
const short kLengthByte = 1;
const short kBaseLen = 2;
const short kStr255Len = 255;
const short kStr63Len = 63;
const short kStr32Len = 32;
const short kStr31Len = 31;
// Number of temporary strings
const short kTempCStrings = 8;
//----------------------------------------------------------------------------------------
// MABlockMove: BlockMoveData() is fastest on PowerPC, memcpy() on 68K
//----------------------------------------------------------------------------------------
#if powerc
#define MABlockMove(srcPtr, destPtr, byteCount) \
::BlockMoveData(Ptr(srcPtr), Ptr(destPtr), Size(byteCount))
#else
#define MABlockMove(srcPtr, destPtr, byteCount) \
::memcpy(destPtr, srcPtr, size_t(byteCount))
#endif
//----------------------------------------------------------------------------------------
// MABlockMoveOverlap: BlockMoveData() is fastest on PowerPC, memmove() on 68K
//----------------------------------------------------------------------------------------
#if powerc
#define MABlockMoveOverlap(srcPtr, destPtr, byteCount) \
::BlockMoveData(Ptr(srcPtr), Ptr(destPtr), Size(byteCount))
#else
#define MABlockMoveOverlap(srcPtr, destPtr, byteCount) \
::memmove(destPtr, srcPtr, size_t(byteCount))
#endif
//----------------------------------------------------------------------------------------
// CString: Superclass of all Pascal string compatible string classes.
//----------------------------------------------------------------------------------------
typedef struct CString *CStringPtr, **CStringHandle;
struct CString
{
public:
unsigned char fStr[kBaseLen];
protected:
CString() {}
// This is here (and protected) to stop people trying to instantiate CString.
// To do so is very bad, because it's suicide to make one of these! There are
// only 2 bytes of data!
void InsertHelper(const CString& insStr, short pos, short maxLength);
void InsertHelper(const char* insStr, short pos, short maxLength);
public:
// Basic length method, inherited by all derived classes. Define one that returns a
// reference. Can be used as an lvalue and only can be applied to non-const Strings.
inline unsigned char& Length()
{
return fStr[0];
} // for non-const CString
inline unsigned char Length() const
{
return fStr[0];
} // for const CString
inline Boolean IsEmpty()
{
return fStr[0] <= 0;
} // for non-const CString
inline Boolean IsEmpty() const
{
return fStr[0] <= 0;
} // for const CString
// Character selector operator.
inline unsigned char& operator[](short pos)
{
return fStr[pos];
} // for non-const CString
inline unsigned char operator[](short pos) const
{
return fStr[pos];
} // for const CString
//------------------------------------------------------------------------------------
// CAUTION: There is a subtle difference between the (char*) and (unsigned char*)
// conversion operators. The first converts a pascal-style string to a c-style
// string. The second simply converts between two types (CString and Str55) both of
// which are pascal-style strings.
// Create a NULL terminated c-style string from a pascal-style CString. Used in
// debugging to fprintf a CString.
operator char*() const;
// Used to create a toolbox type Str255 from our CString. This is simply a type
// coercion! Both CString and Str255 are expected to be pascal-style strings.
inline operator unsigned char*()
{
return (unsigned char *) this;
} // for non-const CString
operator const unsigned char*() const; // for const CString
//------------------------------------------------------------------------------------
// Return an ID represented as a CString to the actual ID (a long).
operator long() const;
// Relational operators that are inherited by all the derived CString types. Three of
// each so that literal C Strings can be conveniently used for one of the operators as
// well as two of the derive classes as operators. These are declared here but defined
// below all the CString classes because they use constructors for CStr255 and its class
// definition has not been encountered yet.
friend inline Boolean operator==(const CString& s1,
const char* s2);
friend inline Boolean operator==(const char* s1,
const CString& s2);
friend inline Boolean operator==(const CString& s1,
const CString& s2);
friend inline Boolean operator!=(const CString& s1,
const char* s2);
friend inline Boolean operator!=(const char* s1,
const CString& s2);
friend inline Boolean operator!=(const CString& s1,
const CString& s2);
friend inline Boolean operator>(const CString& s1,
const char* s2);
friend inline Boolean operator>(const char* s1,
const CString& s2);
friend inline Boolean operator>(const CString& s1,
const CString& s2);
friend inline Boolean operator<(const CString& s1,
const char* s2);
friend inline Boolean operator<(const char* s1,
const CString& s2);
friend inline Boolean operator<(const CString& s1,
const CString& s2);
friend inline Boolean operator>=(const CString& s1,
const char* s2);
friend inline Boolean operator>=(const char* s1,
const CString& s2);
friend inline Boolean operator>=(const CString& s1,
const CString& s2);
friend inline Boolean operator<=(const CString& s1,
const char* s2);
friend inline Boolean operator<=(const char* s1,
const CString& s2);
friend inline Boolean operator<=(const CString& s1,
const CString& s2);
// Concatenation operator that are inherited by all the derived CString types. Three
// of each so that literal C Strings can be conveniently used for one of the operators
// as well as using any two classes derived from CString.
friend CStr255 operator+(const CString& s1,
const char* s2);
friend CStr255 operator+(const char* s1,
const CString& s2);
friend CStr255 operator+(const CString& s1,
const CString& s2);
// Methods that mimic the Pascal builtin CString functions for Pos, Insert and Delete.
// Note that insert and copy is implemented in the derived classes.
unsigned char Pos(const char* subStr, unsigned char startPos = 1);
unsigned char Pos(const CString& subStr, unsigned char startPos = 1);
void Delete(short pos, short length);
protected:
inline long Min(const long a, const long b) const
{
return a < b ? a : b;
}
};
//----------------------------------------------------------------------------------------
// CStr255:
//----------------------------------------------------------------------------------------
struct CStr255 : CString
{
friend struct CStr63;
friend struct CStr31;
private:
unsigned char fData[kStr255Len - 1];
public:
static const CStr255 sEmptyString;
CStr255();
CStr255(const CStr255& str);
CStr255(const CStr63& str);
CStr255(const CStr32& str);
CStr255(const CStr31& str);
CStr255(const unsigned char* str);
CStr255(const char* str);
CStr255(const long id);
// Insert and Copy roughly equivalent to the Pascal Insert and Copy functions.
void Insert(const CString& str, short pos);
void Insert(const char* str, short pos);
CStr255 Copy(short pos, short length);
// Concatenation operator
CStr255& operator +=(const CString& str);
CStr255& operator +=(const char* str);
CStr255& operator +=(const char ch);
// Assignment operator
CStr255& operator =(const CStr255& str);
CStr255& operator =(const CStr63& str);
CStr255& operator =(const CStr32& str);
CStr255& operator =(const CStr31& str);
CStr255& operator =(const unsigned char* str);
CStr255& operator =(const char aChar);
CStr255& operator =(const char* str);
};
//----------------------------------------------------------------------------------------
// CStr63:
//----------------------------------------------------------------------------------------
struct CStr63 : CString
{
friend struct CStr255;
friend struct CStr31;
private:
unsigned char fData[kStr63Len - 1];
public:
CStr63();
CStr63(const CStr255& str);
CStr63(const CStr63& str);
CStr63(const CStr32& str);
CStr63(const CStr31& str);
CStr63(const unsigned char* str);
CStr63(const char* str);
CStr63(const long id);
// Insert and Copy roughly equivalent to the Pascal Insert and Copy functions.
void Insert(const CString& str, short pos);
void Insert(const char* str, short pos);
CStr63 Copy(short pos, short length);
// Concatenation operator
CStr63& operator +=(const CString& str);
CStr63& operator +=(const char* str);
CStr63& operator +=(const char ch);
};
//----------------------------------------------------------------------------------------
// CStr32:
//----------------------------------------------------------------------------------------
struct CStr32 : CString
{
friend struct CStr255;
friend struct CStr63;
private:
unsigned char fData[kStr32Len - 1];
public:
CStr32();
inline CStr32(unsigned char length)
{
fStr[0] = length;
}
CStr32(const CStr255& str);
CStr32(const CStr63& str);
CStr32(const CStr32& str);
CStr32(const CStr31& str);
CStr32(const unsigned char* str);
CStr32(const char* str);
CStr32(const long id);
// Insert and Copy roughly equivalent to the Pascal Insert and Copy functions.
void Insert(const CString& str, short pos);
void Insert(const char* str, short pos);
CStr32 Copy(short pos, short length);
// Concatenation operator
CStr32& operator +=(const CString& str);
CStr32& operator +=(const char* str);
CStr32& operator +=(const char ch);
};
//----------------------------------------------------------------------------------------
// CStr31:
//----------------------------------------------------------------------------------------
struct CStr31 : CString
{
friend struct CStr255;
friend struct CStr63;
friend struct CStr32;
private:
unsigned char fData[kStr31Len - 1];
public:
CStr31();
inline CStr31(unsigned char length)
{
fStr[0] = length;
}
CStr31(const CStr255& str);
CStr31(const CStr63& str);
CStr31(const CStr32& str);
CStr31(const CStr31& str);
CStr31(const unsigned char* str);
CStr31(const char* str);
CStr31(const long id);
void operator =(const CString& str);
void operator =(const unsigned char* str);
void operator =(const char* str);
// Insert and Copy roughly equivalent to the Pascal Insert and Copy functions.
void Insert(const CString& str, short pos);
void Insert(const char* str, short pos);
CStr31 Copy(short pos, short length);
// Concatenation operator
CStr31& operator +=(const CString& str);
CStr31& operator +=(const char* str);
CStr31& operator +=(const char ch);
};
//----------------------------------------------------------------------------------------
// CStr255 inline function definitions
//----------------------------------------------------------------------------------------
inline CStr255::CStr255()
{
fStr[0] = 0;
}
inline CStr255::CStr255(const CStr255& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr255::CStr255(const CStr63& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr255::CStr255(const CStr32& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr255::CStr255(const CStr31& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr255::CStr255(const unsigned char* str)
{
MABlockMove(str, fStr, str[0] + kLengthByte);
}
inline CStr255& CStr255::operator = (const CStr255& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
return *this;
}
inline CStr255& CStr255::operator = (const CStr63& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
return *this;
}
inline CStr255& CStr255::operator = (const CStr32& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
return *this;
}
inline CStr255& CStr255::operator = (const CStr31& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
return *this;
}
inline CStr255& CStr255::operator = (const unsigned char* str)
{
MABlockMove(str, fStr, str[0] + kLengthByte);
return *this;
}
inline CStr255& CStr255::operator = (const char aChar)
{
Length() = (aChar) ? 1 : 0;
fStr[1] = aChar;
return *this;
}
inline void CStr255::Insert(const CString& str, short pos)
{
this->InsertHelper(str, pos, kStr255Len);
}
inline void CStr255::Insert(const char* str, short pos)
{
this->InsertHelper(str, pos, kStr255Len);
}
//----------------------------------------------------------------------------------------
// CStr63 inline function definitions
//----------------------------------------------------------------------------------------
inline CStr63::CStr63()
{
fStr[0] = 0;
}
inline CStr63::CStr63(const CStr255& str)
{
// Truncate the CStr255 to 63 bytes if necessary.
Length() = str.Length() > kStr63Len ? kStr63Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr63::CStr63(const CStr63& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr63::CStr63(const CStr32& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr63::CStr63(const CStr31& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr63::CStr63(const unsigned char* str)
{
MABlockMove(str, fStr, Min(str[0] + kLengthByte, sizeof(CStr63)));
}
inline void CStr63::Insert(const CString& str, short pos)
{
this->InsertHelper(str, pos, kStr63Len);
}
inline void CStr63::Insert(const char* str, short pos)
{
this->InsertHelper(str, pos, kStr63Len);
}
//----------------------------------------------------------------------------------------
// CStr32 inline function definitions
//----------------------------------------------------------------------------------------
inline CStr32::CStr32()
{
fStr[0] = 0;
}
inline CStr32::CStr32(const CStr255& str)
{
// Truncate the CStr255 to 32 bytes if necessary.
Length() = str.Length() > kStr32Len ? kStr32Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr32::CStr32(const CStr63& str)
{
// Truncate the CStr63 to 32 bytes if necessary.
Length() = str.Length() > kStr32Len ? kStr32Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr32::CStr32(const CStr32& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr32::CStr32(const CStr31& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr32::CStr32(const unsigned char* str)
{
MABlockMove(str, fStr, Min(str[0] + kLengthByte, sizeof(CStr32)));
}
inline void CStr32::Insert(const CString& str, short pos)
{
this->InsertHelper(str, pos, kStr32Len);
}
inline void CStr32::Insert(const char* str, short pos)
{
this->InsertHelper(str, pos, kStr32Len);
}
//----------------------------------------------------------------------------------------
// CStr31 inline function definitions
//----------------------------------------------------------------------------------------
inline CStr31::CStr31()
{
fStr[0] = 0;
}
inline CStr31::CStr31(const CStr255& str)
{
// Truncate the CStr255 to 31 bytes if necessary.
Length() = str.Length() > kStr31Len ? kStr31Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr31::CStr31(const CStr63& str)
{
// Truncate the CStr63 to 31 bytes if necessary.
Length() = str.Length() > kStr31Len ? kStr31Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr31::CStr31(const CStr32& str)
{
// Truncate the CStr32 to 31 bytes if necessary.
Length() = str.Length() > kStr31Len ? kStr31Len : str.Length();
MABlockMove(&str.fStr[1], &fStr[1], Length());
}
inline CStr31::CStr31(const CStr31& str)
{
MABlockMove(str.fStr, fStr, str.Length() + kLengthByte);
}
inline CStr31::CStr31(const unsigned char* str)
{
MABlockMove(str, fStr, Min(str[0] + kLengthByte, sizeof(CStr31)));
}
inline void CStr31::Insert(const CString& str, short pos)
{
this->InsertHelper(str, pos, kStr31Len);
}
inline void CStr31::Insert(const char* str, short pos)
{
this->InsertHelper(str, pos, kStr31Len);
}
//----------------------------------------------------------------------------------------
// Inline friend function definitions for relational string operators.
//----------------------------------------------------------------------------------------
inline Boolean operator==(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) == 0;
}
inline Boolean operator==(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) == 0;
}
inline Boolean operator==(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) == 0;
}
inline Boolean operator!=(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) != 0;
}
inline Boolean operator!=(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) != 0;
}
inline Boolean operator!=(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) != 0;
}
inline Boolean operator>(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) > 0;
}
inline Boolean operator>(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) > 0;
}
inline Boolean operator>(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) > 0;
}
inline Boolean operator<(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) < 0;
}
inline Boolean operator<(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) < 0;
}
inline Boolean operator<(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) < 0;
}
inline Boolean operator>=(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) >= 0;
}
inline Boolean operator>=(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) >= 0;
}
inline Boolean operator>=(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) >= 0;
}
inline Boolean operator<=(const CString& s1, const char* s2)
{
return ::RelString((ConstStr255Param)&s1, CStr255(s2), false, true) <= 0;
}
inline Boolean operator<=(const char* s1, const CString& s2)
{
return ::RelString(CStr255(s1), (ConstStr255Param)&s2, false, true) <= 0;
}
inline Boolean operator<=(const CString& s1, const CString& s2)
{
return ::RelString((ConstStr255Param)&s1, (ConstStr255Param)&s2, false, true) <= 0;
}
#endif

View File

@@ -1,560 +0,0 @@
/*-----------------------------------------------------------------------------
StdPopup
Written 1994 Netscape Communications Corporation
Portions derived from MacApp,
Copyright © 1984-1994 Apple Computer, Inc. All rights reserved.
-----------------------------------------------------------------------------*/
// primary header
#include "PopupBox.h"
// local libraries
// cross-platform libraries
#include "xpassert.h"
#include "xp_trace.h"
// PowerPlant
#include <UDrawingState.h>
#include <URegistrar.h>
#include <LStdControl.h>
// Macintosh headers
#include <Icons.h>
#include <Memory.h>
#include <Menus.h>
#include <OSUtils.h>
#include <Traps.h>
// ANSI headers
#include <stdio.h>
#include <UGAColorRamp.h>
#include <UGraphicsUtilities.h>
#include "UFontSwitcher.h"
#include "UUTF8TextHandler.h"
#include "UPropFontSwitcher.h"
#include "UCustomizePopUp.h"
#include "LCustomizeMenu.h"
//-----------------------------------------------------------------------------
// random stuff
//-----------------------------------------------------------------------------
#define SETMODRECT(DEST,SOURCE,TOP,LEFT,BOTTOM,RIGHT) \
SetRect (&(DEST), (SOURCE).LEFT, (SOURCE).TOP, (SOURCE).RIGHT, (SOURCE).BOTTOM)
#ifndef GetMenuProc
#define GetMenuProc(menu) (*((Handle *) ((*((Ptr *) (menu))) + 0x06)))
#endif
//-----------------------------------------------------------------------------
// Discrete List Box
//-----------------------------------------------------------------------------
const Int16 fontNumber_Unknown = -1;
StdPopup::StdPopup (CGAPopupMenu * target)
: LAttachment ()
{
ThrowIfNil_(fTarget = target);
fTarget->SetNeedCustomDrawFlag(NeedCustomPopup());
mExecuteHost = false;
fMenu = nil;
fDirty = true;
}
StdPopup::~StdPopup ()
{
if (fMenu)
DisposeMenu (fMenu);
}
//
// definition
//
short
StdPopup::GetCount ()
{
return 0;
}
CStr255
StdPopup::GetText (short item)
{
char buffer [20];
sprintf (buffer, "%hi", item);
return buffer;
}
//
// interface
//
const int tlo = 18; // offset of text from left side of widget
const int tls = 23; // offset from right side of widget to left side of triangle icon
Point
StdPopup::CalcTargetFrame (short & baseline)
{
SyncMenu (fTarget->GetMacMenuH());
Point size;
size.v = /* text */ 16 + /* border */ 3;
size.h = CalcMaxWidth (fTarget->GetMacMenuH()) + tls;
StColorPenState saveColorPenState;
StTextState saveTextState;
saveColorPenState.Normalize();
saveTextState.Normalize();
FontInfo fontInfo;
GetFontInfo (&fontInfo);
baseline = 1 + fontInfo.ascent;
size.v = fontInfo.ascent+fontInfo.descent+fontInfo.leading+ 2;
return size;
}
void
StdPopup::DirtyMenu ()
{
fDirty = true;
}
//
// internal
//
short
StdPopup::CalcMaxWidth (MenuHandle aquiredMenu)
{
if (1 || fDirty)
{
Rect menuRect;
Point hitPt = {0,0};
short whichItem;
MenuDefUPP * menuProc = (MenuDefUPP*) (*aquiredMenu)->menuProc;
SInt8 theState = HGetState((*aquiredMenu)->menuProc);
HLock((*aquiredMenu)->menuProc);
CallMenuDefProc (*menuProc, mSizeMsg, aquiredMenu, &menuRect, hitPt, &whichItem);
HSetState((*aquiredMenu)->menuProc, theState);
}
return (*aquiredMenu)->menuWidth;
}
void StdPopup::DrawTruncTextBox (CStr255 text, const Rect& box)
{
/*
Truncates the text before drawing.
Does not word wrap.
*/
FontInfo fontInfo;
GetFontInfo (&fontInfo);
MoveTo (box.left, box.bottom - fontInfo.descent -1);
TruncString (box.right - box.left, text, truncEnd);
DrawString (text);
}
void StdPopup::DrawWidget (MenuHandle aquiredMenu, const Rect & widgetFrame)
{
StColorPenState saveColorPenState;
StTextState saveTextState;
saveColorPenState.Normalize();
saveTextState.Normalize();
if (GetTextTraits() != fontNumber_Unknown)
UTextTraits::SetPortTextTraits(GetTextTraits());
Rect r;
SETMODRECT(r,widgetFrame,top+1,left+1,bottom-2,right-2);
EraseRect (&r);
MoveTo (widgetFrame.left + 3, widgetFrame.bottom - 1);
LineTo (widgetFrame.right -1, widgetFrame.bottom - 1);
MoveTo (widgetFrame.right -1, widgetFrame.top + 3);
LineTo (widgetFrame.right -1, widgetFrame.bottom - 1);
SETMODRECT(r,widgetFrame,top,left,bottom-1,right-1);
FrameRect (&r);
SETMODRECT(r,widgetFrame,top-1,right-tls,top-1+16,right-tls+16);
::PlotIconID (&r, atNone, ttNone, 'cz');
short whichItem = fTarget->GetValue();
CStr255 itemText;
if (whichItem)
GetMenuItemText (aquiredMenu, whichItem, itemText);
SETMODRECT(r,widgetFrame,top+1,left+tlo,bottom-1,right-tls);
DrawTruncTextBox (itemText, r);
}
void
StdPopup::ExecuteSelf (MessageT message, void *param)
{
fTarget->SetNeedCustomDrawFlag(NeedCustomPopup());
switch (message) {
case msg_DrawOrPrint: {
// 97-06-07 pkc -- put back SyncMenu otherwise Javascript reflection back
// into popup menu list is broken
SyncMenu (fTarget->GetMacMenuH());
mExecuteHost = true;
break;
}
case msg_Click: {
Rect frame;
SMouseDownEvent* event = (SMouseDownEvent*) param;
ThrowIfNil_(event);
{
// Determine which HotSpot was clicked
Int16 theHotSpot = fTarget->FindHotSpot(event->whereLocal);
if (theHotSpot > 0)
{
fTarget->FocusDraw();
// Track mouse while it is down
if (fTarget->TrackHotSpot(theHotSpot, event->whereLocal, event->macEvent.modifiers))
{
// Mouse released inside HotSpot
fTarget->HotSpotResult(theHotSpot);
}
}
mExecuteHost = false;
}
break;
}
}
}
void
StdPopup::SyncMenu (MenuHandle aquiredMenu)
{
if (!fDirty)
return;
int current = CountMItems (aquiredMenu);
int want = GetCount();
int add = want - current;
if (0 < add) {
for (int i = 1; i <= add; i++)
AppendMenu (aquiredMenu, "\pTest");
}
else if (add < 0) {
for (int i = 1; i <= -add; i++)
DeleteMenuItem (aquiredMenu, want + 1);
}
for (int item = 1; item <= want; item++)
{
CStr255 itemText;
itemText = GetText( item );
if ( itemText[ 1 ] == '-' )
itemText = " " + itemText;
SetMenuItemText (aquiredMenu, item, itemText );
}
if (fTarget->GetMaxValue() != want)
fTarget->SetMaxValue (want);
(*aquiredMenu)->menuWidth += tls;
fDirty = false;
}
Boolean StdPopup::NeedCustomPopup() const
{
return false;
}
ResIDT StdPopup::GetTextTraits() const
{
return fTarget->GetTextTraits();
}
/*-----------------------------------------------------------------------------
LCustomizeFontMenu
-----------------------------------------------------------------------------*/
class LCustomizeFontMenu : public LCustomizeMenu {
public:
LCustomizeFontMenu(short fontNum);
virtual void Draw (MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item);
virtual void Size (MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item);
virtual void Choose(MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item);
protected:
virtual void DrawItemText( Rect& itemrect, Str255 itemtext );
virtual void SetupFont() { ::TextFont(fFontNum); };
private:
short fFontNum;
};
#pragma mark == LCustomizeFontMenu ==
LCustomizeFontMenu::LCustomizeFontMenu(short fontNum)
: LCustomizeMenu()
{
fFontNum = fontNum;
}
void LCustomizeFontMenu::Draw(MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item)
{
SetupFont();
LCustomizeMenu::Draw(menu, root, rect, hitPt, item);
}
void LCustomizeFontMenu::Size(MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item)
{
SetupFont();
LCustomizeMenu::Size(menu, root, rect, hitPt, item);
}
void LCustomizeFontMenu::Choose(MenuHandle menu, MenuDefUPP* root, Rect *rect, Point hitPt, short *item)
{
SetupFont();
LCustomizeMenu::Choose(menu, root, rect, hitPt, item);
}
void LCustomizeFontMenu::DrawItemText( Rect& itemrect, Str255 itemtext )
{
SetupFont();
LCustomizeMenu::DrawItemText(itemrect,itemtext);
}
/*-----------------------------------------------------------------------------
LMultiFontTextMenu
-----------------------------------------------------------------------------*/
class LMultiFontTextMenu : public LCustomizeMenu {
public:
LMultiFontTextMenu(UMultiFontTextHandler* texthandler, UFontSwitcher* fs);
protected:
virtual void DrawItemText( Rect& itemrect, Str255 itemtext )
{ fTextHandler->DrawString(fFontSwitcher, itemtext); }
virtual short MeasureItemText(Str255 itemtext )
{ return fTextHandler->StringWidth(fFontSwitcher, itemtext); };
private:
UMultiFontTextHandler* fTextHandler;
UFontSwitcher* fFontSwitcher;
};
LMultiFontTextMenu::LMultiFontTextMenu(UMultiFontTextHandler* texthandler, UFontSwitcher* fs)
: LCustomizeMenu()
{
fTextHandler = texthandler;
fFontSwitcher = fs;
}
#pragma mark -
// ===========================================================================
// ¥ CGAPopupMenu CGAPopupMenu ¥
// ===========================================================================
// ---------------------------------------------------------------------------
// ¥ CGAPopupMenu(LStream*)
// ---------------------------------------------------------------------------
// Construct from data in a Stream
CGAPopupMenu::CGAPopupMenu(
LStream *inStream)
: mNeedCustomDraw(false),
super(inStream)
{
}
CGAPopupMenu::~CGAPopupMenu()
{
}
//-------------------------------------------------------------------------------------
// CGAPopupMenu::DrawPopupTitle
//-------------------------------------------------------------------------------------
void
CGAPopupMenu::DrawPopupTitle ()
{
if(! mNeedCustomDraw)
{ // hacky way, depend on mIsUTF8 to decide wheather we use the super class implementation
super::DrawPopupTitle();
return;
}
StColorPenState theColorPenState;
StTextState theTextState;
// ¥ Get some loal variables setup including the rect for the title
ResIDT textTID = GetTextTraitsID ();
Rect titleRect;
Str255 title;
GetCurrentItemTitle ( title );
// ¥ Figure out what the justification is from the text trait and
// get the port setup with the text traits
UTextTraits::SetPortTextTraits ( textTID );
// ¥ Setup the title justification which is always left justified
Int16 titleJust = teFlushLeft;
// ¥ Calculate the title rect
CalcTitleRect ( titleRect );
// ¥ Setup the text color which by default is black
RGBColor textColor;
::GetForeColor ( &textColor );
// ¥ Get the current item's title
Str255 currentItemTitle;
GetCurrentItemTitle ( currentItemTitle );
// ¥ Loop over any devices we might be spanning and handle the drawing
// appropriately for each devices screen depth
StDeviceLoop theLoop ( titleRect );
Int16 depth;
while ( theLoop.NextDepth ( depth ))
{
if ( depth < 4 ) // ¥ BLACK & WHITE
{
// ¥ If the control is dimmed then we use the grayishTextOr
// transfer mode to draw the text
if ( !IsEnabled ())
{
::RGBForeColor ( &UGAColorRamp::GetBlackColor () );
::TextMode ( grayishTextOr );
}
else if ( IsEnabled () && IsHilited () )
{
// ¥ When we are hilited we simply draw the title in white
::RGBForeColor ( &UGAColorRamp::GetWhiteColor () );
}
// ¥ Now get the actual title drawn with all the appropriate settings
UMultiFontTextHandler *th = UUTF8TextHandler::Instance();
UFontSwitcher *fs = UPropFontSwitcher::Instance();
FontInfo info;
th->GetFontInfo(fs, &info);
::MoveTo(titleRect.left,
(titleRect.top + titleRect.bottom + info.ascent - info.descent ) / 2);
th->DrawString(fs, currentItemTitle);
}
else // ¥ COLOR
{
// ¥ If control is selected we always draw the text in the title
// hilite color, if requested
if ( IsHilited ())
::RGBForeColor ( &UGAColorRamp::GetWhiteColor() );
// ¥ If the box is dimmed then we have to do our own version of the
// grayishTextOr as it does not appear to work correctly across
// multiple devices
if ( !IsEnabled () || !IsActive ())
{
textColor = UGraphicsUtilities::Lighten ( &textColor );
::TextMode ( srcOr );
::RGBForeColor ( &textColor );
}
// ¥ Now get the actual title drawn with all the appropriate settings
UMultiFontTextHandler *th = UUTF8TextHandler::Instance();
UFontSwitcher *fs = UPropFontSwitcher::Instance();
FontInfo info;
th->GetFontInfo(fs, &info);
::MoveTo(titleRect.left,
(titleRect.top + titleRect.bottom + info.ascent - info.descent) / 2);
th->DrawString(fs, currentItemTitle);
}
}
} // CGAPopupMenu::DrawPopupTitle
//-------------------------------------------------------------------------------------
//
// This method is used to calculate the title rect for the currently selected item in
// the popup, this title is drawn inside the popup
const Int16 gsPopup_RightInset = 24; // Used to position the title rect
const Int16 gsPopup_TitleInset = 8; // Apple specification
void
CGAPopupMenu::CalcTitleRect ( Rect &outRect )
{
if(! mNeedCustomDraw)
{ // hacky way, depend on mIsUTF8 to decide wheather we use the super class implementation
super::CalcTitleRect(outRect);
return;
}
StTextState theTextState;
StColorPenState thePenState;
Int16 bevelWidth = 2;
// ¥ Get some loal variables setup including the rect for the title
ResIDT textTID = GetTextTraitsID ();
// ¥ Get the port setup with the text traits
UTextTraits::SetPortTextTraits ( textTID );
// ¥ Figure out the height of the text for the selected font
FontInfo fInfo;
UFontSwitcher *fs = UPropFontSwitcher::Instance();
UMultiFontTextHandler *th = UUTF8TextHandler::Instance();
th->GetFontInfo(fs, &fInfo);
Int16 textHeight = fInfo.ascent + fInfo.descent;
Int16 textBaseline = fInfo.ascent;
// ¥ Get the local inset frame rectangle
CalcLocalPopupFrameRect ( outRect );
::InsetRect ( &outRect, 0, bevelWidth );
outRect.right -= gsPopup_RightInset;
outRect.left += gsPopup_TitleInset;
// ¥ Adjust the title rect to match the height of the font
outRect.top += (( UGraphicsUtilities::RectHeight ( outRect ) - textBaseline) / 2) - 2;
outRect.bottom = outRect.top + textHeight;
} // CGAPopupMenu::CalcTitleRect
//=====================================================================================
// ¥¥ POPUP MENU HANDLING
//-------------------------------------------------------------------------------------
// CGAPopupMenu::HandlePopupMenuSelect
//-------------------------------------------------------------------------------------
void
CGAPopupMenu::HandlePopupMenuSelect ( Point inPopupLoc,
Int16 inCurrentItem,
Int16 &outMenuID,
Int16 &outMenuItem )
{
MenuHandle menuH = GetMacMenuH ();
ThrowIfNil_ ( menuH );
if ( menuH )
{
// BUG#69583: Make sure we *do* use the system font so that the current
// item will be checked properly as in Akbar. So we don't do the LMSetSysFont
// stuff that LGAPopup does.
// ¥ Handle the actual insertion into the hierarchical menubar
::InsertMenu ( menuH, hierMenu );
FocusDraw ();
// ¥ Before we display the menu we need to make sure that we have the
// current item marked in the menu. NOTE: we do NOT use the current
// item that has been passed in here as that always has a value of one
// in the case of a pulldown menu
SetupCurrentMenuItem ( menuH, GetValue () );
// ¥ Then we call PopupMenuSelect and wait for it to return
Int32 result;
// hacky way, depend on mIsUTF8 to decide which implementation to use
if (!mNeedCustomDraw)
{
result = ::PopUpMenuSelect(menuH, inPopupLoc.v, inPopupLoc.h, inCurrentItem );
}
else
{
LMultiFontTextMenu utf8menu(UUTF8TextHandler::Instance(), UPropFontSwitcher::Instance());
result = UCustomizePopUp::PopUpMenuSelect(menuH, &utf8menu, inPopupLoc.v, inPopupLoc.h, inCurrentItem);
}
// ¥ Then we extract the values from the returned result
// these are then passed back out to the caller
outMenuID = HiWord ( result );
outMenuItem = LoWord ( result );
// ¥ Finally get the menu removed
::DeleteMenu ( GetPopupMenuResID ());
}
} // CGAPopupMenu::HandlePopupMenuSelect

View File

@@ -1,125 +0,0 @@
/*-----------------------------------------------------------------------------
StdPopup
Written 1994 Netscape Communications Corporation
Portions derived from MacApp,
Copyright © 1984-1994 Apple Computer, Inc. All rights reserved.
-----------------------------------------------------------------------------*/
#pragma once
#ifndef _DISCRETE_LIST_BOX_
#define _DISCRETE_LIST_BOX_
/*-----------------------------------------------------------------------------
StdPopup
We need non-text menu items, so we will use a custom menu definition
procedure.
We need to have a dynamic number of menus, so we will use PopupMenuSelect.
static Handle sMenuProc
In order to use a custom procedure, we need to dispatch from a handle.
This handle is constant and therefore can be global.
static StdPopup * sMenuObject
We can't figure out which object called PopupMenuSelect, so we will set
this global right before calling it. We will never get a menu callback
except from within PopupMenuSelect.
Handle fDefaultMenuProc
This is the normal definition procedure for the menu. We'll use it to
handle most operations; only overriding drawing.
MenuHandle fMenu
We only need a menu widget when we're calling PopupMenuSelect; we could
actually just have 1 of them and reuse it amongst any number of objects, or
give each item its own widget.
// short item = 0;
// DoMenuProc (mSizeMsg, m, gZeroRect, gZeroPt, item);
-----------------------------------------------------------------------------*/
#include <Menus.h>
#include <LAttachment.h>
#include <LGAPopup.h>
#include "PascalString.h"
class LP_Glypher;
#define dlbPopupMenuID 'cz'
class CGAPopupMenu;
// StdPopup
class StdPopup: public LAttachment {
public:
StdPopup (CGAPopupMenu* target);
~StdPopup ();
// definition
virtual short GetCount ()=0;
virtual CStr255 GetText (short item)=0;
// interface
Point CalcTargetFrame (short & baseline);
void DirtyMenu ();
ResIDT GetTextTraits() const;
ResIDT SetTextTraits(ResIDT inTextTraits);
protected:
MenuHandle GetMacMenuH();
virtual Boolean NeedCustomPopup() const;
virtual void SyncMenu (MenuHandle aquiredMenu);
virtual short CalcMaxWidth (MenuHandle aquiredMenu);
void DrawWidget (MenuHandle aquiredMenu, const Rect & widgetFrame);
virtual void ExecuteSelf (MessageT message, void *param);
// do ScriptCode Menu Trick on IM:MacTbxEss Page3-46
// Give subclass a chance to do it.
virtual void SetMenuItemText(MenuHandle aquiredMenu, int item, CStr255& itemText)
{ ::SetMenuItemText(aquiredMenu, item, itemText); } ;
// Let us have a chance to override PopUpMenuSelect
virtual long PopUpMenuSelect(MenuHandle aquiredMenu, short top, short left, short popUpItem)
{ return ::PopUpMenuSelect( aquiredMenu, top, left, popUpItem); };
virtual void DrawTruncTextBox (CStr255 text, const Rect& box);
friend class TempUseMenu;
CGAPopupMenu* fTarget;
MenuHandle fMenu; // this is used if we're doing the UTF8 stuff
private:
Boolean fDirty;
};
class CGAPopupMenu : public LGAPopup {
friend class StdPopup;
public:
enum { class_ID = 'Gatt' };
typedef LGAPopup super;
CGAPopupMenu(LStream* inStream);
virtual ~CGAPopupMenu();
void SetTextTraits(ResIDT inTextTraitsID) { mTextTraitsID = inTextTraitsID; }
ResIDT GetTextTraits() const { return mTextTraitsID; }
void SetNeedCustomDrawFlag(Boolean needCustomDraw) { mNeedCustomDraw = needCustomDraw; }
// For UTF8
//----<< ¥ DRAWING ¥ >>------------------------------------------------------------
virtual void DrawPopupTitle ();
virtual void CalcTitleRect ( Rect &outRect ); // ¥ OVERRIDE
protected:
//----<< ¥ POPUP MENU HANDLING ¥ >>------------------------------------------------
virtual void HandlePopupMenuSelect ( Point inPopupLoc,
Int16 inCurrentItem,
Int16 &outMenuID,
Int16 &outMenuItem );
private:
Boolean mNeedCustomDraw;
};
#endif /* _DISCRETE_LIST_BOX_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,34 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// RandomFrontEndCrap.h
#pragma once
extern char reconnectHack[];
extern char mailNewsReconnect[];
Boolean IsInternalImage(const char* url);
Boolean IsMailToLink(const char* url);
Boolean IsMailNewsReconnect(const char* url);
Boolean IsInternalTypeLink(const char* url);
Boolean IsDocInfoWindow(const char* inName);
Boolean IsViewSourceWindow(const char* inName);
Boolean IsSpecialBrowserWindow(const char* inName);

View File

@@ -1,85 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// StBlockingDialogHandler.cp
#include "StBlockingDialogHandler.h"
#include <Balloons.h>
StBlockingDialogHandler::StBlockingDialogHandler(
ResIDT inDialogResID,
LCommander* inSuper)
: StDialogHandler(inDialogResID, inSuper)
{
// disable the Help menu while a dialog is in front
// (to prevent loading of Help URLs)
MenuHandle balloonMenuH = NULL;
HMGetHelpMenuHandle( &balloonMenuH );
if (balloonMenuH)
DisableItem(balloonMenuH, 0);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
StBlockingDialogHandler::~StBlockingDialogHandler()
{
MenuHandle balloonMenuH = NULL;
HMGetHelpMenuHandle( &balloonMenuH );
if (balloonMenuH)
EnableItem(balloonMenuH, 0);
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
Boolean StBlockingDialogHandler::ExecuteAttachments(
MessageT inMessage,
void *ioParam)
{
Boolean executeHost = true;
// Execute the Attachments for the EventDispatcher that was
// in control before this one took over
// if (mSaveDispatcher != nil) {
// executeHost = mSaveDispatcher->ExecuteAttachments(inMessage, ioParam);
// }
// Inherited function will execute Attachments for this object
return (executeHost && LAttachable::ExecuteAttachments(inMessage, ioParam));
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Override to prevent About menu item from being enabled.
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void
StBlockingDialogHandler::FindCommandStatus(
CommandT inCommand,
Boolean &outEnabled,
Boolean& /* outUsesMark */,
Char16& /* outMark */,
Str255 /* outName */)
{
outEnabled = false;
}

View File

@@ -1,41 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// StBlockingDialogHandler.h
#pragma once
#include <UModalDialogs.h>
class StBlockingDialogHandler : public StDialogHandler
{
public:
StBlockingDialogHandler(
ResIDT inDialogResID,
LCommander* inSuper);
virtual ~StBlockingDialogHandler();
virtual Boolean ExecuteAttachments(
MessageT inMessage,
void *ioParam);
virtual void FindCommandStatus(CommandT inCommand,
Boolean &outEnabled, Boolean &outUsesMark,
Char16 &outMark, Str255 outName);
};

View File

@@ -1,605 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "TSMProxy.h"
#include "proto.h"
#include "edt.h"
#include "uintl.h"
#include "intl_csi.h"
HoldUpdatesProxy::HoldUpdatesProxy(CEditView &inTextView) :
mTextView(inTextView)
{
mTextView.SetHoldUpdates(this);
mStartY = 0;
mHeight = 0;
}
HoldUpdatesProxy::~HoldUpdatesProxy()
{
mTextView.SetHoldUpdates(nil);
mTextView.DocumentChanged(mStartY, mHeight);
}
void HoldUpdatesProxy::DocumentChanged( int32 iStartY, int32 iHeight )
{
if (mHeight == 0) { // there is no range already
// just set to the new range
mStartY = iStartY;
mHeight = iHeight;
} else if (mHeight == -1) { // the current range already extends to the bottom
// should the top be moved up?
if (iStartY < mStartY)
mStartY = iStartY;
} else if (iHeight == -1) { // the new range extendes all the way to the bottom
// should the top be moved up?
mHeight = iHeight;
if (iStartY < mStartY)
mStartY = iStartY;
} else {
if (iStartY < mStartY) {
// use the new top
if (iStartY + iHeight > mStartY + mHeight) {
// and the new height
mStartY = iStartY;
mHeight = iHeight;
} else {
// but the old height
mHeight += mStartY - iStartY;
mStartY = iStartY;
}
} else {
// use the old top
if (iStartY + iHeight > mStartY + mHeight) {
// but use the new height
mHeight = iStartY + iHeight - mStartY;
}
}
}
}
AEEventHandlerUPP HTMLInlineTSMProxy::sAEHandler = NewAEEventHandlerProc( AEHandlerTSM );
HTMLInlineTSMProxy *HTMLInlineTSMProxy::sCurrentProxy = NULL;
#if _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
void HTMLInlineTSMProxy::PasteFromPtr(const Ptr thedata, int32 len, short hiliteStyle)
{
if (len < 1)
return;
EDT_CharacterData *pData = EDT_NewCharacterData();
if (pData) {
pData->mask = TF_INLINEINPUT | TF_INLINEINPUTTHICK | TF_INLINEINPUTDOTTED;
switch (hiliteStyle) {
case kCaretPosition:
pData->values = TF_INLINEINPUT | TF_INLINEINPUTTHICK; // this is just a guess actually: FIX ME!!
break;
case kRawText:
pData->values = 0;
break;
case kSelectedRawText:
pData->values = TF_INLINEINPUT | TF_INLINEINPUTTHICK | TF_INLINEINPUTDOTTED;
break;
default:
XP_ASSERT(false);
case kConvertedText:
pData->values = TF_INLINEINPUT;
break;
case kSelectedConvertedText:
pData->values = TF_INLINEINPUT | TF_INLINEINPUTTHICK;
break;
}
EDT_SetCharacterData( mContext ,pData );
EDT_FreeCharacterData(pData);
}
// HACK HACK HACK
// ok, so everyone has been really helpful and all but I'm going to put this in as a hack
// rather than try to do it "right": unicodeString will either be "thedata" or the result
// if we need to do unicode conversion. We'll free this below if the pointer address has changed
char *unicodeString = thedata;
INTL_CharSetInfo csi = LO_GetDocumentCharacterSetInfo(mContext);
int16 win_csid = INTL_GetCSIWinCSID(csi);
if ( (win_csid == CS_UTF8) || (win_csid==CS_UTF7) ) {
INTL_Encoding_ID winCSID = ScriptToEncoding( ::GetScriptManagerVariable( smKeyScript ) );
unicodeString = (char *)INTL_ConvertLineWithoutAutoDetect( winCSID, CS_UTF8, (unsigned char *)thedata, len );
len = strlen(unicodeString);
}
if (len < 16) { // can we use a small static buffer?
char smallbuffer[16];
XP_MEMCPY(smallbuffer, unicodeString, len);
smallbuffer[len] = '\0';
EDT_InsertText(mContext, smallbuffer);
} else {
char *verytemp = (char *) XP_ALLOC(len + 1);
if (verytemp) {
XP_MEMCPY(verytemp, unicodeString, len);
verytemp[len] = '\0';
EDT_InsertText(mContext, verytemp);
XP_FREE(verytemp);
}
}
// see hack alert above
if ( unicodeString != thedata )
XP_FREEIF(unicodeString);
}
#endif _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
HTMLInlineTSMProxy::HTMLInlineTSMProxy( CEditView &inTextView )
: mTextView( inTextView )
{
mTSMDocID = 0;
OSType supportedType = kTextService;
OSErr err = ::NewTSMDocument( 1, &supportedType, &mTSMDocID, (long)(void *)this );
ThrowIfOSErr_(err);
mInputHoleActive = false;
mDocActive = false;
}
HTMLInlineTSMProxy::~HTMLInlineTSMProxy()
{
if ( mDocActive )
Deactivate(); // for a bug in TSM. See TE27
OSErr err = noErr;
if ( mTSMDocID )
err = ::DeleteTSMDocument(mTSMDocID);
mTSMDocID = 0;
// Assert_(err == noErr);
}
void
HTMLInlineTSMProxy::Activate( void )
{
OSErr err = noErr;
Assert_( mDocActive == false );
InstallTSMHandlers();
sCurrentProxy = this;
#ifdef Debug_Signal
// check to see if a bug in TSM will be encountered
ProcessSerialNumber psn,
csn;
err = GetCurrentProcess(&psn);
// ThrowIfOSErr_(err);
err = GetFrontProcess(&csn);
// ThrowIfOSErr_(err);
Assert_((psn.highLongOfPSN == csn.highLongOfPSN) && (psn.lowLongOfPSN == csn.lowLongOfPSN));
#endif
if ( mTSMDocID )
err = ::ActivateTSMDocument( mTSMDocID );
else
err = ::UseInputWindow(NULL, true);
// ThrowIfOSErr_(err);
if ( err == noErr )
mDocActive = true;
}
void
HTMLInlineTSMProxy::Deactivate( void )
{
OSErr err = noErr;
Assert_( mDocActive );
RemoveTSMHandlers();
sCurrentProxy = NULL;
err = ::DeactivateTSMDocument( mTSMDocID );
if (err != tsmDocNotActiveErr) // this just seems to happen too much -- it is okay if it happens
{
Assert_( err == noErr );
}
mDocActive = false;
}
void
HTMLInlineTSMProxy::FlushInput( void )
{
OSErr err = noErr;
Assert_( mTSMDocID != 0 );
if ( mTSMDocID != 0 )
{
err = ::FixTSMDocument( mTSMDocID );
}
}
void
HTMLInlineTSMProxy::InstallTSMHandlers( void )
{
OSErr err = noErr;
err = ::AEInstallEventHandler(kTextServiceClass, kUpdateActiveInputArea, sAEHandler, kUpdateActiveInputArea, false);
ThrowIfOSErr_(err);
err = ::AEInstallEventHandler(kTextServiceClass, kPos2Offset, sAEHandler, kPos2Offset, false);
ThrowIfOSErr_(err);
err = ::AEInstallEventHandler(kTextServiceClass, kOffset2Pos, sAEHandler, kOffset2Pos, false);
ThrowIfOSErr_(err);
}
void
HTMLInlineTSMProxy::RemoveTSMHandlers( void )
{
OSErr err = noErr;
err = ::AERemoveEventHandler(kTextServiceClass, kUpdateActiveInputArea, sAEHandler, false);
ThrowIfOSErr_(err);
err = ::AERemoveEventHandler(kTextServiceClass, kPos2Offset, sAEHandler, false);
ThrowIfOSErr_(err);
err = ::AERemoveEventHandler(kTextServiceClass, kOffset2Pos, sAEHandler, false);
ThrowIfOSErr_(err);
}
pascal OSErr
HTMLInlineTSMProxy::AEHandlerTSM( const AppleEvent *inAppleEvent, AppleEvent *outReply, Int32 inRefCon )
{
OSErr err = noErr;
THz oldZone = ::LMGetTheZone(), // Apple bug #115424?
appZone = ::LMGetApplZone();
::LMSetTheZone(appZone);
#if _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
try
{
Assert_( sCurrentProxy != NULL );
StHandleLocker lock(inAppleEvent->dataHandle);
LAESubDesc appleEvent(*inAppleEvent);
LAEStream replyStream;
ThrowIf_(((Int32)(void *)sCurrentProxy) != appleEvent.KeyedItem(keyAETSMDocumentRefcon).ToInt32());
replyStream.OpenRecord();
if ( sCurrentProxy != NULL )
{
switch( inRefCon )
{
case kUpdateActiveInputArea:
sCurrentProxy->AEUpdate(appleEvent);
break;
case kPos2Offset:
sCurrentProxy->AEPos2Offset(appleEvent, replyStream);
break;
case kOffset2Pos:
sCurrentProxy->AEOffset2Pos(appleEvent, replyStream);
break;
}
}
replyStream.CloseRecord();
// Transfer reply parameters to the real reply (hopefully MacOS 8 will have a way around this)
// ie, can simply say:
//
// replyStream.Close(outReply);
//
StAEDescriptor reply;
replyStream.Close(reply);
LAESubDesc replySD(reply);
AEKeyword key;
for (Int32 i = 1; i <= replySD.CountItems(); i++) {
StAEDescriptor parm;
replySD.NthItem(i, &key).ToDesc(&parm.mDesc);
err = ::AEPutParamDesc(outReply, key, &parm.mDesc);
ThrowIfOSErr_(err);
}
}
catch ( ExceptionCode inErr )
{
err = inErr;
}
catch ( ... )
{
err = paramErr;
}
#endif _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
::LMSetTheZone(oldZone); // Apple bug #115424?
return err;
}
#if _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
void HTMLInlineTSMProxy::AEUpdate(
const LAESubDesc &inAppleEvent )
{
CEditView::OutOfFocus(&mTextView);
HoldUpdatesProxy stopUpdatesProxy(mTextView);
// if we don't already have an input hole, remember where we are
if (!mInputHoleActive) {
mInputHoleActive = true;
mInputHoleStart = EDT_GetInsertPointOffset(mContext);
mInputHoleLen = 0;
}
// get the text in the input hole
LAESubDesc textSD(inAppleEvent.KeyedItem(keyAETheData), typeChar);
Ptr thedata = (const Ptr)textSD.GetDataPtr();
int32 len = textSD.GetDataLength();
// fixLength is the number of characters which can be fixed into the buffer.
Int32 fixLength = inAppleEvent.KeyedItem(keyAEFixLength).ToInt32();
if (fixLength < 0) // special signal to fix it all!!
fixLength = len;
mTextView.EraseCaret();
mTextView.HideCaret(true);
// if we do already have an input hole, select all the text and delete so that we start fresh
if (mInputHoleLen) {
EDT_CharacterData *temp = EDT_GetCharacterData( mContext );
EDT_SetInsertPointToOffset(mContext, mInputHoleStart, mInputHoleLen);
EDT_DeletePreviousChar(mContext);
if (temp) {
if (len) // if len == 0, then don't bother setting the character data because there is nothing left!
EDT_SetCharacterData( mContext, temp );
EDT_FreeCharacterData( temp );
}
}
// we will handle this special case because it makes the algorithm easier to understand.
// the input hole is going away because we are going to fix everything...
if (fixLength == len)
{
PasteFromPtr(thedata, fixLength, kRawText);
mInputHoleActive = false;
CEditView::OutOfFocus(&mTextView);
mTextView.HideCaret(false);
return;
}
// we have already selected the old data, now paste in anything that needs to be fixed
if (fixLength) {
PasteFromPtr(thedata, fixLength, kRawText);
mInputHoleStart = EDT_GetInsertPointOffset(mContext); // a new starting point for our input hole
}
if (inAppleEvent.KeyExists(keyAEHiliteRange)) {
LAESubDesc hiliteSD(inAppleEvent.KeyedItem(keyAEHiliteRange), typeTextRangeArray);
TextRangeArrayPtr p = (TextRangeArrayPtr)hiliteSD.GetDataPtr();
for (Int32 i = 0; i < p->fNumOfRanges; i++) {
TextRange record;
// we don't care about any extra information which is supposed to be encoded in the sign of any of these numbers
record.fStart = abs(p->fRange[i].fStart);
record.fEnd = abs(p->fRange[i].fEnd);
record.fHiliteStyle = abs(p->fRange[i].fHiliteStyle);
PasteFromPtr(thedata + fixLength + record.fStart, record.fEnd - record.fStart, record.fHiliteStyle);
}
}
mInputHoleLen = EDT_GetInsertPointOffset(mContext) - mInputHoleStart; // a new length for our input hole
// output
mTextView.HideCaret(false);
CEditView::OutOfFocus(&mTextView);
}
// so which is it?
#define keyAELeadingEdge keyAELeftSide
void HTMLInlineTSMProxy::AEPos2Offset(
const LAESubDesc &inAppleEvent,
LAEStream &inStream) const
{
// input
Point where;
Boolean dragging = false;
inAppleEvent.KeyedItem(keyAECurrentPoint).ToPtr(typeQDPoint, &where, sizeof(where));
LAESubDesc sd = inAppleEvent.KeyedItem(keyAEDragging);
if (sd.GetType() != typeNull) // keyAEdragging is optional
dragging = sd.ToBoolean();
// process
CEditView::OutOfFocus(&mTextView);
mTextView.FocusDraw(); // for GlobalToLocal
::GlobalToLocal(&where);
CEditView::OutOfFocus(&mTextView);
SPoint32 where32;
mTextView.LocalToImagePoint(where, where32);
LO_HitResult result;
LO_Hit(mContext, where32.h, where32.v, false, &result, nil);
if (result.type != LO_HIT_ELEMENT ||
// result.lo_hitElement.region != LO_HIT_ELEMENT_REGION_MIDDLE ||
result.lo_hitElement.position.element->type != LO_TEXT) {
inStream.WriteKey(keyAEOffset);
Int32 offset = -1;
inStream.WriteDesc(typeLongInteger, &offset, sizeof(offset));
inStream.WriteKey(keyAERegionClass);
short aShort = kTSMOutsideOfBody;
inStream.WriteDesc(typeShortInteger, &aShort, sizeof(aShort));
return;
}
ED_BufferOffset newPosition = EDT_LayoutElementToOffset( mContext, result.lo_hitElement.position.element, result.lo_hitElement.position.position);
/*
ED_BufferOffset saveSelStart, saveSelEnd;
EDT_GetSelectionOffsets(mContext, &saveSelStart, &saveSelEnd); // remember position
EDT_PositionCaret(mContext, where32.h, where32.v );
ED_BufferOffset newPosition = EDT_GetInsertPointOffset(mContext);
EDT_SetInsertPointToOffset(mContext, saveSelStart, saveSelEnd - saveSelStart); // restore position
*/
// restrict to the active range if you are dragging
if (dragging) {
if (newPosition < mInputHoleStart) newPosition = mInputHoleStart;
if (newPosition > mInputHoleStart + mInputHoleLen) newPosition = mInputHoleStart + mInputHoleLen;
}
// output
inStream.WriteKey(keyAEOffset);
Int32 offset = newPosition;
offset -= mInputHoleStart;
inStream.WriteDesc(typeLongInteger, &offset, sizeof(offset));
inStream.WriteKey(keyAERegionClass);
short aShort = kTSMOutsideOfBody;
SDimension32 sizeImage;
SDimension16 sizeFrame;
mTextView.GetImageSize(sizeImage);
mTextView.GetFrameSize(sizeFrame);
if ((0 <= where32.h) && (where32.h < sizeFrame.width) && (0 <= where32.v) && (where.v < sizeImage.height))
{
if (offset >= 0 && offset <= mInputHoleLen)
aShort = kTSMInsideOfActiveInputArea;
else
aShort = kTSMInsideOfBody;
}
inStream.WriteDesc(typeShortInteger, &aShort, sizeof(aShort));
}
void HTMLInlineTSMProxy::AEOffset2Pos(
const LAESubDesc &inAppleEvent,
LAEStream &inStream) const
{
// input
Int32 offset = inAppleEvent.KeyedItem(keyAEOffset).ToInt32();
offset += mInputHoleStart;
LO_Element * element;
int32 caretPos;
EDT_OffsetToLayoutElement(mContext, offset, &element, &caretPos);
SPoint32 where32;
int32 veryTemp;
GetCaretPosition( mContext, element, caretPos, &where32.h, &veryTemp, &where32.v );
Point where;
mTextView.ImageToLocalPoint(where32, where);
CEditView::OutOfFocus(&mTextView);
mTextView.FocusDraw(); // for LocalToGlobal
::LocalToGlobal(&where);
// output
inStream.WriteKey(keyAEPoint);
inStream.WriteDesc(typeQDPoint, &where, sizeof(where));
}
#endif _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_

View File

@@ -1,89 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "CEditView.h"
class HoldUpdatesProxy
{
public:
HoldUpdatesProxy( CEditView &inTextView );
~HoldUpdatesProxy();
void DocumentChanged( int32 iStartY, int32 iHeight );
protected:
CEditView &mTextView;
int32 mStartY;
int32 mHeight;
};
class HTMLInlineTSMProxy //: public VTSMProxy
{
// friend class WTSMManager;
public:
HTMLInlineTSMProxy( CEditView &inTextView );
~HTMLInlineTSMProxy();
void SetContext( MWContext *inContext )
{
mContext = inContext;
};
virtual void Activate(void);
virtual void Deactivate(void);
virtual void FlushInput(void);
virtual void InstallTSMHandlers(void);
virtual void RemoveTSMHandlers(void);
static
pascal OSErr AEHandlerTSM( const AppleEvent *inAppleEvent, AppleEvent *outReply, Int32 inRefCon );
#if _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
protected:
virtual void AEUpdate( const LAESubDesc &inAppleEvent );
virtual void AEPos2Offset( const LAESubDesc &inAppleEvent, LAEStream &inStream ) const;
virtual void AEOffset2Pos( const LAESubDesc &inAppleEvent, LAEStream &inStream ) const;
void PasteFromPtr( const Ptr thedata, int32 len, short hiliteStyle );
#endif _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
int mInputHoleActive;
ED_BufferOffset mInputHoleStart; // since we have this...
int32 mInputHoleLen; // and this.
CEditView &mTextView;
MWContext *mContext;
TSMDocumentID mTSMDocID;
Boolean mDocActive;
static AEEventHandlerUPP sAEHandler;
static HTMLInlineTSMProxy *sCurrentProxy;
};

Some files were not shown because too many files have changed in this diff Show More