Initial revision

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@1580 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
GNUstep Maintainer 1996-05-30 20:03:15 +00:00
commit 4faed08751
162 changed files with 32515 additions and 0 deletions

83
ANNOUNCE Normal file
View file

@ -0,0 +1,83 @@
GNUstep GUI Library ANNOUNCE
****************************
This is version 0.1.0 of the GNUstep GUI library (libgnustep-gui).
What is the GNUstep GUI Library?
It is a library of graphical user interface classes written completely
in the Objective-C language; the classes are based upon the OPENSTEP(tm)
specification as release by NeXT Software, Inc. The library does not
completely conform to the specification and has been
enhanced in a number of ways to take advantage of the GNU system.
These classes include graphical objects such as buttons, text fields,
popup lists, browser lists, and windows; there are also many associated
classes for handling events, colors, fonts, pasteboards and images.
The design of libgnustep-gui is designed in two parts. The first part is the
front-end component which is independent of platform and display system.
This front-end is combined with a back-end component which handles all of
the display system dependent such as specific calls to X/Windows. This
design allows the GNUstep applications to have the "look and feel" of
the underlying display system without any changes to the application, and
the library can be easily ported to other display systems.
The GNUstep GUI Library requires the GNU Objective-C compiler, the GNUstep
Base Library, and back-end component like the GNUstep X/DPS GUI Backend.
Creators rejoice!
Scott Christley
scottc@net-community.com
*****
Check out the GNUstep web site. (http://www.gnustep.org)
OPENSTEP and NeXT are trademarks of NeXT Software, Inc. (http://www.next.com)
The GNUstep GUI Library was donated to the Free Software Foundation
by the On-line Community project, contact info@net-community.com about
creating on-line social communities. (http://www.net-community.com)
*****
[ Most GNU software is packed using the GNU `gzip' compression program.
Source code is available on most sites distributing GNU software.
For information on how to order GNU software on tape, floppy or cd-rom, or
printed GNU manuals, check the file etc/ORDERS in the GNU Emacs distribution
or in GNUinfo/ORDERS on prep, or e-mail a request to: gnu@@prep.ai.mit.edu
By ordering your GNU software from the FSF, you help us continue to
develop more free software. Media revenues are our primary source of
support. Donations to FSF are deductible on US tax returns.
The above software will soon be at these ftp sites as well.
Please try them before prep.ai.mit.edu as prep is very busy!
thanx -gnu@prep.ai.mit.edu
ASIA: ftp.cs.titech.ac.jp, utsun.s.u-tokyo.ac.jp:/ftpsync/prep,
cair.kaist.ac.kr:/pub/gnu, ftp.nectec.or.th:/pub/mirrors/gnu
AUSTRALIA: archie.au:/gnu (archie.oz or archie.oz.au for ACSnet)
AFRICA: ftp.sun.ac.za:/pub/gnu
MIDDLE-EAST: ftp.technion.ac.il:/pub/unsupported/gnu
EUROPE: irisa.irisa.fr:/pub/gnu, ftp.univ-lyon1.fr:pub/gnu,
ftp.mcc.ac.uk, unix.hensa.ac.uk:/pub/uunet/systems/gnu,
src.doc.ic.ac.uk:/gnu, ftp.ieunet.ie:pub/gnu, ftp.eunet.ch,
nic.switch.ch:/mirror/gnu, ftp.informatik.rwth-aachen.de:/pub/gnu,
ftp.informatik.tu-muenchen.de, ftp.win.tue.nl:/pub/gnu,
ftp.funet.fi:/pub/gnu, ftp.denet.dk, ftp.stacken.kth.se, isy.liu.se,
ftp.luth.se:/pub/unix/gnu, ftp.sunet.se:/pub/gnu, archive.eu.net
SOUTH AMERICA: ftp.unicamp.br:/pub/gnu
WESTERN CANADA: ftp.cs.ubc.ca:/mirror2/gnu
USA: wuarchive.wustl.edu:/systems/gnu, labrea.stanford.edu,
ftp.digex.net:/pub/gnu, ftp.kpc.com:/pub/mirror/gnu, f.ms.uky.edu:/pub3/gnu,
jaguar.utah.edu:/gnustuff, ftp.hawaii.edu:/mirrors/gnu,
vixen.cso.uiuc.edu:/gnu, mrcnext.cso.uiuc.edu:/pub/gnu,
ftp.cs.columbia.edu:/archives/gnu/prep, col.hp.com:/mirrors/gnu,
gatekeeper.dec.com:/pub/GNU, ftp.uu.net:/systems/gnu

339
COPYING Normal file
View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

481
COPYING.LIB Normal file
View file

@ -0,0 +1,481 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

15
ChangeLog Normal file
View file

@ -0,0 +1,15 @@
Tue Feb 13 09:52:02 1996 Scott Christley <scottc@net-community.com>
* Headers/AppKit/NSText.h: Removed WIN32 instance variables
Sun Feb 11 14:17:15 1996 Scott Christley <scottc@net-community.com>
* Makefile.in: Changed library name from libAppKit to libgnustep
* Renamed file libAppKit.m to libgnustep.m
* Changed terminology "Application Kit Library" to
"Application Library" to eliminate trademark conflicts with NeXT.
Thu Feb 8 04:53:45 1996 Scott Christley <scottc@net-community.com>
* *.m: Conforms to NSCoding protocol
* *.h: Added NSCoding protocol methods

View file

@ -0,0 +1,133 @@
/*
DPSOperators.h
Display Postscript operators and functions
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: September, 1995
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_DPSOperators
#define _GNUstep_H_DPSOperators
#include <Foundation/NSObject.h>
#include <DPSClient/TypesandConstants.h>
#include <Foundation/NSGeometry.h>
@class NSColor;
//////////////////////////////////////////////////////////////////////////
//
// Drawing operators
//
// path an arc in counterclockwise direction
void
PSarc(float x, float y, float radius, float angle1, float angle2);
// path an arc in clockwise direction
void
PSarcn(float x, float y, float radius, float angle1, float angle2);
// path a Bezier curve
void
PScurveto(float x1, float y1, float x2, float y2, float x3, float y3);
// path a line
void
PSlineto(float x, float y);
// set current point
void
PSmoveto(float x, float y);
// path a Bezier curve relative to current point
void
PSrcurveto(float x1, float y1, float x2, float y2, float x3, float y3);
// path a line relative to current point
void
PSrlineto(float x, float y);
// set current point relative to current point
void
PSrmoveto(float x, float y);
// path a text string
void
PSshow(char *string);
//
// Path operators
//
// close the path
void
PSclosepath();
// start new path
void
PSnewpath();
// fill the path
void
PSfill();
// stroke the path
void
PSstroke();
//
// Graphic state operators
//
// get current line width
float
PScurrentlinewidth();
// set current line width
void
PSsetlinewidth(float width);
// get current point in path
NSPoint
PScurrentpoint();
// flush graphic operations
void
PSflushgraphics();
// set the color
void
PSsetcolor(NSColor *c);
//
// Convenience operations
//
// path a rectangle
void
PSrectstroke(float x, float y, float width, float height);
// path and fill a rectangle
void
PSrectfill(float x, float y, float width, float height);
#endif /* _GNUstep_H_DPSOperators */

View file

@ -0,0 +1,163 @@
/*
NSDPSContext.h
Encapsulation of Display Postscript contexts
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSDPSContext
#define _GNUstep_H_NSDPSContext
#include <AppKit/stdappkit.h>
#include <DPSClient/TypesandConstants.h>
#include <Foundation/NSData.h>
//
// NSDPSContextNotification
// Circular dependency between protocol and class
//
@class NSDPSContext;
@protocol NSDPSContextNotification
//
// Synchronizing Application and Display Postscript Server Execution
//
- (void)contextFinishedExecuting:(NSDPSContext *)context;
@end
//
// NSDPSContext class interface
//
@interface NSDPSContext : NSObject
{
// Attributes
NSMutableData *context_data;
BOOL is_screen_context;
DPSErrorProc error_proc;
DPSTextProc text_proc;
NSDPSContext *chained_parent;
NSDPSContext *chained_child;
BOOL is_output_traced;
BOOL is_synchronized;
// Reserverd for back-end use
void *be_context_reserved;
}
//
// Initializing a Context
//
- initWithMutableData:(NSMutableData *)data
forDebugging:(BOOL)debug
languageEncoding:(DPSProgramEncoding)langEnc
nameEncoding:(DPSNameEncoding)nameEnc
textProc:(DPSTextProc)tProc
errorProc:(DPSErrorProc)errorProc;
//
// Testing the Drawing Destination
//
- (BOOL)isDrawingToScreen;
//
// Accessing Context Data
//
- (NSMutableData *)mutableData;
//
// Setting and Identifying the Current Context
//
+ (NSDPSContext *)currentContext;
+ (void)setCurrentContext:(NSDPSContext *)context;
- (NSDPSContext *)DPSContext;
//
// Controlling the Context
//
- (void)flush;
- (void)interruptExecution;
- (void)notifyObjectWhenFinishedExecuting:(id <NSDPSContextNotification>)obj;
- (void)resetCommunication;
- (void)wait;
//
// Managing Returned Text and Errors
//
+ (NSString *)stringForDPSError:(const DPSBinObjSeqRec *)error;
- (DPSErrorProc)errorProc;
- (void)setErrorProc:(DPSErrorProc)proc;
- (void)setTextProc:(DPSTextProc)proc;
- (DPSTextProc)textProc;
//
// Sending Raw Data
//
- (void)printFormat:(NSString *)format,...;
- (void)printFormat:(NSString *)format arguments:(va_list)argList;
- (void)writeData:(NSData *)buf;
- (void)writePostScriptWithLanguageEncodingConversion:(NSData *)buf;
//
// Managing Binary Object Sequences
//
- (void)awaitReturnValues;
- (void)writeBOSArray:(const void *)data
count:(unsigned int)items
ofType:(DPSDefinedType)type;
- (void)writeBOSNumString:(const void *)data
length:(unsigned int)count
ofType:(DPSDefinedType)type
scale:(int)scale;
- (void)writeBOSString:(const void *)data
length:(unsigned int)bytes;
- (void)writeBinaryObjectSequence:(const void *)data
length:(unsigned int)bytes;
- (void)updateNameMap;
//
// Managing Chained Contexts
//
- (void)chainChildContext:(NSDPSContext *)child;
- (NSDPSContext *)childContext;
- (NSDPSContext *)parentContext;
- (void)unchainContext;
//
// Debugging Aids
//
+ (BOOL)areAllContextsOutputTraced;
+ (BOOL)areAllContextsSynchronized;
+ (void)setAllContextsOutputTraced:(BOOL)flag;
+ (void)setAllContextsSynchronized:(BOOL)flag;
- (BOOL)isOutputTraced;
- (BOOL)isSynchronized;
- (void)setOutputTraced:(BOOL)flag;
- (void)setSynchronized:(BOOL)flag;
@end
#endif /* _GNUstep_H_NSDPSContext */

View file

@ -0,0 +1,94 @@
/*
TypesandConstants.h
All of the Type and Constant definitions for Display Postscript
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: September, 1995
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_DPSTypes
#define _GNUstep_H_DPSTypes
typedef void *DPSProgramEncoding;
typedef void *DPSNameEncoding;
typedef void *DPSTextProc;
typedef void *DPSErrorProc;
typedef void DPSBinObjSeqRec;
typedef unsigned int DPSDefinedType;
//
// Backing Store Types
//
typedef enum _NSBackingStoreType {
NSBackingStoreRetained,
NSBackingStoreNonretained,
NSBackingStoreBuffered
} NSBackingStoreType;
//
// Compositing operators
//
typedef enum _NSCompositingOperation {
NSCompositeClear,
NSCompositeCopy,
NSCompositeSourceOver,
NSCompositeSourceIn,
NSCompositeSourceOut,
NSCompositeSourceAtop,
NSCompositeDataOver,
NSCompositeDataIn,
NSCompositeDataOut,
NSCompositeDataAtop,
NSCompositeXOR,
NSCompositePlusDarker,
NSCompositeHighlight,
NSCompositePlusLighter
} NSCompositingOperation;
//
// Window ordering
//
typedef enum _NSWindowOrderingMode {
NSWindowAbove,
NSWindowBelow,
NSWindowOut
} NSWindowOrderingMode;
extern NSString *DPSPostscriptErrorException;
extern NSString *DPSNameTooLongException;
extern NSString *DPSResultTagCheckException;
extern NSString *DPSResultTypeCheckException;
extern NSString *DPSInvalidContextException;
extern NSString *DPSSelectException;
extern NSString *DPSConnectionClosedException;
extern NSString *DPSReadException;
extern NSString *DPSWriteException;
extern NSString *DPSInvalidFDException;
extern NSString *DPSInvalidTEException;
extern NSString *DPSInvalidPortException;
extern NSString *DPSOutOfMemoryException;
extern NSString *DPSCantConnectException;
#endif // _GNUstep_H_DPSTypes

View file

@ -0,0 +1,148 @@
/*
AppKit.h
Main include file for GNUstep GUI Library
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_AppKit
#define _GNUstep_H_AppKit
#include <AppKit/stdappkit.h>
//
// System dependent information
//
float MB_SCREEN_MAXWIDTH();
float MB_SCREEN_MAXHEIGHT();
//
// Display Postscript System
//
#include <DPSClient/DPSOperators.h>
//
// Types and Constants for GNUstep GUI Library
//
#include <AppKit/TypesandConstants.h>
//
// GNUstep GUI Library functions
//
#include <AppKit/Functions.h>
//
// Protocols
//
//
// Classes
//
@class NSWorkspace;
@class NSResponder, NSApplication, NSScreen;
@class NSWindow, NSPanel, NSView, NSMenu;
@class NSSavePanel, NSOpenPanel, NSHelpPanel;
@class NSClipView, NSScrollView, NSSplitView;
@class NSText;
// Controls
@class NSControl, NSButton, NSTextField, NSScroller, NSBox, NSForm, NSMatrix;
@class NSPopUpButton, NSSlider, NSBrowser, NSForm;
// Cells
@class NSCell, NSActionCell, NSButtonCell, NSTextFieldCell, NSFormCell;
@class NSSliderCell, NSMenuCell, NSBrowserCell, NSFormCell;
@class NSEvent, NSCursor;
@class NSColor, NSColorList, NSColorPanel, NSColorPicker, NSColorWell;
@class NSImage, NSImageRep, NSBitmapImageRep, NSCachedImageRep;
@class NSCustomImageRep, NSEPSImageRep;
@class NSDataLink, NSDataLinkManager, NSDataLinkPanel;
@class NSFont, NSFontManager, NSFontPanel;
@class NSPageLayout, NSPrinter, NSPrintInfo, NSPrintOperation, NSPrintPanel;
@class NSPasteboard, NSSelection;
@class NSSpellChecker, NSSpellServer;
#include <AppKit/NSActionCell.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSBitmapImageRep.h>
#include <AppKit/NSBox.h>
#include <AppKit/NSBrowser.h>
#include <AppKit/NSBrowserCell.h>
#include <AppKit/NSButton.h>
#include <AppKit/NSButtonCell.h>
#include <AppKit/NSCachedImageRep.h>
#include <AppKit/NSCell.h>
#include <AppKit/NSClipView.h>
#include <AppKit/NSColor.h>
#include <AppKit/NSColorList.h>
#include <AppKit/NSColorPanel.h>
#include <AppKit/NSColorPicker.h>
#include <AppKit/NSColorWell.h>
#include <AppKit/NSControl.h>
#include <AppKit/NSCursor.h>
#include <AppKit/NSCustomImageRep.h>
#include <AppKit/NSDataLink.h>
#include <AppKit/NSDataLinkManager.h>
#include <AppKit/NSDataLinkPanel.h>
#include <AppKit/NSEPSImageRep.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSFont.h>
#include <AppKit/NSFontManager.h>
#include <AppKit/NSFontPanel.h>
#include <AppKit/NSForm.h>
#include <AppKit/NSFormCell.h>
#include <AppKit/NSHelpPanel.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSImageRep.h>
#include <AppKit/NSMatrix.h>
#include <AppKit/NSMenu.h>
#include <AppKit/NSMenuCell.h>
#include <AppKit/NSOpenPanel.h>
#include <AppKit/NSPageLayout.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSPasteboard.h>
#include <AppKit/NSPopUpButton.h>
#include <AppKit/NSPrinter.h>
#include <AppKit/NSPrintInfo.h>
#include <AppKit/NSPrintOperation.h>
#include <AppKit/NSPrintPanel.h>
#include <AppKit/NSResponder.h>
#include <AppKit/NSSavePanel.h>
#include <AppKit/NSScreen.h>
#include <AppKit/NSScroller.h>
#include <AppKit/NSScrollView.h>
#include <AppKit/NSSelection.h>
#include <AppKit/NSSlider.h>
#include <AppKit/NSSliderCell.h>
#include <AppKit/NSSpellChecker.h>
#include <AppKit/NSSpellServer.h>
#include <AppKit/NSSplitView.h>
#include <AppKit/NSText.h>
#include <AppKit/NSTextField.h>
#include <AppKit/NSTextFieldCell.h>
#include <AppKit/NSView.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSWorkspace.h>
#endif _GNUstep_H_AppKit

View file

@ -0,0 +1,251 @@
/*
Functions.h
Generic functions for the GNUstep GUI Library
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_AppKitFunctions
#define _GNUstep_H_AppKitFunctions
#include <AppKit/stdappkit.h>
#include <DPSClient/DPSOperators.h>
@class NSPasteboard, NSColor;
//
// Rectangle Drawing Functions
//
//
// Optimize Drawing
//
void NSEraseRect(NSRect aRect);
void NSHighlightRect(NSRect aRect);
void NSRectClip(NSRect aRect);
void NSRectClipList(const NSRect *rects, int count);
void NS__RectFill(id self, NSRect aRect);
#define NSRectFill(ARECT) NS__RectFill(self,ARECT)
void NSRectFillList(const NSRect *rects, int count);
void NSRectFillListWithGrays(const NSRect *rects,
const float *grays, int count);
//
// Draw a Bordered Rectangle
//
void NSDrawButton(NSRect aRect, NSRect clipRect);
void NSDrawGrayBezel(NSRect aRect, NSRect clipRect);
void NSDrawGroove(NSRect aRect, NSRect clipRect);
NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect,
const NSRectEdge *sides, const float *grays,
int count);
void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect);
void NSFrameRect(NSRect aRect);
void NSFrameRectWithWidth(NSRect aRect, float frameWidth);
//
// Color Functions
//
//
// Get Information About Color Space and Window Depth
//
const NSWindowDepth *NSAvailableWindowDepths(void);
NSWindowDepth NSBestDepth(NSString *colorSpace,
int bitsPerSample, int bitsPerPixel,
BOOL planar, BOOL *exactMatch);
int NSBitsPerPixelFromDepth(NSWindowDepth depth);
int NSBitsPerSampleFromDepth(NSWindowDepth depth);
NSString *NSColorSpaceFromDepth(NSWindowDepth depth);
int NSNumberOfColorComponents(NSString *colorSpaceName);
BOOL NSPlanarFromDepth(NSWindowDepth depth);
//
// Read the Color at a Screen Position
//
NSColor *NSReadPixel(NSPoint location);
//
// Text Functions
//
//
// Filter Characters Entered into a Text Object
//
unsigned short NSEditorFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding);
unsigned short NSFieldFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding);
//
// Calculate or Draw a Line of Text (in Text Object)
//
int NSDrawALine(id self, NSLayInfo *layInfo);
int NSScanALine(id self, NSLayInfo *layInfo);
//
// Calculate Font Ascender, Descender, and Line Height (in Text Object)
//
void NSTextFontInfo(id fid,
float *ascender, float *descender,
float *lineHeight);
//
// Access Text Object's Word Tables
//
NSData * NSDataWithWordTable(const unsigned char *smartLeft,
const unsigned char *smartRight,
const unsigned char *charClasses,
const NSFSM *wrapBreaks,
int wrapBreaksCount,
const NSFSM *clickBreaks,
int clickBreaksCount,
BOOL charWrap);
void NSReadWordTable(NSZone *zone,
NSData *data,
unsigned char **smartLeft,
unsigned char **smartRight,
unsigned char **charClasses,
NSFSM **wrapBreaks,
int *wrapBreaksCount,
NSFSM **clickBreaks,
int *clickBreaksCount,
BOOL *charWrap);
//
// Array Allocation Functions for Use by the NSText Class
//
NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc);
NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed);
NSTextChunk *NSChunkMalloc(int growBy, int initUsed);
NSTextChunk *NSChunkRealloc(NSTextChunk *pc);
NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc,
NSTextChunk *dpc,
NSZone *zone);
NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone);
NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone);
NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone);
//
// Imaging Functions
//
//
// Copy an image
//
void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect, NSRect destRect);
void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint);
//
// Render Bitmap Images
//
void NSDrawBitmap(NSRect rect,
int pixelsWide,
int pixelsHigh,
int bitsPerSample,
int samplesPerPixel,
int bitsPerPixel,
int bytesPerRow,
BOOL isPlanar,
BOOL hasAlpha,
NSString *colorSpaceName,
const unsigned char *const data[5]);
//
// Attention Panel Functions
//
//
// Create an Attention Panel without Running It Yet
//
id NSGetAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...);
//
// Create and Run an Attention Panel
//
int NSRunAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...);
int NSRunLocalizedAlertPanel(NSString *table,
NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...);
//
// Release an Attention Panel
//
void NSReleaseAlertPanel(id panel);
//
// Services Menu Functions
//
//
// Determine Whether an Item Is Included in Services Menus
//
int NSSetShowsServicesMenuItem(NSString *item, BOOL showService);
BOOL NSShowsServicesMenuItem(NSString *item);
//
// Programmatically Invoke a Service
//
BOOL NSPerformService(NSString *item, NSPasteboard *pboard);
//
// Force Services Menu to Update Based on New Services
//
void NSUpdateDynamicServices(void);
//
// Other GNUstep GUI Library Functions
//
//
// Play the System Beep
//
void NSBeep(void);
//
// Return File-related Pasteboard Types
//
NSString *NSCreateFileContentsPboardType(NSString *fileType);
NSString *NSCreateFilenamePboardType(NSString *filename);
NSString *NSGetFileType(NSString *pboardType);
NSArray *NSGetFileTypes(NSArray *pboardTypes);
//
// Draw a Distinctive Outline around Linked Data
//
void NSFrameLinkRect(NSRect aRect, BOOL isDestination);
float NSLinkFrameThickness(void);
//
// Convert an Event Mask Type to a Mask
//
unsigned int NSEventMaskFromType(NSEventType type);
#endif // _GNUstep_H_AppKitFunctions

View file

@ -0,0 +1,75 @@
/*
LogFile.h
Logfile for recording trace messages
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep Application Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_LogFile
#define _GNUstep_H_LogFile
#include <Foundation/NSObject.h>
#include <stdio.h>
@interface LogFile : NSObject
{
// Attributes
struct _MB_lflags
{
unsigned int is_locking:1;
unsigned int is_date_logging:1;
} l_flags;
FILE *the_log;
}
//
// Call one of these to initialize the log file and open a stream
// to the standard output or a file.
//
// -init does not open a file
- init;
- initStdout;
- initStdoutWithLocking;
- initFile:(const char *)filename;
- initFileWithLocking:(const char *)filename;
// Instance methods
- writeLog:(const char *)logEntry;
- closeLog;
- (BOOL)isDateLogging;
- setDateLogging:(BOOL)flag;
- (BOOL)isLocking;
@end
#ifdef DEBUGLOG
#define NSDebugLog(format, args...) NSLog(format, ## args)
#else
#define NSDebugLog(format, args...)
#endif
#endif // _GNUstep_H_LogFile

View file

@ -0,0 +1,98 @@
/*
NSActionCell.h
Abstract cell for target/action paradigm
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSActionCell
#define _GNUstep_H_NSActionCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSCell.h>
#include <Foundation/NSCoder.h>
@interface NSActionCell : NSCell <NSCoding>
{
// Attributes
int tag;
id target;
SEL action;
}
//
// Configuring an NSActionCell
//
- (void)setAlignment:(NSTextAlignment)mode;
- (void)setBezeled:(BOOL)flag;
- (void)setBordered:(BOOL)flag;
- (void)setEnabled:(BOOL)flag;
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned int)leftDigits
right:(unsigned int)rightDigits;
- (void)setFont:(NSFont *)fontObject;
- (void)setImage:(NSImage *)image;
//
// Manipulating NSActionCell Values
//
- (double)doubleValue;
- (float)floatValue;
- (int)intValue;
- (void)setStringValue:(NSString *)aString;
- (NSString *)stringValue;
//
// Displaying
//
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView;
- (NSView *)controlView;
//
// Target and Action
//
- (SEL)action;
- (void)setAction:(SEL)aSelector;
- (void)setTarget:(id)anObject;
- (id)target;
//
// Assigning a Tag
//
- (void)setTag:(int)anInt;
- (int)tag;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSActionCell

View file

@ -0,0 +1,259 @@
/*
NSApplication.h
The one and only application class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSApplication
#define _GNUstep_H_NSApplication
#include <AppKit/stdappkit.h>
#include <Foundation/NSArray.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSResponder.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSMenu.h>
#include <AppKit/NSImage.h>
#include <Foundation/NSDate.h>
#include <gnustep/base/Queue.h>
#include <Foundation/NSCoder.h>
@interface NSApplication : NSResponder <NSCoding>
{
// Attributes
NSMutableArray *window_list;
Queue *event_queue;
NSEvent *current_event;
id key_window;
id main_window;
id delegate;
int window_count;
NSMenu *main_menu;
NSMenuCell *windows_menu;
unsigned int current_mod;
BOOL app_is_running;
BOOL app_should_quit;
BOOL app_is_active;
BOOL app_is_hidden;
NSImage *app_icon;
// Reserved for back-end use
void *be_app_reserved;
}
//
// Class methods
//
//
// Creating and initializing the NSApplication
//
+ (NSApplication *)sharedApplication;
//
// Instance methods
//
//
// Creating and initializing the NSApplication
//
- (void)finishLaunching;
//
// Changing the active application
//
- (void)activateIgnoringOtherApps:(BOOL)flag;
- (void)deactivate;
- (BOOL)isActive;
//
// Running the event loop
//
- (void)abortModal;
- (NSModalSession)beginModalSessionForWindow:(NSWindow *)theWindow;
- (void)endModalSession:(NSModalSession)theSession;
- (BOOL)isRunning;
- (void)run;
- (int)runModalForWindow:(NSWindow *)theWindow;
- (int)runModalSession:(NSModalSession)theSession;
- (void)sendEvent:(NSEvent *)theEvent;
- (void)stop:sender;
- (void)stopModal;
- (void)stopModalWithCode:(int)returnCode;
//
// Getting, removing, and posting events
//
- (NSEvent *)currentEvent;
- (void)discardEventsMatchingMask:(unsigned int)mask
beforeEvent:(NSEvent *)lastEvent;
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask
untilDate:(NSDate *)expiration
inMode:(NSString *)mode
dequeue:(BOOL)flag;
- (void)postEvent:(NSEvent *)event atStart:(BOOL)flag;
//
// Sending action messages
//
- (BOOL)sendAction:(SEL)aSelector
to:aTarget
from:sender;
- targetForAction:(SEL)aSelector;
- (BOOL)tryToPerform:(SEL)aSelector
with:anObject;
//
// Setting the application's icon
//
- (void)setApplicationIconImage:(NSImage *)anImage;
- (NSImage *)applicationIconImage;
//
// Hiding all windows
//
- (void)hide:sender;
- (BOOL)isHidden;
- (void)unhide:sender;
- (void)unhideWithoutActivation;
//
// Managing windows
//
- (NSWindow *)keyWindow;
- (NSWindow *)mainWindow;
- (NSWindow *)makeWindowsPerform:(SEL)aSelector
inOrder:(BOOL)flag;
- (void)miniaturizeAll:sender;
- (void)preventWindowOrdering;
- (void)setWindowsNeedUpdate:(BOOL)flag;
- (void)updateWindows;
- (NSArray *)windows;
- (NSWindow *)windowWithWindowNumber:(int)windowNum;
//
// Showing Standard Panels
//
- (void)orderFrontColorPanel:sender;
- (void)orderFrontDataLinkPanel:sender;
- (void)orderFrontHelpPanel:sender;
- (void)runPageLayout:sender;
//
// Getting the main menu
//
- (NSMenu *)mainMenu;
- (void)setMainMenu:(NSMenu *)aMenu;
//
// Managing the Windows menu
//
- (void)addWindowsItem:aWindow
title:(NSString *)aString
filename:(BOOL)isFilename;
- (void)arrangeInFront:sender;
- (void)changeWindowsItem:aWindow
title:(NSString *)aString
filename:(BOOL)isFilename;
- (void)removeWindowsItem:aWindow;
- (void)setWindowsMenu:aMenu;
- (void)updateWindowsItem:aWindow;
- (NSMenu *)windowsMenu;
//
// Managing the Service menu
//
- (void)registerServicesMenuSendTypes:(NSArray *)sendTypes
returnTypes:(NSArray *)returnTypes;
- (NSMenu *)servicesMenu;
- (void)setServicesMenu:(NSMenu *)aMenu;
- validRequestorForSendType:(NSString *)sendType
returnType:(NSString *)returnType;
//
// Getting the display postscript context
//
// - (NSDOSContext *)context;
//
// Reporting an exception
//
//- (void)reportException:(NSException *)anException
//
// Terminating the application
//
- (void)terminate:sender;
//
// Assigning a delegate
//
- delegate;
- (void)setDelegate:anObject;
//
// Implemented by the delegate
//
- (BOOL)application:sender openFileWithoutUI:(NSString *)filename;
- (BOOL)application:(NSApplication *)app openFile:(NSString *)filename;
- (BOOL)application:(NSApplication *)app openTempFile:(NSString *)filename;
- (void)applicationDidBecomeActive:sender;
- (void)applicationDidFinishLaunching:sender;
- (void)applicationDidHide:sender;
- (void)applicationDidResignActive:sender;
- (void)applicationDidUnhide:sender;
- (void)applicationDidUpdate:sender;
- (BOOL)applicationOpenUntitledFile:(NSApplication *)app;
- (BOOL)applicationShouldTerminate:sender;
- (void)applicationWillBecomeActive:sender;
- (void)applicationWillFinishLaunching:sender;
- (void)applicationWillHide:sender;
- (void)applicationWillResignActive:sender;
- (void)applicationWillUnhide:sender;
- (void)applicationWillUpdate:sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
//
// Backend methods
//
@interface NSApplication (GNUstepBackend)
// Get next event
- (NSEvent *)getNextEvent;
// handle a non-translated event
- (void)handleNullEvent;
@end
#endif // _GNUstep_H_NSApplication

View file

@ -0,0 +1,110 @@
/*
NSBitmapImageRep.h
Bitmap image representations
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSBitmapImageRep
#define _GNUstep_H_NSBitmapImageRep
#include <AppKit/stdappkit.h>
#include <AppKit/NSImageRep.h>
#include <Foundation/NSCoder.h>
@interface NSBitmapImageRep : NSImageRep <NSCoding>
{
// Attributes
}
//
// Allocating and Initializing a New NSBitmapImageRep Object
//
+ (id)imageRepWithData:(NSData *)tiffData;
+ (NSArray *)imageRepsWithData:(NSData *)tiffData;
- (id)initWithData:(NSData *)tiffData;
- (id)initWithFocusedViewRect:(NSRect)rect;
- (id)initWithBitmapDataPlanes:(unsigned char **)planes
pixelsWide:(int)width
pixelsHigh:(int)height
bitsPerSample:(int)bps
samplesPerPixel:(int)spp
hasAlpha:(BOOL)alpha
isPlanar:(BOOL)config
colorSpaceName:(NSString *)colorSpaceName
bytesPerRow:(int)rowBytes
bitsPerPixel:(int)pixelBits;
//
// Getting Information about the Image
//
- (int)bitsPerPixel;
- (int)samplesPerPixel;
- (BOOL)isPlanar;
- (int)numberOfPlanes;
- (int)bytesPerPlane;
- (int)bytesPerRow;
//
// Getting Image Data
//
- (unsigned char *)bitmapData;
- (void)getBitmapDataPlanes:(unsigned char **)data;
//
// Producing a TIFF Representation of the Image
//
+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray;
+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray
usingCompression:(NSTIFFCompression)compressionType
factor:(float)factor;
- (NSData *)TIFFRepresentation;
- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)compressionType
factor:(float)factor;
//
// Setting and Checking Compression Types
//
+ (void)getTIFFCompressionTypes:(const NSTIFFCompression **)list
count:(int *)numTypes;
+ (NSString *)localizedNameForTIFFCompressionType:(NSTIFFCompression)compression;
- (BOOL)canBeCompressedUsing:(NSTIFFCompression)compression;
- (void)getCompression:(NSTIFFCompression *)compression
factor:(float *)factor;
- (void)setCompression:(NSTIFFCompression)compression
factor:(float)factor;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSBitmapImageRep

View file

@ -0,0 +1,91 @@
/*
NSBox.h
Simple box view that can display a border and title
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSBox
#define _GNUstep_H_NSBox
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSFont.h>
#include <Foundation/NSCoder.h>
@interface NSBox : NSView <NSCoding>
{
@protected
// Attributes
id cell;
id content_view;
NSSize offsets;
NSRect border_rect;
NSRect title_rect;
NSBorderType border_type;
NSTitlePosition title_position;
}
//
// Getting and Modifying the Border and Title
//
- (NSRect)borderRect;
- (NSBorderType)borderType;
- (void)setBorderType:(NSBorderType)aType;
- (void)setTitle:(NSString *)aString;
- (void)setTitleFont:(NSFont *)fontObj;
- (void)setTitlePosition:(NSTitlePosition)aPosition;
- (NSString *)title;
- (id)titleCell;
- (NSFont *)titleFont;
- (NSTitlePosition)titlePosition;
- (NSRect)titleRect;
//
// Setting and Placing the Content View
//
- (id)contentView;
- (NSSize)contentViewMargins;
- (void)setContentView:(NSView *)aView;
- (void)setContentViewMargins:(NSSize)offsetSize;
//
// Resizing the Box
//
- (void)setFrameFromContentFrame:(NSRect)contentFrame;
- (void)sizeToFit;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSBox

View file

@ -0,0 +1,219 @@
/*
NSBrowser.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSBrowser
#define _GNUstep_H_NSBrowser
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <AppKit/NSMatrix.h>
#include <AppKit/NSScroller.h>
#include <Foundation/NSCoder.h>
@interface NSBrowser : NSControl <NSCoding>
{
// Attributes
}
//
// Setting the Delegate
//
- (id)delegate;
- (void)setDelegate:(id)anObject;
//
// Target and Action
//
- (SEL)doubleAction;
- (BOOL)sendAction;
- (void)setDoubleAction:(SEL)aSelector;
//
// Setting Component Classes
//
+ (Class)cellClass;
- (id)cellPrototype;
- (Class)matrixClass;
- (void)setCellClass:(Class)classId;
- (void)setCellPrototype:(NSCell *)aCell;
- (void)setMatrixClass:(Class)classId;
//
// Setting NSBrowser Behavior
//
- (BOOL)reusesColumns;
- (void)setReusesColumns:(BOOL)flag;
- (void)setTakesTitleFromPreviousColumn:(BOOL)flag;
- (BOOL)takesTitleFromPreviousColumn;
//
// Allowing Different Types of Selection
//
- (BOOL)allowsBranchSelection;
- (BOOL)allowsEmptySelection;
- (BOOL)allowsMultipleSelection;
- (void)setAllowsBranchSelection:(BOOL)flag;
- (void)setAllowsEmptySelection:(BOOL)flag;
- (void)setAllowsMultipleSelection:(BOOL)flag;
//
// Setting Arrow Key Behavior
//
- (BOOL)acceptsArrowKeys;
- (BOOL)sendsActionOnArrowKeys;
- (void)setAcceptsArrowKeys:(BOOL)flag;
- (void)setSendsActionOnArrowKeys:(BOOL)flag;
//
// Showing a Horizontal Scroller
//
- (void)setHasHorizontalScroller:(BOOL)flag;
- (BOOL)hasHorizontalScroller;
//
// Setting the NSBrowser's Appearance
//
- (int)maxVisibleColumns;
- (int)minColumnWidth;
- (BOOL)separatesColumns;
- (void)setMaxVisibleColumns:(int)columnCount;
- (void)setMinColumnWidth:(int)columnWidth;
- (void)setSeparatesColumns:(BOOL)flag;
//
// Manipulating Columns
//
- (void)addColumn;
- (int)columnOfMatrix:(NSMatrix *)matrix;
- (void)displayAllColumns;
- (void)displayColumn:(int)column;
- (int)firstVisibleColumn;
- (BOOL)isLoaded;
- (int)lastColumn;
- (int)lastVisibleColumn;
- (void)loadColumnZero;
- (int)numberOfVisibleColumns;
- (void)reloadColumn:(int)column;
- (void)selectAll:(id)sender;
- (int)selectedColumn;
- (void)setLastColumn:(int)column;
- (void)validateVisibleColumns;
//
// Manipulating Column Titles
//
- (void)drawTitle:(NSString *)title
inRect:(NSRect)aRect
ofColumn:(int)column;
- (BOOL)isTitled;
- (void)setTitled:(BOOL)flag;
- (void)setTitle:(NSString *)aString
ofColumn:(int)column;
- (NSRect)titleFrameOfColumn:(int)column;
- (float)titleHeight;
- (NSString *)titleOfColumn:(int)column;
//
// Scrolling an NSBrowser
//
- (void)scrollColumnsLeftBy:(int)shiftAmount;
- (void)scrollColumnsRightBy:(int)shiftAmount;
- (void)scrollColumnToVisible:(int)column;
- (void)scrollViaScroller:(NSScroller *)sender;
- (void)updateScroller;
//
// Event Handling
//
- (void)doClick:(id)sender;
- (void)doDoubleClick:(id)sender;
//
// Getting Matrices and Cells
//
- (id)loadedCellAtRow:(int)row
column:(int)column;
- (NSMatrix *)matrixInColumn:(int)column;
- (id)selectedCell;
- (id)selectedCellInColumn:(int)column;
- (NSArray *)selectedCells;
//
// Getting Column Frames
//
- (NSRect)frameOfColumn:(int)column;
- (NSRect)frameOfInsideOfColumn:(int)column;
//
// Manipulating Paths
//
- (NSString *)path;
- (NSString *)pathSeparator;
- (NSString *)pathToColumn:(int)column;
- (BOOL)setPath:(NSString *)path;
- (void)setPathSeparator:(NSString *)aString;
//
// Arranging an NSBrowser's Components
//
- (void)tile;
//
// Methods Implemented by the Delegate
//
- (void)browser:(NSBrowser *)sender
createRowsForColumn:(int)column
inMatrix:(NSMatrix *)matrix;
- (BOOL)browser:(NSBrowser *)sender
isColumnValid:(int)column;
- (int)browser:(NSBrowser *)sender
numberOfRowsInColumn:(int)column;
- (BOOL)browser:(NSBrowser *)sender
selectCell:(NSString *)title
inColumn:(int)column;
- (NSString *)browser:(NSBrowser *)sender
titleOfColumn:(int)column;
- (void)browser:(NSBrowser *)sender
willDisplayCell:(id)cell
atRow:(int)row
column:(int)column;
- (void)browserDidScroll:(NSBrowser *)sender;
- (void)browserWillScroll:(NSBrowser *)sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSBrowser

View file

@ -0,0 +1,78 @@
/*
NSBrowserCell.h
Cell class for the NSBrowser
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSBrowserCell
#define _GNUstep_H_NSBrowserCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSCell.h>
#include <Foundation/NSCoder.h>
@interface NSBrowserCell : NSCell <NSCoding>
{
// Attributes
}
//
// Accessing Graphic Attributes
//
+ (NSImage *)branchImage;
+ (NSImage *)highlightedBranchImage;
- (NSImage *)alternateImage;
- (void)setAlternateImage:(NSImage *)anImage;
//
// Placing in the Browser Hierarchy
//
- (BOOL)isLeaf;
- (void)setLeaf:(BOOL)flag;
//
// Determining Loaded Status
//
- (BOOL)isLoaded;
- (void)setLoaded:(BOOL)flag;
//
// Setting State
//
- (void)reset;
- (void)set;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSBrowserCell

View file

@ -0,0 +1,50 @@
/*
NSText.h
The text object
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSBundleAdditions
#define _GNUstep_H_NSBundleAdditions
@implementation NSBundle (NSBundleAdditions)
- (NSString *)pathForImageResource:(NSString *)name;
+ (BOOL)loadNibFile:(NSString *)fileName
externalNameTable:(NSDictionary *)context
withZone:(NSZone *)zone;
+ (BOOL)loadNibNamed:(NSString *)aNibName
owner:(id)owner;
@end
#endif // _GNUstep_H_NSBundleAdditions

View file

@ -0,0 +1,123 @@
/*
NSButton.h
The button class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSButton
#define _GNUstep_H_NSButton
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <DPSClient/DPSOperators.h>
#include <Foundation/NSCoder.h>
@interface NSButton : NSControl <NSCoding>
{
// Attributes
}
//
// Initializing the NSButton Factory
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)classId;
//
// Setting the Button Type
//
- (void)setType:(NSButtonType)aType;
//
// Setting the State
//
- (void)setState:(int)value;
- (int)state;
//
// Setting the Repeat Interval
//
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval;
- (void)setPeriodicDelay:(float)delay
interval:(float)interval;
//
// Setting the Titles
//
- (NSString *)alternateTitle;
- (void)setAlternateTitle:(NSString *)aString;
- (void)setTitle:(NSString *)aString;
- (NSString *)title;
//
// Setting the Images
//
- (NSImage *)alternateImage;
- (NSImage *)image;
- (NSCellImagePosition)imagePosition;
- (void)setAlternateImage:(NSImage *)anImage;
- (void)setImage:(NSImage *)anImage;
- (void)setImagePosition:(NSCellImagePosition)aPosition;
//
// Modifying Graphic Attributes
//
- (BOOL)isBordered;
- (BOOL)isTransparent;
- (void)setBordered:(BOOL)flag;
- (void)setTransparent:(BOOL)flag;
//
// Displaying
//
- (void)highlight:(BOOL)flag;
//
// Setting the Key Equivalent
//
- (NSString *)keyEquivalent;
- (unsigned int)keyEquivalentModifierMask;
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
- (void)setKeyEquivalentModifierMask:(unsigned int)mask;
//
// Handling Events and Action Messages
//
- (void)performClick:(id)sender;
- (BOOL)performKeyEquivalent:(NSEvent *)anEvent;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSButton

View file

@ -0,0 +1,119 @@
/*
NSButtonCell.h
The cell class for NSButton
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSButtonCell
#define _GNUstep_H_NSButtonCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSActionCell.h>
#include <Foundation/NSString.h>
#include <DPSClient/DPSOperators.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
@interface NSButtonCell : NSActionCell <NSCoding>
{
// Attributes
NSString *alt_contents;
NSImage *alt_image;
BOOL transparent;
// Reserved for back-end use
void *be_bc_reserved;
}
//
// Setting the Titles
//
- (NSString *)alternateTitle;
- (void)setAlternateTitle:(NSString *)aString;
- (void)setFont:(NSFont *)fontObject;
- (void)setTitle:(NSString *)aString;
- (NSString *)title;
//
// Setting the Images
//
- (NSImage *)alternateImage;
- (NSCellImagePosition)imagePosition;
- (void)setAlternateImage:(NSImage *)anImage;
- (void)setImagePosition:(NSCellImagePosition)aPosition;
//
// Setting the Repeat Interval
//
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval;
- (void)setPeriodicDelay:(float)delay
interval:(float)interval;
//
// Setting the Key Equivalent
//
- (NSString *)keyEquivalent;
- (NSFont *)keyEquivalentFont;
- (unsigned int)keyEquivalentModifierMask;
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
- (void)setKeyEquivalentModifierMask:(unsigned int)mask;
- (void)setKeyEquivalentFont:(NSFont *)fontObj;
- (void)setKeyEquivalentFont:(NSString *)fontName
size:(float)fontSize;
//
// Modifying Graphic Attributes
//
- (BOOL)isOpaque;
- (BOOL)isTransparent;
- (void)setTransparent:(BOOL)flag;
//
// Modifying Graphic Attributes
//
- (int)highlightsBy;
- (void)setHighlightsBy:(int)aType;
- (void)setShowsStateBy:(int)aType;
- (void)setType:(NSButtonType)aType;
- (int)showsStateBy;
//
// Simulating a Click
//
- (void)performClick:(id)sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSButtonCell

View file

@ -0,0 +1,69 @@
/*
NSCachedImageRep.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSCachedImageRep
#define _GNUstep_H_NSCachedImageRep
#include <AppKit/stdappkit.h>
#include <AppKit/NSImageRep.h>
#include <AppKit/NSWindow.h>
#include <Foundation/NSCoder.h>
@interface NSCachedImageRep : NSImageRep <NSCoding>
{
// Attributes
}
//
// Initializing an NSCachedImageRep
//
- (id)initWithSize:(NSSize)aSize
depth:(NSWindowDepth)aDepth
separate:(BOOL)separate
alpha:(BOOL)alpha;
- (id)initWithWindow:(NSWindow *)aWindow
rect:(NSRect)aRect;
//
// Getting the Representation
//
- (NSRect)rect;
- (NSWindow *)window;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSCachedImageRep

View file

@ -0,0 +1,274 @@
/*
NSCell.h
The abstract cell class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSCell
#define _GNUstep_H_NSCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSImage.h>
#include <Foundation/NSString.h>
#include <AppKit/NSView.h>
#include <AppKit/NSFont.h>
#include <AppKit/NSText.h>
#include <Foundation/NSCoder.h>
@interface NSCell : NSObject <NSCoding>
{
// Attributes
NSString *contents;
id support;
BOOL cell_state;
BOOL cell_highlighted;
BOOL cell_enabled;
BOOL cell_editable;
BOOL cell_bordered;
BOOL cell_bezeled;
BOOL cell_scrollable;
BOOL cell_selectable;
BOOL cell_continuous;
BOOL cell_float_autorange;
unsigned int cell_float_left;
unsigned int cell_float_right;
unsigned int image_position;
int cell_type;
NSTextAlignment text_align;
int entry_type;
NSView *control_view;
NSSize cell_size;
id represented_object;
}
//
// Initializing an NSCell
//
- (id)initImageCell:(NSImage *)anImage;
- (id)initTextCell:(NSString *)aString;
//
// Determining Component Sizes
//
- (void)calcDrawInfo:(NSRect)aRect;
- (NSSize)cellSize;
- (NSSize)cellSizeForBounds:(NSRect)aRect;
- (NSRect)drawingRectForBounds:(NSRect)theRect;
- (NSRect)imageRectForBounds:(NSRect)theRect;
- (NSRect)titleRectForBounds:(NSRect)theRect;
//
// Setting the NSCell's Type
//
- (void)setType:(NSCellType)aType;
- (NSCellType)type;
//
// Setting the NSCell's State
//
- (void)setState:(int)value;
- (int)state;
//
// Enabling and Disabling the NSCell
//
- (BOOL)isEnabled;
- (void)setEnabled:(BOOL)flag;
//
// Setting the Image
//
- (NSImage *)image;
- (void)setImage:(NSImage *)anImage;
//
// Setting the NSCell's Value
//
- (double)doubleValue;
- (float)floatValue;
- (int)intValue;
- (NSString *)stringValue;
- (void)setDoubleValue:(double)aDouble;
- (void)setFloatValue:(float)aFloat;
- (void)setIntValue:(int)anInt;
- (void)setStringValue:(NSString *)aString;
//
// Interacting with Other NSCells
//
- (void)takeDoubleValueFrom:(id)sender;
- (void)takeFloatValueFrom:(id)sender;
- (void)takeIntValueFrom:(id)sender;
- (void)takeStringValueFrom:(id)sender;
//
// Modifying Text Attributes
//
- (NSTextAlignment)alignment;
- (NSFont *)font;
- (BOOL)isEditable;
- (BOOL)isSelectable;
- (BOOL)isScrollable;
- (void)setAlignment:(NSTextAlignment)mode;
- (void)setEditable:(BOOL)flag;
- (void)setFont:(NSFont *)fontObject;
- (void)setSelectable:(BOOL)flag;
- (void)setScrollable:(BOOL)flag;
- (NSText *)setUpFieldEditorAttributes:(NSText *)textObject;
- (void)setWraps:(BOOL)flag;
- (BOOL)wraps;
//
// Editing Text
//
- (void)editWithFrame:(NSRect)aRect
inView:(NSView *)controlView
editor:(NSText *)textObject
delegate:(id)anObject
event:(NSEvent *)theEvent;
- (void)endEditing:(NSText *)textObject;
- (void)selectWithFrame:(NSRect)aRect
inView:(NSView *)controlView
editor:(NSText *)textObject
delegate:(id)anObject
start:(int)selStart
length:(int)selLength;
//
// Validating Input
//
- (int)entryType;
- (BOOL)isEntryAcceptable:(NSString *)aString;
- (void)setEntryType:(int)aType;
//
// Formatting Data
//
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned int)leftDigits
right:(unsigned int)rightDigits;
//
// Modifying Graphic Attributes
//
- (BOOL)isBezeled;
- (BOOL)isBordered;
- (BOOL)isOpaque;
- (void)setBezeled:(BOOL)flag;
- (void)setBordered:(BOOL)flag;
//
// Setting Parameters
//
- (int)cellAttribute:(NSCellAttribute)aParameter;
- (void)setCellAttribute:(NSCellAttribute)aParameter
to:(int)value;
//
// Displaying
//
- (NSView *)controlView;
- (void)drawInteriorWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView;
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView;
- (void)highlight:(BOOL)lit
withFrame:(NSRect)cellFrame
inView:(NSView *)controlView;
- (BOOL)isHighlighted;
//
// Target and Action
//
- (SEL)action;
- (BOOL)isContinuous;
- (int)sendActionOn:(int)mask;
- (void)setAction:(SEL)aSelector;
- (void)setContinuous:(BOOL)flag;
- (void)setTarget:(id)anObject;
- (id)target;
//
// Assigning a Tag
//
- (void)setTag:(int)anInt;
- (int)tag;
//
// Handling Keyboard Alternatives
//
- (NSString *)keyEquivalent;
//
// Tracking the Mouse
//
+ (BOOL)prefersTrackingUntilMouseUp;
- (BOOL)continueTracking:(NSPoint)lastPoint
at:(NSPoint)currentPoint
inView:(NSView *)controlView;
- (int)mouseDownFlags;
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval;
- (BOOL)startTrackingAt:(NSPoint)startPoint
inView:(NSView *)controlView;
- (void)stopTracking:(NSPoint)lastPoint
at:(NSPoint)stopPoint
inView:(NSView *)controlView
mouseIsUp:(BOOL)flag;
- (BOOL)trackMouse:(NSEvent *)theEvent
inRect:(NSRect)cellFrame
ofView:(NSView *)controlView
untilMouseUp:(BOOL)flag;
//
// Managing the Cursor
//
- (void)resetCursorRect:(NSRect)cellFrame
inView:(NSView *)controlView;
//
// Comparing to Another NSCell
//
- (NSComparisonResult)compare:(id)otherCell;
//
// Using the NSCell to Represent an Object
//
- (id)representedObject;
- (void)setRepresentedObject:(id)anObject;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSCell

View file

@ -0,0 +1,88 @@
/*
NSClipView.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSClipView
#define _GNUstep_H_NSClipView
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSCursor.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
@interface NSClipView : NSView <NSCoding>
{
// Attributes
}
//
// Managing the Document View
//
- (NSRect)documentRect;
- (id)documentView;
- (NSRect)documentVisibleRect;
- (void)setDocumentView:(NSView *)aView;
//
// Setting the Cursor
//
- (NSCursor *)documentCursor;
- (void)setDocumentCursor:(NSCursor *)anObject;
//
// Setting the Background Color
//
- (NSColor *)backgroundColor;
- (void)setBackgroundColor:(NSColor *)color;
//
// Scrolling
//
- (BOOL)autoscroll:(NSEvent *)theEvent;
- (NSPoint)constrainScrollPoint:(NSPoint)newOrigin;
- (BOOL)copiesOnScroll;
- (void)scrollToPoint:(NSPoint)newOrigin;
- (void)setCopiesOnScroll:(BOOL)flag;
//
// Responding to a Changed Frame
//
- (void)viewFrameChanged:(NSNotification *)notification;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSClipView

View file

@ -0,0 +1,205 @@
/*
NSColor.h
The colorful color class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColor
#define _GNUstep_H_NSColor
#include <AppKit/stdappkit.h>
#include <Foundation/NSCoder.h>
@class NSPasteboard;
@interface NSColor : NSObject <NSCoding>
{
// Attributes
NSString *colorspace_name;
NSString *catalog_name;
NSString *color_name;
struct _GNU_RGB_component
{
float red;
float green;
float blue;
} RGB_component;
struct _GNU_CMYK_component
{
float cyan;
float magenta;
float yellow;
float black;
} CMYK_component;
float alpha_component;
float white_component;
float hue_component;
float brightness_component;
float saturation_component;
BOOL is_clear;
// Reserved for back-end use
void *be_color_reserved;
}
//
// Creating an NSColor from Component Values
//
+ (NSColor *)colorWithCalibratedHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha;
+ (NSColor *)colorWithCalibratedRed:(float)red
green:(float)green
blue:(float)blue
alpha:(float)alpha;
+ (NSColor *)colorWithCalibratedWhite:(float)white
alpha:(float)alpha;
+ (NSColor *)colorWithCatalogName:(NSString *)listName
colorName:(NSString *)colorName;
+ (NSColor *)colorWithDeviceCyan:(float)cyan
magenta:(float)magenta
yellow:(float)yellow
black:(float)black
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceRed:(float)red
green:(float)green
blue:(float)blue
alpha:(float)alpha;
+ (NSColor *)colorWithDeviceWhite:(float)white
alpha:(float)alpha;
//
// Creating an NSColor With Preset Components
//
+ (NSColor *)blackColor;
+ (NSColor *)blueColor;
+ (NSColor *)brownColor;
+ (NSColor *)clearColor;
+ (NSColor *)cyanColor;
+ (NSColor *)darkGrayColor;
+ (NSColor *)grayColor;
+ (NSColor *)greenColor;
+ (NSColor *)lightGrayColor;
+ (NSColor *)magentaColor;
+ (NSColor *)orangeColor;
+ (NSColor *)purpleColor;
+ (NSColor *)redColor;
+ (NSColor *)whiteColor;
+ (NSColor *)yellowColor;
//
// Ignoring Alpha Components
//
+ (BOOL)ignoresAlpha;
+ (void)setIgnoresAlpha:(BOOL)flag;
//
// Retrieving a Set of Components
//
- (void)getCyan:(float *)cyan
magenta:(float *)magenta
yellow:(float *)yellow
black:(float *)black
alpha:(float *)alpha;
- (void)getHue:(float *)hue
saturation:(float *)saturation
brightness:(float *)brightness
alpha:(float *)alpha;
- (void)getRed:(float *)red
green:(float *)green
blue:(float *)blue
alpha:(float *)alpha;
- (void)getWhite:(float *)white
alpha:(float *)alpha;
//
// Retrieving Individual Components
//
- (float)alphaComponent;
- (float)blackComponent;
- (float)blueComponent;
- (float)brightnessComponent;
- (NSString *)catalogNameComponent;
- (NSString *)colorNameComponent;
- (float)cyanComponent;
- (float)greenComponent;
- (float)hueComponent;
- (NSString *)localizedCatalogNameComponent;
- (NSString *)localizedColorNameComponent;
- (float)magentaComponent;
- (float)redComponent;
- (float)saturationComponent;
- (float)whiteComponent;
- (float)yellowComponent;
//
// Converting to Another Color Space
//
- (NSString *)colorSpaceName;
- (NSColor *)colorUsingColorSpaceName:(NSString *)colorSpace;
- (NSColor *)colorUsingColorSpaceName:(NSString *)colorSpace
device:(NSDictionary *)deviceDescription;
//
// Changing the Color
//
- (NSColor *)blendedColorWithFraction:(float)fraction
ofColor:(NSColor *)aColor;
- (NSColor *)colorWithAlphaComponent:(float)alpha;
//
// Copying and Pasting
//
+ (NSColor *)colorFromPasteboard:(NSPasteboard *)pasteBoard;
- (void)writeToPasteboard:(NSPasteboard *)pasteBoard;
//
// Drawing
//
- (void)drawSwatchInRect:(NSRect)rect;
- (void)set;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSColor

View file

@ -0,0 +1,93 @@
/*
NSColorList.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColorList
#define _GNUstep_H_NSColorList
#include <AppKit/stdappkit.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
@interface NSColorList : NSObject <NSCoding>
{
// Attributes
}
//
// Initializing an NSColorList
//
- (id)initWithName:(NSString *)name;
- (id)initWithName:(NSString *)name
fromFile:(NSString *)path;
//
// Getting All Color Lists
//
+ (NSArray *)availableColorLists;
//
// Getting a Color List by Name
//
+ (NSColorList *)colorListNamed:(NSString *)name;
- (NSString *)name;
//
// Managing Colors by Key
//
- (NSArray *)allKeys;
- (NSColor *)colorWithKey:(NSString *)key;
- (void)insertColor:(NSColor *)color
key:(NSString *)key
atIndex:(unsigned)location;
- (void)removeColorWithKey:(NSString *)key;
- (void)setColor:(NSColor *)aColor
forKey:(NSString *)key;
//
// Editing
//
- (BOOL)isEditable;
//
// Writing and Removing Files
//
- (BOOL)writeToFile:(NSString *)path;
- (void)removeFile;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSColorList

View file

@ -0,0 +1,91 @@
/*
NSColorPanel.h
System generic color panel
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColorPanel
#define _GNUstep_H_NSColorPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSColorList.h>
#include <Foundation/NSCoder.h>
@interface NSColorPanel : NSPanel <NSCoding>
{
// Attributes
}
//
// Creating the NSColorPanel
//
+ (NSColorPanel *)sharedColorPanel;
+ (BOOL)sharedColorPanelExists;
//
// Setting the NSColorPanel
//
+ (void)setPickerMask:(int)mask;
+ (void)setPickerMode:(int)mode;
- (NSView *)accessoryView;
- (BOOL)isContinuous;
- (int)mode;
- (void)setAccessoryView:(NSView *)aView;
- (void)setAction:(SEL)aSelector;
- (void)setContinuous:(BOOL)flag;
- (void)setMode:(int)mode;
- (void)setShowsAlpha:(BOOL)flag;
- (void)setTarget:(id)anObject;
- (BOOL)showsAlpha;
//
// Attaching a Color List
//
- (void)attachColorList:(NSColorList *)aColorList;
- (void)detachColorList:(NSColorList *)aColorList;
//
// Setting Color
//
+ (BOOL)dragColor:(NSColor **)aColor
withEvent:(NSEvent *)anEvent
fromView:(NSView *)sourceView;
- (float)alpha;
- (NSColor *)color;
- (void)setColor:(NSColor *)aColor;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSColorPanel

View file

@ -0,0 +1,82 @@
/*
NSColorPicker.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColorPicker
#define _GNUstep_H_NSColorPicker
#include <AppKit/stdappkit.h>
#include <AppKit/NSColorPanel.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSColorList.h>
#include <AppKit/NSButtonCell.h>
@interface NSColorPicker : NSObject
{
// Attributes
}
//
// Initializing an NSColorPicker
//
- (id)initWithPickerMask:(int)aMask
colorPanel:(NSColorPanel *)colorPanel;
//
// Getting the Color Panel
//
- (NSColorPanel *)colorPanel;
//
// Adding Button Images
//
- (void)insertNewButtonImage:(NSImage *)newImage
in:(NSButtonCell *)newButtonCell;
- (NSImage *)provideNewButtonImage;
//
// Setting the Mode
//
- (void)setMode:(int)mode;
//
// Using Color Lists
//
- (void)attachColorList:(NSColorList *)colorList;
- (void)detachColorList:(NSColorList *)colorList;
//
// Responding to a Resized View
//
- (void)viewSizeChanged:(id)sender;
@end
#endif // _GNUstep_H_NSColorPicker

View file

@ -0,0 +1,77 @@
/*
NSColorWell.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSColorWell
#define _GNUstep_H_NSColorWell
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
@interface NSColorWell : NSControl <NSCoding>
{
// Attributes
}
//
// Drawing
//
- (void)drawWellInside:(NSRect)insideRect;
//
// Activating
//
- (void)activate:(BOOL)exclusive;
- (void)deactivate;
- (BOOL)isActive;
//
// Managing Color
//
- (NSColor *)color;
- (void)setColor:(NSColor *)color;
- (void)takeColorFrom:(id)sender;
//
// Managing Borders
//
- (BOOL)isBordered;
- (void)setBordered:(BOOL)bordered;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSColorWell

View file

@ -0,0 +1,171 @@
/*
NSControl.h
The abstract control class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSControl
#define _GNUstep_H_NSControl
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSCell.h>
#include <Foundation/NSCoder.h>
@interface NSControl : NSView <NSCoding>
{
// Attributes
int tag;
id cell;
}
//
// Initializing an NSControl Object
//
- (id)initWithFrame:(NSRect)frameRect;
//
// Setting the Control's Cell
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)factoryId;
- (id)cell;
- (void)setCell:(NSCell *)aCell;
//
// Enabling and Disabling the Control
//
- (BOOL)isEnabled;
- (void)setEnabled:(BOOL)flag;
//
// Identifying the Selected Cell
//
- (id)selectedCell;
- (int)selectedTag;
//
// Setting the Control's Value
//
- (double)doubleValue;
- (float)floatValue;
- (int)intValue;
- (void)setDoubleValue:(double)aDouble;
- (void)setFloatValue:(float)aFloat;
- (void)setIntValue:(int)anInt;
- (void)setNeedsDisplay;
- (void)setStringValue:(NSString *)aString;
- (NSString *)stringValue;
//
// Interacting with Other Controls
//
- (void)takeDoubleValueFrom:(id)sender;
- (void)takeFloatValueFrom:(id)sender;
- (void)takeIntValueFrom:(id)sender;
- (void)takeStringValueFrom:(id)sender;
//
// Formatting Text
//
- (NSTextAlignment)alignment;
- (NSFont *)font;
- (void)setAlignment:(NSTextAlignment)mode;
- (void)setFont:(NSFont *)fontObject;
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned)leftDigits
right:(unsigned)rightDigits;
//
// Managing the Field Editor
//
- (BOOL)abortEditing;
- (NSText *)currentEditor;
- (void)validateEditing;
//
// Resizing the Control
//
- (void)calcSize;
- (void)sizeToFit;
//
// Displaying the Control and Cell
//
- (void)drawCell:(NSCell *)aCell;
- (void)drawCellInside:(NSCell *)aCell;
- (void)selectCell:(NSCell *)aCell;
- (void)updateCell:(NSCell *)aCell;
- (void)updateCellInside:(NSCell *)aCell;
//
// Target and Action
//
- (SEL)action;
- (BOOL)isContinuous;
- (BOOL)sendAction:(SEL)theAction
to:(id)theTarget;
- (int)sendActionOn:(int)mask;
- (void)setAction:(SEL)aSelector;
- (void)setContinuous:(BOOL)flag;
- (void)setTarget:(id)anObject;
- (id)target;
//
// Assigning a Tag
//
- (void)setTag:(int)anInt;
- (int)tag;
//
// Tracking the Mouse
//
- (void)mouseDown:(NSEvent *)theEvent;
- (BOOL)ignoresMultiClick;
- (void)setIgnoresMultiClick:(BOOL)flag;
//
// Methods Implemented by the Delegate
//
- (BOOL)control:(NSControl *)control
textShouldBeginEditing:(NSText *)fieldEditor;
- (BOOL)control:(NSControl *)control
textShouldEndEditing:(NSText *)fieldEditor;
- (void)controlTextDidBeginEditing:(NSNotification *)aNotification;
- (void)controlTextDidEndEditing:(NSNotification *)aNotification;
- (void)controlTextDidChange:(NSNotification *)aNotification;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSControl

View file

@ -0,0 +1,90 @@
/*
NSCursor.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSCursor
#define _GNUstep_H_NSCursor
#include <AppKit/stdappkit.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSEvent.h>
#include <Foundation/NSCoder.h>
@interface NSCursor : NSObject <NSCoding>
{
// Attributes
}
//
// Initializing a New NSCursor Object
//
- (id)initWithImage:(NSImage *)newImage;
//
// Defining the Cursor
//
- (NSPoint)hotSpot;
- (NSImage *)image;
- (void)setHotSpot:(NSPoint)spot;
- (void)setImage:(NSImage *)newImage;
//
// Setting the Cursor
//
+ (void)hide;
+ (void)pop;
+ (void)setHiddenUntilMouseMoves:(BOOL)flag;
+ (void)unhide;
- (BOOL)isSetOnMouseEntered;
- (BOOL)isSetOnMouseExited;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)pop;
- (void)push;
- (void)set;
- (void)setOnMouseEntered:(BOOL)flag;
- (void)setOnMouseExited:(BOOL)flag;
//
// Getting the Cursor
//
+ (NSCursor *)arrowCursor;
+ (NSCursor *)currentCursor;
+ (NSCursor *)IBeamCursor;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSCursor

View file

@ -0,0 +1,61 @@
/*
NSCustomImageRep.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSCustomImageRep
#define _GNUstep_H_NSCustomImageRep
#include <AppKit/stdappkit.h>
#include <AppKit/NSImageRep.h>
#include <Foundation/NSCoder.h>
@interface NSCustomImageRep : NSImageRep <NSCoding>
{
// Attributes
}
- (id)initWithDrawSelector:(SEL)aSelector
delegate:(id)anObject;
//
// Identifying the Object
//
- (id)delegate;
- (SEL)drawSelector;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSCustomImageRep

View file

@ -0,0 +1,107 @@
/*
NSDataLink.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSDataLink
#define _GNUstep_H_NSDataLink
#include <AppKit/stdappkit.h>
#include <AppKit/NSSelection.h>
#include <AppKit/NSPasteboard.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSCoder.h>
@class NSDataLinkManager;
@interface NSDataLink : NSObject <NSCoding>
{
// Attributes
}
//
// Initializing a Link
//
- (id)initLinkedToFile:(NSString *)filename;
- (id)initLinkedToSourceSelection:(NSSelection *)selection
managedBy:(NSDataLinkManager *)linkManager
supportingTypes:(NSArray *)newTypes;
- (id)initWithContentsOfFile:(NSString *)filename;
- (id)initWithPasteboard:(NSPasteboard *)pasteboard;
//
// Exporting a Link
//
- (BOOL)saveLinkIn:(NSString *)directoryName;
- (BOOL)writeToFile:(NSString *)filename;
- (void)writeToPasteboard:(NSPasteboard *)pasteboard;
//
// Information about the Link
//
- (NSDataLinkDisposition)disposition;
- (NSDataLinkNumber)linkNumber;
- (NSDataLinkManager *)manager;
//
// Information about the Link's Source
//
- (NSDate *)lastUpdateTime;
- (BOOL)openSource;
- (NSString *)sourceApplicationName;
- (NSString *)sourceFilename;
- (NSSelection *)sourceSelection;
- (NSArray *)types;
//
// Information about the Link's Destination
//
- (NSString *)destinationApplicationName;
- (NSString *)destinationFilename;
- (NSSelection *)destinationSelection;
//
// Changing the Link
//
- (BOOL)break;
- (void)noteSourceEdited;
- (void)setUpdateMode:(NSDataLinkUpdateMode)mode;
- (BOOL)updateDestination;
- (NSDataLinkUpdateMode)updateMode;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSDataLink

View file

@ -0,0 +1,129 @@
/*
NSDataLinkManager.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSDataLinkManager
#define _GNUstep_H_NSDataLinkManager
#include <AppKit/stdappkit.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSDataLink.h>
#include <AppKit/NSSelection.h>
#include <Foundation/NSCoder.h>
@interface NSDataLinkManager : NSObject <NSCoding>
{
// Attributes
}
//
// Initializing and Freeing a Link Manager
//
- (id)initWithDelegate:(id)anObject;
- (id)initWithDelegate:(id)anObject
fromFile:(NSString *)path;
//
// Adding and Removing Links
//
- (BOOL)addLink:(NSDataLink *)link
at:(NSSelection *)selection;
- (BOOL)addLinkAsMarker:(NSDataLink *)link
at:(NSSelection *)selection;
- (NSDataLink *)addLinkPreviouslyAt:(NSSelection *)oldSelection
fromPasteboard:(NSPasteboard *)pasteboard
at:(NSSelection *)selection;
- (void)breakAllLinks;
- (void)writeLinksToPasteboard:(NSPasteboard *)pasteboard;
//
// Informing the Link Manager of Document Status
//
- (void)noteDocumentClosed;
- (void)noteDocumentEdited;
- (void)noteDocumentReverted;
- (void)noteDocumentSaved;
- (void)noteDocumentSavedAs:(NSString *)path;
- (void)noteDocumentSavedTo:(NSString *)path;
//
// Getting and Setting Information about the Link Manager
//
- (id)delegate;
- (BOOL)delegateVerifiesLinks;
- (NSString *)filename;
- (BOOL)interactsWithUser;
- (BOOL)isEdited;
- (void)setDelegateVerifiesLinks:(BOOL)flag;
- (void)setInteractsWithUser:(BOOL)flag;
//
// Getting and Setting Information about the Manager's Links
//
- (BOOL)areLinkOutlinesVisible;
- (NSEnumerator *)destinationLinkEnumerator;
- (NSDataLink *)destinationLinkWithSelection:(NSSelection *)destSel;
- (void)setLinkOutlinesVisible:(BOOL)flag;
- (NSEnumerator *)sourceLinkEnumerator;
//
// Methods Implemented by the Delegate
//
- (BOOL)copyToPasteboard:(NSPasteboard *)pasteboard
at:(NSSelection *)selection
cheapCopyAllowed:(BOOL)flag;
- (void)dataLinkManager:(NSDataLinkManager *)sender
didBreakLink:(NSDataLink *)link;
- (BOOL)dataLinkManager:(NSDataLinkManager *)sender
isUpdateNeededForLink:(NSDataLink *)link;
- (void)dataLinkManager:(NSDataLinkManager *)sender
startTrackingLink:(NSDataLink *)link;
- (void)dataLinkManager:(NSDataLinkManager *)sender
stopTrackingLink:(NSDataLink *)link;
- (void)dataLinkManagerCloseDocument:(NSDataLinkManager *)sender;
- (void)dataLinkManagerDidEditLinks:(NSDataLinkManager *)sender;
- (void)dataLinkManagerRedrawLinkOutlines:(NSDataLinkManager *)sender;
- (BOOL)dataLinkManagerTracksLinksIndividually:(NSDataLinkManager *)sender;
- (BOOL)importFile:(NSString *)filename
at:(NSSelection *)selection;
- (BOOL)pasteFromPasteboard:(NSPasteboard *)pasteboard
at:(NSSelection *)selection;
- (BOOL)showSelection:(NSSelection *)selection;
- (NSWindow *)windowForSelection:(NSSelection *)selection;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSDataLinkManager

View file

@ -0,0 +1,89 @@
/*
NSDataLinkPanel.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSDataLinkPanel
#define _GNUstep_H_NSDataLinkPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSDataLink.h>
#include <Foundation/NSCoder.h>
@interface NSDataLinkPanel : NSPanel <NSCoding>
{
// Attributes
}
//
// Initializing
//
+ (NSDataLinkPanel *)sharedDataLinkPanel;
//
// Keeping the Panel Up to Date
//
+ (void)getLink:(NSDataLink **)link
manager:(NSDataLinkManager **)linkManager
isMultiple:(BOOL *)flag;
+ (void)setLink:(NSDataLink *)link
manager:(NSDataLinkManager *)linkManager
isMultiple:(BOOL)flag;
- (void)getLink:(NSDataLink **)link
manager:(NSDataLinkManager **)linkManager
isMultiple:(BOOL *)flag;
- (void)setLink:(NSDataLink *)link
manager:(NSDataLinkManager *)linkManager
isMultiple:(BOOL)flag;
//
// Customizing the Panel
//
- (NSView *)accessoryView;
- (void)setAccessoryView:(NSView *)aView;
//
// Responding to User Input
//
- (void)pickedBreakAllLinks:(id)sender;
- (void)pickedBreakLink:(id)sender;
- (void)pickedOpenSource:(id)sender;
- (void)pickedUpdateDestination:(id)sender;
- (void)pickedUpdateMode:(id)sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSDataLinkPanel

View file

@ -0,0 +1,70 @@
/*
NSEPSImageRep.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSEPSImageRep
#define _GNUstep_H_NSEPSImageRep
#include <AppKit/stdappkit.h>
#include <AppKit/NSImageRep.h>
#include <Foundation/NSCoder.h>
@interface NSEPSImageRep : NSImageRep <NSCoding>
{
// Attributes
}
//
// Initializing a New Instance
//
+ (id)imageRepWithData:(NSData *)epsData;
- (id)initWithData:(NSData *)epsData;
//
// Getting Image Data
//
- (NSRect)boundingBox;
- (NSData *)EPSRepresentation;
//
// Drawing the Image
//
- (void)prepareGState;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSEPSImageRep

View file

@ -0,0 +1,182 @@
/*
NSEvent.h
The event class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSEvent
#define _GNUstep_H_NSEvent
#include <AppKit/stdappkit.h>
#include <DPSClient/DPSOperators.h>
#include <Foundation/NSRange.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSCoder.h>
#include <DPSClient/NSDPSContext.h>
@class NSWindow;
@interface NSEvent : NSObject <NSCoding>
{
// Attributes
NSEventType event_type;
NSPoint location_point;
unsigned int modifier_flags;
NSTimeInterval event_time;
int window_num;
NSDPSContext *event_context;
union _MB_event_data
{
struct
{
int event_num;
int click;
float pressure;
} mouse;
struct
{
BOOL repeat;
NSString *char_keys;
NSString *unmodified_keys;
unsigned short key_code;
} key;
struct
{
int event_num;
int tracking_num;
void *user_data;
} tracking;
struct
{
short sub_type;
int data1;
int data2;
} misc;
} event_data;
}
//
// Creating NSEvent objects
//
+ (NSEvent *)enterExitEventWithType:(NSEventType)type
location:(NSPoint)location
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
eventNumber:(int)eventNum
trackingNumber:(int)trackingNum
userData:(void *)userData;
+ (NSEvent *)keyEventWithType:(NSEventType)type
location:(NSPoint)location
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
characters:(NSString *)keys
charactersIgnoringModifiers:(NSString *)ukeys
isARepeat:(BOOL)repeatKey
keyCode:(unsigned short)code;
+ (NSEvent *)mouseEventWithType:(NSEventType)type
location:(NSPoint)location
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
eventNumber:(int)eventNum
clickCount:(int)clickNum
pressure:(float)pressureValue;
+ (NSEvent *)otherEventWithType:(NSEventType)type
location:(NSPoint)location
modifierFlags:(unsigned int)flags
timestamp:(NSTimeInterval)time
windowNumber:(int)windowNum
context:(NSDPSContext *)context
subtype:(short)subType
data1:(int)data1
data2:(int)data2;
//
// Getting General Event Information
//
- (NSDPSContext *)context;
- (NSPoint)locationInWindow;
- (unsigned int)modifierFlags;
- (NSTimeInterval)timestamp;
- (NSEventType)type;
- (NSWindow *)window;
- (int)windowNumber;
//
// Getting Key Event Information
//
- (NSString *)characters;
- (NSString *)charactersIgnoringModifiers;
- (BOOL)isARepeat;
- (unsigned short)keyCode;
//
// Getting Mouse Event Information
//
- (int)clickCount;
- (int)eventNumber;
- (float)pressure;
//
// Getting Tracking Event Information
//
- (int)trackingNumber;
- (void *)userData;
//
// Requesting Periodic Events
//
+ (void)startPeriodicEventsAfterDelay:(NSTimeInterval)delaySeconds
withPeriod:(NSTimeInterval)periodSeconds;
+ (void)stopPeriodicEvents;
//
// Getting Information about Specially Defined Events
//
- (int)data1;
- (int)data2;
- (short)subtype;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSEvent

View file

@ -0,0 +1,109 @@
/*
NSFont.h
The font class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSFont
#define _GNUstep_H_NSFont
#include <AppKit/stdappkit.h>
#include <Foundation/NSCoder.h>
@interface NSFont : NSObject <NSCoding>
{
// Attributes
NSString *family_name;
NSString *font_name;
float point_size;
NSFontTraitMask font_traits;
// Reserved for back-end use
void *be_font_reserved;
}
//
// Creating a Font Object
//
+ (NSFont *)boldSystemFontOfSize:(float)fontSize;
+ (NSFont *)fontWithName:(NSString *)fontName
matrix:(const float *)fontMatrix;
+ (NSFont *)fontWithName:(NSString *)fontName
size:(float)fontSize;
+ (NSFont *)systemFontOfSize:(float)fontSize;
+ (NSFont *)userFixedPitchFontOfSize:(float)fontSize;
+ (NSFont *)userFontOfSize:(float)fontSize;
//
// Setting the Font
//
+ (void)setUserFixedPitchFont:(NSFont *)aFont;
+ (void)setUserFont:(NSFont *)aFont;
+ (void)useFont:(NSString *)fontName;
- (void)set;
//
// Querying the Font
//
- (NSDictionary *)afmDictionary;
- (NSString *)afmFileContents;
- (NSRect)boundingRectForFont;
- (NSString *)displayName;
- (NSString *)familyName;
- (void)setFamilyName:(NSString *)familyName;
- (NSString *)fontName;
- (BOOL)isBaseFont;
- (const float *)matrix;
- (float)pointSize;
- (void)setPointSize:(float)value;
- (NSFont *)printerFont;
- (NSFont *)screenFont;
- (float)widthOfString:(NSString *)string;
- (float *)widths;
- (NSFontTraitMask)traits;
- (void)setTraits:(NSFontTraitMask)traits;
//
// Manipulating Glyphs
//
- (NSSize)advancementForGlyph:(NSGlyph)aGlyph;
- (NSRect)boundingRectForGlyph:(NSGlyph)aGlyph;
- (BOOL)glyphIsEncoded:(NSGlyph)aGlyph;
- (NSPoint)positionOfGlyph:(NSGlyph)curGlyph
precededByGlyph:(NSGlyph)prevGlyph
isNominal:(BOOL *)nominal;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSFont

View file

@ -0,0 +1,122 @@
/*
NSFontManager.h
Manages system and user fonts
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSFontManager
#define _GNUstep_H_NSFontManager
#include <AppKit/stdappkit.h>
#include <AppKit/NSFont.h>
#include <AppKit/NSFontPanel.h>
#include <AppKit/NSMenu.h>
@interface NSFontManager : NSObject
{
// Attributes
id delegate;
SEL action;
NSMutableArray *family_list;
NSMutableArray *family_metrics;
NSFont *selected_font;
NSMutableArray *font_list;
NSMenu *font_menu;
}
//
// Managing the FontManager
//
+ (void)setFontManagerFactory:(Class)classId;
+ (void)setFontPanelFactory:(Class)classId;
+ (NSFontManager *)sharedFontManager;
//
// Initialization
//
- (void)enumerateFamilies;
//
// Converting Fonts
//
- (NSFont *)convertFont:(NSFont *)fontObject;
- (NSFont *)convertFont:(NSFont *)fontObject
toFamily:(NSString *)family;
- (NSFont *)convertFont:(NSFont *)fontObject
toFace:(NSString *)typeface;
- (NSFont *)convertFont:(NSFont *)fontObject
toHaveTrait:(NSFontTraitMask)trait;
- (NSFont *)convertFont:(NSFont *)fontObject
toNotHaveTrait:(NSFontTraitMask)trait;
- (NSFont *)convertFont:(NSFont *)fontObject
toSize:(float)size;
- (NSFont *)convertWeight:(BOOL)upFlag
ofFont:(NSFont *)fontObject;
- (NSFont *)fontWithFamily:(NSString *)family
traits:(NSFontTraitMask)traits
weight:(int)weight
size:(float)size;
//
// Setting and Getting Parameters
//
- (SEL)action;
- (NSArray *)availableFonts;
- (NSArray *)familyMetrics;
- (NSMenu *)fontMenu:(BOOL)create;
- (NSFontPanel *)fontPanel:(BOOL)create;
- (BOOL)isEnabled;
- (BOOL)isMultiple;
- (NSFont *)selectedFont;
- (void)setAction:(SEL)aSelector;
- (void)setEnabled:(BOOL)flag;
- (void)setFontMenu:(NSMenu *)newMenu;
- (void)setSelectedFont:(NSFont *)fontObject
isMultiple:(BOOL)flag;
- (NSFontTraitMask)traitsOfFont:(NSFont *)fontObject;
- (int)weightOfFont:(NSFont *)fontObject;
//
// Target and Action Methods
//
- (BOOL)sendAction;
//
// Assigning a Delegate
//
- (id)delegate;
- (void)setDelegate:(id)anObject;
//
// Methods Implemented by the Delegate
//
- (BOOL)fontManager:(id)sender willIncludeFont:(NSString *)fontName;
@end
#endif // _GNUstep_H_NSFontManager

View file

@ -0,0 +1,80 @@
/*
NSFontPanel.h
Standard panel for selecting and previewing fonts.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSFontPanel
#define _GNUstep_H_NSFontPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <Foundation/NSCoder.h>
@interface NSFontPanel : NSPanel <NSCoding>
{
// Attributes
NSFont *panel_font;
}
//
// Creating an NSFontPanel
//
+ (NSFontPanel *)sharedFontPanel;
- (NSFont *)panelConvertFont:(NSFont *)fontObject;
//
// Setting the Font
//
- (void)setPanelFont:(NSFont *)fontObject
isMultiple:(BOOL)flag;
//
// Configuring the NSFontPanel
//
- (NSView *)accessoryView;
- (BOOL)isEnabled;
- (void)setAccessoryView:(NSView *)aView;
- (void)setEnabled:(BOOL)flag;
- (BOOL)worksWhenModal;
//
// Displaying the NSFontPanel
//
- (void)orderWindow:(NSWindowOrderingMode)place
relativeTo:(int)otherWindows;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSFontPanel

View file

@ -0,0 +1,105 @@
/*
NSForm.h
Form class, a text field with a label
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSForm
#define _GNUstep_H_NSForm
#include <AppKit/stdappkit.h>
#include <AppKit/NSMatrix.h>
#include <AppKit/NSFormCell.h>
#include <AppKit/NSFont.h>
#include <Foundation/NSCoder.h>
@interface NSForm : NSMatrix <NSCoding>
{
// Attributes
}
//
// Laying Out the Form
//
- (NSFormCell *)addEntry:(NSString *)title;
- (NSFormCell *)insertEntry:(NSString *)title
atIndex:(int)index;
- (void)removeEntryAtIndex:(int)index;
- (void)setInterlineSpacing:(float)spacing;
//
// Finding Indices
//
- (int)indexOfCellWithTag:(int)aTag;
- (int)indexOfSelectedItem;
//
// Modifying Graphic Attributes
//
- (void)setBezeled:(BOOL)flag;
- (void)setBordered:(BOOL)flag;
- (void)setTextAlignment:(int)mode;
- (void)setTextFont:(NSFont *)fontObject;
- (void)setTitleAlignment:(NSTextAlignment)mode;
- (void)setTitleFont:(NSFont *)fontObject;
//
// Setting the Cell Class
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)classId;
//
// Getting a Cell
//
- (id)cellAtIndex:(int)index;
//
// Displaying a Cell
//
- (void)drawCellAtIndex:(int)index;
//
// Editing Text
//
- (void)selectTextAtIndex:(int)index;
//
// Resizing the Form
//
- (void)setEntryWidth:(float)width;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSForm

View file

@ -0,0 +1,86 @@
/*
NSFormCell.h
The cell class for the NSForm control
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSFormCell
#define _GNUstep_H_NSFormCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSActionCell.h>
#include <Foundation/NSCoder.h>
@interface NSFormCell : NSActionCell <NSCoding>
{
// Attributes
}
//
// Initializing an NSFormCell
//
- (id)initTextCell:(NSString *)aString;
//
// Determining an NSFormCell's Size
//
- (NSSize)cellSizeForBounds:(NSRect)aRect;
//
// Determining Graphic Attributes
//
- (BOOL)isOpaque;
//
// Modifying the Title
//
- (void)setTitle:(NSString *)aString;
- (void)setTitleAlignment:(NSTextAlignment)mode;
- (void)setTitleFont:(NSFont *)fontObject;
- (void)setTitleWidth:(float)width;
- (NSString *)title;
- (NSTextAlignment)titleAlignment;
- (NSFont *)titleFont;
- (float)titleWidth;
- (float)titleWidth:(NSSize)aSize;
//
// Displaying
//
- (void)drawInteriorWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSFormCell

View file

@ -0,0 +1,87 @@
/*
NSHelpPanel.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSHelpPanel
#define _GNUstep_H_NSHelpPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <Foundation/NSCoder.h>
@interface NSHelpPanel : NSPanel <NSCoding>
{
// Attributes
}
//
// Accessing the Help Panel
//
+ (NSHelpPanel *)sharedHelpPanel;
+ (NSHelpPanel *)sharedHelpPanelWithDirectory:(NSString *)helpDirectory;
//
// Managing the Contents
//
+ (void)setHelpDirectory:(NSString *)helpDirectory;
- (void)addSupplement:(NSString *)helpDirectory
inPath:(NSString *)supplementPath;
- (NSString *)helpDirectory;
- (NSString *)helpFile;
//
// Attaching Help to Objects
//
+ (void)attachHelpFile:(NSString *)filename
markerName:(NSString *)markerName
to:(id)anObject;
+ (void)detachHelpFrom:(id)anObject;
//
// Showing Help
//
- (void)showFile:(NSString *)filename
atMarker:(NSString *)markerName;
- (BOOL)showHelpAttachedTo:(id)anObject;
//
// Printing
//
- (void)print:(id)sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSHelpPanel

View file

@ -0,0 +1,171 @@
/*
NSImage.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSImage
#define _GNUstep_H_NSImage
#include <AppKit/stdappkit.h>
#include <DPSClient/TypesandConstants.h>
#include <AppKit/NSColor.h>
#include <AppKit/NSImageRep.h>
#include <Foundation/NSCoder.h>
@interface NSImage : NSObject <NSCoding>
{
// Attributes
NSSize image_size;
}
//
// Initializing a New NSImage Instance
//
- (id)initByReferencingFile:(NSString *)filename;
- (id)initWithContentsOfFile:(NSString *)filename;
- (id)initWithData:(NSData *)data;
- (id)initWithPasteboard:(NSPasteboard *)pasteboard;
- (id)initWithSize:(NSSize)aSize;
//
// Setting the Size of the Image
//
- (void)setSize:(NSSize)aSize;
- (NSSize)size;
//
// Referring to Images by Name
//
+ (id)imageNamed:(NSString *)name;
- (BOOL)setName:(NSString *)name;
- (NSString *)name;
//
// Specifying the Image
//
- (void)addRepresentation:(NSImageRep *)imageRep;
- (void)addRepresentations:(NSArray *)imageRepArray;
- (void)lockFocus;
- (void)lockFocusOnRepresentation:(NSImageRep *)imageRep;
- (void)unlockFocus;
//
// Using the Image
//
- (void)compositeToPoint:(NSPoint)aPoint
operation:(NSCompositingOperation)op;
- (void)compositeToPoint:(NSPoint)aPoint
fromRect:(NSRect)aRect
operation:(NSCompositingOperation)op;
- (void)dissolveToPoint:(NSPoint)aPoint
fraction:(float)aFloat;
- (void)dissolveToPoint:(NSPoint)aPoint
fromRect:(NSRect)aRect
fraction:(float)aFloat;
//
// Choosing Which Image Representation to Use
//
- (void)setPrefersColorMatch:(BOOL)flag;
- (BOOL)prefersColorMatch;
- (void)setUsesEPSOnResolutionMismatch:(BOOL)flag;
- (BOOL)usesEPSOnResolutionMismatch;
- (void)setMatchesOnMultipleResolution:(BOOL)flag;
- (BOOL)matchesOnMultipleResolution;
//
// Getting the Representations
//
- (NSImageRep *)bestRepresentationForDevice:(NSDictionary *)deviceDescription;
- (NSArray *)representations;
- (void)removeRepresentation:(NSImageRep *)imageRep;
//
// Determining How the Image is Stored
//
- (void)setCachedSeparately:(BOOL)flag;
- (BOOL)isCachedSeparately;
- (void)setDataRetained:(BOOL)flag;
- (BOOL)isDataRetained;
- (void)setCacheDepthMatchesImageDepth:(BOOL)flag;
- (BOOL)cacheDepthMatchesImageDepth;
//
// Determining How the Image is Drawn
//
- (BOOL)isValid;
- (void)setScalesWhenResized:(BOOL)flag;
- (BOOL)scalesWhenResized;
- (void)setBackgroundColor:(NSColor *)aColor;
- (NSColor *)backgroundColor;
- (BOOL)drawRepresentation:(NSImageRep *)imageRep
inRect:(NSRect)aRect;
- (void)recache;
//
// Assigning a Delegate
//
- (void)setDelegate:(id)anObject;
- (id)delegate;
//
// Producing TIFF Data for the Image
//
- (NSData *)TIFFRepresentation;
- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)comp
factor:(float)aFloat;
//
// Managing NSImageRep Subclasses
//
+ (NSArray *)imageUnfilteredFileTypes;
+ (NSArray *)imageUnfilteredPasteboardTypes;
//
// Testing Image Data Sources
//
+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;
+ (NSArray *)imageFileTypes;
+ (NSArray *)imagePasteboardTypes;
//
// Methods Implemented by the Delegate
//
- (NSImage *)imageDidNotDraw:(id)sender
inRect:(NSRect)aRect;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSImage

View file

@ -0,0 +1,109 @@
/*
NSImageRep.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSImageRep
#define _GNUstep_H_NSImageRep
#include <AppKit/stdappkit.h>
#include <AppKit/NSPasteboard.h>
#include <Foundation/NSCoder.h>
@interface NSImageRep : NSObject <NSCoding>
{
// Attributes
}
//
// Creating an NSImageRep
//
+ (id)imageRepWithContentsOfFile:(NSString *)filename;
+ (NSArray *)imageRepsWithContentsOfFile:(NSString *)filename;
+ (id)imageRepWithPasteboard:(NSPasteboard *)pasteboard;
+ (NSArray *)imageRepsWithPasteboard:(NSPasteboard *)pasteboard;
//
// Checking Data Types
//
+ (BOOL)canInitWithData:(NSData *)data;
+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;
+ (NSArray *)imageFileTypes;
+ (NSArray *)imagePasteboardTypes;
+ (NSArray *)imageUnfilteredFileTypes;
+ (NSArray *)imageUnfilteredPasteboardTypes;
//
// Setting the Size of the Image
//
- (void)setSize:(NSSize)aSize;
- (NSSize)size;
//
// Specifying Information about the Representation
//
- (int)bitsPerSample;
- (NSString *)colorSpaceName;
- (BOOL)hasAlpha;
- (BOOL)isOpaque;
- (int)pixelsHigh;
- (int)pixelsWide;
- (void)setAlpha:(BOOL)flag;
- (void)setBitsPerSample:(int)anInt;
- (void)setColorSpaceName:(NSString *)aString;
- (void)setOpaque:(BOOL)flag;
- (void)setPixelsHigh:(int)anInt;
- (void)setPixelsWide:(int)anInt;
//
// Drawing the Image
//
- (BOOL)draw;
- (BOOL)drawAtPoint:(NSPoint)aPoint;
- (BOOL)drawInRect:(NSRect)aRect;
//
// Managing NSImageRep Subclasses
//
+ (Class)imageRepClassForData:(NSData *)data;
+ (Class)imageRepClassForFileType:(NSString *)type;
+ (Class)imageRepClassForPasteboardType:(NSString *)type;
+ (void)registerImageRepClass:(Class)imageRepClass;
+ (NSArray *)registeredImageRepClasses;
+ (void)unregisterImageRepClass:(Class)imageRepClass;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSImageRep

View file

@ -0,0 +1,281 @@
/*
NSMatrix.h
This is the Matrix class. This class corresponds to NSMatrix
of the OpenStep specification, but it also allows for rows
and columns of different sizes.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Pascal Forget <pascal@wsc.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSMatrix
#define _GNUstep_H_NSMatrix
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
@interface NSMatrix : NSControl <NSCoding>
{
// Attributes
NSMutableArray *rows;
NSMutableArray *col_widths;
NSMutableArray *row_heights;
int num_cols;
int num_rows;
NSCell *cell_prototype;
NSSize inter_cell;
Class cell_class;
BOOL allows_empty_selection;
BOOL selection_by_rect;
BOOL draws_background;
BOOL draws_cell_background;
NSMutableArray *selected_cells;
BOOL autoscroll;
BOOL scrollable;
BOOL autosize;
NSMatrixMode mode;
SEL double_action;
SEL error_action;
}
//
// Initializing the NSMatrix Class
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)classId;
//
// Initializing an NSMatrix Object
//
- (id)initWithFrame:(NSRect)frameRect;
- (id)initWithFrame:(NSRect)frameRect
mode:(int)aMode
cellClass:(Class)classId
numberOfRows:(int)rowsHigh
numberOfColumns:(int)colsWide;
- (id)initWithFrame:(NSRect)frameRect
mode:(int)aMode
prototype:(NSCell *)aCell
numberOfRows:(int)rowsHigh
numberOfColumns:(int)colsWide;
//
// Setting the Selection Mode
//
- (NSMatrixMode)mode;
- (void)setMode:(NSMatrixMode)aMode;
//
// Configuring the NSMatrix
//
- (BOOL)allowsEmptySelection;
- (BOOL)isSelectionByRect;
- (void)setAllowsEmptySelection:(BOOL)flag;
- (void)setSelectionByRect:(BOOL)flag;
//
// Setting the Cell Class
//
- (Class)cellClass;
- (id)prototype;
- (void)setCellClass:(Class)classId;
- (void)setPrototype:(NSCell *)aCell;
//
// Laying Out the NSMatrix
//
- (void)addColumn;
- (void)addColumnWithCells:(NSArray *)cellArray;
- (void)addRow;
- (void)addRowWithCells:(NSArray *)cellArray;
- (NSRect)cellFrameAtRow:(int)row
column:(int)column;
- (NSSize)cellSize;
- (void)getNumberOfRows:(int *)rowCount
columns:(int *)columnCount;
- (void)insertColumn:(int)column;
- (void)insertColumn:(int)column withCells:(NSArray *)cellArray;
- (void)insertRow:(int)row;
- (void)insertRow:(int)row withCells:(NSArray *)cellArray;
- (NSSize)intercellSpacing;
- (NSCell *)makeCellAtRow:(int)row
column:(int)column;
- (void)putCell:(NSCell *)newCell
atRow:(int)row
column:(int)column;
- (void)removeColumn:(int)column;
- (void)removeRow:(int)row;
- (void)renewRows:(int)newRows
columns:(int)newColumns;
- (void)setCellSize:(NSSize)aSize;
- (void)setIntercellSpacing:(NSSize)aSize;
- (void)sortUsingFunction:(int (*)(id element1, id element2, void *userData))comparator
context:(void *)context;
- (void)sortUsingSelector:(SEL)comparator;
//
// Finding Matrix Coordinates
//
- (BOOL)getRow:(int *)row
column:(int *)column
forPoint:(NSPoint)aPoint;
- (BOOL)getRow:(int *)row
column:(int *)column
ofCell:(NSCell *)aCell;
//
// Modifying Individual Cells
//
- (void)setState:(int)value
atRow:(int)row
column:(int)column;
//
// Selecting Cells
//
- (void)deselectAllCells;
- (void)deselectSelectedCell;
- (void)selectAll:(id)sender;
- (void)selectCellAtRow:(int)row
column:(int)column;
- (BOOL)selectCellWithTag:(int)anInt;
- (id)selectedCell;
- (NSArray *)selectedCells;
- (int)selectedColumn;
- (int)selectedRow;
- (void)setSelectionFrom:(int)startPos
to:(int)endPos
anchor:(int)anchorPos
highlight:(BOOL)flag;
//
// Finding Cells
//
- (id)cellAtRow:(int)row
column:(int)column;
- (id)cellWithTag:(int)anInt;
- (NSArray *)cells;
//
// Modifying Graphic Attributes
//
- (NSColor *)backgroundColor;
- (NSColor *)cellBackgroundColor;
- (BOOL)drawsBackground;
- (BOOL)drawsCellBackground;
- (void)setBackgroundColor:(NSColor *)aColor;
- (void)setCellBackgroundColor:(NSColor *)aColor;
- (void)setDrawsBackground:(BOOL)flag;
- (void)setDrawsCellBackground:(BOOL)flag;
//
// Editing Text in Cells
//
- (void)selectText:(id)sender;
- (id)selectTextAtRow:(int)row
column:(int)column;
- (void)textDidBeginEditing:(NSNotification *)notification;
- (void)textDidChange:(NSNotification *)notification;
- (void)textDidEndEditing:(NSNotification *)notification;
- (BOOL)textShouldBeginEditing:(NSText *)textObject;
- (BOOL)textShouldEndEditing:(NSText *)textObject;
//
// Setting Tab Key Behavior
//
- (id)nextText;
- (id)previousText;
- (void)setNextText:(id)anObject;
- (void)setPreviousText:(id)anObject;
//
// Assigning a Delegate
//
- (void)setDelegate:(id)anObject;
- (id)delegate;
//
// Resizing the Matrix and Cells
//
- (BOOL)autosizesCells;
- (void)setAutosizesCells:(BOOL)flag;
- (void)setValidateSize:(BOOL)flag;
- (void)sizeToCells;
//
// Scrolling
//
- (BOOL)isAutoscroll;
- (void)scrollCellToVisibleAtRow:(int)row
column:(int)column;
- (void)setAutoscroll:(BOOL)flag;
- (void)setScrollable:(BOOL)flag;
//
// Displaying
//
- (void)drawCellAtRow:(int)row
column:(int)column;
- (void)highlightCell:(BOOL)flag
atRow:(int)row
column:(int)column;
//
//Target and Action
//
- (SEL)doubleAction;
- (void)setDoubleAction:(SEL)aSelector;
- (SEL)errorAction;
- (BOOL)sendAction;
- (void)sendAction:(SEL)aSelector
to:(id)anObject
forAllCells:(BOOL)flag;
- (void)sendDoubleAction;
- (void)setErrorAction:(SEL)aSelector;
//
// Handling Event and Action Messages
//
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (int)mouseDownFlags;
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
//
// Managing the Cursor
//
- (void)resetCursorRects;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSMatrix

View file

@ -0,0 +1,112 @@
/*
NSMenu.h
The menu class
Here is your menu sir, our specials today are...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSMenu
#define _GNUstep_H_NSMenu
#include <AppKit/stdappkit.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSMenuCell.h>
#include <AppKit/NSMatrix.h>
#include <Foundation/NSCoder.h>
@interface NSMenu : NSWindow <NSCoding>
{
// Attributes
NSMutableArray *menu_items;
// Reserved for back-end use
void *be_menu_reserved;
}
//
// Controlling Allocation Zones
//
+ (NSZone *)menuZone;
+ (void)setMenuZone:(NSZone *)zone;
//
// Initializing a New NSMenu
//
- (id)initWithTitle:(NSString *)aTitle;
//
// Setting Up the Menu Commands
//
- (id)addItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode;
- (id)insertItemWithTitle:(NSString *)aString
action:(SEL)aSelector
keyEquivalent:(NSString *)charCode
atIndex:(unsigned int)index;
- (NSArray *)itemArray;
- (NSMatrix *)itemMatrix;
- (void)setItemMatrix:(NSMatrix *)aMatrix;
//
// Finding Menu Items
//
- (id)cellWithTag:(int)aTag;
//
// Building Submenus
//
- (NSMenuCell *)setSubmenu:(NSMenu *)aMenu
forItem:(NSMenuCell *)aCell;
- (void)submenuAction:(id)sender;
//
// Managing NSMenu Windows
//
- (NSMenu *)attachedMenu;
- (BOOL)isAttached;
- (BOOL)isTornOff;
- (NSPoint)locationForSubmenu:(NSMenu *)aSubmenu;
- (void)sizeToFit;
- (NSMenu *)supermenu;
//
// Displaying the Menu
//
- (BOOL)autoenablesItems;
- (void)setAutoenablesItems:(BOOL)flag;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSMenu

View file

@ -0,0 +1,80 @@
/*
NSMenuCell.h
Cell class for menu items
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSMenuCell
#define _GNUstep_H_NSMenuCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSButtonCell.h>
#include <Foundation/NSCoder.h>
@class NSMenu;
@interface NSMenuCell : NSButtonCell <NSCoding>
{
// Attributes
NSString *key_equivalent;
NSMenu *sub_menu;
unsigned int menu_identifier;
// Reserved for back-end use
void *be_mc_reserved;
}
//
// WIN32 methods
//
- (unsigned int)menuIdentifier;
- (void)setMenuIdentifier:(unsigned int)theID;
//
// Checking for a Submenu
//
- (BOOL)hasSubmenu;
- (NSMenu *)submenu;
- (void)setSubmenu:(NSMenu *)aMenu;
//
// Managing User Key Equivalents
//
+ (void)setUsesUserKeyEquivalents:(BOOL)flag;
+ (BOOL)usesUserKeyEquivalents;
- (NSString *)userKeyEquivalent;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSMenuCell

View file

@ -0,0 +1,84 @@
/*
NSOpenPanel.h
Standard open panel for opening files
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSOpenPanel
#define _GNUstep_H_NSOpenPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSSavePanel.h>
#include <Foundation/NSCoder.h>
@interface NSOpenPanel : NSSavePanel <NSCoding>
{
// Attributes
NSMutableArray *the_filenames;
BOOL multiple_select;
BOOL choose_dir;
BOOL choose_file;
}
//
// Accessing the NSOpenPanel
//
+ (NSOpenPanel *)openPanel;
//
// Filtering Files
//
- (BOOL)allowsMultipleSelection;
- (BOOL)canChooseDirectories;
- (BOOL)canChooseFiles;
- (void)setAllowsMultipleSelection:(BOOL)flag;
- (void)setCanChooseDirectories:(BOOL)flag;
- (void)setCanChooseFiles:(BOOL)flag;
//
// Querying the Chosen Files
//
- (NSArray *)filenames;
//
// Running the NSOpenPanel
//
- (int)runModalForTypes:(NSArray *)fileTypes;
- (int)runModalForDirectory:(NSString *)path
file:(NSString *)filename
types:(NSArray *)fileTypes;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSOpenPanel

View file

@ -0,0 +1,87 @@
/*
NSPageLayout.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPageLayout
#define _GNUstep_H_NSPageLayout
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSPrintInfo.h>
#include <Foundation/NSCoder.h>
@interface NSPageLayout : NSPanel <NSCoding>
{
// Attributes
}
//
// Creating an NSPageLayout Instance
//
+ (NSPageLayout *)pageLayout;
//
// Running the Panel
//
- (int)runModal;
- (int)runModalWithPrintInfo:(NSPrintInfo *)pInfo;
//
// Customizing the Panel
//
- (NSView *)accessoryView;
- (void)setAccessoryView:(NSView *)aView;
//
// Updating the Panel's Display
//
- (void)convertOldFactor:(float *)old
newFactor:(float *)new;
- (void)pickedButton:(id)sender;
- (void)pickedOrientation:(id)sender;
- (void)pickedPaperSize:(id)sender;
- (void)pickedUnits:(id)sender;
//
// Communicating with the NSPrintInfo Object
//
- (NSPrintInfo *)printInfo;
- (void)readPrintInfo;
- (void)writePrintInfo;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPageLayout

View file

@ -0,0 +1,62 @@
/*
NSPanel.h
Panel window class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPanel
#define _GNUstep_H_NSPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSWindow.h>
#include <Foundation/NSCoder.h>
@interface NSPanel : NSWindow <NSCoding>
{
// Attributes
}
//
// Determining the Panel Behavior
//
- (BOOL)becomesKeyOnlyIfNeeded;
- (BOOL)isFloatingPanel;
- (void)setBecomesKeyOnlyIfNeeded:(BOOL)flag;
- (void)setFloatingPanel:(BOOL)flag;
- (void)setWorksWhenModal:(BOOL)flag;
- (BOOL)worksWhenModal;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPanel

View file

@ -0,0 +1,104 @@
/*
NSPasteboard.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPasteboard
#define _GNUstep_H_NSPasteboard
#include <AppKit/stdappkit.h>
@interface NSPasteboard : NSObject
{
// Attributes
}
//
// Creating and Releasing an NSPasteboard Object
//
+ (NSPasteboard *)generalPasteboard;
+ (NSPasteboard *)pasteboardWithName:(NSString *)name;
+ (NSPasteboard *)pasteboardWithUniqueName;
- (void)releaseGlobally;
//
// Getting Data in Different Formats
//
+ (NSPasteboard *)pasteboardByFilteringData:(NSData *)data
ofType:(NSString *)type;
+ (NSPasteboard *)pasteboardByFilteringFile:(NSString *)filename;
+ (NSPasteboard *)pasteboardByFilteringTypesInPasteboard:(NSPasteboard *)pboard;
+ (NSArray *)typesFilterableTo:(NSString *)type;
//
// Referring to a Pasteboard by Name
//
- (NSString *)name;
//
// Writing Data
//
- (int)addTypes:(NSArray *)newTypes
owner:(id)newOwner;
- (int)declareTypes:(NSArray *)newTypes
owner:(id)newOwner;
- (BOOL)setData:(NSData *)data
forType:(NSString *)dataType;
- (BOOL)setPropertyList:(id)propertyList
forType:(NSString *)dataType;
- (BOOL)setString:(NSString *)string
forType:(NSString *)dataType;
- (BOOL)writeFileContents:(NSString *)filename;
//
// Determining Types
//
- (NSString *)availableTypeFromArray:(NSArray *)types;
- (NSArray *)types;
//
// Reading Data
//
- (int)changeCount;
- (NSData *)dataForType:(NSString *)dataType;
- (id)propertyListForType:(NSString *)dataType;
- (NSString *)readFileContentsType:(NSString *)type
toFile:(NSString *)filename;
- (NSString *)stringForType:(NSString *)dataType;
//
// Methods Implemented by the Owner
//
- (void)pasteboard:(NSPasteboard *)sender
provideDataForType:(NSString *)type;
- (void)pasteboardChangedOwner:(NSPasteboard *)sender;
@end
#endif // _GNUstep_H_NSPasteboard

View file

@ -0,0 +1,128 @@
/*
NSPopUpButton.h
Popup list class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPopUpButton
#define _GNUstep_H_NSPopUpButton
#include <AppKit/stdappkit.h>
#include <AppKit/NSButton.h>
#include <AppKit/NSMenuCell.h>
#include <AppKit/NSMatrix.h>
#include <AppKit/NSFont.h>
#include <Foundation/NSCoder.h>
@interface NSPopUpButton : NSView <NSCoding>
{
// Attributes
NSMutableArray *list_items;
NSRect list_rect;
int selected_item;
id pub_target;
SEL pub_action;
BOOL is_up;
BOOL pulls_down;
// Reserved for back-end use
void *be_pub_reserved;
}
//
// Initializing an NSPopUpButton
//
- (id)initWithFrame:(NSRect)frameRect
pullsDown:(BOOL)flag;
//
// Target and Action
//
- (SEL)action;
- (void)setAction:(SEL)aSelector;
- (id)target;
- (void)setTarget:(id)anObject;
//
// Adding Items
//
- (void)addItemWithTitle:(NSString *)title;
- (void)addItemsWithTitles:(NSArray *)itemTitles;
- (void)insertItemWithTitle:(NSString *)title
atIndex:(unsigned int)index;
//
// Removing Items
//
- (void)removeAllItems;
- (void)removeItemWithTitle:(NSString *)title;
- (void)removeItemAtIndex:(int)index;
//
// Querying the NSPopUpButton about Its Items
//
- (int)indexOfItemWithTitle:(NSString *)title;
- (int)indexOfSelectedItem;
- (int)numberOfItems;
- (NSMenuCell *)itemAtIndex:(int)index;
- (NSMatrix *)itemMatrix;
- (NSString *)itemTitleAtIndex:(int)index;
- (NSArray *)itemTitles;
- (NSMenuCell *)itemWithTitle:(NSString *)title;
- (NSMenuCell *)lastItem;
- (NSMenuCell *)selectedItem;
- (NSString *)titleOfSelectedItem;
//
// Manipulating the NSPopUpButton
//
- (NSFont *)font;
- (BOOL)pullsDown;
- (void)selectItemAtIndex:(int)index;
- (void)selectItemWithTitle:(NSString *)title;
- (void)setFont:(NSFont *)fontObject;
- (void)setPullsDown:(BOOL)flag;
- (void)setTitle:(NSString *)aString;
- (NSString *)stringValue;
- (void)synchronizeTitleAndSelectedItem;
//
// Displaying the NSPopUpButton's Items
//
- (BOOL)autoenablesItems;
- (void)setAutoenablesItems:(BOOL)flag;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPopUpButton

View file

@ -0,0 +1,119 @@
/*
NSPrintInfo.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPrintInfo
#define _GNUstep_H_NSPrintInfo
#include <AppKit/stdappkit.h>
#include <AppKit/NSPrinter.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSCoder.h>
@interface NSPrintInfo : NSObject <NSCoding>
{
// Attributes
}
//
// Creating and Initializing an NSPrintInfo Instance
//
- (id)initWithDictionary:(NSDictionary *)aDict;
//
// Managing the Shared NSPrintInfo Object
//
+ (void)setSharedPrintInfo:(NSPrintInfo *)printInfo;
+ (NSPrintInfo *)sharedPrintInfo;
//
// Managing the Printing Rectangle
//
+ (NSSize)sizeForPaperName:(NSString *)name;
- (float)bottomMargin;
- (float)leftMargin;
- (NSPrintingOrientation)orientation;
- (NSString *)paperName;
- (NSSize)paperSize;
- (float)rightMargin;
- (void)setBottomMargin:(float)value;
- (void)setLeftMargin:(float)value;
- (void)setOrientation:(NSPrintingOrientation)mode;
- (void)setPaperName:(NSString *)name;
- (void)setPaperSize:(NSSize)size;
- (void)setRightMargin:(float)value;
- (void)setTopMargin:(float)value;
- (float)topMargin;
//
// Pagination
//
- (NSPrintingPaginationMode)horizontalPagination;
- (void)setHorizontalPagination:(NSPrintingPaginationMode)mode;
- (void)setVerticalPagination:(NSPrintingPaginationMode)mode;
- (NSPrintingPaginationMode)verticalPagination;
//
// Positioning the Image on the Page
//
- (BOOL)isHorizontallyCentered;
- (BOOL)isVerticallyCentered;
- (void)setHorizontallyCentered:(BOOL)flag;
- (void)setVerticallyCentered:(BOOL)flag;
//
// Specifying the Printer
//
+ (NSPrinter *)defaultPrinter;
+ (void)setDefaultPrinter:(NSPrinter *)printer;
- (NSPrinter *)printer;
- (void)setPrinter:(NSPrinter *)aPrinter;
//
// Controlling Printing
//
- (NSString *)jobDisposition;
- (void)setJobDisposition:(NSString *)disposition;
- (void)setUpPrintOperationDefaultValues;
//
// Accessing the NSPrintInfo Object's Dictionary
//
- (NSMutableDictionary *)dictionary;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPrintInfo

View file

@ -0,0 +1,123 @@
/*
NSPrintOperation.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPrintOperation
#define _GNUstep_H_NSPrintOperation
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSPrintInfo.h>
#include <AppKit/NSPrintPanel.h>
#include <Foundation/NSData.h>
@interface NSPrintOperation : NSObject
{
// Attributes
}
//
// Creating and Initializing an NSPrintOperation Object
//
+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect
toData:(NSMutableData *)data;
+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect
toData:(NSMutableData *)data
printInfo:(NSPrintInfo *)aPrintInfo;
+ (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect
toPath:(NSString *)path
printInfo:(NSPrintInfo *)aPrintInfo;
+ (NSPrintOperation *)printOperationWithView:(NSView *)aView;
+ (NSPrintOperation *)printOperationWithView:(NSView *)aView
printInfo:(NSPrintInfo *)aPrintInfo;
- (id)initEPSOperationWithView:(NSView *)aView
insideRect:(NSRect)rect
toData:(NSMutableData *)data
printInfo:(NSPrintInfo *)aPrintInfo;
- (id)initWithView:(NSView *)aView
printInfo:(NSPrintInfo *)aPrintInfo;
//
// Setting the Print Operation
//
+ (NSPrintOperation *)currentOperation;
+ (void)setCurrentOperation:(NSPrintOperation *)operation;
//
// Determining the Type of Operation
//
- (BOOL)isEPSOperation;
//
// Controlling the User Interface
//
- (NSPrintPanel *)printPanel;
- (BOOL)showPanels;
- (void)setPrintPanel:(NSPrintPanel *)panel;
- (void)setShowPanels:(BOOL)flag;
//
// Managing the DPS Context
//
- (NSDPSContext *)createContext;
- (NSDPSContext *)context;
- (void)destroyContext;
//
// Page Information
//
- (int)currentPage;
- (NSPrintingPageOrder)pageOrder;
- (void)setPageOrder:(NSPrintingPageOrder)order;
//
// Running a Print Operation
//
- (void)cleanUpOperation;
- (BOOL)deliverResult;
- (BOOL)runOperation;
//
// Getting the NSPrintInfo Object
//
- (NSPrintInfo *)printInfo;
- (void)setPrintInfo:(NSPrintInfo *)aPrintInfo;
//
// Getting the NSView Object
//
- (NSView *)view;
@end
#endif // _GNUstep_H_NSPrintOperation

View file

@ -0,0 +1,81 @@
/*
NSPrintPanel.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPrintPanel
#define _GNUstep_H_NSPrintPanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <Foundation/NSCoder.h>
@interface NSPrintPanel : NSPanel <NSCoding>
{
// Attributes
}
//
// Creating an NSPrintPanel
//
+ (NSPrintPanel *)printPanel;
//
// Customizing the Panel
//
- (void)setAccessoryView:(NSView *)aView;
- (NSView *)accessoryView;
//
// Running the Panel
//
- (int)runModal;
- (void)pickedButton:(id)sender;
//
// Updating the Panel's Display
//
- (void)pickedAllPages:(id)sender;
- (void)pickedLayoutList:(id)sender;
//
// Communicating with the NSPrintInfo Object
//
- (void)updateFromPrintInfo;
- (void)finalWritePrintInfo;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPrintPanel

View file

@ -0,0 +1,99 @@
/*
NSPrinter.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSPrinter
#define _GNUstep_H_NSPrinter
#include <AppKit/stdappkit.h>
#include <Foundation/NSCoder.h>
@interface NSPrinter : NSObject <NSCoding>
{
// Attributes
}
//
// Finding an NSPrinter
//
+ (NSPrinter *)printerWithName:(NSString *)name;
+ (NSPrinter *)printerWithType:(NSString *)type;
+ (NSArray *)printerTypes;
//
// Printer Attributes
//
- (NSString *)host;
- (NSString *)name;
- (NSString *)note;
- (NSString *)type;
//
// Retrieving Specific Information
//
- (BOOL)acceptsBinary;
- (NSRect)imageRectForPaper:(NSString *)paperName;
- (NSSize)pageSizeForPaper:(NSString *)paperName;
- (BOOL)isColor;
- (BOOL)isFontAvailable:(NSString *)fontName;
- (int)languageLevel;
- (BOOL)isOutputStackInReverseOrder;
//
// Querying the NSPrinter Tables
//
- (BOOL)booleanForKey:(NSString *)key
inTable:(NSString *)table;
- (NSDictionary *)deviceDescription;
- (float)floatForKey:(NSString *)key
inTable:(NSString *)table;
- (int)intForKey:(NSString *)key
inTable:(NSString *)table;
- (NSRect)rectForKey:(NSString *)key
inTable:(NSString *)table;
- (NSSize)sizeForKey:(NSString *)key
inTable:(NSString *)table;
- (NSString *)stringForKey:(NSString *)key
inTable:(NSString *)table;
- (NSArray *)stringListForKey:(NSString *)key
inTable:(NSString *)table;
- (NSPrinterTableStatus)statusForTable:(NSString *)table;
- (BOOL)isKey:(NSString *)key
inTable:(NSString *)table;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSPrinter

View file

@ -0,0 +1,103 @@
/*
NSResponder.h
Abstract class which is basis of command and event processing
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSResponder
#define _GNUstep_H_NSResponder
#include <AppKit/stdappkit.h>
#include <AppKit/NSEvent.h>
#include <Foundation/NSObject.h>
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSCoder.h>
@interface NSResponder : NSObject <NSCoding>
{
// Attributes
id next_responder;
}
//
// Instance methods
//
//
// Managing the next responder
//
- nextResponder;
- (void)setNextResponder:aResponder;
//
// Determining the first responder
//
- (BOOL)acceptsFirstResponder;
- (BOOL)becomeFirstResponder;
- (BOOL)resignFirstResponder;
//
// Aid event processing
//
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
- (BOOL)tryToPerform:(SEL)anAction with:anObject;
//
// Forwarding event messages
//
- (void)flagsChanged:(NSEvent *)theEvent;
- (void)helpRequested:(NSEvent *)theEvent;
- (void)keyDown:(NSEvent *)theEvent;
- (void)keyUp:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)noResponderFor:(SEL)eventSelector;
- (void)rightMouseDown:(NSEvent *)theEvent;
- (void)rightMouseDragged:(NSEvent *)theEvent;
- (void)rightMouseUp:(NSEvent *)theEvent;
//
// Services menu support
//
- validRequestorForSendType:(NSString *)typeSent
returnType:(NSString *)typeReturned;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSResponder

View file

@ -0,0 +1,133 @@
/*
NSSavePanel.h
Standard save panel for saving files
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSavePanel
#define _GNUstep_H_NSSavePanel
#include <AppKit/stdappkit.h>
#include <AppKit/NSPanel.h>
#include <AppKit/NSView.h>
#include <Foundation/NSCoder.h>
// Should be subclassed from NSPanel but
// we are using the WIN32 common dialog
@interface NSSavePanel : NSObject <NSCoding>
{
// Attributes
NSView *accessory_view;
NSString *panel_title;
NSString *panel_prompt;
NSString *directory;
NSString *file_name;
NSString *required_type;
BOOL file_package;
id delegate;
// Reserved for back-end use
void *be_save_reserved;
}
//
// Creating an NSSavePanel
//
+ (NSSavePanel *)savePanel;
//
// Customizing the NSSavePanel
//
- (void)setDefaults;
- (void)setAccessoryView:(NSView *)aView;
- (NSView *)accessoryView;
- (void)setTitle:(NSString *)title;
- (NSString *)title;
- (void)setPrompt:(NSString *)prompt;
- (NSString *)prompt;
//
// Setting Directory and File Type
//
- (NSString *)requiredFileType;
- (void)setDirectory:(NSString *)path;
- (void)setRequiredFileType:(NSString *)type;
- (void)setTreatsFilePackagesAsDirectories:(BOOL)flag;
- (BOOL)treatsFilePackagesAsDirectories;
//
// Running the NSSavePanel
//
- (int)runModalForDirectory:(NSString *)path
file:(NSString *)filename;
- (int)runModal;
//
// Reading Save Information
//
- (NSString *)directory;
- (NSString *)filename;
//
// Target and Action Methods
//
- (void)ok:(id)sender;
- (void)cancel:(id)sender;
//
// Responding to User Input
//
- (void)selectText:(id)sender;
//
// Setting the Delegate
//
- (void)setDelegate:(id)anObject;
//
// Methods Implemented by the Delegate
//
- (NSComparisonResult)panel:(id)sender
compareFilename:(NSString *)filename1
with:(NSString *)filename2
caseSensitive:(BOOL)caseSensitive;
- (BOOL)panel:(id)sender
shouldShowFilename:(NSString *)filename;
- (BOOL)panel:(id)sender
isValidFilename:(NSString*)filename;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSSavePanel

View file

@ -0,0 +1,59 @@
/*
NSScreen.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSScreen
#define _GNUstep_H_NSScreen
#include <AppKit/stdappkit.h>
#include <AppKit/TypesandConstants.h>
@interface NSScreen : NSObject
{
// Attributes
}
//
// Creating NSScreen Instances
//
+ (NSScreen *)mainScreen;
+ (NSScreen *)deepestScreen;
+ (NSArray *)screens;
//
// Reading Screen Information
//
- (NSWindowDepth)depth;
- (NSRect)frame;
- (NSDictionary *)deviceDescription;
@end
#endif // _GNUstep_H_NSScreen

View file

@ -0,0 +1,112 @@
/*
NSScrollView.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSScrollView
#define _GNUstep_H_NSScrollView
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSScroller.h>
#include <Foundation/NSCoder.h>
@interface NSScrollView : NSView <NSCoding>
{
// Attributes
}
//
// Determining Component Sizes
//
- (NSSize)contentSize;
- (NSRect)documentVisibleRect;
//
// Laying Out the NSScrollView
//
+ (NSSize)contentSizeForFrameSize:(NSSize)size
hasHorizontalScroller:(BOOL)horizFlag
hasVerticalScroller:(BOOL)vertFlag
borderType:(NSBorderType)aType;
+ (NSSize)frameSizeForContentSize:(NSSize)size
hasHorizontalScroller:(BOOL)horizFlag
hasVerticalScroller:(BOOL)vertFlag
borderType:(NSBorderType)aType;
- (void)setHasHorizontalScroller:(BOOL)flag;
- (BOOL)hasHorizontalScroller;
- (void)setHasVerticalScroller:(BOOL)flag;
- (BOOL)hasVerticalScroller;
- (void)tile;
- (void)toggleRuler:(id)sender;
- (BOOL)isRulerVisible;
//
// Managing Component Views
//
- (void)setDocumentView:(NSView *)aView;
- (id)documentView;
- (void)setHorizontalScroller:(NSScroller *)anObject;
- (NSScroller *)horizontalScroller;
- (void)setVerticalScroller:(NSScroller *)anObject;
- (NSScroller *)verticalScroller;
- (void)reflectScrolledClipView:(NSClipView *)cView;
//
// Modifying Graphic Attributes
//
- (void)setBorderType:(NSBorderType)aType;
- (NSBorderType)borderType;
- (void)setBackgroundColor:(NSColor *)color;
- (NSColor *)backgroundColor;
//
// Setting Scrolling Behavior
//
- (float)lineScroll;
- (float)pageScroll;
- (void)setScrollsDynamically:(BOOL)flag;
- (BOOL)scrollsDynamically;
- (void)setLineScroll:(float)value;
- (void)setPageScroll:(float)value;
//
// Managing the Cursor
//
- (void)setDocumentCursor:(NSCursor *)anObject;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSScrollView

View file

@ -0,0 +1,96 @@
/*
NSScroller.h
The scroller class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSScroller
#define _GNUstep_H_NSScroller
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
@interface NSScroller : NSControl <NSCoding>
{
// Attributes
BOOL is_horizontal;
SEL action;
id target;
float percent;
float cur_value;
// Reserved for back-end use
void *be_scroll_reserved;
}
//
// Laying out the NSScroller
//
+ (float)scrollerWidth;
- (NSScrollArrowPosition)arrowsPosition;
- (void)checkSpaceForParts;
- (NSRect)rectForPart:(NSScrollerPart)partCode;
- (void)setArrowsPosition:(NSScrollArrowPosition)where;
- (NSUsableScrollerParts)usableParts;
//
// Setting the NSScroller's Values
//
- (float)knobProportion;
- (void)setFloatValue:(float)aFloat
knobProportion:(float)ratio;
//
// Displaying
//
- (void)drawArrow:(NSScrollerArrow)whichButton
highlight:(BOOL)flag;
- (void)drawKnob;
- (void)drawParts;
- (void)highlight:(BOOL)flag;
//
// Handling Events
//
- (NSScrollerPart)hitPart;
- (NSScrollerPart)testPart:(NSPoint)thePoint;
- (void)trackKnob:(NSEvent *)theEvent;
- (void)trackScrollButtons:(NSEvent *)theEvent;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSScroller

View file

@ -0,0 +1,77 @@
/*
NSSelection.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSelection
#define _GNUstep_H_NSSelection
#include <AppKit/stdappkit.h>
#include <AppKit/NSPasteboard.h>
#include <Foundation/NSCoder.h>
@interface NSSelection : NSObject <NSCoding>
{
// Attributes
}
//
// Returning Special Selection Shared Instances
//
+ (NSSelection *)allSelection;
+ (NSSelection *)currentSelection;
+ (NSSelection *)emptySelection;
//
// Creating and Initializing a Selection
//
+ (NSSelection *)selectionWithDescriptionData:(NSData *)data;
- (id)initWithDescriptionData:(NSData *)newData;
- (id)initWithPasteboard:(NSPasteboard *)pasteboard;
//
// Describing a Selection
//
- (NSData *)descriptionData;
- (BOOL)isWellKnownSelection;
//
// Writing a Selection to the Pasteboard
//
- (void)writeToPasteboard:(NSPasteboard *)pasteboard;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSSelection

View file

@ -0,0 +1,89 @@
/*
NSSlider.h
The slider control class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSlider
#define _GNUstep_H_NSSlider
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <Foundation/NSCoder.h>
@interface NSSlider : NSControl <NSCoding>
{
// Attributes
}
//
// Setting the Cell Class
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)classId;
//
// Modifying an NSSlider's Appearance
//
- (NSImage *)image;
- (int)isVertical;
- (float)knobThickness;
- (void)setImage:(NSImage *)backgroundImage;
- (void)setKnobThickness:(float)aFloat;
- (void)setTitle:(NSString *)aString;
- (void)setTitleCell:(NSCell *)aCell;
- (void)setTitleColor:(NSColor *)aColor;
- (void)setTitleFont:(NSFont *)fontObject;
- (NSString *)title;
- (id)titleCell;
- (NSColor *)titleColor;
- (NSFont *)titleFont;
//
// Setting and Getting Value Limits
//
- (double)maxValue;
- (double)minValue;
- (void)setMaxValue:(double)aDouble;
- (void)setMinValue:(double)aDouble;
//
// Handling Events
//
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSSlider

View file

@ -0,0 +1,112 @@
/*
NSSliderCell.h
Cell class for slider control
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSliderCell
#define _GNUstep_H_NSSliderCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSActionCell.h>
#include <Foundation/NSCoder.h>
@interface NSSliderCell : NSActionCell <NSCoding>
{
// Attributes
double max_value;
double min_value;
double scale_factor;
int scroll_size;
int knob_thickness;
double page_value;
BOOL is_vertical;
// Reserved for back-end use
void *be_sc_reserved;
}
//
// Determining Component Sizes
//
- (NSSize)cellSizeForBounds:(NSRect)aRect;
- (NSRect)knobRectFlipped:(BOOL)flipped;
//
// Setting Value Limits
//
- (double)maxValue;
- (double)minValue;
- (void)setMaxValue:(double)aDouble;
- (void)setMinValue:(double)aDouble;
//
// Modifying Graphic Attributes
//
- (void)setVertical:(BOOL)value;
- (int)isVertical;
- (float)knobThickness;
- (void)setKnobThickness:(float)aFloat;
- (void)setTitle:(NSString *)aString;
- (void)setTitleCell:(NSCell *)aCell;
- (void)setTitleColor:(NSColor *)aColor;
- (void)setTitleFont:(NSFont *)fontObject;
- (NSString *)title;
- (id)titleCell;
- (NSFont *)titleFont;
- (NSColor *)titleColor;
//
// Displaying the NSSliderCell
//
- (void)drawBarInside:(NSRect)aRect
flipped:(BOOL)flipped;
- (void)drawKnob;
- (void)drawKnob:(NSRect)knobRect;
//
// Modifying Behavior
//
- (double)altIncrementValue;
- (void)setAltIncrementValue:(double)incValue;
//
// Tracking the Mouse
//
+ (BOOL)prefersTrackingUntilMouseUp;
- (NSRect)trackRect;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSSliderCell

View file

@ -0,0 +1,94 @@
/*
NSSpellChecker.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSpellChecker
#define _GNUstep_H_NSSpellChecker
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSPanel.h>
#include <Foundation/NSRange.h>
@interface NSSpellChecker : NSObject
{
// Attributes
}
//
// Making a Checker available
//
+ (NSSpellChecker *)sharedSpellChecker;
+ (BOOL)sharedSpellCheckerExists;
//
// Managing the Spelling Panel
//
- (NSView *)accessoryView;
- (void)setAccessoryView:(NSView *)aView;
- (NSPanel *)spellingPanel;
//
// Checking Spelling
//
- (int)countWordsInString:(NSString *)aString
language:(NSString *)language;
- (NSRange)checkSpellingOfString:(NSString *)stringToCheck
startingAt:(int)startingOffset;
- (NSRange)checkSpellingOfString:(NSString *)stringToCheck
startingAt:(int)startingOffset
language:(NSString *)language
wrap:(BOOL)wrapFlag
inSpellDocumentWithTag:(int)tag
wordCount:(int *)wordCount;
//
// Setting the Language
//
- (NSString *)language;
- (BOOL)setLanguage:(NSString *)aLanguage;
//
// Managing the Spelling Process
//
+ (int)uniqueSpellDocumentTag;
- (void)closeSpellDocumentWithTag:(int)tag;
- (void)ignoreWord:(NSString *)wordToIgnore
inSpellDocumentWithTag:(int)tag;
- (NSArray *)ignoredWordsInSpellDocumentWithTag:(int)tag;
- (void)setIgnoredWords:(NSArray *)someWords
inSpellDocumentWithTag:(int)tag;
- (void)setWordFieldStringValue:(NSString *)aString;
- (void)updateSpellingPanelWithMisspelledWord:(NSString *)word;
@end
#endif // _GNUstep_H_NSSpellChecker

View file

@ -0,0 +1,86 @@
/*
NSSpellServer.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSpellServer
#define _GNUstep_H_NSSpellServer
#include <AppKit/stdappkit.h>
#include <Foundation/NSRange.h>
@interface NSSpellServer : NSObject
{
// Attributes
}
//
// Checking in Your Service
//
- (BOOL)registerLanguage:(NSString *)language
byVendor:(NSString *)vendor;
//
// Assigning a Delegate
//
- (id)delegate;
- (void)setDelegate:(id)anObject;
//
// Running the Service
//
- (void)run;
//
// Checking User Dictionaries
//
- (BOOL)isWordInUserDictionaries:(NSString *)word
caseSensitive:(BOOL)flag;
//
// Methods Implemented by the Delegate
//
- (NSRange)spellServer:(NSSpellServer *)sender
findMisspelledWordInString:(NSString *)stringToCheck
language:(NSString *)language
wordCount:(int *)wordCount
countOnly:(BOOL)countOnly;
- (NSArray *)spellServer:(NSSpellServer *)sender
suggestGuessesForWord:(NSString *)word
inLanguage:(NSString *)language;
- (void)spellServer:(NSSpellServer *)sender
didLearnWord:(NSString *)word
inLanguage:(NSString *)language;
- (void)spellServer:(NSSpellServer *)sender
didForgetWord:(NSString *)word
inLanguage:(NSString *)language;
@end
#endif // _GNUstep_H_NSSpellServer

View file

@ -0,0 +1,77 @@
/*
NSSplitView.h
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSSplitView
#define _GNUstep_H_NSSplitView
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <Foundation/NSCoder.h>
@interface NSSplitView : NSView <NSCoding>
{
// Attributes
}
//
// Managing Component Views
//
- (void)adjustSubviews;
- (float)dividerThickness;
- (void)drawDividerInRect:(NSRect)aRect;
//
// Assigning a Delegate
//
- (id)delegate;
- (void)setDelegate:(id)anObject;
//
// Implemented by the Delegate
//
- (void)splitView:(NSSplitView *)splitView
constrainMinCoordinate:(float *)min
maxCoordinate:(float *)max
ofSubviewAt:(int)offset;
- (void)splitView:(NSSplitView *)sender
resizeSubviewsWithOldSize:(NSSize)oldSize;
- (void)splitViewDidResizeSubviews:(NSNotification *)notification;
- (void)splitViewWillResizeSubviews:(NSNotification *)notification;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSSplitView

View file

@ -0,0 +1,202 @@
/*
NSText.h
The text object
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSText
#define _GNUstep_H_NSText
#include <AppKit/stdappkit.h>
#include <AppKit/NSView.h>
#include <AppKit/NSFont.h>
#include <Foundation/NSCoder.h>
@interface NSText : NSView <NSCoding>
{
// Attributes
id delegate;
NSString *text_contents;
unsigned int alignment;
BOOL is_editable;
BOOL is_rich_text;
BOOL is_selectable;
BOOL imports_graphics;
BOOL uses_font_panel;
BOOL is_horizontally_resizable;
BOOL is_vertically_resizable;
BOOL is_ruler_visible;
BOOL is_field_editor;
NSColor *background_color;
NSColor *text_color;
NSFont *default_font;
NSRange selected_range;
// Reserved for back-end use
void *be_text_reserved;
}
//
// Getting and Setting Contents
//
- (void)replaceRange:(NSRange)range
withRTF:(NSData *)rtfData;
- (void)replaceRange:(NSRange)range
withRTFD:(NSData *)rtfdData;
- (NSData *)RTFDFromRange:(NSRange)range;
- (NSData *)RTFFromRange:(NSRange)range;
- (void)setText:(NSString *)string;
- (void)setText:(NSString *)string
range:(NSRange)range;
- (NSString *)text;
//
// Managing Global Characteristics
//
- (NSTextAlignment)alignment;
- (BOOL)drawsBackground;
- (BOOL)importsGraphics;
- (BOOL)isEditable;
- (BOOL)isRichText;
- (BOOL)isSelectable;
- (void)setAlignment:(NSTextAlignment)mode;
- (void)setDrawsBackground:(BOOL)flag;
- (void)setEditable:(BOOL)flag;
- (void)setImportsGraphics:(BOOL)flag;
- (void)setRichText:(BOOL)flag;
- (void)setSelectable:(BOOL)flag;
//
// Managing Font and Color
//
- (NSColor *)backgroundColor;
- (void)changeFont:(id)sender;
- (NSFont *)font;
- (void)setBackgroundColor:(NSColor *)color;
- (void)setColor:(NSColor *)color
ofRange:(NSRange)range;
- (void)setFont:(NSFont *)obj;
- (void)setFont:(NSFont *)font
ofRange:(NSRange)range;
- (void)setTextColor:(NSColor *)color;
- (void)setUsesFontPanel:(BOOL)flag;
- (NSColor *)textColor;
- (BOOL)usesFontPanel;
//
// Managing the Selection
//
- (NSRange)selectedRange;
- (void)setSelectedRange:(NSRange)range;
//
// Sizing the Frame Rectangle
//
- (BOOL)isHorizontallyResizable;
- (BOOL)isVerticallyResizable;
- (NSSize)maxSize;
- (NSSize)minSize;
- (void)setHorizontallyResizable:(BOOL)flag;
- (void)setMaxSize:(NSSize)newMaxSize;
- (void)setMinSize:(NSSize)newMinSize;
- (void)setVerticallyResizable:(BOOL)flag;
- (void)sizeToFit;
//
// Responding to Editing Commands
//
- (void)alignCenter:(id)sender;
- (void)alignLeft:(id)sender;
- (void)alignRight:(id)sender;
- (void)copy:(id)sender;
- (void)copyFont:(id)sender;
- (void)copyRuler:(id)sender;
- (void)cut:(id)sender;
- (void)delete:(id)sender;
- (void)paste:(id)sender;
- (void)pasteFont:(id)sender;
- (void)pasteRuler:(id)sender;
- (void)selectAll:(id)sender;
- (void)subscript:(id)sender;
- (void)superscript:(id)sender;
- (void)underline:(id)sender;
- (void)unscript:(id)sender;
//
// Managing the Ruler
//
- (BOOL)isRulerVisible;
- (void)toggleRuler:(id)sender;
//
// Spelling
//
- (void)checkSpelling:(id)sender;
- (void)showGuessPanel:(id)sender;
//
// Scrolling
//
- (void)scrollRangeToVisible:(NSRange)range;
//
// Reading and Writing RTFD Files
//
- (BOOL)readRTFDFromFile:(NSString *)path;
- (BOOL)writeRTFDToFile:(NSString *)path
atomically:(BOOL)flag;
//
// Managing the Field Editor
//
- (BOOL)isFieldEditor;
- (void)setFieldEditor:(BOOL)flag;
//
// Managing the Delegate
//
- (id)delegate;
- (void)setDelegate:(id)anObject;
//
// Implemented by the Delegate
//
- (void)textDidBeginEditing:(NSNotification *)aNotification;
- (void)textDidChange:(NSNotification *)aNotification;
- (void)textDidEndEditing:(NSNotification *)aNotification;
- (BOOL)textShouldBeginEditing:(NSText *)textObject;
- (BOOL)textShouldEndEditing:(NSText *)textObject;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSText

View file

@ -0,0 +1,114 @@
/*
NSTextField.h
Text field control class for text entry
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSTextField
#define _GNUstep_H_NSTextField
#include <AppKit/stdappkit.h>
#include <AppKit/NSControl.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
@interface NSTextField : NSControl <NSCoding>
{
// Attributes
id next_text;
id previous_text;
id text_delegate;
SEL error_action;
}
//
// Setting User Access to Text
//
- (BOOL)isEditable;
- (BOOL)isSelectable;
- (void)setEditable:(BOOL)flag;
- (void)setSelectable:(BOOL)flag;
//
// Editing Text
//
- (void)selectText:(id)sender;
//
// Setting Tab Key Behavior
//
- (id)nextText;
- (id)previousText;
- (void)setNextText:(id)anObject;
- (void)setPreviousText:(id)anObject;
//
// Assigning a Delegate
//
- (void)setDelegate:(id)anObject;
- (id)delegate;
//
// Modifying Graphic Attributes
//
- (NSColor *)backgroundColor;
- (BOOL)drawsBackground;
- (BOOL)isBezeled;
- (BOOL)isBordered;
- (void)setBackgroundColor:(NSColor *)aColor;
- (void)setBezeled:(BOOL)flag;
- (void)setBordered:(BOOL)flag;
- (void)setDrawsBackground:(BOOL)flag;
- (void)setTextColor:(NSColor *)aColor;
- (NSColor *)textColor;
//
// Target and Action
//
- (SEL)errorAction;
- (void)setErrorAction:(SEL)aSelector;
//
// Handling Events
//
- (BOOL)acceptsFirstResponder;
- (void)textDidBeginEditing:(NSNotification *)aNotification;
- (void)textDidChange:(NSNotification *)aNotification;
- (void)textDidEndEditing:(NSNotification *)aNotification;
- (BOOL)textShouldBeginEditing:(NSText *)textObject;
- (BOOL)textShouldEndEditing:(NSText *)textObject;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSTextField

View file

@ -0,0 +1,77 @@
/*
NSTextFieldCell.h
Cell class for the text field entry control
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSTextFieldCell
#define _GNUstep_H_NSTextFieldCell
#include <AppKit/stdappkit.h>
#include <AppKit/NSActionCell.h>
#include <DPSClient/DPSOperators.h>
#include <AppKit/NSColor.h>
#include <Foundation/NSCoder.h>
@interface NSTextFieldCell : NSActionCell <NSCoding>
{
// Attributes
NSColor *background_color;
NSColor *text_color;
BOOL draw_background;
BOOL pending_select;
// Reserved for back-end use
void *be_tfc_reserved;
}
//
// Modifying Graphic Attributes
//
- (NSColor *)backgroundColor;
- (BOOL)drawsBackground;
- (void)setBackgroundColor:(NSColor *)aColor;
- (void)setDrawsBackground:(BOOL)flag;
- (void)setTextColor:(NSColor *)aColor;
- (id)setUpFieldEditorAttributes:(id)textObject;
- (NSColor *)textColor;
//
// Edit text
//
- (void)selectText:(id)sender;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSTextFieldCell

View file

@ -0,0 +1,315 @@
/*
NSView.h
The wonderful view class; it encapsulates all drawing functionality
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSView
#define _GNUstep_H_NSView
#include <AppKit/stdappkit.h>
#include <AppKit/NSResponder.h>
#include <AppKit/NSImage.h>
#include <Foundation/NSArray.h>
#include <AppKit/TrackingRectangle.h>
#include <AppKit/NSCursor.h>
#include <Foundation/NSCoder.h>
@class NSWindow;
@class NSClipView;
@interface NSView : NSResponder <NSCoding>
{
// Attributes
NSRect frame;
NSRect bounds;
float frame_rotation;
id super_view;
NSMutableArray *sub_views;
id window;
NSMutableArray *tracking_rects;
BOOL is_flipped;
BOOL is_rotated_from_base;
BOOL is_rotated_or_scaled_from_base;
BOOL opaque;
BOOL needs_display;
BOOL disable_autodisplay;
BOOL post_frame_changes;
BOOL autoresize_subviews;
// Reserved for back-end use
void *be_view_reserved;
}
//
//Initializing NSView Objects
//
- (id)initWithFrame:(NSRect)frameRect;
//
// Managing the NSView Hierarchy
//
- (void)addSubview:(NSView *)aView;
- (void)addSubview:(NSView *)aView
positioned:(NSWindowOrderingMode)place
relativeTo:(NSView *)otherView;
- (NSView *)ancestorSharedWithView:(NSView *)aView;
- (BOOL)isDescendantOf:(NSView *)aView;
- (NSView *)opaqueAncestor;
- (void)removeFromSuperview;
- (void)replaceSubview:(NSView *)oldView
with:(NSView *)newView;
- (void)sortSubviewsUsingFunction:(int (*)(id ,id ,void *))compare
context:(void *)context;
- (NSMutableArray *)subviews;
- (NSView *)superview;
- (void)setSuperview:(NSView *)superview;
- (NSWindow *)window;
- (void)viewWillMoveToWindow:(NSWindow *)newWindow;
//
// Modifying the Frame Rectangle
//
- (float)frameRotation;
- (NSRect)frame;
- (void)rotateByAngle:(float)angle;
- (void)setFrame:(NSRect)frameRect;
- (void)setFrameOrigin:(NSPoint)newOrigin;
- (void)setFrameRotation:(float)angle;
- (void)setFrameSize:(NSSize)newSize;
//
// Modifying the Coordinate System
//
- (float)boundsRotation;
- (NSRect)bounds;
- (BOOL)isFlipped;
- (BOOL)isRotatedFromBase;
- (BOOL)isRotatedOrScaledFromBase;
- (void)scaleUnitSquareToSize:(NSSize)newSize;
- (void)setBounds:(NSRect)aRect;
- (void)setBoundsOrigin:(NSPoint)newOrigin;
- (void)setBoundsRotation:(float)angle;
- (void)setBoundsSize:(NSSize)newSize;
- (void)translateOriginToPoint:(NSPoint)point;
//
// Converting Coordinates
//
- (NSRect)centerScanRect:(NSRect)aRect;
- (NSPoint)convertPoint:(NSPoint)aPoint
fromView:(NSView *)aView;
- (NSPoint)convertPoint:(NSPoint)aPoint
toView:(NSView *)aView;
- (NSRect)convertRect:(NSRect)aRect
fromView:(NSView *)aView;
- (NSRect)convertRect:(NSRect)aRect
toView:(NSView *)aView;
- (NSSize)convertSize:(NSSize)aSize
fromView:(NSView *)aView;
- (NSSize)convertSize:(NSSize)aSize
toView:(NSView *)aView;
//
// Notifying Ancestor Views
//
- (BOOL)postsFrameChangedNotifications;
- (void)setPostsFrameChangedNotifications:(BOOL)flag;
//
// Resizing Subviews
//
- (void)resizeSubviewsWithOldSize:(NSSize)oldSize;
- (void)setAutoresizesSubviews:(BOOL)flag;
- (BOOL)autoresizesSubviews;
- (void)setAutoresizingMask:(unsigned int)mask;
- (unsigned int)autoresizingMask;
- (void)resizeWithOldSuperviewSize:(NSSize)oldSize;
//
// Graphics State Objects
//
- (void)allocateGState;
- (void)releaseGState;
- (int)gState;
- (void)renewGState;
- (void)setUpGState;
//
// Focusing
//
+ (NSView *)focusView;
- (void)lockFocus;
- (void)unlockFocus;
//
// Displaying
//
- (BOOL)canDraw;
- (void)display;
- (void)displayIfNeeded;
- (void)displayIfNeededIgnoringOpacity;
- (void)displayRect:(NSRect)aRect;
- (void)displayRectIgnoringOpacity:(NSRect)aRect;
- (void)drawRect:(NSRect)rect;
- (NSRect)visibleRect;
- (BOOL)isOpaque;
- (BOOL)needsDisplay;
- (void)setNeedsDisplay:(BOOL)flag;
- (void)setNeedsDisplayInRect:(NSRect)invalidRect;
- (BOOL)shouldDrawColor;
//
// Scrolling
//
- (NSRect)adjustScroll:(NSRect)newVisible;
- (BOOL)autoscroll:(NSEvent *)theEvent;
- (void)reflectScrolledClipView:(NSClipView *)aClipView;
- (void)scrollClipView:(NSClipView *)aClipView
toPoint:(NSPoint)aPoint;
- (void)scrollPoint:(NSPoint)aPoint;
- (void)scrollRect:(NSRect)aRect
by:(NSSize)delta;
- (BOOL)scrollRectToVisible:(NSRect)aRect;
//
// Managing the Cursor
//
- (void)addCursorRect:(NSRect)aRect
cursor:(NSCursor *)anObject;
- (void)discardCursorRects;
- (void)removeCursorRect:(NSRect)aRect
cursor:(NSCursor *)anObject;
- (void)resetCursorRects;
//
// Assigning a Tag
//
- (int)tag;
- (id)viewWithTag:(int)aTag;
//
// Aiding Event Handling
//
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
- (NSView *)hitTest:(NSPoint)aPoint;
- (BOOL)mouse:(NSPoint)aPoint
inRect:(NSRect)aRect;
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
- (void)removeTrackingRect:(NSTrackingRectTag)tag;
- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)anEvent;
- (NSTrackingRectTag)addTrackingRect:(NSRect)aRect
owner:(id)anObject
userData:(void *)data
assumeInside:(BOOL)flag;
- (NSArray *)trackingRectangles;
//
// Dragging
//
- (BOOL)dragFile:(NSString *)filename
fromRect:(NSRect)rect
slideBack:(BOOL)slideFlag
event:(NSEvent *)event;
- (void)dragImage:(NSImage *)anImage
at:(NSPoint)viewLocation
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:(id)sourceObject
slideBack:(BOOL)slideFlag;
- (void)registerForDraggedTypes:(NSArray *)newTypes;
- (void)unregisterDraggedTypes;
//
// Printing
//
- (NSData *)dataWithEPSInsideRect:(NSRect)aRect;
- (void)fax:(id)sender;
- (void)print:(id)sender;
- (void)writeEPSInsideRect:(NSRect)rect
toPasteboard:(NSPasteboard *)pasteboard;
//
// Pagination
//
- (void)adjustPageHeightNew:(float *)newBottom
top:(float)oldTop
bottom:(float)oldBottom
limit:(float)bottomLimit;
- (void)adjustPageWidthNew:(float *)newRight
left:(float)oldLeft
right:(float)oldRight
limit:(float)rightLimit;
- (float)heightAdjustLimit;
- (BOOL)knowsPagesFirst:(int *)firstPageNum
last:(int *)lastPageNum;
- (NSPoint)locationOfPrintRect:(NSRect)aRect;
- (NSRect)rectForPage:(int)page;
- (float)widthAdjustLimit;
//
// Writing Conforming PostScript
//
- (void)addToPageSetup;
- (void)beginPage:(int)ordinalNum
label:(NSString *)aString
bBox:(NSRect)pageRect
fonts:(NSString *)fontNames;
- (void)beginPageSetupRect:(NSRect)aRect
placement:(NSPoint)location;
- (void)beginPrologueBBox:(NSRect)boundingBox
creationDate:(NSString *)dateCreated
createdBy:(NSString *)anApplication
fonts:(NSString *)fontNames
forWhom:(NSString *)user
pages:(int)numPages
title:(NSString *)aTitle;
- (void)beginSetup;
- (void)beginTrailer;
- (void)drawPageBorderWithSize:(NSSize)borderSize;
- (void)drawSheetBorderWithSize:(NSSize)borderSize;
- (void)endHeaderComments;
- (void)endPrologue;
- (void)endSetup;
- (void)endPageSetup;
- (void)endPage;
- (void)endTrailer;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_NSView

View file

@ -0,0 +1,367 @@
/*
NSWindow.h
The window class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSWindow
#define _GNUstep_H_NSWindow
#include <AppKit/stdappkit.h>
#include <AppKit/NSResponder.h>
#include <AppKit/NSView.h>
#include <AppKit/NSEvent.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSString.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSColor.h>
#include <AppKit/NSText.h>
#include <Foundation/NSCoder.h>
@interface NSWindow : NSResponder <NSCoding>
{
// Attributes
NSRect frame;
id frame_view;
id content_view;
id first_responder;
id original_responder;
id delegate;
int window_num;
NSColor *background_color;
NSString *represented_filename;
NSString *miniaturized_title;
NSString *window_title;
NSPoint last_point;
NSBackingStoreType backing_type;
BOOL visible;
BOOL is_key;
BOOL is_main;
BOOL is_edited;
BOOL is_miniaturized;
BOOL disable_flush_window;
unsigned int style_mask;
BOOL menu_exclude;
// Reserved for back-end use
void *be_wind_reserved;
}
//
// Class methods
//
//
// Computing frame and content rectangles
//
+ (NSRect)contentRectForFrameRect:(NSRect)aRect
styleMask:(unsigned int)aStyle;
+ (NSRect)frameRectForContentRect:(NSRect)aRect
styleMask:(unsigned int)aStyle;
+ (NSRect)minFrameWidthWithTitle:(NSString *)aTitle
styleMask:(unsigned int)aStyle;
//
// Saving and restoring the frame
//
+ (void)removeFrameUsingName:(NSString *)name;
//
// Initializing and getting a new NSWindow object
//
- initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag;
- initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
screen:aScreen;
//
// Accessing the content view
//
- contentView;
- (void)setContentView:(NSView *)aView;
//
// Window graphics
//
- (NSColor *)backgroundColor;
- (NSString *)representedFilename;
- (void)setBackgroundColor:(NSColor *)color;
- (void)setRepresentedFilename:(NSString *)aString;
- (void)setTitle:(NSString *)aString;
- (void)setTitleWithRepresentedFilename:(NSString *)aString;
- (unsigned int)styleMask;
- (NSString *)title;
//
// Window device attributes
//
- (NSBackingStoreType)backingType;
- (NSDictionary *)deviceDescription;
- (int)gState;
- (BOOL)isOneShot;
- (void)setBackingType:(NSBackingStoreType)type;
- (void)setOneShot:(BOOL)flag;
- (int)windowNumber;
- (void)setWindowNumber:(int)windowNum;
//
// The miniwindow
//
- (NSImage *)miniwindowImage;
- (NSString *)miniwindowTitle;
- (void)setMiniwindowImage:(NSImage *)image;
- (void)setMiniwindowTitle:(NSString *)title;
//
// The field editor
//
- (void)endEditingFor:anObject;
- (NSText *)fieldEditor:(BOOL)createFlag
forObject:anObject;
//
// Window status and ordering
//
- (void)becomeKeyWindow;
- (void)becomeMainWindow;
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (BOOL)hidesOnDeactivate;
- (BOOL)isKeyWindow;
- (BOOL)isMainWindow;
- (BOOL)isMiniaturized;
- (BOOL)isVisible;
- (int)level;
- (void)makeKeyAndOrderFront:sender;
- (void)makeKeyWindow;
- (void)makeMainWindow;
- (void)orderBack:sender;
- (void)orderFront:sender;
- (void)orderFrontRegardless;
- (void)orderOut:sender;
- (void)orderWindow:(NSWindowOrderingMode)place
relativeTo:(int)otherWin;
- (void)resignKeyWindow;
- (void)resignMainWindow;
- (void)setHidesOnDeactivate:(BOOL)flag;
- (void)setLevel:(int)newLevel;
//
// Moving and resizing the window
//
- (NSPoint)cascadeTopLeftFromPoint:(NSPoint)topLeftPoint;
- (void)center;
- (NSRect)constrainFrameRect:(NSRect)frameRect
toScreen:screen;
- (NSRect)frame;
- (NSSize)minSize;
- (NSSize)maxSize;
- (void)setContentSize:(NSSize)aSize;
- (void)setFrame:(NSRect)frameRect
display:(BOOL)flag;
- (void)setFrameOrigin:(NSPoint)aPoint;
- (void)setFrameTopLeftPoint:(NSPoint)aPoint;
- (void)setMinSize:(NSSize)aSize;
- (void)setMaxSize:(NSSize)aSize;
//
// Converting coordinates
//
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
- (NSPoint)convertScreenToBase:(NSPoint)aPoint;
//
// Managing the display
//
- (void)display;
- (void)disableFlushWindow;
- (void)displayIfNeeded;
- (void)enableFlushWindow;
- (void)flushWindow;
- (void)flushWindowIfNeeded;
- (BOOL)isAutodisplay;
- (BOOL)isFlushWindowDisabled;
- (void)setAutoDisplay:(BOOL)flag;
- (void)setViewsNeedDisplay:(BOOL)flag;
- (void)update;
- (void)useOptimizedDrawing:(BOOL)flag;
- (BOOL)viewsNeedDisplay;
//
// Screens and window depths
//
//+ (NSWindowDepth)defaultDepthLimit
//- (BOOL)canStoreColor;
//- (NSScreen *)deepestScreen;
//- (NSWindowDepth)depthLimit;
//- (BOOL)hasDynamicDepthLimit;
//- (NSScreen *)screen;
//- (void)setDepthLimit:(NSWindowDepth)limit;
//- (void)setDynamicDepthLimit:(BOOL)flag;
//
// Cursor management
//
- (BOOL)areCursorRectsEnabled;
- (void)disableCursorRects;
- (void)discardCursorRects;
- (void)enableCursorRects;
- (void)invalidateCursorRectsForView:(NSView *)aView;
- (void)resetCursorRects;
//
// Handling user actions and events
//
- (void)close;
- (void)deminiaturize:sender;
- (BOOL)isDocumentEdited;
- (BOOL)isReleasedWhenClosed;
- (void)miniaturize:sender;
- (void)performClose:sender;
- (void)performMiniaturize:sender;
- (int)resizeFlags;
- (void)setDocumentEdited:(BOOL)flag;
- (void)setReleasedWhenClosed:(BOOL)flag;
//
// Aiding event handling
//
- (BOOL)acceptsMouseMovedEvents;
- (NSEvent *)currentEvent;
- (void)discardEventsMatchingMask:(unsigned int)mask
beforeEvent:(NSEvent *)lastEvent;
- (NSResponder *)firstResponder;
- (void)keyDown:(NSEvent *)theEvent;
- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
- (NSPoint)mouseLocationOutsideOfEventStream;
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask;
- (NSEvent *)nextEventMatchingMask:(unsigned int)mask
untilDate:(NSDate *)expiration
inMode:(NSString *)mode
dequeue:(BOOL)deqFlag;
- (void)postEvent:(NSEvent *)event
atStart:(BOOL)flag;
- (void)setAcceptsMouseMovedEvents:(BOOL)flag;
- (void)sendEvent:(NSEvent *)theEvent;
- (BOOL)tryToPerform:(SEL)anAction with:anObject;
- (BOOL)worksWhenModal;
//
// Dragging
//
- (void)dragImage:(NSImage *)anImage
at:(NSPoint)baseLocation
offset:(NSSize)initialOffset
event:(NSEvent *)event
pasteboard:(NSPasteboard *)pboard
source:sourceObject
slideBack:(BOOL)slideFlag;
- (void)registerForDraggedTypes:(NSArray *)newTypes;
- (void)unregisterDraggedTypes;
//
// Services and windows menu support
//
- (BOOL)isExcludedFromWindowsMenu;
- (void)setExcludedFromWindowsMenu:(BOOL)flag;
- validRequestorForSendType:(NSString *)sendType
returnType:(NSString *)returnType;
//
// Saving and restoring the frame
//
- (NSString *)frameAutosaveName;
- (void)saveFrameUsingName:(NSString *)name;
- (BOOL)setFrameAutosaveName:(NSString *)name;
- (void)setFrameFromString:(NSString *)string;
- (BOOL)setFrameUsingName:(NSString *)name;
- (NSString *)stringWithSavedFrame;
//
// Printing and postscript
//
- (NSDate *)dataWithEPSInsideRect:(NSRect)rect;
- (void)fax:sender;
- (void)print:sender;
//
// Assigning a delegate
//
- delegate;
- (void)setDelegate:anObject;
//
// Implemented by the delegate
//
- (BOOL)windowShouldClose:sender;
- (NSSize)windowWillResize:(NSWindow *)sender
toSize:(NSSize)frameSize;
- windowWillReturnFieldEditor:(NSWindow *)sender
toObject:client;
- (void)windowDidBecomeKey:sender;
- (void)windowDidBecomeMain:sender;
- (void)windowDidChangeScreen:sender;
- (void)windowDidDeminiaturize:sender;
- (void)windowDidExpose:sender;
- (void)windowDidMiniaturize:sender;
- (void)windowDidMove:sender;
- (void)windowDidResignKey:sender;
- (void)windowDidResignMain:sender;
- (void)windowDidResize:sender;
- (void)windowDidUpdate:sender;
- (void)windowWillClose:sender;
- (void)windowWillMiniaturize:sender;
- (void)windowWillMove:sender;
//
// NSCoding methods
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
//
// GNUstep additional methods
//
//
// Mouse capture/release
//
- (void)captureMouse: sender;
- (void)releaseMouse: sender;
@end
#endif // _GNUstep_H_NSWindow

View file

@ -0,0 +1,149 @@
/*
NSWorkspace.h
Interface for workspace.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_NSWorkspace
#define _GNUstep_H_NSWorkspace
#include <AppKit/stdappkit.h>
#include <AppKit/NSImage.h>
#include <AppKit/NSView.h>
@interface NSWorkspace : NSObject
{
// Attributes
}
//
// Creating a Workspace
//
+ (NSWorkspace *)sharedWorkspace;
//
// Opening Files
//
- (BOOL)openFile:(NSString *)fullPath;
- (BOOL)openFile:(NSString *)fullPath
fromImage:(NSImage *)anImage
at:(NSPoint)point
inView:(NSView *)aView;
- (BOOL)openFile:(NSString *)fullPath
withApplication:(NSString *)appName;
- (BOOL)openFile:(NSString *)fullPath
withApplication:(NSString *)appName
andDeactivate:(BOOL)flag;
- (BOOL)openTempFile:(NSString *)fullPath;
//
// Manipulating Files
//
- (BOOL)performFileOperation:(NSString *)operation
source:(NSString *)source
destination:(NSString *)destination
files:(NSArray *)files
tag:(int *)tag;
- (BOOL)selectFile:(NSString *)fullPath
inFileViewerRootedAtPath:(NSString *)rootFullpath;
//
// Requesting Information about Files
//
- (NSString *)fullPathForApplication:(NSString *)appName;
- (BOOL)getFileSystemInfoForPath:(NSString *)fullPath
isRemovable:(BOOL *)removableFlag
isWritable:(BOOL *)writableFlag
isUnmountable:(BOOL *)unmountableFlag
description:(NSString **)description
type:(NSString **)fileSystemType;
- (BOOL)getInfoForFile:(NSString *)fullPath
application:(NSString **)appName
type:(NSString **)type;
- (NSImage *)iconForFile:(NSString *)fullPath;
- (NSImage *)iconForFiles:(NSArray *)pathArray;
- (NSImage *)iconForFileType:(NSString *)fileType;
//
// Tracking Changes to the File System
//
- (BOOL)fileSystemChanged;
- (void)noteFileSystemChanged;
//
// Updating Registered Services and File Types
//
- (void)findApplications;
//
// Launching and Manipulating Applications
//
- (void)hideOtherApplications;
- (BOOL)launchApplication:(NSString *)appName;
- (BOOL)launchApplication:(NSString *)appName
showIcon:(BOOL)showIcon
autolaunch:(BOOL)autolaunch;
//
// Unmounting a Device
//
- (BOOL)unmountAndEjectDeviceAtPath:(NSString *)path;
//
// Tracking Status Changes for Devices
//
- (void)checkForRemovableMedia;
- (NSArray *)mountNewRemovableMedia;
- (NSArray *)mountedRemovableMedia;
//
// Notification Center
//
- (NSNotificationCenter *)notificationCenter;
//
// Tracking Changes to the User Defaults Database
//
- (void)noteUserDefaultsChanged;
- (BOOL)userDefaultsChanged;
//
// Animating an Image
//
- (void)slideImage:(NSImage *)image
from:(NSPoint)fromPoint
to:(NSPoint)toPoint;
//
// Requesting Additional Time before Power Off or Logout
//
- (int)extendPowerOffBy:(int)requested;
@end
#endif // _GNUstep_H_NSWorkspace

View file

@ -0,0 +1,69 @@
/*
TrackingRectangle.h
Tracking rectangle class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_TrackingRectangle
#define _GNUstep_H_TrackingRectangle
#include <AppKit/stdappkit.h>
#include <Foundation/NSCoder.h>
@interface TrackingRectangle : NSObject <NSCoding>
{
// Attributes
NSRect rectangle;
NSTrackingRectTag tag;
id owner;
void *user_data;
BOOL inside;
}
// Instance methods
- initWithRect:(NSRect)aRect
tag:(NSTrackingRectTag)aTag
owner:anObject
userData:(void *)theData
inside:(BOOL)flag;
- (NSRect)rectangle;
- (NSTrackingRectTag)tag;
- owner;
- (void *)userData;
- (BOOL)inside;
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder;
- initWithCoder:aDecoder;
@end
#endif // _GNUstep_H_TrackingRectangle

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,45 @@
/*
config.h
System dependent includes.
@configure_input@
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_AppKitConfig
#define _GNUstep_H_AppKitConfig
#include <Foundation/NSGeometry.h>
// Until they have been added to libobjects
#define NSNotification void
#define NSNotificationCenter void
@config_include@
#endif /* _GNUstep_H_AppKitConfig */

View file

@ -0,0 +1,2 @@
s/@configure_input@/ Generated from config.in by configure.bat/
s/@config_include@//

View file

@ -0,0 +1,39 @@
/* stdappkit.h
Global includes for the GNUstep GUI Library.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _GNUstep_H_AppKitStandard
#define _GNUstep_H_AppKitStandard
#include <AppKit/config.h>
#include <AppKit/LogFile.h>
#include <AppKit/TypesandConstants.h>
#include <AppKit/Functions.h>
#endif // _GNUstep_H_AppKitStandard

183
INSTALL Normal file
View file

@ -0,0 +1,183 @@
This file documents the installation of the GNUstep GUI
Library, `libgnustep-gui'. Copyright (C) 1996 Free Software
Foundation, Inc. You may copy, distribute, and modify it freely as long
as you preserve this copyright notice and permission notice.
Installing `libgnustep-gui'
***************************
To compile and install `libgnustep-gui':
Here is a quick-and-dirty example of installation commands:
./configure --prefix=/usr/local
make
make install
Here are more detailed instructions. These notes are for a GNU system
that can run ./configure. For Windows NT/95, if you have a working
bash shell then you can follow these instructions; otherwise, follow
the Windows NT/95 specific instructions below.
1. Install `gcc'. The library requires gcc version
2.7.0 or later.
2. Install 'libgnustep-base'. This library requires the classes in
the GNUstep Base Library. You must also apply the Objective-C
Runtime patches to GCC which makes the runtime thread-safe, if
your version of GCC lacks them.
3. Configure the package for your system. In the directory that this
file is in, type `./configure'. If you're using `csh' on an old
version of System V, you might need to type `sh configure' instead
to prevent `csh' from trying to execute `configure' itself.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation, and
creates the Makefile(s) (one in each subdirectory of the source
directory). In some packages it creates a C header file
containing system-dependent definitions. It also creates a file
`config.status' that you can run in the future to recreate the
current configuration.
Running `configure' takes less than a minute or two. While it is
running, it prints some messages that tell what it is doing. If
you don't want to see the messages, run `configure' with its
standard output redirected to `/dev/null'; for example:
./configure >/dev/null
To compile the package in a different directory from the one
containing the source code, you must use a version of make that
supports the VPATH variable, such as GNU make. `cd' to the
directory where you want the object files and executables to go
and run `configure'. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If for some reason `configure' is not in the source code directory
that you are configuring, then it will report that it can't find
the source code. In that case, run `configure' with the option
`--srcdir=DIR', where DIR is the directory that contains the
source code.
By default, `make install' will install the package's files in
/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can
specify an installation prefix other than /usr/local by giving
`configure' the option `--prefix=PATH'. Alternately, you can do
so by giving a value for the `prefix' variable when you run
`make', e.g.,
make prefix=/usr/gnu
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files.
If you give `configure' the option `--exec_prefix=PATH' or set the
`make' variable `exec_prefix' to PATH, the package will use PATH
as the prefix for installing programs and libraries. Data files
and documentation will still use the regular prefix. Normally,
all files are installed using the regular prefix.
You can tell `configure' to figure out the configuration for your
system, and record it in `config.status', without actually
configuring the package (creating `Makefile's and perhaps a
configuration header file). To do this, give `configure' the
`--no-create' option. Later, you can run `./config.status' to
actually configure the package. This option is useful mainly in
`Makefile' rules for updating `config.status' and `Makefile'. You
can also give `config.status' the `--recheck' option, which makes
it re-run `configure' with the same arguments you used before.
This is useful if you change `configure'.
`configure' ignores any other arguments that you give it.
If your system requires unusual options for compilation or linking
that `configure' doesn't know about, you can give `configure'
initial values for some variables by setting them in the
environment. In Bourne-compatible shells, you can do that on the
command line like this:
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
The `make' variables that you might want to override with
environment variables when running `configure' are:
(For these variables, any value given in the environment overrides
the value that `configure' would choose:)
`CC'
C compiler program. Default is `cc', or `gcc' if `gcc' is in
your PATH.
`INSTALL'
Program to use to install files. Default is `install' if you
have it, `install.sh' otherwise.
(For these variables, any value given in the environment is added
to the value that `configure' chooses:)
`DEFS'
Configuration options, in the form `-Dfoo -Dbar ...'
`LIBS'
Libraries to link with, in the form `-lfoo -lbar ...'
If you need to do unusual things to compile the package, we
encourage you to figure out how `configure' could check whether to
do them, and mail diffs or instructions to the address given in
the `README' so we can include them in the next release.
4. Type `make' to compile the package. If you want, you can override
the `make' variables `CFLAGS' and `LDFLAGS' like this:
make CFLAGS=-O2 LDFLAGS=-s
5. Type `make install' to install the library, data files, header
files, and documentation.
6. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the
Makefile(s), and `config.status' (all the files that `configure'
created), type `make distclean'.
The file `configure.in' is used as a template to create
`configure' by a program called `autoconf'. You will only need it
if you want to regenerate `configure' using a newer version of
`autoconf'.
Installing on Windows NT/95
***************************
The system requires that you have headers and libraries for
the WIN32 API and ANSI-C.
Quick installation instructions:
configure
make
make install
Detail installation instructions:
1. Install `gcc'. The library requires gcc version
2.7.0 or later.
2. Install 'libgnustep-base'. This library requires the classes in
the GNUstep Base Library. You must also apply the Objective-C
Runtime patches to GCC which makes the runtime thread-safe, if
your version of GCC lacks them.
3. Configure the package for your system. Review the Makefile.sed.nt
which is used to process Makefile.in to create a working Makefile.
Of interest are:
'lib_installdir' where to install the library file
'h_installdir' where to install the headers
'sys_libs' WIN32 API and ANSI-C libraries
4. Run 'configure.bat' to create the Makefile, and the header configuration
file 'Headers/gnustep/gui/config.h'
5. Type `make' to compile the package. If you want, you can override
the `make' variables `CFLAGS' and `LDFLAGS' like this:
make CFLAGS=-O2 LDFLAGS=-s
6. Type `make install' to install the library, data files, header
files, and documentation.
7. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the
Makefile(s), and `config.status' (all the files that `configure'
created), type `make distclean'.

112
Makefile.in Normal file
View file

@ -0,0 +1,112 @@
# @configure_input@
#
# Top level makefile for GNUstep GUI Library
# Copyright (C) 1996 Free Software Foundation
#
# Author: Scott Christley <scottc@net-community.com>
#
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
MAKEDEFINES =
oext = .o
libext = .a
exeext =
#### End of system configuration section. ####
include $(srcdir)/Version
SUBDIRS = Source Testing
DIST_FILES = \
Makefile.in configure config.guess \
configure.bat Makefile.sed.nt \
README ANNOUNCE NEWS INSTALL \
COPYING.LIB COPYING ChangeLog
all: Source
%-subdirs:
for i in $(SUBDIRS); do \
(cd $$i; $(MAKE) $(MAKEDEFINES) $*); \
done
Source Documentation: FORCE
cd $@; $(MAKE) $(MAKEDEFINES)
install uninstall TAGS: Source
for i in $(SUBDIRS); do \
(cd $$i; $(MAKE) $(MAKEDEFINES) $@); \
done
info dvi:
cd Documentation ; $(MAKE) $(MAKEDEFINES) $@
Testing: Source
cd $@; $(MAKE) $(MAKEDEFINES)
Makefile: Makefile.in config.status
$(SHELL) config.status
config.status: configure
$(SHELL) $(srcdir)/configure --no-create
mostlyclean-top:
rm -f *~
clean-top:
maintainer-clean-top:
mostlyclean: mostlyclean-top mostlyclean-subdirs
clean: mostlyclean-top clean-subdirs
distclean: clean-top distclean-subdirs
rm -f Makefile config.status config.log config.cache TAGS
cd Headers ; cd gnustep ; cd gui ; rm -f config.h
cd Headers ; rm -f AppKit ; rm -f DPSClient
maintainer-clean: maintainer-clean-subdirs
snap: $(DIST_FILES)
rm -rf snap
mkdir snap
for i in $(SUBDIRS); do \
(cd $$i; $(MAKE) $(MAKEDEFINES) copy-dist); \
done
mkdir snap/config
for file in $(DIST_FILES); do \
ln $$file snap/$$file ; \
done
snapshot: snap
ln README.first snap
rm -f .name
echo libobjects-`date +%y%m%d` >.name
rm -rf `cat .name`
mv snap `cat .name`
tar -chvf `cat .name`.tar `cat .name`
rm -f `cat .name`.tar.gz
gzip -9 `cat .name`.tar
rm -rf `cat .name`
dist: snap
mv snap libobjects-$(OBJECTS_VERSION)
tar -chvf libobjects-$(OBJECTS_VERSION).tar \
libobjects-$(OBJECTS_VERSION)
rm -f libobjects-$(OBJECTS_VERSION).tar.gz
gzip -9 libobjects-$(OBJECTS_VERSION).tar
rm -rf libobjects-$(OBJECTS_VERSION)
rcs-list-locked:
@echo "===."
@rlog -L -R $(RCS_FILES)
@for i in $(SUBDIRS); do \
echo "===$$i"; \
(cd $$i; \
$(MAKE) -s $(MAKEDEFINES) rcs-list-locked); \
done
FORCE:

37
Makefile.sed.nt Normal file
View file

@ -0,0 +1,37 @@
s/@configure_input@/ Generated from Makefile.in by configure.bat/
s/@srcdir@/./
s/@CC@/gcc -fgnu-runtime -O/
s/@lib_installdir@/\/MB\/Libraries/
s/@h_installdir@/\/MB\/Headers/
s/@gcc_lib@/libgcc.lib/
s/@objc_lib@/libobjc.lib/
s/@sys_libs@/libc.lib oldnames.lib user32.lib gdi32.lib wsock32.lib/
s/@add_libs@/libobjects.lib General.lib/
s/@exeext@/.exe/
s/@oext@/.obj/
s/@libext@/.lib/
s/@resext@/.res/
s/@rcext@/.rc/
s/INIT_FILE =/INIT_FILE = init_$(MAIN_FILE)/
s/@ldflags@/-align:0x1000 -entry:WinMainCRTStartup -stack:1000000,1000000/
s/@ld@/ld -subsystem:windows/
s/@ldout@/-out:/
s/@lib@/lib/
s/@libout@/-out:/
s/@ranlib@/touch/
s/@rc@/rc \/l 0x409 \/i $(MB_INCLUDE)/
s/cd Headers ; cd AppKit ; rm -f *~/cd Headers \& cd AppKit \& rm -f *~/
s/cd Headers ; cd AppKit ; rm -f config.h/cd Headers \& cd AppKit \& rm -f config.h/
s/cd $@; $(MAKE) $(MAKEDEFINES)/cd $@ \& $(MAKE) $(MAKEDEFINES)/
/%-subdirs:/,/done/c\
%-subdirs: \
for %i in ( $(SUBDIRS) ) do \\\
( cd %i & \\\
$(MAKE) - $(MAKEFLAGS) $(MAKEDEFINES) $* & \\\
cd .. )
/install uninstall TAGS:/,/done/c\
install uninstall TAGS: Source\
for %i in ( $(SUBDIRS) ) do \\\
( cd %i & \\\
$(MAKE) - $(MAKEFLAGS) $(MAKEDEFINES) $@ & \\\
cd .. )

21
NEWS Normal file
View file

@ -0,0 +1,21 @@
GNUstep GUI Library NEWS
************************
The currently released version of the library is `0.1.0'
Noteworthy changes in version `0.1.0'
======================================
* Integration of the GNUstep X/DPS GUI Backend. This has finally
produced a set of core code with can display on X/Windows.
Much of the X/Windows code has been written by Pascal Forget
<pascal@wsc.com> and integration efforts have been lead by Scott
Christley <scottc@net-community.com>.
* Some major directory reorganization for the new naming guidelines.
Headers previously in AppKit and DPSClient directories have been moved
to gnustep/gui and gnustep/dps directores and symbol links are
created for the AppKit and DPSClient directories. This should allow
both GNUstep and other OpenStep implementations to reside on the
same machine without conflicts.

32
README Normal file
View file

@ -0,0 +1,32 @@
GNUstep GUI Library README
**************************
Here is some introductory info to get you started:
Initial reading
===============
The file `ANNOUNCE' contains a very brief overview of the library.
It also tells you where to get the most recent version.
The file `NEWS' has the library's feature history.
The file `INSTALL' gives instructions for installing the library.
How can you help?
=================
* Read the projects and questions in the `TODO' file. If you can
volunteer for any of the projects, or if you have any useful
comments send me email! <scottc@net-community.com>
* Give me feedback! Tell me what you like; tell me what you think
could be better. Send me bug reports.
* Donate classes. If you write classes that fit in the GNUstep GUI
Library framework, I'd be happy to include them.
Creators rejoice!
Scott Christley
scottc@net-community.com

442
Source/Functions.m Normal file
View file

@ -0,0 +1,442 @@
/*
Functions.m
Generic Functions for the GNUstep GUI Library.
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/Functions.h>
#include <gnustep/gui/LogFile.h>
#include <stdio.h>
#include <stdarg.h>
// Should be in Foundation Kit
// Does not handle %@
// yuck, yuck, yuck
extern LogFile *logFile;
void NSLogV(NSString *format, va_list args)
{
char out[1024];
vsprintf(out, [format cString], args);
[logFile writeLog:out];
}
void NSLog(NSString *format, ...)
{
va_list ap;
va_start(ap, format);
NSLogV(format, ap);
va_end(ap);
}
void NSNullLog(NSString *format, ...)
{
}
//
// Rectangle Drawing Functions
//
//
// Optimize Drawing
//
void NSEraseRect(NSRect aRect)
{}
void NSHighlightRect(NSRect aRect)
{}
void NSRectClip(NSRect aRect)
{}
void NSRectClipList(const NSRect *rects, int count)
{}
void NS__RectFill(id self, NSRect aRect)
{
char out[80];
sprintf(out, "DPS: rect: %f %f %f %f\n", aRect.origin.x,
aRect.origin.y, aRect.size.width, aRect.size.height);
NSDebugLog([NSString stringWithCString: out]);
PSrectfill(aRect.origin.x, aRect.origin.y,
aRect.size.width, aRect.size.height);
}
void NSRectFillList(const NSRect *rects, int count)
{}
void NSRectFillListWithGrays(const NSRect *rects,
const float *grays, int count)
{}
//
// Draw a Bordered Rectangle
//
void NSDrawButton(NSRect aRect, NSRect clipRect)
{}
void NSDrawGrayBezel(NSRect aRect, NSRect clipRect)
{}
void NSDrawGroove(NSRect aRect, NSRect clipRect)
{}
NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect,
const NSRectEdge *sides, const float *grays,
int count)
{
return NSZeroRect;
}
void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect)
{}
void NSFrameRect(NSRect aRect)
{}
void NSFrameRectWithWidth(NSRect aRect, float frameWidth)
{}
//
// Color Functions
//
//
// Get Information About Color Space and Window Depth
//
const NSWindowDepth *NSAvailableWindowDepths(void)
{
return NULL;
}
NSWindowDepth NSBestDepth(NSString *colorSpace,
int bitsPerSample, int bitsPerPixel,
BOOL planar, BOOL *exactMatch)
{
return 0;
}
int NSBitsPerPixelFromDepth(NSWindowDepth depth)
{
return 0;
}
int NSBitsPerSampleFromDepth(NSWindowDepth depth)
{
return 0;
}
NSString *NSColorSpaceFromDepth(NSWindowDepth depth)
{
return nil;
}
int NSNumberOfColorComponents(NSString *colorSpaceName)
{
return 0;
}
BOOL NSPlanarFromDepth(NSWindowDepth depth)
{
return NO;
}
//
// Read the Color at a Screen Position
//
NSColor *NSReadPixel(NSPoint location)
{
return nil;
}
//
// Text Functions
//
//
// Filter Characters Entered into a Text Object
//
unsigned short NSEditorFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding)
{
return 0;
}
unsigned short NSFieldFilter(unsigned short theChar,
int flags, NSStringEncoding theEncoding)
{
return 0;
}
//
// Calculate or Draw a Line of Text (in Text Object)
//
int NSDrawALine(id self, NSLayInfo *layInfo)
{
return 0;
}
int NSScanALine(id self, NSLayInfo *layInfo)
{
return 0;
}
//
// Calculate Font Ascender, Descender, and Line Height (in Text Object)
//
void NSTextFontInfo(id fid,
float *ascender, float *descender,
float *lineHeight)
{}
//
// Access Text Object's Word Tables
//
NSData * NSDataWithWordTable(const unsigned char *smartLeft,
const unsigned char *smartRight,
const unsigned char *charClasses,
const NSFSM *wrapBreaks,
int wrapBreaksCount,
const NSFSM *clickBreaks,
int clickBreaksCount,
BOOL charWrap)
{
return nil;
}
void NSReadWordTable(NSZone *zone,
NSData *data,
unsigned char **smartLeft,
unsigned char **smartRight,
unsigned char **charClasses,
NSFSM **wrapBreaks,
int *wrapBreaksCount,
NSFSM **clickBreaks,
int *clickBreaksCount,
BOOL *charWrap)
{}
//
// Array Allocation Functions for Use by the NSText Class
//
NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc)
{
return NULL;
}
NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed)
{
return NULL;
}
NSTextChunk *NSChunkMalloc(int growBy, int initUsed)
{
return NULL;
}
NSTextChunk *NSChunkRealloc(NSTextChunk *pc)
{
return NULL;
}
NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc,
NSTextChunk *dpc,
NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone)
{
return NULL;
}
NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone)
{
return NULL;
}
//
// Imaging Functions
//
//
// Copy an image
//
void NSCopyBitmapFromGState(int srcGstate, NSRect srcRect, NSRect destRect)
{}
void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
{}
//
// Render Bitmap Images
//
void NSDrawBitmap(NSRect rect,
int pixelsWide,
int pixelsHigh,
int bitsPerSample,
int samplesPerPixel,
int bitsPerPixel,
int bytesPerRow,
BOOL isPlanar,
BOOL hasAlpha,
NSString *colorSpaceName,
const unsigned char *const data[5])
{}
//
// Attention Panel Functions
//
//
// Create an Attention Panel without Running It Yet
//
id NSGetAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return nil;
}
//
// Create and Run an Attention Panel
//
int NSRunAlertPanel(NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return 0;
}
int NSRunLocalizedAlertPanel(NSString *table,
NSString *title,
NSString *msg,
NSString *defaultButton,
NSString *alternateButton,
NSString *otherButton, ...)
{
return 0;
}
//
// Release an Attention Panel
//
void NSReleaseAlertPanel(id panel)
{}
//
// Services Menu Functions
//
//
// Determine Whether an Item Is Included in Services Menus
//
int NSSetShowsServicesMenuItem(NSString *item, BOOL showService)
{
return 0;
}
BOOL NSShowsServicesMenuItem(NSString *item)
{
return NO;
}
//
// Programmatically Invoke a Service
//
BOOL NSPerformService(NSString *item, NSPasteboard *pboard)
{
return NO;
}
//
// Force Services Menu to Update Based on New Services
//
void NSUpdateDynamicServices(void)
{}
//
// Other Application Kit Functions
//
//
// Play the System Beep
//
void NSBeep(void)
{
#ifdef WIN32
MessageBeep(MB_OK);
#endif
}
//
// Return File-related Pasteboard Types
//
NSString *NSCreateFileContentsPboardType(NSString *fileType)
{
return nil;
}
NSString *NSCreateFilenamePboardType(NSString *filename)
{
return nil;
}
NSString *NSGetFileType(NSString *pboardType)
{
return nil;
}
NSArray *NSGetFileTypes(NSArray *pboardTypes)
{
return nil;
}
//
// Draw a Distinctive Outline around Linked Data
//
void NSFrameLinkRect(NSRect aRect, BOOL isDestination)
{}
float NSLinkFrameThickness(void)
{
return 0;
}
//
// Convert an Event Mask Type to a Mask
//
unsigned int NSEventMaskFromType(NSEventType type)
{
return 0;
}

130
Source/LogFile.m Normal file
View file

@ -0,0 +1,130 @@
/*
LogFile.m
Logfile for recording trace messages
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/LogFile.h>
@implementation LogFile
// Class methods
+ (void)initialize
{
// Initial version
if (self == [LogFile class])
[self setVersion:1.0];
}
// Instance methods
- init
{
[super init];
l_flags.is_locking = NO;
l_flags.is_date_logging = YES;
if (the_log) [self closeLog];
return self;
}
- (void)dealloc
{
[self closeLog];
return [super dealloc];
}
- initStdout
{
[self init];
return self;
}
- initStdoutWithLocking
{
[self init];
l_flags.is_locking = YES;
return self;
}
- initFile:(const char *)filename
{
[self init];
the_log = fopen(filename, "w");
if (the_log) [self writeLog: "Start of Log\n"];
if (!the_log)
return nil;
else
return self;
}
- initFileWithLocking:(const char *)filename;
{
[self init];
l_flags.is_locking = YES;
the_log = fopen(filename, "w");
if (the_log) [self writeLog: "Start of Log\n"];
if (!the_log)
return nil;
else
return self;
}
// Instance methods
- writeLog:(const char *)logEntry
{
if (the_log == NULL)
printf("%s", logEntry);
else
{
fprintf(the_log, "%s", logEntry);
fflush(the_log);
}
}
- closeLog
{
[self writeLog:"Log closed.\n"];
if (the_log) fclose(the_log);
the_log = NULL;
}
- (BOOL)isDateLogging
{
return (BOOL)l_flags.is_date_logging;
}
- setDateLogging:(BOOL)flag
{
l_flags.is_date_logging = flag;
}
- (BOOL)isLocking
{
return (BOOL)l_flags.is_locking;
}
@end

313
Source/Makefile.in Normal file
View file

@ -0,0 +1,313 @@
# @configure_input@
#
# Main makefile for GNUstep GUI Library
# Copyright (C) 1996, 1996 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
#
# This file is part of the GNUstep GUI Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# If you are interested in a warranty or support for this source code,
# contact Scott Christley at scottc@net-community.com
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
SHELL = /bin/sh
#### Start of system configuration section. ####
# The main executable or library
MAIN_FILE=libgnustep-gui
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
MAKEDEFINES =
CC = @CC@
CPPFLAGS = @CPPFLAGS@
CFLAGS = -c $(GCCFLAGS) -I../Headers $(CPPFLAGS)
GCC_LIB =
OBJC_LIB = -lobjc
SYS_LIBS =
ADD_LIBS = @LIBS@
exeext =
oext = .o
libext = .a
resext = .res
rcext = .rc
LN_S = @LN_S@
LDFLAGS = @LDFLAGS@ -o
LD = ld
LDOUT =
LIB = ar
LIBOUT =
LIBFLAGS = rc
RANLIB = @RANLIB@
RC =
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INIT_FILE =
INIT_FILE_OBJ=$(INIT_FILE)$(oext)
#### End of system configuration section. ####
include $(srcdir)/../Version
GNUSTEP1_HEADERS = gui/AppKit.h \
gui/Functions.h \
gui/LogFile.h \
gui/NSActionCell.h \
gui/NSApplication.h \
gui/NSBitmapImageRep.h \
gui/NSBox.h \
gui/NSBrowser.h \
gui/NSBrowserCell.h \
gui/NSBundle.h \
gui/NSButton.h \
gui/NSButtonCell.h \
gui/NSCachedImageRep.h \
gui/NSCell.h \
gui/NSClipView.h \
gui/NSColor.h \
gui/NSColorList.h \
gui/NSColorPanel.h \
gui/NSColorPicker.h \
gui/NSColorWell.h \
gui/NSControl.h \
gui/NSCursor.h \
gui/NSCustomImageRep.h
GNUSTEP2_HEADERS = gui/NSDataLink.h \
gui/NSDataLinkManager.h \
gui/NSDataLinkPanel.h \
gui/NSEPSImageRep.h \
gui/NSEvent.h \
gui/NSFont.h \
gui/NSFontManager.h \
gui/NSFontPanel.h \
gui/NSForm.h \
gui/NSFormCell.h \
gui/NSHelpPanel.h \
gui/NSImage.h \
gui/NSImageRep.h \
gui/NSMatrix.h \
gui/NSMenu.h \
gui/NSMenuCell.h \
gui/NSOpenPanel.h \
gui/NSPageLayout.h \
gui/NSPanel.h \
gui/NSPasteboard.h \
gui/NSPopUpButton.h \
gui/NSPrintInfo.h \
gui/NSPrintOperation.h \
gui/NSPrintPanel.h
GNUSTEP3_HEADERS = gui/NSPrinter.h \
gui/NSResponder.h \
gui/NSSavePanel.h \
gui/NSScreen.h \
gui/NSScrollView.h \
gui/NSScroller.h \
gui/NSSelection.h \
gui/NSSlider.h \
gui/NSSliderCell.h \
gui/NSSpellChecker.h \
gui/NSSpellServer.h \
gui/NSSplitView.h \
gui/NSText.h \
gui/NSTextField.h \
gui/NSTextFieldCell.h \
gui/NSView.h \
gui/NSWindow.h \
gui/NSWorkspace.h \
gui/TrackingRectangle.h \
gui/TypesandConstants.h \
gui/config.h \
gui/stdappkit.h
GNUSTEP_DPS_HEADERS = dps/NSDPSContext.h \
dps/DPSOperators.h \
dps/TypesandConstants.h
OBJS_WITHOUT_INIT = $(MAIN_FILE)$(oext) \
NSActionCell$(oext) \
NSApplication$(oext) \
NSBitmapImageRep$(oext) \
NSBox$(oext) \
NSBrowser$(oext) \
NSBrowserCell$(oext) \
NSButton$(oext) \
NSButtonCell$(oext) \
NSCachedImageRep$(oext) \
NSCell$(oext) \
NSClipView$(oext) \
NSColor$(oext) \
NSColorList$(oext) \
NSColorPanel$(oext) \
NSColorPicker$(oext) \
NSColorWell$(oext) \
NSControl$(oext) \
NSCursor$(oext) \
NSCustomImageRep$(oext) \
NSDataLink$(oext) \
NSDataLinkManager$(oext) \
NSDataLinkPanel$(oext) \
NSDPSContext$(oext) \
NSEPSImageRep$(oext) \
NSEvent$(oext) \
NSFont$(oext) \
NSFontManager$(oext) \
NSFontPanel$(oext) \
NSForm$(oext) \
NSFormCell$(oext) \
NSHelpPanel$(oext) \
NSImage$(oext) \
NSImageRep$(oext) \
NSMatrix$(oext) \
NSMenu$(oext) \
NSMenuCell$(oext) \
NSOpenPanel$(oext) \
NSPageLayout$(oext) \
NSPanel$(oext) \
NSPasteboard$(oext) \
NSPrinter$(oext) \
NSPrintInfo$(oext) \
NSPrintOperation$(oext) \
NSPrintPanel$(oext) \
NSPopUpButton$(oext) \
NSResponder$(oext) \
NSSavePanel$(oext) \
NSScreen$(oext) \
NSScroller$(oext) \
NSScrollView$(oext) \
NSSelection$(oext) \
NSSlider$(oext) \
NSSliderCell$(oext) \
NSSpellChecker$(oext) \
NSSpellServer$(oext) \
NSSplitView$(oext) \
NSText$(oext) \
NSTextField$(oext) \
NSTextFieldCell$(oext) \
NSView$(oext) \
NSWindow$(oext) \
NSWorkspace$(oext) \
Functions$(oext) \
TrackingRectangle$(oext) \
LogFile$(oext)
OBJS = $(OBJS_WITHOUT_INIT)
.SUFFIXES: .m
.m$(oext):
$(CC) $(CFLAGS) $<
#
# libraries
#
LIBS = $(GCC_LIB) $(OBJC_LIB) $(SYS_LIBS) $(ADD_LIBS)
#
# targets
#
all: header_links src
header_links:
-rm -f ../Headers/AppKit
$(LN_S) ../Headers/gnustep/gui ../Headers/AppKit
-rm -f ../Headers/DPSClient
$(LN_S) ../Headers/gnustep/dps ../Headers/DPSClient
src: $(MAIN_FILE)$(libext)
# library
$(MAIN_FILE)$(libext): $(OBJS)
$(LIB) $(LIBFLAGS) $(LIBOUT)$(MAIN_FILE)$(libext) $(OBJS)
$(RANLIB) $(MAIN_FILE)$(libext)
#
# Initialization routine
#
$(INIT_FILE_OBJ): $(OBJS_WITHOUT_INIT)
nm $(OBJS_WITHOUT_INIT) | grep " __GLOBAL_" > tmpinit.c
collect tmpinit.c $(INIT_FILE)
$(CC) $(CFLAGS) $(INIT_FILE).c
rm tmpinit.c
install: installdirs install-lib install-headers
installdirs:
$(srcdir)/../mkinstalldirs \
$(libdir) \
$(includedir)/gnustep \
$(includedir)/gnustep/dps \
$(includedir)/gnustep/gui
if [ -d $(includedir)/AppKit ] ; then true ; else \
$(LN_S) $(includedir)/gnustep/gui $(includedir)/AppKit ; fi
if [ -d $(includedir)/DPSClient ] ; then true ; else \
$(LN_S) $(includedir)/gnustep/dps $(includedir)/DPSClient ; fi
# end of installdirs
install-lib: $(MAIN_FILE)$(libext)
-rm -f $(libdir)/$(MAIN_FILE)$(libext)
mv $(MAIN_FILE)$(libext) $(libdir)
install-headers:
for file in $(GNUSTEP1_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP2_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP3_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP_DPS_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
#
# Cleaning
#
mostlyclean:
clean:
rm -f *~
rm -f *$(oext)
rm -f $(MAIN_FILE)$(libext)
distclean: clean
rm -f Makefile
maintainer-clean: distclean
FORCE:

27
Source/Makefile.sed.nt Normal file
View file

@ -0,0 +1,27 @@
s/@configure_input@/ Generated from Makefile.in by configure.bat/
s/@srcdir@/./
s/@CC@/gcc -fgnu-runtime -O -DDEBUGLOG/
s/@CPPFLAGS@//
s/@lib_installdir@/\/MB\/Libraries/
s/@h_installdir@/\/MB\/Headers/
s/@gcc_lib@/libgcc.lib/
s/@objc_lib@/libobjc.lib/
s/@sys_libs@/libc.lib oldnames.lib user32.lib gdi32.lib wsock32.lib/
s/@add_libs@/libobjects.lib/
s/@exeext@/.exe/
s/@oext@/.obj/
s/@libext@/.lib/
s/@resext@/.res/
s/@rcext@/.rc/
s/INIT_FILE =/INIT_FILE = init_$(MAIN_FILE)/
s/@ldflags@/-align:0x1000 -entry:WinMainCRTStartup -stack:1000000,1000000/
s/@ld@/ld -subsystem:windows/
s/@ldout@/-out:/
s/@lib@/lib/
s/@libflags@//
s/@libout@/-out:/
s/@ranlib@/touch/
s/@rc@/rc \/l 0x409 \/i $(MB_INCLUDE)/
s/OBJS = $(OBJS_WITHOUT_INIT)/OBJS = $(OBJS_WITHOUT_INIT) $(INIT_FILE_OBJ)/

246
Source/NSActionCell.m Normal file
View file

@ -0,0 +1,246 @@
/*
NSActionCell.m
Abstract cell for target/action paradigm
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSActionCell.h>
#include <gnustep/base/NSCoder.h>
#include <gnustep/gui/NSControl.h>
@implementation NSActionCell
//
// Class methods
//
+ (void)initialize
{
if (self == [NSActionCell class])
{
NSLog(@"Initialize NSActionCell class\n");
// Initial version
[self setVersion:1];
}
}
//
// Instance methods
//
- init
{
[super init];
target = nil;
action = NULL;
tag = 0;
return self;
}
- initImageCell:(NSImage *)anImage
{
[super initImageCell:anImage];
target = nil;
action = NULL;
tag = 0;
return self;
}
- initTextCell:(NSString *)aString
{
[super initTextCell:aString];
target = nil;
action = NULL;
tag = 0;
return self;
}
//
// Configuring an NSActionCell
//
- (void)setAlignment:(NSTextAlignment)mode
{
[super setAlignment:mode];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setBezeled:(BOOL)flag
{
[super setBezeled:flag];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setBordered:(BOOL)flag
{
[super setBordered:flag];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setEnabled:(BOOL)flag
{
[super setEnabled:flag];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned int)leftDigits
right:(unsigned int)rightDigits
{
[super setFloatingPointFormat:autoRange left:leftDigits right:rightDigits];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setFont:(NSFont *)fontObject
{
[super setFont:fontObject];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (void)setImage:(NSImage *)image
{
[super setImage:image];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
//
// Manipulating NSActionCell Values
//
- (double)doubleValue
{
return [super doubleValue];
}
- (float)floatValue
{
return [super floatValue];
}
- (int)intValue
{
return [super intValue];
}
- (void)setStringValue:(NSString *)aString
{
[super setStringValue:aString];
if (control_view)
if ([control_view isKindOfClass: [NSControl class]])
[(NSControl *)control_view updateCell: self];
}
- (NSString *)stringValue
{
return [super stringValue];
}
//
// Displaying
//
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{
[super drawWithFrame:cellFrame inView:controlView];
}
- (NSView *)controlView
{
return [super controlView];
}
//
// Target and Action
//
- (SEL)action
{
return action;
}
- (void)setAction:(SEL)aSelector
{
action = aSelector;
}
- (void)setTarget:(id)anObject
{
target = anObject;
}
- (id)target
{
return target;
}
//
// Assigning a Tag
//
- (void)setTag:(int)anInt
{
tag = anInt;
}
- (int)tag
{
return tag;
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeValueOfObjCType: "i" at: &tag];
[aCoder encodeObjectReference: target withName: @"Target"];
[aCoder encodeValueOfObjCType: @encode(SEL) at: &action];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
[aDecoder decodeValueOfObjCType: "i" at: &tag];
[aDecoder decodeObjectAt: &target withName: NULL];
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &action];
return self;
}
@end

1014
Source/NSApplication.m Normal file

File diff suppressed because it is too large Load diff

206
Source/NSBitmapImageRep.m Normal file
View file

@ -0,0 +1,206 @@
/*
NSBitmapImageRep.m
Bitmap image representations
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSBitmapImageRep.h>
@implementation NSBitmapImageRep
//
// Class methods
//
+ (void)initialize
{
if (self == [NSBitmapImageRep class])
{
// Initial version
[self setVersion:1];
}
}
//
// Allocating and Initializing a New NSBitmapImageRep Object
//
+ (id)imageRepWithData:(NSData *)tiffData
{
return nil;
}
+ (NSArray *)imageRepsWithData:(NSData *)tiffData
{
return nil;
}
//
// Producing a TIFF Representation of the Image
//
+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray
{
return nil;
}
+ (NSData *)TIFFRepresentationOfImageRepsInArray:(NSArray *)anArray
usingCompression:(NSTIFFCompression)compressionType
factor:(float)factor
{
return nil;
}
//
// Setting and Checking Compression Types
//
+ (void)getTIFFCompressionTypes:(const NSTIFFCompression **)list
count:(int *)numTypes
{}
+ (NSString *)localizedNameForTIFFCompressionType:(NSTIFFCompression)compression
{
return nil;
}
//
// Instance methods
//
//
// Allocating and Initializing a New NSBitmapImageRep Object
//
- (id)initWithData:(NSData *)tiffData
{
return nil;
}
- (id)initWithFocusedViewRect:(NSRect)rect
{
return nil;
}
- (id)initWithBitmapDataPlanes:(unsigned char **)planes
pixelsWide:(int)width
pixelsHigh:(int)height
bitsPerSample:(int)bps
samplesPerPixel:(int)spp
hasAlpha:(BOOL)alpha
isPlanar:(BOOL)config
colorSpaceName:(NSString *)colorSpaceName
bytesPerRow:(int)rowBytes
bitsPerPixel:(int)pixelBits
{
return nil;
}
//
// Getting Information about the Image
//
- (int)bitsPerPixel
{
return 0;
}
- (int)samplesPerPixel
{
return 0;
}
- (BOOL)isPlanar
{
return NO;
}
- (int)numberOfPlanes
{
return 0;
}
- (int)bytesPerPlane
{
return 0;
}
- (int)bytesPerRow
{
return 0;
}
//
// Getting Image Data
//
- (unsigned char *)bitmapData
{
return NULL;
}
- (void)getBitmapDataPlanes:(unsigned char **)data
{}
//
// Producing a TIFF Representation of the Image
//
- (NSData *)TIFFRepresentation
{
return nil;
}
- (NSData *)TIFFRepresentationUsingCompression:(NSTIFFCompression)compressionType
factor:(float)factor
{
return nil;
}
//
// Setting and Checking Compression Types
//
- (BOOL)canBeCompressedUsing:(NSTIFFCompression)compression
{
return NO;
}
- (void)getCompression:(NSTIFFCompression *)compression
factor:(float *)factor
{}
- (void)setCompression:(NSTIFFCompression)compression
factor:(float)factor
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

244
Source/NSBox.m Normal file
View file

@ -0,0 +1,244 @@
/*
NSBox.m
Simple box view that can display a border and title
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSBox.h>
#include <gnustep/gui/NSTextFieldCell.h>
@implementation NSBox
//
// Class methods
//
+ (void)initialize
{
if (self == [NSBox class])
{
// Initial version
[self setVersion:1];
}
}
//
// Instance methods
//
- initWithFrame:(NSRect)frameRect
{
[super initWithFrame:frameRect];
cell = [[NSTextFieldCell alloc] initTextCell:@"Title"];
offsets.width = 5;
offsets.height = 5;
border_rect = bounds;
border_type = NSLineBorder;
title_position = NSAtTop;
title_rect = NSZeroRect;
[self setContentView: [[NSView alloc] init]];
return self;
}
- (void)dealloc
{
if (cell) [cell release];
if (content_view) [content_view release];
[super dealloc];
}
//
// Getting and Modifying the Border and Title
//
- (NSRect)borderRect
{
return border_rect;
}
- (NSBorderType)borderType
{
return border_type;
}
- (void)setBorderType:(NSBorderType)aType
{
border_type = aType;
}
- (void)setTitle:(NSString *)aString
{
[cell setStringValue:aString];
}
- (void)setTitleFont:(NSFont *)fontObj
{
[cell setFont:fontObj];
}
- (void)setTitlePosition:(NSTitlePosition)aPosition
{
title_position = aPosition;
}
- (NSString *)title
{
return [cell stringValue];
}
- (id)titleCell
{
return cell;
}
- (NSFont *)titleFont
{
return [cell font];
}
- (NSTitlePosition)titlePosition
{
return title_position;
}
- (NSRect)titleRect
{
return title_rect;
}
//
// Setting and Placing the Content View
//
- (id)contentView
{
return content_view;
}
- (NSSize)contentViewMargins
{
return offsets;
}
- (void)setContentView:(NSView *)aView
{
NSRect r;
if (content_view)
{
// Tell view that it is no longer in a window
[content_view viewWillMoveToWindow:nil];
[content_view release];
}
content_view = aView;
[content_view retain];
// We only have one view in our subview array
[sub_views release];
sub_views = [NSMutableArray array];
if ([sub_views count] == 0)
{
[sub_views addObject:aView];
}
[content_view setSuperview:self];
[content_view setNextResponder:self];
[content_view viewWillMoveToWindow:window];
r.origin.x = bounds.origin.x + offsets.width;
r.origin.y = bounds.origin.y + offsets.height;
r.size.width = bounds.size.width - (2 * offsets.width);
r.size.height = bounds.size.height - (2 * offsets.height);
[content_view setFrame:r];
}
- (void)setContentViewMargins:(NSSize)offsetSize
{
offsets = offsetSize;
}
//
// Resizing the Box
//
- (void)setFrameFromContentFrame:(NSRect)contentFrame
{
}
- (void)sizeToFit
{}
//
// Managing the NSView Hierarchy
//
- (void)addSubview:(NSView *)aView
{
// Subviews get added to our content view's list
[content_view addSubview:aView];
}
//
// Displaying
//
- (void)drawRect:(NSRect)rect
{
NSColor *c = [NSColor redColor];
PSsetcolor(c);
PSrectstroke(border_rect.origin.x, border_rect.origin.y,
border_rect.size.width, border_rect.size.height);
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject: cell];
[aCoder encodeObject: content_view];
[aCoder encodeSize: offsets];
[aCoder encodeRect: border_rect];
[aCoder encodeRect: title_rect];
[aCoder encodeValueOfObjCType: @encode(NSBorderType) at: &border_type];
[aCoder encodeValueOfObjCType: @encode(NSTitlePosition) at: &title_position];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
cell = [aDecoder decodeObject];
content_view = [aDecoder decodeObject];
offsets = [aDecoder decodeSize];
border_rect = [aDecoder decodeRect];
title_rect = [aDecoder decodeRect];
[aDecoder decodeValueOfObjCType: @encode(NSBorderType) at: &border_type];
[aDecoder decodeValueOfObjCType: @encode(NSTitlePosition)
at: &title_position];
return self;
}
@end

469
Source/NSBrowser.m Normal file
View file

@ -0,0 +1,469 @@
/*
NSBrowser.m
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSBrowser.h>
@implementation NSBrowser
//
// Class methods
//
+ (void)initialize
{
if (self == [NSBrowser class])
{
// Initial version
[self setVersion:1];
}
}
//
// Setting Component Classes
//
+ (Class)cellClass
{
return NULL;
}
//
// Instance methods
//
//
// Setting the Delegate
//
- (id)delegate
{
return nil;
}
- (void)setDelegate:(id)anObject
{}
//
// Target and Action
//
- (SEL)doubleAction
{
return NULL;
}
- (BOOL)sendAction
{
return NO;
}
- (void)setDoubleAction:(SEL)aSelector
{}
//
// Setting Component Classes
//
- (id)cellPrototype
{
return nil;
}
- (Class)matrixClass
{
return NULL;
}
- (void)setCellClass:(Class)classId
{}
- (void)setCellPrototype:(NSCell *)aCell
{}
- (void)setMatrixClass:(Class)classId
{}
//
// Setting NSBrowser Behavior
//
- (BOOL)reusesColumns
{
return NO;
}
- (void)setReusesColumns:(BOOL)flag
{}
- (void)setTakesTitleFromPreviousColumn:(BOOL)flag
{}
- (BOOL)takesTitleFromPreviousColumn
{
return NO;
}
//
// Allowing Different Types of Selection
//
- (BOOL)allowsBranchSelection
{
return NO;
}
- (BOOL)allowsEmptySelection
{
return NO;
}
- (BOOL)allowsMultipleSelection
{
return NO;
}
- (void)setAllowsBranchSelection:(BOOL)flag
{}
- (void)setAllowsEmptySelection:(BOOL)flag
{}
- (void)setAllowsMultipleSelection:(BOOL)flag
{}
//
// Setting Arrow Key Behavior
//
- (BOOL)acceptsArrowKeys
{
return NO;
}
- (BOOL)sendsActionOnArrowKeys
{
return NO;
}
- (void)setAcceptsArrowKeys:(BOOL)flag
{}
- (void)setSendsActionOnArrowKeys:(BOOL)flag
{}
//
// Showing a Horizontal Scroller
//
- (void)setHasHorizontalScroller:(BOOL)flag
{}
- (BOOL)hasHorizontalScroller
{
return NO;
}
//
// Setting the NSBrowser's Appearance
//
- (int)maxVisibleColumns
{
return 0;
}
- (int)minColumnWidth
{
return 0;
}
- (BOOL)separatesColumns
{
return NO;
}
- (void)setMaxVisibleColumns:(int)columnCount
{}
- (void)setMinColumnWidth:(int)columnWidth
{}
- (void)setSeparatesColumns:(BOOL)flag
{}
//
// Manipulating Columns
//
- (void)addColumn
{}
- (int)columnOfMatrix:(NSMatrix *)matrix
{
return 0;
}
- (void)displayAllColumns
{}
- (void)displayColumn:(int)column
{}
- (int)firstVisibleColumn
{
return 0;
}
- (BOOL)isLoaded
{
return NO;
}
- (int)lastColumn
{
return 0;
}
- (int)lastVisibleColumn
{
return 0;
}
- (void)loadColumnZero
{}
- (int)numberOfVisibleColumns
{
return 0;
}
- (void)reloadColumn:(int)column
{}
- (void)selectAll:(id)sender
{}
- (int)selectedColumn
{
return 0;
}
- (void)setLastColumn:(int)column
{}
- (void)validateVisibleColumns
{}
//
// Manipulating Column Titles
//
- (void)drawTitle:(NSString *)title
inRect:(NSRect)aRect
ofColumn:(int)column
{}
- (BOOL)isTitled
{
return NO;
}
- (void)setTitled:(BOOL)flag
{}
- (void)setTitle:(NSString *)aString
ofColumn:(int)column
{}
- (NSRect)titleFrameOfColumn:(int)column
{
return NSZeroRect;
}
- (float)titleHeight
{
return 0;
}
- (NSString *)titleOfColumn:(int)column
{
return nil;
}
//
// Scrolling an NSBrowser
//
- (void)scrollColumnsLeftBy:(int)shiftAmount
{}
- (void)scrollColumnsRightBy:(int)shiftAmount
{}
- (void)scrollColumnToVisible:(int)column
{}
- (void)scrollViaScroller:(NSScroller *)sender
{}
- (void)updateScroller
{}
//
// Event Handling
//
- (void)doClick:(id)sender
{}
- (void)doDoubleClick:(id)sender
{}
//
// Getting Matrices and Cells
//
- (id)loadedCellAtRow:(int)row
column:(int)column
{
return nil;
}
- (NSMatrix *)matrixInColumn:(int)column
{
return nil;
}
- (id)selectedCell
{
return nil;
}
- (id)selectedCellInColumn:(int)column
{
return nil;
}
- (NSArray *)selectedCells
{
return nil;
}
//
// Getting Column Frames
//
- (NSRect)frameOfColumn:(int)column
{
return NSZeroRect;
}
- (NSRect)frameOfInsideOfColumn:(int)column
{
return NSZeroRect;
}
//
// Manipulating Paths
//
- (NSString *)path
{
return nil;
}
- (NSString *)pathSeparator
{
return nil;
}
- (NSString *)pathToColumn:(int)column
{
return nil;
}
- (BOOL)setPath:(NSString *)path
{
return NO;
}
- (void)setPathSeparator:(NSString *)aString
{}
//
// Arranging an NSBrowser's Components
//
- (void)tile
{}
//
// Methods Implemented by the Delegate
//
- (void)browser:(NSBrowser *)sender
createRowsForColumn:(int)column
inMatrix:(NSMatrix *)matrix
{}
- (BOOL)browser:(NSBrowser *)sender
isColumnValid:(int)column
{
return NO;
}
- (int)browser:(NSBrowser *)sender
numberOfRowsInColumn:(int)column
{
return 0;
}
- (BOOL)browser:(NSBrowser *)sender
selectCell:(NSString *)title
inColumn:(int)column
{
return NO;
}
- (NSString *)browser:(NSBrowser *)sender
titleOfColumn:(int)column
{
return nil;
}
- (void)browser:(NSBrowser *)sender
willDisplayCell:(id)cell
atRow:(int)row
column:(int)column
{}
- (void)browserDidScroll:(NSBrowser *)sender
{}
- (void)browserWillScroll:(NSBrowser *)sender
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

121
Source/NSBrowserCell.m Normal file
View file

@ -0,0 +1,121 @@
/*
NSBrowserCell.m
Cell class for the NSBrowser
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSBrowserCell.h>
@implementation NSBrowserCell
//
// Class methods
//
+ (void)initialize
{
if (self == [NSBrowserCell class])
{
// Initial version
[self setVersion:1];
}
}
//
// Accessing Graphic Attributes
//
+ (NSImage *)branchImage
{
return nil;
}
+ (NSImage *)highlightedBranchImage
{
return nil;
}
//
// Instance methods
//
//
// Accessing Graphic Attributes
//
- (NSImage *)alternateImage
{
return nil;
}
- (void)setAlternateImage:(NSImage *)anImage
{}
//
// Placing in the Browser Hierarchy
//
- (BOOL)isLeaf
{
return NO;
}
- (void)setLeaf:(BOOL)flag
{}
//
// Determining Loaded Status
//
- (BOOL)isLoaded
{
return NO;
}
- (void)setLoaded:(BOOL)flag
{}
//
// Setting State
//
- (void)reset
{}
- (void)set
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

346
Source/NSButton.m Normal file
View file

@ -0,0 +1,346 @@
/*
NSButton.m
The button class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSButton.h>
#include <gnustep/gui/NSWindow.h>
#include <gnustep/gui/NSButtonCell.h>
#include <gnustep/gui/NSApplication.h>
//
// class variables
//
id MB_NSBUTTON_CLASS;
//
// NSButton implementation
//
@implementation NSButton
//
// Class methods
//
+ (void)initialize
{
if (self == [NSButton class])
{
// Initial version
[self setVersion:1];
// Set our cell class to NSButtonCell
[self setCellClass:[NSButtonCell class]];
}
}
//
// Initializing the NSButton Factory
//
+ (Class)cellClass
{
return MB_NSBUTTON_CLASS;
}
+ (void)setCellClass:(Class)classId
{
MB_NSBUTTON_CLASS = classId;
}
//
// Instance methods
//
//
// Initialization
//
- init
{
return [self initWithFrame:NSZeroRect];
}
- initWithFrame:(NSRect)frameRect
{
[super initWithFrame:frameRect];
// set our cell
[[self cell] release];
[self setCell:[[MB_NSBUTTON_CLASS alloc] init]];
return self;
}
//
// Setting the Button Type
//
- (void)setType:(NSButtonType)aType
{
[cell setType:aType];
[self display];
}
//
// Setting the State
//
- (void)setState:(int)value
{
[cell setState:value];
[self display];
}
- (int)state
{
return [cell state];
}
//
// Setting the Repeat Interval
//
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval
{}
- (void)setPeriodicDelay:(float)delay
interval:(float)interval
{}
//
// Setting the Titles
//
- (NSString *)alternateTitle
{
return [cell alternateTitle];
}
- (void)setAlternateTitle:(NSString *)aString
{
[cell setAlternateTitle:aString];
[self display];
}
- (void)setTitle:(NSString *)aString
{
[cell setTitle:aString];
[self display];
}
- (NSString *)title
{
return [cell title];
}
//
// Setting the Images
//
- (NSImage *)alternateImage
{
return [cell alternateImage];
}
- (NSImage *)image
{
return [cell image];
}
- (NSCellImagePosition)imagePosition
{
return [cell imagePosition];
}
- (void)setAlternateImage:(NSImage *)anImage
{
[cell setAlternateImage:anImage];
[self display];
}
- (void)setImage:(NSImage *)anImage
{
[cell setImage:anImage];
[self display];
}
- (void)setImagePosition:(NSCellImagePosition)aPosition
{
[cell setImagePosition:aPosition];
[self display];
}
//
// Modifying Graphic Attributes
//
- (BOOL)isBordered
{
return [cell isBordered];
}
- (BOOL)isTransparent
{
return [cell isTransparent];
}
- (void)setBordered:(BOOL)flag
{
[cell setBordered:flag];
[self display];
}
- (void)setTransparent:(BOOL)flag
{
[cell setTransparent:flag];
[self display];
}
//
// Displaying
//
- (void)drawRect:(NSRect)rect
{
[cell drawWithFrame:rect inView:self];
}
- (void)highlight:(BOOL)flag
{
}
//
// Setting the Key Equivalent
//
- (NSString *)keyEquivalent
{
return nil;
}
- (unsigned int)keyEquivalentModifierMask
{
return 0;
}
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent
{}
- (void)setKeyEquivalentModifierMask:(unsigned int)mask
{}
//
// Handling Events and Action Messages
//
- (void)mouseDown:(NSEvent *)theEvent
{
NSApplication *theApp = [NSApplication sharedApplication];
BOOL mouseUp, done;
NSEvent *e;
unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
| NSMouseMovedMask;
NSDebugLog(@"NSButton mouseDown\n");
// capture mouse
[[self window] captureMouse: self];
done = NO;
e = theEvent;
while (!done)
{
mouseUp = [cell trackMouse: e inRect: bounds
ofView:self untilMouseUp:YES];
e = [theApp currentEvent];
// If mouse went up then we are done
if ((mouseUp) || ([e type] == NSLeftMouseUp))
done = YES;
else
{
NSDebugLog(@"NSButton process another event\n");
e = [theApp nextEventMatchingMask:event_mask untilDate:nil
inMode:nil dequeue:YES];
}
}
// Release mouse
[[self window] releaseMouse: self];
// If the mouse went up in the button
if (mouseUp)
{
// Unhighlight the button
[cell highlight: NO withFrame: bounds
inView: self];
//
// Perform different state changes based upon our type
//
switch ([cell type])
{
case NSMomentaryChangeButton:
case NSPushOnPushOffButton:
case NSToggleButton:
case NSSwitchButton:
case NSRadioButton:
case NSOnOffButton:
// Toggle our state
if ([self state])
{
[self setState:0];
NSDebugLog(@"toggle state off\n");
}
else
{
[self setState:1];
NSDebugLog(@"toggle state on\n");
}
}
// Have the target perform the action
[self sendAction:[self action] to:[self target]];
}
}
- (void)performClick:(id)sender
{
[cell performClick:sender];
}
- (BOOL)performKeyEquivalent:(NSEvent *)anEvent
{
return NO;
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

282
Source/NSButtonCell.m Normal file
View file

@ -0,0 +1,282 @@
/*
NSButtonCell.m
The button cell class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSButtonCell.h>
#include <gnustep/gui/NSButton.h>
#include <gnustep/gui/NSWindow.h>
#include <Foundation/NSLock.h>
#include <Foundation/NSArray.h>
#include <gnustep/gui/NSEvent.h>
#include <gnustep/gui/NSApplication.h>
//
// NSButtonCell implementation
//
@implementation NSButtonCell
//
// Class methods
//
+ (void)initialize
{
if (self == [NSButtonCell class])
{
// Initial version
[self setVersion:1];
}
}
//
// Instance methods
//
- init
{
[self initTextCell:[NSString stringWithCString:"Button"]];
return self;
}
- initImageCell:(NSImage *)anImage
{
[super initImageCell:anImage];
cell_type = NSMomentaryPushButton;
[self setEnabled:YES];
transparent = NO;
[self setBordered:YES];
return self;
}
- initTextCell:(NSString *)aString
{
[super initTextCell:aString];
support = [NSFont userFixedPitchFontOfSize:12];
alt_contents = @"Button";
cell_type = NSMomentaryPushButton;
[self setEnabled:YES];
transparent = NO;
[self setBordered:YES];
return self;
}
- (void)dealloc
{
[super dealloc];
}
//
// Setting the Titles
//
- (NSString *)alternateTitle
{
return alt_contents;
}
- (void)setAlternateTitle:(NSString *)aString
{
alt_contents = aString;
// update our state
[self setState:[self state]];
}
- (void)setFont:(NSFont *)fontObject
{
[super setFont:fontObject];
}
- (void)setTitle:(NSString *)aString
{
[self setStringValue:aString];
// update our state
[self setState:[self state]];
}
- (NSString *)title
{
return [self stringValue];
}
//
// Setting the Images
//
- (NSImage *)alternateImage
{
return alt_image;
}
- (NSCellImagePosition)imagePosition
{
return image_position;
}
- (void)setAlternateImage:(NSImage *)anImage
{
alt_image = anImage;
}
- (void)setImagePosition:(NSCellImagePosition)aPosition
{
image_position = aPosition;
}
//
// Setting the Repeat Interval
//
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval
{}
- (void)setPeriodicDelay:(float)delay
interval:(float)interval
{}
//
// Setting the Key Equivalent
//
- (NSString *)keyEquivalent
{
return nil;
}
- (NSFont *)keyEquivalentFont
{
return nil;
}
- (unsigned int)keyEquivalentModifierMask
{
return 0;
}
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent
{}
- (void)setKeyEquivalentModifierMask:(unsigned int)mask
{}
- (void)setKeyEquivalentFont:(NSFont *)fontObj
{}
- (void)setKeyEquivalentFont:(NSString *)fontName
size:(float)fontSize
{}
//
// Modifying Graphic Attributes
//
- (BOOL)isOpaque
{
return NO;
}
- (BOOL)isTransparent
{
return transparent;
}
- (void)setTransparent:(BOOL)flag
{
transparent = flag;
}
//
// Modifying Graphic Attributes
//
- (int)highlightsBy
{
return 0;
}
- (void)setHighlightsBy:(int)aType
{}
- (void)setShowsStateBy:(int)aType
{}
- (void)setType:(NSButtonType)aType
{
cell_type = aType;
// update our state
[self setState:[self state]];
}
- (int)showsStateBy
{
return 0;
}
- (void)setState:(int)value
{
[super setState:value];
}
//
// Displaying
//
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{
// Save last view drawn to
control_view = controlView;
}
//
// Simulating a Click
//
- (void)performClick:(id)sender
{
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
NSLog(@"NSButtonCell: start encoding\n");
[aCoder encodeObject: alt_contents];
[aCoder encodeObject: alt_image];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSLog(@"NSButtonCell: finish encoding\n");
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
NSLog(@"NSButtonCell: start decoding\n");
alt_contents = [aDecoder decodeObject];
alt_image = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &transparent];
NSLog(@"NSButtonCell: finish decoding\n");
return self;
}
@end

92
Source/NSCachedImageRep.m Normal file
View file

@ -0,0 +1,92 @@
/*
NSCachedImageRep.m
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSCachedImageRep.h>
@implementation NSCachedImageRep
//
// Class methods
//
+ (void)initialize
{
if (self == [NSCachedImageRep class])
{
// Initial version
[self setVersion:1];
}
}
//
// Initializing an NSCachedImageRep
//
- (id)initWithSize:(NSSize)aSize
depth:(NSWindowDepth)aDepth
separate:(BOOL)separate
alpha:(BOOL)alpha
{
return nil;
}
- (id)initWithWindow:(NSWindow *)aWindow
rect:(NSRect)aRect
{
return nil;
}
//
// Getting the Representation
//
- (NSRect)rect
{
return NSZeroRect;
}
- (NSWindow *)window
{
return nil;
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

789
Source/NSCell.m Normal file
View file

@ -0,0 +1,789 @@
/*
NSCell.m
The abstract cell class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSCell.h>
#include <gnustep/gui/NSApplication.h>
#include <gnustep/gui/NSButton.h>
@implementation NSCell
//
// Class methods
//
+ (void)initialize
{
if (self == [NSCell class])
{
// Initial version
[self setVersion:1];
}
}
//
// Tracking the Mouse
//
+ (BOOL)prefersTrackingUntilMouseUp
{
return NO;
}
//
// Instance methods
//
//
// Initializing an NSCell
//
- init
{
[super init];
cell_type = NSNullCellType;
image_position = NSNoImage;
cell_state = NO;
cell_highlighted = NO;
cell_enabled = YES;
cell_editable = NO;
cell_bordered = NO;
cell_bezeled = NO;
cell_scrollable = NO;
cell_selectable = NO;
cell_continuous = NO;
cell_float_autorange = NO;
cell_float_left = 0;
cell_float_right = 0;
return self;
}
- (id)initImageCell:(NSImage *)anImage
{
[super init];
// Not an image class --then forget it
if (![anImage isKindOfClass:[NSImage class]])
return nil;
support = anImage;
cell_type = NSImageCellType;
image_position = NSImageOnly;
cell_state = NO;
cell_highlighted = NO;
cell_enabled = YES;
cell_editable = NO;
cell_bordered = NO;
cell_bezeled = NO;
cell_scrollable = NO;
cell_selectable = NO;
cell_continuous = NO;
cell_float_autorange = NO;
cell_float_left = 0;
cell_float_right = 0;
return self;
}
- (id)initTextCell:(NSString *)aString
{
[super init];
// Not a string class --then forget it
//if (![aString isKindOfClass:[NSString class]])
// return nil;
support = [NSFont userFontOfSize:12];
contents = aString;
cell_type = NSTextCellType;
text_align = NSLeftTextAlignment;
image_position = NSNoImage;
cell_state = NO;
cell_highlighted = NO;
cell_enabled = YES;
cell_editable = NO;
cell_bordered = NO;
cell_bezeled = NO;
cell_scrollable = NO;
cell_selectable = NO;
cell_continuous = NO;
cell_float_autorange = YES;
cell_float_left = 0;
cell_float_right = 6;
return self;
}
//
// Determining Component Sizes
//
- (void)calcDrawInfo:(NSRect)aRect
{}
- (NSSize)cellSize
{
return NSZeroSize;
}
- (NSSize)cellSizeForBounds:(NSRect)aRect
{
return NSZeroSize;
}
- (NSRect)drawingRectForBounds:(NSRect)theRect
{
return NSZeroRect;
}
- (NSRect)imageRectForBounds:(NSRect)theRect
{
return NSZeroRect;
}
- (NSRect)titleRectForBounds:(NSRect)theRect
{
return NSZeroRect;
}
//
// Setting the NSCell's Type
//
- (void)setType:(NSCellType)aType
{
cell_type = aType;
}
- (NSCellType)type
{
return cell_type;
}
//
// Setting the NSCell's State
//
- (void)setState:(int)value
{
cell_state = value;
}
- (int)state
{
return cell_state;
}
//
// Enabling and Disabling the NSCell
//
- (BOOL)isEnabled
{
return cell_enabled;
}
- (void)setEnabled:(BOOL)flag
{
cell_enabled = flag;
}
//
// Setting the Image
//
- (NSImage *)image
{
if (cell_type == NSImageCellType)
return support;
else
return nil;
}
- (void)setImage:(NSImage *)anImage
{
// Not an image class --then forget it
if (![anImage isKindOfClass:[NSImage class]])
return;
// Only set the image if we are an image cell
if (cell_type == NSImageCellType)
support = anImage;
}
//
// Setting the NSCell's Value
//
- (double)doubleValue
{
return [contents doubleValue];
}
- (float)floatValue;
{
return [contents floatValue];
}
- (int)intValue
{
return [contents intValue];
}
- (NSString *)stringValue
{
return contents;
}
- (void)setDoubleValue:(double)aDouble
{
char c[256];
unsigned int w = cell_float_left + cell_float_right;
// Default printf formatting
if (cell_float_left == 0)
sprintf(c, "%f", aDouble);
else
if (cell_float_autorange)
sprintf(c, "%*f", w, aDouble);
else
sprintf(c, "%*.*f", w, cell_float_right, aDouble);
contents = [NSString stringWithCString:c];
}
- (void)setFloatValue:(float)aFloat
{
char c[256];
unsigned int w = cell_float_left + cell_float_right;
// Default printf formatting
if (cell_float_left == 0)
sprintf(c, "%f", aFloat);
else
if (cell_float_autorange)
sprintf(c, "%*f", w, aFloat);
else
sprintf(c, "%*.*f", w, cell_float_right, aFloat);
contents = [NSString stringWithCString:c];
}
- (void)setIntValue:(int)anInt
{
char c[256];
sprintf(c, "%d", anInt);
contents = [NSString stringWithCString:c];
}
- (void)setStringValue:(NSString *)aString
{
contents = aString;
}
//
// Interacting with Other NSCells
//
- (void)takeDoubleValueFrom:(id)sender
{
[self setDoubleValue:[sender doubleValue]];
}
- (void)takeFloatValueFrom:(id)sender
{
[self setFloatValue:[sender floatValue]];
}
- (void)takeIntValueFrom:(id)sender
{
[self setIntValue:[sender intValue]];
}
- (void)takeStringValueFrom:(id)sender
{
[self setStringValue:[sender stringValue]];
}
//
// Modifying Text Attributes
//
- (NSTextAlignment)alignment
{
return text_align;
}
- (NSFont *)font
{
if ([support isKindOfClass:[NSFont class]])
return support;
else
return nil;
}
- (BOOL)isEditable
{
return cell_editable;
}
- (BOOL)isSelectable
{
return cell_selectable;
}
- (BOOL)isScrollable
{
return cell_scrollable;
}
- (void)setAlignment:(NSTextAlignment)mode
{
text_align = mode;
}
- (void)setEditable:(BOOL)flag
{
cell_editable = flag;
// If its editable then its selectable
if (flag)
cell_selectable = flag;
}
- (void)setFont:(NSFont *)fontObject
{
// Not a font --then forget it
if (![fontObject isKindOfClass:[NSFont class]])
return;
// Only set the font if we are a text cell
if ([support isKindOfClass:[NSFont class]])
support = fontObject;
}
- (void)setSelectable:(BOOL)flag
{
cell_selectable = flag;
// If its not selectable then its not editable
if (!flag)
cell_editable = NO;
}
- (void)setScrollable:(BOOL)flag
{
cell_scrollable = flag;
}
- (NSText *)setUpFieldEditorAttributes:(NSText *)textObject
{
return nil;
}
- (void)setWraps:(BOOL)flag
{}
- (BOOL)wraps
{
return NO;
}
//
// Editing Text
//
- (void)editWithFrame:(NSRect)aRect
inView:(NSView *)controlView
editor:(NSText *)textObject
delegate:(id)anObject
event:(NSEvent *)theEvent
{}
- (void)endEditing:(NSText *)textObject
{}
- (void)selectWithFrame:(NSRect)aRect
inView:(NSView *)controlView
editor:(NSText *)textObject
delegate:(id)anObject
start:(int)selStart
length:(int)selLength
{}
//
// Validating Input
//
- (int)entryType
{
return entry_type;
}
- (BOOL)isEntryAcceptable:(NSString *)aString
{
return YES;
}
- (void)setEntryType:(int)aType
{
entry_type = aType;
}
//
// Formatting Data
//
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned int)leftDigits
right:(unsigned int)rightDigits
{
cell_float_autorange = autoRange;
cell_float_left = leftDigits;
cell_float_right = rightDigits;
}
//
// Modifying Graphic Attributes
//
- (BOOL)isBezeled
{
return cell_bezeled;
}
- (BOOL)isBordered
{
return cell_bordered;
}
- (BOOL)isOpaque
{
return NO;
}
- (void)setBezeled:(BOOL)flag
{
cell_bezeled = flag;
}
- (void)setBordered:(BOOL)flag
{
cell_bordered = flag;
}
//
// Setting Parameters
//
- (int)cellAttribute:(NSCellAttribute)aParameter
{
return 0;
}
- (void)setCellAttribute:(NSCellAttribute)aParameter
to:(int)value
{}
//
// Displaying
//
- (NSView *)controlView
{
return control_view;
}
- (void)drawInteriorWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{}
- (void)drawWithFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{}
- (void)highlight:(BOOL)lit
withFrame:(NSRect)cellFrame
inView:(NSView *)controlView
{
cell_highlighted = lit;
}
- (BOOL)isHighlighted
{
return cell_highlighted;
}
//
// Target and Action
//
- (SEL)action
{
return NULL;
}
- (BOOL)isContinuous
{
return cell_continuous;
}
- (int)sendActionOn:(int)mask
{
return 0;
}
- (void)setAction:(SEL)aSelector
{}
- (void)setContinuous:(BOOL)flag
{
cell_continuous = flag;
}
- (void)setTarget:(id)anObject
{}
- (id)target
{
return nil;
}
//
// Assigning a Tag
//
- (void)setTag:(int)anInt
{}
- (int)tag
{
return -1;
}
//
// Handling Keyboard Alternatives
//
- (NSString *)keyEquivalent
{
return nil;
}
//
// Tracking the Mouse
//
- (BOOL)continueTracking:(NSPoint)lastPoint
at:(NSPoint)currentPoint
inView:(NSView *)controlView
{
return YES;
}
- (int)mouseDownFlags
{
return 0;
}
- (void)getPeriodicDelay:(float *)delay
interval:(float *)interval
{}
- (BOOL)startTrackingAt:(NSPoint)startPoint
inView:(NSView *)controlView
{
// If the point is in the view then yes start tracking
if ([controlView mouse: startPoint inRect: [controlView bounds]])
return YES;
else
return NO;
}
- (void)stopTracking:(NSPoint)lastPoint
at:(NSPoint)stopPoint
inView:(NSView *)controlView
mouseIsUp:(BOOL)flag
{
}
- (BOOL)trackMouse:(NSEvent *)theEvent
inRect:(NSRect)cellFrame
ofView:(NSView *)controlView
untilMouseUp:(BOOL)flag
{
NSApplication *theApp = [NSApplication sharedApplication];
NSEvent *e;
unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask
| NSMouseMovedMask;
NSPoint location = [theEvent locationInWindow];
NSPoint point = [controlView convertPoint: location fromView: nil];
NSPoint last_point;
BOOL done;
NSRect r;
BOOL untilMU, mouseWentUp;
NSDebugLog(@"NSCell start tracking\n");
NSDebugLog(@"NSCell tracking in rect %f %f %f %f\n",
cellFrame.origin.x, cellFrame.origin.y,
cellFrame.size.width, cellFrame.size.height);
NSDebugLog(@"NSCell initial point %f %f\n", point.x, point.y);
if (![self startTrackingAt: point inView: controlView])
return NO;
// If point is in cellFrame then highlight the cell
if ([controlView mouse: point inRect: cellFrame])
[self highlight:YES withFrame:cellFrame inView:controlView];
else
return NO;
// Get next mouse events until a mouse up is obtained
NSDebugLog(@"NSCell get mouse events\n");
mouseWentUp = NO;
done = NO;
while (!done)
{
last_point = point;
e = [theApp nextEventMatchingMask:event_mask untilDate:nil
inMode:nil dequeue:YES];
location = [e locationInWindow];
point = [controlView convertPoint: location fromView: nil];
NSDebugLog(@"NSCell location %f %f\n", location.x, location.y);
NSDebugLog(@"NSCell point %f %f\n", point.x, point.y);
if (![controlView mouse: point inRect: cellFrame])
{
NSDebugLog(@"NSCell point not in cell frame\n");
// If point not in cell then unhighlight cell
[self highlight: NO withFrame: cellFrame
inView: controlView];
// Do we now return or keep tracking
if ((![[self class] prefersTrackingUntilMouseUp])
|| (!flag))
{
NSDebugLog(@"NSCell return immediately\n");
done = YES;
continue;
}
}
// should we continue tracking?
if (![self continueTracking: last_point at: point
inView: controlView])
{
NSDebugLog(@"NSCell stop tracking\n");
done = YES;
continue;
}
// Did the mouse go up?
if ([e type] == NSLeftMouseUp)
{
NSDebugLog(@"NSCell mouse went up\n");
mouseWentUp = YES;
done = YES;
}
}
// Tell ourselves to stop tracking
[self stopTracking: last_point at: point
inView: controlView mouseIsUp: mouseWentUp];
// Return YES only if the mouse went up within the cell
if ((mouseWentUp) &&
([controlView mouse: point inRect: cellFrame]))
{
NSDebugLog(@"NSCell mouse went up in cell\n");
return YES;
}
// Otherwise return NO
NSDebugLog(@"NSCell mouse did not go up in cell\n");
return NO;
}
//
// Managing the Cursor
//
- (void)resetCursorRect:(NSRect)cellFrame
inView:(NSView *)controlView
{}
//
// Comparing to Another NSCell
//
- (NSComparisonResult)compare:(id)otherCell
{
return 0;
}
//
// Using the NSCell to Represent an Object
//
- (id)representedObject
{
return nil;
}
- (void)setRepresentedObject:(id)anObject
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject: contents];
[aCoder encodeObject: support];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_state];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_highlighted];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_enabled];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_editable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_bordered];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_bezeled];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_scrollable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_selectable];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_continuous];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &cell_float_autorange];
[aCoder encodeValueOfObjCType: "I" at: &cell_float_left];
[aCoder encodeValueOfObjCType: "I" at: &cell_float_right];
[aCoder encodeValueOfObjCType: "I" at: &image_position];
[aCoder encodeValueOfObjCType: "i" at: &cell_type];
[aCoder encodeValueOfObjCType: @encode(NSTextAlignment) at: &text_align];
[aCoder encodeValueOfObjCType: "i" at: &entry_type];
[aCoder encodeObjectReference: control_view withName: @"Control view"];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
contents = [aDecoder decodeObject];
support = [aDecoder decodeObject];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_state];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_highlighted];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_enabled];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_editable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_bordered];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_bezeled];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_scrollable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_selectable];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_continuous];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &cell_float_autorange];
[aDecoder decodeValueOfObjCType: "I" at: &cell_float_left];
[aDecoder decodeValueOfObjCType: "I" at: &cell_float_right];
[aDecoder decodeValueOfObjCType: "I" at: &image_position];
[aDecoder decodeValueOfObjCType: "i" at: &cell_type];
[aDecoder decodeValueOfObjCType: @encode(NSTextAlignment) at: &text_align];
[aDecoder decodeValueOfObjCType: "i" at: &entry_type];
[aDecoder decodeObjectAt: &control_view withName: NULL];
return self;
}
@end

135
Source/NSClipView.m Normal file
View file

@ -0,0 +1,135 @@
/*
NSClipView.m
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSClipView.h>
@implementation NSClipView
//
// Class methods
//
+ (void)initialize
{
if (self == [NSClipView class])
{
// Initial version
[self setVersion:1];
}
}
//
// Managing the Document View
//
- (NSRect)documentRect
{
return NSZeroRect;
}
- (id)documentView
{
return nil;
}
- (NSRect)documentVisibleRect
{
return NSZeroRect;
}
- (void)setDocumentView:(NSView *)aView
{}
//
// Setting the Cursor
//
- (NSCursor *)documentCursor
{
return nil;
}
- (void)setDocumentCursor:(NSCursor *)anObject
{}
//
// Setting the Background Color
//
- (NSColor *)backgroundColor
{
return nil;
}
- (void)setBackgroundColor:(NSColor *)color
{}
//
// Scrolling
//
- (BOOL)autoscroll:(NSEvent *)theEvent
{
return NO;
}
- (NSPoint)constrainScrollPoint:(NSPoint)newOrigin
{
return NSZeroPoint;
}
- (BOOL)copiesOnScroll
{
return NO;
}
- (void)scrollToPoint:(NSPoint)newOrigin
{}
- (void)setCopiesOnScroll:(BOOL)flag
{}
//
// Responding to a Changed Frame
//
- (void)viewFrameChanged:(NSNotification *)notification
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

507
Source/NSColor.m Normal file
View file

@ -0,0 +1,507 @@
/*
NSColor.m
The colorful color class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSColor.h>
#include <gnustep/gui/NSView.h>
// Global strings
NSString *NSCalibratedWhiteColorSpace;
NSString *NSCalibratedBlackColorSpace;
NSString *NSCalibratedRGBColorSpace;
NSString *NSDeviceWhiteColorSpace;
NSString *NSDeviceBlackColorSpace;
NSString *NSDeviceRGBColorSpace;
NSString *NSDeviceCMYKColorSpace;
NSString *NSNamedColorSpace;
NSString *NSCustomColorSpace;
// Global gray values
const float NSBlack = 0;
const float NSDarkGray = .502;
const float NSWhite = 1;
const float NSLightGray = .753;
@implementation NSColor
////////////////////////////////////////////////////////////
//
// Internal methods
//
- (void)setRed:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.red = value;
}
- (void)setGreen:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.green = value;
}
- (void)setBlue:(float)value
{
if (value < 0) value = 0;
if (value > 1) value = 1;
RGB_component.blue = value;
}
- (void)setClear:(BOOL)flag
{
is_clear = flag;
}
////////////////////////////////////////////////////////////
//
// Class methods
//
+ (void)initialize
{
if (self == [NSColor class])
{
// Initial version
[self setVersion:1];
}
}
//
// Creating an NSColor from Component Values
//
+ (NSColor *)colorWithCalibratedHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha
{
return nil;
}
+ (NSColor *)colorWithCalibratedRed:(float)red
green:(float)green
blue:(float)blue
alpha:(float)alpha
{
NSColor *c;
c = [[[NSColor alloc] init] autorelease];
[c setRed:red];
[c setGreen:green];
[c setBlue:blue];
[c setClear:NO];
return c;
}
+ (NSColor *)colorWithCalibratedWhite:(float)white
alpha:(float)alpha
{
return nil;
}
+ (NSColor *)colorWithCatalogName:(NSString *)listName
colorName:(NSString *)colorName
{
return nil;
}
+ (NSColor *)colorWithDeviceCyan:(float)cyan
magenta:(float)magenta
yellow:(float)yellow
black:(float)black
alpha:(float)alpha
{
return nil;
}
+ (NSColor *)colorWithDeviceHue:(float)hue
saturation:(float)saturation
brightness:(float)brightness
alpha:(float)alpha
{
return nil;
}
+ (NSColor *)colorWithDeviceRed:(float)red
green:(float)green
blue:(float)blue
alpha:(float)alpha
{
return self;
}
+ (NSColor *)colorWithDeviceWhite:(float)white
alpha:(float)alpha
{
return nil;
}
//
// Creating an NSColor With Preset Components
//
+ (NSColor *)blackColor
{
return [self colorWithCalibratedRed:0
green:0
blue:0
alpha:1];
}
+ (NSColor *)blueColor
{
return [self colorWithCalibratedRed:0
green:0
blue:1.0
alpha:1];
}
+ (NSColor *)brownColor
{
return [self colorWithCalibratedRed:0.6
green:0.4
blue:0.2
alpha:1];
}
+ (NSColor *)clearColor
{
NSColor *c;
c = [self colorWithCalibratedRed:0
green:1.0
blue:1.0
alpha:1];
[c setClear:YES];
return c;
}
+ (NSColor *)cyanColor
{
return [self colorWithCalibratedRed:0
green:1.0
blue:1.0
alpha:1];
}
+ (NSColor *)darkGrayColor
{
return [self colorWithCalibratedRed:0.502
green:0.502
blue:0.502
alpha:1];
}
+ (NSColor *)grayColor
{
return [self colorWithCalibratedRed:0.753
green:0.753
blue:0.753
alpha:1];
}
+ (NSColor *)greenColor
{
return [self colorWithCalibratedRed:0
green:1.0
blue:0
alpha:1];
}
+ (NSColor *)lightGrayColor
{
return [self colorWithCalibratedRed:0.9
green:0.9
blue:0.9
alpha:1];
}
+ (NSColor *)magentaColor
{
return [self colorWithCalibratedRed:1.0
green:0
blue:1.0
alpha:1];
}
+ (NSColor *)orangeColor;
{
return [self colorWithCalibratedRed:1.0
green:0.5
blue:0
alpha:1];
}
+ (NSColor *)purpleColor;
{
return [self colorWithCalibratedRed:0.5
green:0
blue:0.5
alpha:1];
}
+ (NSColor *)redColor;
{
return [self colorWithCalibratedRed:1.0
green:0
blue:0
alpha:1];
}
+ (NSColor *)whiteColor;
{
return [self colorWithCalibratedRed:1.0
green:1.0
blue:1.0
alpha:1];
}
+ (NSColor *)yellowColor
{
return [self colorWithCalibratedRed:1.0
green:1.0
blue:0
alpha:1];
}
//
// Ignoring Alpha Components
//
+ (BOOL)ignoresAlpha
{
return YES;
}
+ (void)setIgnoresAlpha:(BOOL)flag
{}
//
// Copying and Pasting
//
+ (NSColor *)colorFromPasteboard:(NSPasteboard *)pasteBoard
{
return nil;
}
////////////////////////////////////////////////////////////
//
// Instance methods
//
//
// Retrieving a Set of Components
//
- (void)getCyan:(float *)cyan
magenta:(float *)magenta
yellow:(float *)yellow
black:(float *)black
alpha:(float *)alpha
{}
- (void)getHue:(float *)hue
saturation:(float *)saturation
brightness:(float *)brightness
alpha:(float *)alpha
{}
- (void)getRed:(float *)red
green:(float *)green
blue:(float *)blue
alpha:(float *)alpha
{}
- (void)getWhite:(float *)white
alpha:(float *)alpha
{}
//
// Retrieving Individual Components
//
- (float)alphaComponent
{
return alpha_component;
}
- (float)blackComponent
{
return 0;
}
- (float)blueComponent
{
return RGB_component.blue;
}
- (float)brightnessComponent
{
return 0;
}
- (NSString *)catalogNameComponent
{
return nil;
}
- (NSString *)colorNameComponent
{
return nil;
}
- (float)cyanComponent
{
return 0;
}
- (float)greenComponent
{
return RGB_component.green;
}
- (float)hueComponent
{
return 0;
}
- (NSString *)localizedCatalogNameComponent
{
return nil;
}
- (NSString *)localizedColorNameComponent
{
return nil;
}
- (float)magentaComponent
{
return 0;
}
- (float)redComponent
{
return RGB_component.red;
}
- (float)saturationComponent
{
return 0;
}
- (float)whiteComponent
{
return 0;
}
- (float)yellowComponent
{
return 0;
}
//
// Converting to Another Color Space
//
- (NSString *)colorSpaceName
{
return nil;
}
- (NSColor *)colorUsingColorSpaceName:(NSString *)colorSpace
{
return nil;
}
- (NSColor *)colorUsingColorSpaceName:(NSString *)colorSpace
device:(NSDictionary *)deviceDescription
{
return nil;
}
//
// Changing the Color
//
- (NSColor *)blendedColorWithFraction:(float)fraction
ofColor:(NSColor *)aColor
{
return nil;
}
- (NSColor *)colorWithAlphaComponent:(float)alpha
{
return nil;
}
//
// Copying and Pasting
//
- (void)writeToPasteboard:(NSPasteboard *)pasteBoard
{}
//
// Drawing
//
- (void)drawSwatchInRect:(NSRect)rect
{}
- (void)set
{
}
//
// Destroying
//
- (void)dealloc
{
[super dealloc];
}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.red];
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.green];
[aCoder encodeValueOfObjCType: "f" at: &RGB_component.blue];
[aCoder encodeValueOfObjCType: "f" at: &alpha_component];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &is_clear];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.red];
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.green];
[aDecoder decodeValueOfObjCType: "f" at: &RGB_component.blue];
[aDecoder decodeValueOfObjCType: "f" at: &alpha_component];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_clear];
return self;
}
@end

150
Source/NSColorList.m Normal file
View file

@ -0,0 +1,150 @@
/*
NSColorList.m
Description...
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSColorList.h>
// NSColorList notifications
NSString *NSColorListChangedNotification;
@implementation NSColorList
//
// Class methods
//
+ (void)initialize
{
if (self == [NSColorList class])
{
// Initial version
[self setVersion:1];
}
}
//
// Getting All Color Lists
//
+ (NSArray *)availableColorLists
{
return nil;
}
//
// Getting a Color List by Name
//
+ (NSColorList *)colorListNamed:(NSString *)name
{
return nil;
}
//
// Instance methods
//
//
// Initializing an NSColorList
//
- (id)initWithName:(NSString *)name
{
return nil;
}
- (id)initWithName:(NSString *)name
fromFile:(NSString *)path
{
return nil;
}
//
// Getting a Color List by Name
//
- (NSString *)name
{
return nil;
}
//
// Managing Colors by Key
//
- (NSArray *)allKeys
{
return nil;
}
- (NSColor *)colorWithKey:(NSString *)key
{
return nil;
}
- (void)insertColor:(NSColor *)color
key:(NSString *)key
atIndex:(unsigned)location
{}
- (void)removeColorWithKey:(NSString *)key
{}
- (void)setColor:(NSColor *)aColor
forKey:(NSString *)key
{}
//
// Editing
//
- (BOOL)isEditable
{
return NO;
}
//
// Writing and Removing Files
//
- (BOOL)writeToFile:(NSString *)path
{
return NO;
}
- (void)removeFile
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

167
Source/NSColorPanel.m Normal file
View file

@ -0,0 +1,167 @@
/*
NSColorPanel.m
System generic color panel
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
If you are interested in a warranty or support for this source code,
contact Scott Christley <scottc@net-community.com> for more information.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gnustep/gui/NSColorPanel.h>
// NSColorPanel notifications
NSString *NSColorPanelColorChangedNotification;
@implementation NSColorPanel
//
// Class methods
//
+ (void)initialize
{
if (self == [NSColorPanel class])
{
// Initial version
[self setVersion:1];
}
}
//
// Creating the NSColorPanel
//
+ (NSColorPanel *)sharedColorPanel
{
return nil;
}
+ (BOOL)sharedColorPanelExists
{
return NO;
}
//
// Setting the NSColorPanel
//
+ (void)setPickerMask:(int)mask
{}
+ (void)setPickerMode:(int)mode
{}
//
// Setting Color
//
+ (BOOL)dragColor:(NSColor **)aColor
withEvent:(NSEvent *)anEvent
fromView:(NSView *)sourceView
{
return NO;
}
//
// Instance methods
//
//
// Setting the NSColorPanel
//
- (NSView *)accessoryView
{
return nil;
}
- (BOOL)isContinuous
{
return NO;
}
- (int)mode
{
return 0;
}
- (void)setAccessoryView:(NSView *)aView
{}
- (void)setAction:(SEL)aSelector
{}
- (void)setContinuous:(BOOL)flag
{}
- (void)setMode:(int)mode
{}
- (void)setShowsAlpha:(BOOL)flag
{}
- (void)setTarget:(id)anObject
{}
- (BOOL)showsAlpha
{
return NO;
}
//
// Attaching a Color List
//
- (void)attachColorList:(NSColorList *)aColorList
{}
- (void)detachColorList:(NSColorList *)aColorList
{}
//
// Setting Color
//
- (float)alpha
{
return 0;
}
- (NSColor *)color
{
return nil;
}
- (void)setColor:(NSColor *)aColor
{}
//
// NSCoding protocol
//
- (void)encodeWithCoder:aCoder
{
[super encodeWithCoder:aCoder];
}
- initWithCoder:aDecoder
{
[super initWithCoder:aDecoder];
return self;
}
@end

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