Added first cut wxWindows Configuration Tool

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-12 20:43:55 +00:00
parent f2c3db9d7d
commit d7463f75f9
130 changed files with 19018 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
all:
cd src; $(MAKE)
clean:
cd src; $(MAKE) clean

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 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.
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., 675 Mass Ave, Cambridge, MA 02139, 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.

View File

@@ -0,0 +1,517 @@
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!

View File

@@ -0,0 +1,53 @@
wxWindows Library Licence, Version 3
====================================
Copyright (c) 1998 Julian Smart, Robert Roebling et al
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
WXWINDOWS LIBRARY LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public Licence as published by
the Free Software Foundation; either version 2 of the Licence, 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 Licence for more details.
You should have received a copy of the GNU Library General Public Licence
along with this software, usually in a file named COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA.
EXCEPTION NOTICE
1. As a special exception, the copyright holders of this library give
permission for additional uses of the text contained in this release of
the library as licenced under the wxWindows Library Licence, applying
either version 3 of the Licence, or (at your option) any later version of
the Licence as published by the copyright holders of version 3 of the
Licence document.
2. The exception is that you may use, copy, link, modify and distribute
under the user's own terms, binary object code versions of works based
on the Library.
3. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not
apply to the code that you add in this way. To avoid misleading anyone as
to the status of such modified files, you must delete this exception
notice from such code and/or adjust the licensing conditions notice
accordingly.
4. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications.
If you do not wish that, you must delete the exception notice from such
code and/or adjust the licensing conditions notice accordingly.

View File

@@ -0,0 +1,60 @@
wxWindows Free Documentation Licence, Version 3
===============================================
Copyright (c) 1998 Julian Smart, Robert Roebling et al
Everyone is permitted to copy and distribute verbatim copies
of this licence document, but changing it is not allowed.
WXWINDOWS FREE DOCUMENTATION LICENCE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1. Permission is granted to make and distribute verbatim copies of this
manual or piece of documentation provided any copyright notice and this
permission notice are preserved on all copies.
2. Permission is granted to process this file or document through a
document processing system and, at your option and the option of any third
party, print the results, provided a printed document carries a copying
permission notice identical to this one.
3. Permission is granted to copy and distribute modified versions of this
manual or piece of documentation under the conditions for verbatim
copying, provided also that any sections describing licensing conditions
for this manual, such as, in particular, the GNU General Public Licence,
the GNU Library General Public Licence, and any wxWindows Licence are
included exactly as in the original, and provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
4. Permission is granted to copy and distribute translations of this
manual or piece of documentation into another language, under the above
conditions for modified versions, except that sections related to
licensing, including this paragraph, may also be included in translations
approved by the copyright holders of the respective licence documents in
addition to the original English.
WARRANTY DISCLAIMER
5. BECAUSE THIS MANUAL OR PIECE OF DOCUMENTATION IS LICENSED FREE OF CHARGE,
THERE IS NO WARRANTY FOR IT, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THIS MANUAL OR PIECE OF DOCUMENTATION "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 MANUAL OR PIECE OF DOCUMENTATION IS WITH YOU. SHOULD THE MANUAL OR
PIECE OF DOCUMENTATION PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.
6. 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 MANUAL OR PIECE OF DOCUMENTATION 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
MANUAL OR PIECE OF DOCUMENTATION (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 A PROGRAM BASED ON THE MANUAL OR PIECE OF
DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

View File

@@ -0,0 +1,46 @@
#
# File: Makefile
# Author: Julian Smart
# Created: 1999
#
# Makefile : Builds wxWindows configuration tool manual
#
DOCDIR=..
LOCALDOCDIR=.
DOCSOURCES=configtool.tex
all: configtool.chm configtool.htb
hlp: configtool.hlp
htb: configtool.htb
html: configtool.html
htmlhelp: configtool.chm
pdfrtf: configtool_rtf.rtf
configtool.hlp: configtool.rtf configtool.hpj
rm -f configtool.ph
-hcw /E /C configtool.hpj
configtool.chm : configtool.html configtool.hhp
-hhc configtool.hhp
# -mkdir ..\htmlhelp
configtool_rtf.rtf: $(DOCSOURCES) tex2rtf.ini
-tex2rtf configtool.tex configtool_rtf.rtf -twice -rtf
configtool.rtf: $(DOCSOURCES) tex2rtf.ini
-tex2rtf configtool.tex configtool.rtf -twice -winhelp
configtool.html: $(DOCSOURCES) tex2rtf.ini
-tex2rtf configtool.tex configtool.html -twice -html
-rm -f *.con
-rm -f *.ref
-rm -f *.con
-rm -f *.ref
# -tweakmanual
configtool.htb: configtool_contents.html
-zip32 configtool.htb configtool*.html *.hhp *.hhk *.hhc *.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

View File

@@ -0,0 +1,765 @@
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
\twocolwidtha{4cm}%
\definecolour{black}{0}{0}{0}%
\definecolour{cyan}{0}{255}{255}%
\definecolour{green}{0}{255}{0}%
\definecolour{magenta}{255}{0}{255}%
\definecolour{red}{255}{0}{0}%
\definecolour{blue}{0}{0}{200}%
\definecolour{yellow}{255}{255}{0}%
\definecolour{white}{255}{255}{255}%
%\input{psbox.tex}
\newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
\newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
\newcommand{\indexit}[1]{#1\index{#1}}%
\newcommand{\inioption}[1]{{\tt #1}\index{#1}}%
\parskip=10pt%
\parindent=0pt%
\title{\cttitle}%
\author{(c) Julian Smart, 2003}%
\makeindex%
\begin{document}%
%\maketitle%
\begin{center}
\image{}{logo.gif}
{\large {\bf Version \ctversion}}
(c) Julian Smart
\end{center}
\pagestyle{fancyplain}%
\bibliographystyle{plain}%
\pagenumbering{arabic}%
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\tableofcontents%
\chapter{Welcome to \ctshortname}%
\setheader{{\it Welcome}}{}{}{}{}{{\it Welcome}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
Welcome to \ctname, the easy way to configure wxWindows.
Instead of tweaking a setup.h file, or typing a long configure
command, you can now check and uncheck options in a convenient
GUI tool, read the relevant reference document for each
option, and save the setup.h file or configure command file.
\begin{itemize}\itemsep=0pt
\item For release information, please see \helpref{Release Notes}{releasenotes}.
\item For a tour of the main windows in \ctshortname, please see the \helpref{User Interface}{documentui} section.
%\item For a quick tutorial, go straight to \helpref{Getting Started}{gettingstarted}.
\item For tips and troubleshooting, see the \helpref{How To}{howto} section.
\end{itemize}
\chapter{Contacts}%
\setheader{{\it Contacts}}{}{}{}{}{{\it Contacts}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
The \ctname home page is at:
{\tt \cturl}
For help with \ctshortname or to report bugs,
please go to the wxWindows web site.
\section{Credits}
\begin{center}
{\bf (c) 2003 Julian Smart, Anthemion Software}\hrule
{\it Designed by}
{\bf Julian Smart}
{\it Programmed by}
{\bf Julian Smart}
{\it Additional programming by}
{\bf The wxWindows development team}
\end{center}
\chapter{Installation}%
\setheader{{\it Installation}}{}{}{}{}{{\it Installation}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
{\bf On Windows:}
Please run the installation program. This will create a program
folder called \ctname (or other name if you have chosen a different name). This
folder can be accessed via the Start menu under Programs. The
folder contains shortcuts to the program, help file, and Uninstall program.
You can uninstall \ctshortname either by double-clicking the Uninstall \ctshortname icon
in the \ctname group, or by invoking the Windows Control Panel,
double-clicking on Add/Remove Programs, and then choosing the \ctshortname item.
{\bf On Linux:}
Unarchive wxconfigtool-x.xx.tar.gz to a suitable location
in your filesystem. A directory of the form wxconfigtool-x.xx
(where x.xx is the version number) will be created.
Add the location to your PATH and run the application with
'wxconfigtool'. You may wish to set the environment variable
WXCONFIGTOOLDIR so that wxWindows Configuration Tool can find its data files.
For example:
\begin{verbatim}
% cd ~
% tar xvfz wxconfigtool-1.01.tar.gz
% export WXCONFIGTOOLDIR=`pwd`/wxconfigtool-1.01
% export PATH=$PATH:$WXCONFIGTOOLDIR
% wxconfigtool
\end{verbatim}
If you don't want to change your PATH, you could place a
script in a location already on your PATH, such as
/usr/local/bin. For example:
\begin{verbatim}
#!/bin/sh
# Invokes wxWindows Configuration Tool
export WXCONFIGTOOLDIR=/home/mydir/wxconfigtool-1.01
$WXCONFIGTOOLDIR/wxconfigtool $*
\end{verbatim}
{\bf On Mac:}
Download and unarchive the HQX file, and drag the wxWindows Configuration Tool folder to an appropriate location
on your hard disk. Then double-click on the 'wxconfigtool' executable.
\chapter{Release notes}\label{releasenotes}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
For licencing information, please see
the licence files in the installation directory:
\begin{itemize}\itemsep=0pt
\item licendoc.txt
\item gpl.txt
\item lgpl.txt
\item preamble.txt
\end{itemize}
\section{What's New?}\label{whatsnew}
{\bf Version 1.0, June 11th 2003}
\begin{itemize}\itemsep=10pt
\item Initial version.
\end{itemize}
\section{Known issues}\label{knownissues}
The following problems are known to exist:
\begin{itemize}\itemsep=10pt
\item No issues as yet.
\end{itemize}
\section{To Do}\label{todo}
There are many things that could be done to make
this tool more useful, including the following.
\begin{itemize}\itemsep=10pt
\item Allow full platform-specific dependency specification
as mentioned in \helpref{How to specify platform-specific dependencies}{platformdependencies}.
\item Allow \ctshortname to invoke configure and make, with an output
window showing build status.
\item Distinguish between template files and settings file; allow
application of template files to settings files, and vice versa.
\item Implement support for string, integer, float settings.
\item Write a configuration browser.
\item Add description, date and author information to the settings file.
\item Command-line mode with ability to change settings from
the command-line. Just like configure :-)
\item Decide on standard location for settings files.
\item Integrate with new (and old?) build systems.
\item Allow customization of font and colour.
\item Show all calculated dependencies for each config item.
\item Add a search facility.
\end{itemize}
\section{Differences between Windows, Linux and Mac versions}\label{platformdifferences}
Although every effort has been made to make wxWindows Configuration Tool work
the same way on different environments, some small differences
are inevitable.
\begin{itemize}\itemsep=10pt
\item Screenshots illustrate the Windows version; the Linux
and Mac windows and dialogs will be slightly different, but with equivalent
functionality.
\item Dialogs under Windows often have a '?' button on the title
bar, for context-sensitive help. Under Linux, this button is
on the dialog itself, usually near the OK or Close button.
On the Mac, context-sensitive help is not yet supported.
\item Under Linux, online help invoked from the {\bf Help} button
in modal dialogs is itself modal. That is, you have to quit
the help window to return to the dialog. On Windows, you can
switch back to the dialog without quitting the help viewer.
\item On Windows and Linux, context menus are invoked with
right-click. On Mac, use control-click.
\end{itemize}
\chapter{\ctshortname user interface}\label{documentui}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This section describes the main elements of the \ctname user interface.
The \ctshortname main window looks like this:
\begin{center}
\image{}{screen01.png}
\end{center}
\section{Menubar}
%\image{}{menubar.gif}
The \helpref{menubar}{menubarcommands} allows you to perform many functions
such as loading and saving files, creating new configuration items,
undo/redo, invoking help, and so on. Try to remember the keyboard shortcuts that are
displayed next to the menu item labels - they can save you a lot of time
and make your \ctshortname experience more natural and enjoyable.
\section{Main toolbar}
%\image{}{toolbar.gif}
The main toolbar gives quick access to commonly-used commands.
If you hold your mouse pointer over the toolbar buttons, a tooltip pops up with a short description
of the button's function.
You can choose to hide the toolbar altogether
using the {\bf View | Show Toolbar} menu command.
You can find out more about in the \helpref{toolbar commands}{toolbarcommands} topic.
\section{Configuration window}
%\image{}{configwindow.gif}
The biggest area of \ctshortname is taken up by the configuration window.
On the left is a hierarchy of settings that can be customized.
You can check and uncheck most settings, but you will find that
many settings are disabled because they depend on other settings
being enabled (or disabled).
As an end user, you will probably only want to enable or disable
options, but it's possible you may wish to update the structure
of the settings file itself. In which case you can use the
{\bf Edit} menu to add, remove, or rename items; and you can
add custom properties to an item, but this is usually only
useful for a developer of the tool to do.
Undo/Redo can be applied to most editing commands, but (currently) not
enabling and disabling operations.
There are three tabs in the main window: {\bf Properties}, {\bf Setup.h},
and {\bf Configure}. The Properties tab contains the properties
for the selected option. Setup.h shows the setup file,
and there are buttons to allow you to copy the file to the clipboard
and regenerate the file. Similarly, the Configure tab shows
the script that will invoke configure.
The property editor allows you to show detailed information
about the option. A description for each property is shown
when you click on the property. You can also edit property values,
either by clicking and typing, or by double-clicking or clicking
on the {\bf Edit...} button. If a special editor is defined for
the property type, it will be shown.
You can invoke help for the selected option, by clicking
on the question mark toolbar button or the {\bf Help | Configuration Item Help} menu
item. If there is a help topic defined for the option, the
wxWindows reference manual will be opened at that topic.
\begin{comment}
\chapter{Getting started: a step-by-step guide}\label{gettingstarted}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This section will quickly get you up and running with \ctshortname. Click
on \helpref{Step 1}{step1} to start. If you are
using a Mac, please interpret 'left-click' to mean 'click', and
'right-click' to mean 'control-click'.
\section{Step 1: creating a new configuration}\label{step1}
When you run \ctshortname for the first time, you are presented with an
empty configuration window.
Go to \helpref{Step 2}{step2} to learn how to do the next thing.
\section{Step 2: doing something else}\label{step2}
Go to \helpref{Step 3}{step3} to learn how to do a third thing.
\section{Step 3: a third thing}\label{step3}
Go to \helpref{Step 4}{step4} to learn about saving your document and reloading it.
\section{Step 4: saving and loading documents}\label{step4}
You may wish to save a document, so you can come back to it later. Click on {\bf File | Save} or
the \image{}{save.png} toolbar button. The first time you save the file, you will be prompted
for a filename: you can accept the default one provided, or choose another.
To reload the document, click on {\bf File | Open...} or the \image{}{open.gif} toolbar button.
If you are working on another document, you will be prompted to save it first.
Go to \helpref{Step 5: generating configurations}{step5}
\section{Step 5: generating configurations}\label{step5}
Todo.
Go to \helpref{Step 6: where next?}{step6}
\section{Step 6: where next?}\label{step6}
Congratulations! You have learnt how to create, edit, save, and load configuration
files.
To get to know \ctshortname more thoroughly, here are some further things you
can do.
\begin{itemize}
\item Read the \helpref{How To}{howto} section.
\item Use the help facilities: most dialogs have a {\bf Help} button for a general description, and they
also have a {\bf "?"} button for getting information on individual controls on a dialog.
\item Explore the menubar and the menus that appear when you right-click over
the window background and individual cards.
\end{itemize}
\end{comment}
\chapter{Using menubar commands}\label{menubarcommands}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
%\image{}{menubar.gif}
This section describes the menubar commands. Commands
that are not available in the current context are disabled (shown in grey).
\section{File menu}
The File menu shows commands that are mostly related to working
with files.
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf New...} (Ctrl+N)}{Creates a new \ctshortname document.}
\twocolitem{{\bf Open...} (Ctrl+O)}{Opens an existing document.}
\twocolitem{{\bf Close} (Ctrl+W)}{Closes the current document.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Save} (Ctrl+S)}{Saves the current document.}
\twocolitem{{\bf Save As...}}{Saves the current document under a new name.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Save Setup.h...} (Ctrl+H)}{Saves the generated setup.h file in the specified location.}
\twocolitem{{\bf Save Configure Script...} (Ctrl+G)}{Saves the generated script containing a configure command in the specified location.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Exit} (Alt+F4)}{Exits the program.}
\end{twocollist}
\section{Edit menu}
The Edit menu shows commands that are related to editing
document elements.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Undo} (Ctrl+Z)}{Undoes the last undoable action.}
\twocolitem{{\bf Redo} (Ctrl+Y)}{Redoes the last redoable action.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Cut} (Ctrl+T)}{Cuts the selected option and places it on the clipboard.}
\twocolitem{{\bf Copy} (Ctrl+C)}{Copies the selected option.}
\twocolitem{{\bf Paste} (Ctrl+V)}{Pastes an option from the clipboard to the position. Whether the
option is pasted as a child or sibling of the selection is determined by whether
the selection is a folder or not. If you want finer control, right-click on the
item in the tree control and select one of the paste commands.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Add Option}}{Shows a menu for adding one of several option types.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Custom Property}}{Shows a menu for adding, editing or deleting a custom option property.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Delete Option}}{Deletes the selected option.}
\twocolitem{{\bf Rename Option}}{Shows a dialog for renaming the selected option.}
\end{twocollist}
\section{View menu}
The View menu gives you commands related to showing or hiding windows
and various other preferences.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Show Toolbar}}{Shows or hides the toolbar, beneath the menubar.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Settings...} (Ctrl+T)}{Shows the \helpref{Settings Dialog}{settingsdialog}, which
relate to application-wide settings.}
\end{twocollist}
\section{Help menu}
The Help menu gives you commands related to getting help.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Contents}}{Invokes the on-line help, showing the contents page.}
\twocolitem{{\bf wxWindows Help Contents}}{Invokes the on-line wxWindows reference manual, showing the contents page.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf Configuration Option Help} (F1)}{Invokes the on-line wxWindows reference manual at the topic for the selected option (if a topic
is defined).}
\twocolitem{{\bf What's This?}}{Click to get help on a window or configuration option.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf About...}}{Displays a dialog giving a brief description of the program.}
\end{twocollist}
\chapter{Using context menu commands}\label{contextmenucommands}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This section describes the context menu commands available when you right-click.
On the Mac, this is achieved with control-click.
\section{Configuration tree context menu}
This menu is shown when you right-click over the configuration tree window background.
On the Mac, this is achieved with control-click.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Paste before this option}}{Pastes the clipboard option before the clicked-on option.}
\twocolitem{{\bf Paste after this option}}{Pastes the clipboard option after the clicked-on option.}
\twocolitem{{\bf Paste as child of this option}}{Pastes the clipboard option as a child of the clicked-on option,
if it is a group option.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{{\bf C&opy}}{Copies the clicked-on option to the internal clipboard.}
\twocolitem{{\bf Cu&t}}{Copies the clicked-on option to the internal clipboard, and
deletes the option from the tree.}
\end{twocollist}
\chapter{Using toolbar commands}\label{toolbarcommands}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This section describes the toolbar commands.
%\image{}{toolbar.gif}
The toolbar provides quick access to commonly-used
commands.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\image{}{new.png}{\bf New Document}}{Creates a new document.}
\twocolitem{\image{}{open.png}{\bf Open Document}}{Opens an existing document, closing the currently open document.}
\twocolitem{\image{}{save.png}{\bf Save Document}}{Saves the current document.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{\image{}{undo.png}{\bf Undo}}{Undoes the last command.}
\twocolitem{\image{}{redo.png}{\bf Redo}}{Redoes the last command.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{\image{}{copy.png}{\bf Copy}}{Copies the selected option to an internal clipboard.}
\twocolitem{\image{}{cut.png}{\bf Cut}}{Cuts the selected option and copies it to the internal clipboard..}
\twocolitem{\image{}{paste.png}{\bf Paste}}{Pastes the option from the clipboard to the configuration tree.}
\twocolitem{\hrule}{\htmlonly{\hrule}}
\twocolitem{\image{}{help.png}{\bf Help}}{Shows the wxWindows manual topic for the
\twocolitem{\image{}{helpcs.png}{\bf Context Help}}{Shows a context-sensitive help
cursor; click on a window to show brief help about that window.}
selected configuration item.}
\end{twocollist}
\chapter{Using dialogs}\label{dialogs}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
Most dialogs have a {\bf "?"} button on their caption to provide context-sensitive help.
Click on this and then on a control
in a dialog to get quick help on that control. You can also click on the {\bf Help} button
for more detailed help on the dialog.
\section{Settings dialog}\label{settingsdialog}
This dialog has a number of tabs to allow you to
edit different categories of settings that are applicable
to the application as a whole.
\subsection{General settings dialog}\label{generalapplicationsettingsdialog}
The General Settings Dialog allows you to set a variety of \ctshortname options.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Load last document on startup}}{If checked, the last viewed document will
be reloaded when \ctshortname starts up.}
% If the application terminated abnormally, this
%option will be switched off the next time \ctshortname runs in case there was a problem with
%the document file.}
%\twocolitem{{\bf Auto-save document}}{If checked, \ctshortname will regularly
%save the document to a temporary file. If \ctshortname or the operating system
%should terminate abnormally, the next time \ctshortname is run it will
%check for an auto-save file and ask if you wish to open that file.}
%\twocolitem{{\bf Show welcome dialog on startup}}{If checked, the \helpref{Welcome Dialog}{welcomedialog} will
%be shown on startup.}
\twocolitem{{\bf Show tooltips}}{If checked, tooltips will be shown in most dialogs, when you hover
the mouse pointer over a control.}
\end{twocollist}
\subsection{Location settings dialog}\label{locationsettingsdialog}
The Location Settings Dialog allows you to choose various locations.
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxWindows hierarchy}}{This determines where \ctshortname will look
when prompting for filenames.}
\twocolitem{{\bf Use WXWIN environment variable}}{Check this to use
the value of the WXWIN variable instead of the path entered in the text field.}
\end{twocollist}
\chapter{Using keyboard shortcuts}\label{keyboardshortcuts}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
You can make your \ctshortname experience even smoother by
using handy keyboard shortcuts. Note that some shortcuts are
dependent on context: that is, which control has the focus.
\twocolwidtha{3cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf Ctrl + C}}{Copies the selected option to the clipboard.}
\twocolitem{{\bf Ctrl + H}}{Saves the setup.h file.}
\twocolitem{{\bf Ctrl + G}}{Saves the configure script file.}
\twocolitem{{\bf Ctrl + N}}{Creates a new \ctshortname file.}
\twocolitem{{\bf Ctrl + O}}{Opens a \ctshortname file.}
\twocolitem{{\bf Ctrl + S}}{Saves the current \ctshortname document.}
\twocolitem{{\bf Ctrl + T}}{Shows the \helpref{Settings Dialog}{settingsdialog}.}
\twocolitem{{\bf Ctrl + V}}{Pastes the option on the clipboard (if any) to the configuration tree.}
\twocolitem{{\bf Ctrl + W}}{Closes the current \ctshortname document.}
\twocolitem{{\bf Ctrl + X}}{Cuts the selected option and copies it to the clipboard.}
\twocolitem{{\bf Ctrl + Y}}{Redoes the previously undone edit.}
\twocolitem{{\bf Ctrl + Z}}{Undoes the previous edit.}
\twocolitem{{\bf F1}}{Shows the online help for the selected item.}
\twocolitem{{\bf Alt + F4}}{Closes \ctshortname.}
\end{twocollist}
\chapter{Reference}\label{reference}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\section{The dependency evaluation algorithm}
\ctshortname pre-calculates a list of all dependencies
for each option -- this is a kind of reverse-pointer version
of all the dependencies associated with each item. So
if option {\bf a} has a {\bf requires} option specifying
{\bf b}, then {\bf b} will end up with a dependency list
containing {\bf a} and any other options that refer to it.
When the user enables or disables an option ({\bf b}),
the list of dependencies for that option is visited,
and for each mentioned option ({\bf a}), all its dependency information
is evaluated. This may result in the option {\bf a} being
(de)selected and perhaps deactivated (made insensitive).
The results of this change are propagated to dependents of
{\bf a}, recursively, so several options may flip state
as the result of checking the original option.
The parent-child relationship of a check or radio
group and its children is considered to be a virtual
'requires' dependency. Mutual exclusivity is also
taken into account if the option is a radio option
or group. For each radio option, all other mutually
exclusive options need to be listed. See the
{\bf Platform} group for an example of this.
\section{How \ctshortname generates the configure commands}
If the {\bf configure} property isn't empty,
\ctshortname will output the string as a parameter
to configure.
The configure command is taken to be the command to
use if the option is checked. If the option is
unchecked, the 'enable' or 'with' is replaced with
'disable' or 'without'.
TODO: should we distinguish between the case
where a setting is not passed to configure (using
the default), versus the case where it's specified but disabled?
It's probably a good idea to make all the options
explicit, but on the other hand it makes for a very long
command line.
\ctshortname checks for the presence of a
{\bf builtin} custom boolean property and appends 'builtin' or
'sys' to the configure command depending on where
the {\bf builtin} setting is checked or unchecked.
We also allow for passing strings, e.g. for --with-rpath=DIR,
by using the {\bf value} custom string property.
\section{How \ctshortname generates the setup.h file}
The {\bf Platforms} group is ignored. In all other
cases, if the setting is prefixed by wxUSE_...
and it's a boolean setting, \ctshortname will
output 1 or 0 depending on the setting state.
A few settings that don't have the wxUSE_...
convention are also checked for and processed.
\chapter{How To...}\label{howto}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
A variety of topics to help you get the best from \ctshortname.
\section{How to specify dependencies}\label{dependencies}
To ensure consistency throughout the configuration,
\ctshortname allows specification of dependencies, essentially
a list of option names that should be considered in evaluating
whether an option should be enabled or disabled. In addition,
if the option is constrained to always be disabled
or enabled in the current context, then it is greyed out
(deactivated) to prevent the user from changing the state.
There are four kinds of dependencies: requires, precludes,
enabled-if, and enabled-if-not. Each one represents a
relationship between the current option (a) and one
or more named options (b). For the sake of argument
we will consider only one other option, but multiple
options are taken to mean (b1 or b2 or b3 or ...)
Below the allowed combined states of a and b are
listed for each kind of dependency.
1. a {\bf requires} b
For example, wxUSE_DRAG_AND_DROP requires wxUSE_OLE.
\begin{verbatim}
a b
1 1
0 1
0 0
\end{verbatim}
2. a {\bf precludes} b
For example, wxUSE_ODBC precludes wxUSE_UNICODE.
\begin{verbatim}
a b
1 0
0 0
0 1
\end{verbatim}
3. a {\bf enabled-if} b
For example, __WXUNIVERSAL__ enabled-if X11 or MGL
\begin{verbatim}
a b
1 1
1 0
0 0
\end{verbatim}
4. a {\bf enabled-if-not} b
For example, wxUSE_TOOLBAR_SIMPLE enabled-if-not wxUSE_TOOLBAR_NATIVE.
\begin{verbatim}
a b
1 0
0 1
1 1
\end{verbatim}
\section{How to specify platform-specific dependencies}\label{platformdependencies}
You can associate one or more options as part of the
option's {\bf context}. In the case of wxUSE_OLE,
the context contains __WXMSW__, because it's a Windows-specific
option. This is used when calculating dependencies, as
follows. If either option involved in a dependency
relationship is not part of the current context, that
is, none of the options in its {\bf context} property is currently
enabled, then it is ignored in the dependency calculation.
This allows the dependency 'wxUSE_DRAG_AND_DROP requires wxUSE_OLE'
to only be evaluated when __WXMSW__ is enabled.
It doesn't quite cover all bases, however, because
it cannot express that the {\it dependency} itself
is platform specific. You might have a platform-specific
dependency that exists between two options that are
perfectly valid for any platform. For example, we
can't capture the notion that wxUSE_LISTBOX
should be required if wxUSE_COMBOBOX is set,
but only for __WXUNIVERSAL__. We could do it
by complicating the dependency syntax, for example:
wxUSE_COMBOBOX requires wxUSE_LISTBOX:__WXUNIVERSAL__
This means that the dependency should only be
evaluated if __WXUNIVERSAL__ is enabled.
This has not been implemented yet.
\section{How to specify custom properties}\label{customproperties}
You can add custom properties to any option, but
currently only {\bf option} and {\bf value} are
recognised by \ctshortname.
\ctshortname checks for the presence of a
{\bf builtin} boolean custom property and appends 'builtin' or
'sys' to the configure command depending on where
the {\bf builtin} setting is checked or unchecked.
We also allow for passing strings, e.g. for --with-rpath=DIR,
by using the {\bf value} string custom property.
\begin{comment}
\begin{helpglossary}
\gloss{thing}\label{thing}
A glossary entry.
\end{helpglossary}
\end{comment}
\rtfonly{%
\addcontentsline{toc}{chapter}{Index}
\printindex%
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
}
\winhelponly{
\chapter{Popups}\label{popups}
} % WinHelp only
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,41 @@
runTwice = yes
titleFontSize = 12
authorFontSize = 10
chapterFontSize = 12
sectionFontSize = 12
subsectionFontSize = 12
headerRule = yes
footerRule = yes
useHeadingStyles = yes
contentsDepth = 2
listItemIndent=40
winHelpContents = yes
winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
generateHPJ = yes
htmlBrowseButtons = bitmap
winHelpTitle = "wxWindows Configuration Tool"
truncateFilenames = no
htmlIndex = yes
htmlFrameContents = no
;;
;; These two are for generating MS HTML Help project, contents and index files.
;;
htmlWorkshopFiles = true
htmlIndex = true
; Finally, a way to specify face names
htmlFaceName = "Arial, Lucida, Helvetica"
;; For customizing help: make macros empty to disable text for specific
;; versions
\ctfullversiononly [1] {#1}
%\ctfullversiononly [1] {}
\ctgiftversiononly [1] {}
%\ctgiftversiononly [1] {#1}
\ctcustomversiononly [1] {#1}
\ctversion [0] {1.0}
\ctname [0] {wxWindows Configuration Tool}
\ctshortname [0] {Configuration Tool}
\cttitle [0] {\ctname \ctversion}
\cturl [0] {http://www.wxwindows.org}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

View File

@@ -0,0 +1,49 @@
Preamble
========
The licensing of the wxWindows library is intended to protect the wxWindows
library, its developers, and its users, so that the considerable investment
it represents is not abused.
Under the terms of the wxWindows Licence, you as a user are not
obliged to distribute wxWindows source code with your products, if you
distribute these products in binary form. However, you are prevented from
restricting use of the library in source code form, or denying others the
rights to use or distribute wxWindows library source code in the way
intended.
The wxWindows Licence establishes the copyright for the code and related
material, and it gives you legal permission to copy, distribute and/or
modify the library. It also asserts that no warranty is given by the authors
for this or derived code.
The core distribution of the wxWindows library contains files
under two different licences:
- Most files are distributed under the GNU Library General Public
Licence, version 2, with the special exception that you may create and
distribute object code versions built from the source code or modified
versions of it (even if these modified versions include code under a
different licence), and distribute such binaries under your own
terms.
- Most core wxWindows manuals are made available under the "wxWindows
Free Documentation Licence", which allows you to distribute modified
versions of the manuals, such as versions documenting any modifications
made by you in your version of the library. However, you may not restrict
any third party from reincorporating your changes into the original
manuals.
Other relevant files:
- licence.txt: a statement that the wxWindows library is
covered by the GNU Library General Public Licence, with an
exception notice for binary distribution.
- licendoc.txt: the wxWindows Documentation Licence.
- lgpl.txt: the text of the GNU Library General Public Licence.
- gpl.txt: the text of the GNU General Public Licence, which is
referenced by the LGPL.

View File

@@ -0,0 +1,13 @@
Congratulations! You have installed wxWindows Configuration Tool.
Please see the wxWindows web site for support:
http://www.wxwindows.org
Thank you for using wxWindows Configuration Tool, and we hope
you enjoy it!
Julian Smart, wxWindows Team, June 2003

View File

@@ -0,0 +1,69 @@
Welcome to wxWindows Configuration Tool!
=============================================
wxWindows Configuration Tool is a tool for
helping to configure wxWindows.
For further information, please see the manual, and the
following site:
http://www.wxwindows.org
------------------------------------------------------
Installing wxWindows Configuration Tool on Windows
------------------------------------------------------
Run wxconfigtool-x.yz-setup.exe and follow the instructions
to install wxWindows Configuration Tool.
You should find a shortcut on your desktop, and you can
also find it in a group similar to this:
Start -> Program Files -> wxWindows Configuration Tool x.y
------------------------------------------------------
Installing wxWindows Configuration Tool on Unix
------------------------------------------------------
Unarchive wxconfigtool-x.yz.tar.gz to a suitable location
in your filesystem. A directory of the form wxconfigtool-x.yz
(where x.yz is the version number) will be created.
Add the location to your PATH and run the application with
'wxconfigtool'. You may wish to set the environment variable
WXCONFIGTOOLDIR so that wxWindows Configuration Tool can find its data files.
For example:
% cd ~
% tar xvfz wxconfigtool-1.01.tar.gz
% export WXCONFIGTOOLDIR=`pwd`/wxconfigtool-1.01
% export PATH=$PATH:$WXCONFIGTOOLDIR
% wxconfigtool
If you don't want to change your PATH, you could place a
script in a location already on your PATH, such as
/usr/local/bin. For example:
#!/bin/sh
# Invokes wxWindows Configuration Tool
export WXCONFIGTOOLDIR=/home/mydir/wxconfigtool-1.01
$WXCONFIGTOOLDIR/wxconfigtool $*
If you wish to associate the wxWindows Configuration Tool file extension
(pjd) with wxWindows Configuration Tool, you will need to edit your
~/.mailcap file (or create one if it doesn't exist)
and add an entry similar to this:
application/wxconfigtool; wxconfigtool %s
and add this ~/.mime.types:
type=application/wxconfigtool \
desc="wxWindows Configuration Tool Document" \
exts="pjd"
------------------------------------------------------
(c) Julian Smart, June 2003

View File

@@ -0,0 +1,50 @@
TODO
====
Note: some tasks can be done by others
once in CVS.
Essential
=========
- make decent example from setup.h
- allow for string, integer settings
- Settings dialog
- generate setup.h, configure commands
- distinguish between configurations settings
and configuration template files
- configuration browser
- ability to invoke make after configuration
- how about running samples, giving size
information (possibly writing to file)
- command-line mode: could write configure command
to standard output, with optional make invocation
- decide on a standard location for .wxs files in
wxWin hierarchy, so tool can find files automatically.
- makefiles for other systems
- setup and tarball generation
- documentation
Nice-to-have
============
- incorporate makefile/project generator
for independent apps
- possibly evolve it into a central command
centre for wxWindows: invoke other apps such
as poEdit, <favourite dialog editor>, help,
wizards, etc. Upgrade your wxWin version
via the web.

View File

@@ -0,0 +1,37 @@
#!/bin/sh
# Build application and make a tarball.
cd ~/wxconfigtool-build
echo Building wxWindows...
makeapp release wx
rm -f wxconfigtool-build-release/wxconfigtool
if [ "$1" = "clean" ]; then
rm -f wxconfigtool-build-release/*
fi
echo Building Application...
makeapp release all
if [ ! -f wxconfigtool-build-release/wxconfigtool ]; then
echo *** Sorry, wxconfigtool was not built correctly.
exit
fi
echo Making tarball...
makeapp release release
# appver will have been written by the 'release' target.
APPVER=`/tmp/appver`
cd /tmp/wxconfigtool-deliver
APPARCHIVE=wxconfigtool-$APPVER-i386.tar.gz
# echo Copying tarball $APPARCHIVE to ftp site...
# You can use a script to copy this to an ftp site,
# using for example, the 'curl' utility.
# curl ftp://www.mysite.com/$APPARCHIVE --user "myname:mypassword" --upload-file $APPARCHIVE
echo Done building and archiving wxconfigtool.

View File

@@ -0,0 +1,37 @@
; For debug beta only
; Source: c:\winnt\system32\msvcrtd.dll; DestDir: {sys}\; DestName: msvcrtd.dll; CopyMode: onlyifdoesntexist; Flags: uninsneveruninstall
[Tasks]
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
[Icons]
Name: {group}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0
Name: {group}\%APPTITLE% Help; Filename: {app}\%HELPFILE%; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\wxWindows Reference; Filename: {app}\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\%APPTITLE% ReadMe; Filename: {app}\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\%APPTITLE% Licence; Filename: {app}\license.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {userdesktop}\%APPTITLE% %VERSION%; Filename: {app}\%APPNAME%.exe; WorkingDir: {app}; IconFilename: {app}\%APPNAME%.exe; IconIndex: 0; Tasks: desktopicon
[Registry]
; Uncomment the following lines if you'd like to register a data file extension.
; You may need to replace some of the %APPTITLE% occurrences below with a hard-wired
; name if your title contains spaces.
Root: HKCR; SubKey: .%APPEXTENSION%; ValueType: STRING; ValueData: wxConfigToolFile; Flags: uninsdeletevalue
Root: HKCR; SubKey: wxConfigToolFile; ValueType: STRING; ValueData: "%APPTITLE% Document File"; Flags: uninsdeletevalue
Root: HKCR; SubKey: wxConfigToolFile\Shell; ValueType: NONE; Flags: uninsdeletevalue
Root: HKCR; SubKey: wxConfigToolFile\Shell\Open; ValueType: NONE; Flags: uninsdeletevalue
Root: HKCR; SubKey: wxConfigToolFile\Shell\Open\Command; ValueType: STRING; ValueData: "{app}\%APPNAME%.exe ""%1"""; Flags: uninsdeletevalue
Root: HKCR; SubKey: wxConfigToolFile\DefaultIcon; ValueType: STRING; ValueData: {app}\%APPNAME%.exe,0; Flags: uninsdeletevalue
[UninstallDelete]
[InstallDelete]
[Run]
Filename: "{app}\%APPNAME%.exe"; Description: "Launch %APPTITLE%"; Flags: postinstall nowait skipifsilent
[UninstallRun]

View File

@@ -0,0 +1,45 @@
; Inno Setup Script
; Created with ScriptMaker Version 1.3.22
; 14 February 2001 at 10:38
[Setup]
MinVersion=4.0,4.0
AppName=%APPTITLE% %VERSION%
AppId=%APPTITLE%
CreateUninstallRegKey=1
UsePreviousAppDir=1
UsePreviousGroup=1
AppVersion=%VERSION%
AppVerName=%APPTITLE% %VERSION%
AppCopyright=Copyright <20> %COPYRIGHTHOLDER%
BackColor=$800000
BackColor2=$C71F1F
BackColorDirection=toptobottom
WindowShowCaption=1
WindowStartMaximized=1
WindowVisible=1
WindowResizable=1
UninstallLogMode=Append
DirExistsWarning=auto
UninstallFilesDir={app}
DisableDirPage=0
DisableStartupPrompt=1
CreateAppDir=1
DisableProgramGroupPage=0
AlwaysCreateUninstallIcon=1
Uninstallable=1
UninstallIconName=Uninstall %APPTITLE% %VERSION%
UninstallDisplayName=%APPTITLE% %VERSION%
DefaultDirName={pf}\%APPTITLE%
DefaultGroupName=%APPTITLE% %VERSION%
MessagesFile=compiler:default.isl
DiskSpanning=0
DiskSize=1457664
DiskClusterSize=512
ReserveBytes=0
UseSetupLdr=1
LicenseFile=%LICENSEFILE%
InfoAfterFile=%READMEAFTERFILE%
SourceDir=%SOURCEDIR%
OutputDir=%OUTPUTDIR%

View File

@@ -0,0 +1,26 @@
#!/bin/sh
# Build application
# The first argument is debug or release
LEVEL=$1
# Then you can supply one or more makefile targets
TARGET="$2 $3 $4 $5 $6 $6 $7 $8 $9"
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo Usage: makeapp debug/release full/wx/genericapp/cleanall
exit
fi
export APPDIR=$WXWIN/utils/configtool
export WXDIR=$WXWIN
export WXBUILDDIR=wxwin-build-$LEVEL
# If there's no wxwin-build-... directory yet, the makefile
# must include a dummy makeprog.env
export USEDUMMYMAKEPROG="0"
if [ ! -f $WXBUILDDIR/src/makeprog.env ]; then
USEDUMMYMAKEPROG="1"
fi
make -f ${APPDIR}/src/Makefile WXDIR=$WXDIR USEDUMMYMAKEPROG=$USEDUMMYMAKEPROG APPDIR=$APPDIR WXBUILDDIR=$WXBUILDDIR LEVEL=$LEVEL $TARGET

View File

@@ -0,0 +1,132 @@
#! /bin/sh
# Make an Inno Setup distribution list, where files and dirs are represented by
# sections like this:
# [Dirs]
# Name: {app}\backgrounds
#
# [Files]
# Source: C:\program\setup\about.htm; DestDir: {app}\; DestName: about.htm
#
#
# Usage: makeinno.sh sourcedir inno-topfile inno-bottomfile destfile
# For example: makeinno.sh c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
#
PROGNAME=$0
SOURCEDIR=$1
TOPFILE=$2
BOTTOMFILE=$3
INNOFILE=$4
TEMPDIR=/tmp
dochecks()
{
if [ "$SOURCEDIR" = "" ] || [ "$TOPFILE" = "" ] || [ "$BOTTOMFILE" = "" ] || [ "$INNOFILE" = "" ] ; then
usage
fi
if [ ! -d $SOURCEDIR ]; then
echo "Sorry, the source directory $SOURCEDIR does not exist."
usage
fi
if [ ! -f $TOPFILE ]; then
echo "Sorry, the Inno Setup header $TOPFILE does not exist."
usage
fi
if [ ! -f $BOTTOMFILE ]; then
echo "Sorry, the Inno Setup header $BOTTOMFILE does not exist."
usage
fi
if [ ! -d $TEMPDIR ]; then
mkdir $TEMPDIR
fi
}
doreplace()
{
thefile=$1
theexpr=$2
if [ -f $thefile ]; then
sed -e "$theexpr" < $thefile > $thefile.tmp
mv $thefile.tmp $thefile
else
echo "*** $thefile not found."
fi
}
generateinno()
{
# SRCDIR=`cygpath -u $SRCDIR`
# DESTDIR=`cygpath -u $DESTDIR`
# TEMPDIR=`cygpath -u $TEMP`
# Generate a list of all files in the distribution.
# We pass the output through sed in order to remove the preceding "./"
cd $SOURCEDIR
find . -print | sed -e "s/\.\\///g" > $TEMPDIR/files1.tmp
echo "[Dirs]" > $TEMPDIR/files2.tmp
for line in `cat $TEMPDIR/files1.tmp` ; do
# If a directory, add to file
if [ -d $line ] ; then
# The relative path
# TODO: make into DOS filename form
#line2=`cygpath -w $line`
line2=$line
echo " Name: {app}\\"$line2 >> $TEMPDIR/files2.tmp
fi
done
echo "" >> $TEMPDIR/files2.tmp
echo "[Files]" >> $TEMPDIR/files2.tmp
for line in `cat $TEMPDIR/files1.tmp` ; do
# If not a directory, add to file
if [ ! -d $line ] ; then
# The relative path
# TODO: make into DOS filename form
#line2=`cygpath -w $line`
line2=$line
# The absolute path
# TODO: make into DOS filename form
#line1=`cygpath -w $SOURCEDIR`"\\"$line2
line1=$SOURCEDIR"\\"$line2
#pathonly=`find $line -printf "%h"`
pathonly=`dirname $line`
echo " Source: "$line1"; DestDir: {app}\\"$pathonly >> $TEMPDIR/files2.tmp
fi
done
echo "" >> $TEMPDIR/files2.tmp
doreplace $TEMPDIR/files2.tmp "s/\//\\\/g"
# Concatenate the 3 sections
cat $TOPFILE $TEMPDIR/files2.tmp $BOTTOMFILE > $INNOFILE
rm -f $TEMPDIR/files1.tmp
}
usage()
{
echo Usage: $PROGNAME sourcedir inno-topfile inno-bottomfile destfile
echo For example: $PROGNAME c:/project/allfiles c:/project/innotop.txt c:/project/innobott.txt c:/project/project.iss
echo Remember to use paths of the form c:/thing rather than /c/thing.
exit 1
}
dochecks
generateinno

View File

@@ -0,0 +1,267 @@
#!/bin/sh
# Make a distribution of an application.
# If your zip accepts Cygwin-style paths, then
# use cygpath, else substitute echo
CYGPATHPROG=cygpath
#CYGPATHPROG=echo
PROGNAME=$0
SCRIPTDIR=`pwd`
. $SCRIPTDIR/setup.var
# Set this to the required version
VERSION=
doreplace()
{
thefile=$1
theexpr=$2
if [ -f $thefile ]; then
sed -e "$theexpr" < $thefile > $thefile.tmp
mv $thefile.tmp $thefile
else
echo "*** $thefile not found."
fi
}
unix2dosname()
{
echo $1 | sed -e "s/\//\\\\\\\/g" > /tmp/filename.tmp
RETVALUE=`cat /tmp/filename.tmp`
rm -f /tmp/filename.tmp
}
unix2dosname2()
{
echo $1 | sed -e "s/\//\\\\/g" > /tmp/filename.tmp
RETVALUE=`cat /tmp/filename.tmp`
rm -f /tmp/filename.tmp
}
findversion()
{
echo "#include <stdio.h>" > /tmp/appver.c
echo "#include \"$VERSIONSYMBOLFILE\"" >> /tmp/appver.c
echo "int main() { printf(\"%.2f\", $VERSIONSYMBOL); }" >> /tmp/appver.c
gcc /tmp/appver.c -I$APPDIR -o /tmp/appver
VERSION=`/tmp/appver`
rm -f /tmp/appver /tmp/appver.c
}
makesetup()
{
if [ -d $SETUPIMAGEDIR ]; then
echo Removing existing $SETUPIMAGEDIR
rm -f -r $SETUPIMAGEDIR
fi
echo Making the $SETUPIMAGEDIR for preparing the setup
mkdir -p $SETUPIMAGEDIR
if [ -f $READMEFILE ]; then
echo Copying readme.txt
cp $READMEFILE $SETUPIMAGEDIR
else
echo "*** Warning - $READMEFILE not found"
fi
if [ -f $LICENSEFILE ]; then
echo Copying licence.txt
cp $LICENSEFILE $SETUPIMAGEDIR
else
echo "*** Warning - $LICENSEFILE not found"
fi
cp $APPDIR/docs/gpl.txt $SETUPIMAGEDIR
cp $APPDIR/docs/lgpl.txt $SETUPIMAGEDIR
cp $APPDIR/docs/licendoc.txt $SETUPIMAGEDIR
echo Copying sample configuration settings file...
cp $APPDIR/configs/wxwin250.wxs $SETUPIMAGEDIR
if [ "$RESOURCESFILE" != "" ] && [ "$RESOURCESDIR" != "" ]; then
if [ -d $RESOURCESDIR ]; then
cd $RESOURCESDIR
echo Compiling resource file $RESOURCESFILE
zip $SETUPIMAGEDIR/$RESOURCESFILE *
else
echo "*** Warning - $RESOURCESDIR directory not found"
fi
fi
if [ "$MAKEMANUAL" != "0" ]; then
if [ -d $MANUALDIR ]; then
cd $MANUALDIR
make
for EACHFILE in $MANUALFILES ; do
if [ -f $EACHFILE ]; then
echo Copying $EACHFILE
cp $EACHFILE $SETUPIMAGEDIR
else
echo "*** Warning - $EACHFILE not found"
fi
done
else
echo "*** Warning - $MANUALDIR not found"
fi
fi
if [ -f $WXMANUALCHM ]; then
echo Copying wxWindows manual $WXMANUALCHM
cp $WXMANUALCHM $SETUPIMAGEDIR
else
echo "*** Warning - $WXMANUALCHM not found"
fi
if [ -f $APPBINARY ]; then
echo Copying binary $APPBINARY
cp $APPBINARY $SETUPIMAGEDIR
else
echo "*** Error - $APPBINARY not found"
exit 1
fi
if [ "$UPX" != "0" ]; then
echo Compressing binary
upx $SETUPIMAGEDIR/`basename $APPBINARY`
fi
# Time to regenerate the Inno Install script
if [ "$INNO" != "0" ]; then
echo Generating $SETUPSCRIPTNAME
rm -f $SETUPSCRIPTNAME
sh $SCRIPTDIR/makeinno.sh $SETUPIMAGEDIR $INNOTOP $INNOBOTTOM $SETUPSCRIPTNAME
if [ ! -f $SETUPSCRIPTNAME ]; then
echo "*** Error - something went wrong with the script file generation."
exit 1
fi
# Now replace %VERSION% with the real application version, and other
# variables
echo Replacing variables in the setup script
doreplace $SETUPSCRIPTNAME "s/%VERSION%/$VERSION/g"
doreplace $SETUPSCRIPTNAME "s/%COPYRIGHTHOLDER%/$AUTHOR/g"
doreplace $SETUPSCRIPTNAME "s/%VENDOR%/$VENDOR/g"
unix2dosname $READMEFILE
doreplace $SETUPSCRIPTNAME "s;%READMEFILE%;$RETVALUE;g"
unix2dosname $READMEAFTERFILE
doreplace $SETUPSCRIPTNAME "s;%READMEAFTERFILE%;$RETVALUE;g"
unix2dosname $LICENSEFILE
doreplace $SETUPSCRIPTNAME "s;%LICENSEFILE%;$RETVALUE;g"
doreplace $SETUPSCRIPTNAME "s/%APPNAME%/$APPNAME/g"
doreplace $SETUPSCRIPTNAME "s/%APPTITLE%/$APPTITLE/g"
unix2dosname $SETUPIMAGEDIR
doreplace $SETUPSCRIPTNAME "s;%SOURCEDIR%;$RETVALUE;g"
unix2dosname $DESTDIR
doreplace $SETUPSCRIPTNAME "s;%OUTPUTDIR%;$RETVALUE;g"
doreplace $SETUPSCRIPTNAME "s/%APPEXTENSION%/$APPEXTENSION/g"
# FIXME: how do we get the first name in the list?
if [ "$MANUALFILES" != "" ]; then
HELPFILE=`basename $MANUALFILES`
unix2dosname $HELPFILE
doreplace $SETUPSCRIPTNAME "s;%HELPFILE%;$RETVALUE;g"
fi
fi
rm -f $DESTDIR/setup*.*
# Inno Setup complains if this step is not done
unix2dos --unix2dos $SETUPSCRIPTNAME
# Now invoke INNO compiler on the new ISS file
# First, make a DOS filename or Inno Setup will get confused.
unix2dosname2 $SETUPSCRIPTNAME
DOSFILENAME=$RETVALUE
# Note: the double slash is Mingw32/MSYS convention for
# denoting a switch, that must not be converted into
# a path (otherwise /c = c:/)
cd `dirname $SETUPSCRIPTNAME`
BASESCRIPTNAME=`basename $SETUPSCRIPTNAME`
echo Invoking Inno Setup compiler on $BASESCRIPTNAME
"$SETUPCOMPILER" //cc $BASESCRIPTNAME
if [ ! -f $DESTDIR/setup.exe ]; then
echo "*** Error - the setup.exe was not generated."
exit
fi
cd $DESTDIR
mv setup.exe $APPNAME-$VERSION-setup.exe
echo If you saw no warnings or errors, $APPTITLE was successfully spun.
echo
}
# We can't use e.g. this:
# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
# because there's not enough space on the command line, plus we need to ignore the
# blank lines.
# So if we need to (not in this script so far) we do something like this instead:
# expandlines $SRC/setup/files.rsp temp.txt
# zip -@ `$CYGPATHPROG -w $DEST/archive.zip` < temp.txt
expandlines()
{
toexpand=$1
outputfile=$2
rm -f $outputfile
touch $outputfile
for line in `cat $toexpand` ; do
if [ $line != "" ]; then
ls $line >> $outputfile
fi
done
}
usage()
{
echo "Usage: $PROGNAME [ options ]" 1>&2
echo Options:
echo " --help Display this help message"
echo " --upx Compress executable with UPX"
echo " --no-upx Do not compress executable with UPX"
echo " --inno Build the setup.exe"
echo " --no-inno Do not build the setup.exe"
echo.
echo Note that options only override settings in $SCRIPTDIR/setup.var.
exit 1
}
# Process command line options.
for i in "$@"; do
case "$i" in
--inno) INNO=1 ;;
--no-inno) INNO=0 ;;
--upx) UPX=1 ;;
--no-upx) UPX=0 ;;
*)
usage
exit
;;
esac
done
findversion
makesetup

View File

@@ -0,0 +1,135 @@
#!/bin/sh
# Make a distribution of ConfigTool for Linux
# Usage: maketarball.sh wxconfigtool-dir bin-dir deliver-dir version [ options ]
# For example: maketarball.sh ~/wxconfigtool /tmp/build-wxconfigtool /tmp/wxconfigtool-deliver 1.40
APPDIR=$1
SRC=$APPDIR/src
BINARYSRC=$2
DEST=$3
BUILD=0
UPX=0
PROGNAME=$0
# Set this to the required version
VERSION=$4
dotar()
{
rm -f -r $DEST/wxconfigtool*
rm -f $DEST/wxconfigtool-*.*
mkdir -p $DEST/wxconfigtool-$VERSION
mkdir -p $DEST/wxconfigtool-$VERSION/resources
mkdir -p $DEST/wxconfigtool-$VERSION/Sample
cd $DEST/wxconfigtool-$VERSION
# Copy readme files
cp $APPDIR/docs/readme.txt readme.txt
cp $APPDIR/docs/license.txt .
# Copy the application binary
cp $BINARYSRC/wxconfigtool .
# Copy the wxHTML Help manual file
cp $APPDIR/manual/configtool.htb .
# Copy the sample
cp -r $APPDIR/sample Sample
cp $APPDIR/resources/* resources
echo Removing junk from the samples folder...
rm -f -r Sample/CVS
# Copy the resources file
rm -f configtool.bin
zip configtool.bin -j resources/*
rm -f -r resources
# Remove any debug info from wxconfigtool
strip wxconfigtool
# Maybe compress the binary
if [ "$UPX" != "0" ]; then
upx wxconfigtool
fi
cd ..
# Make .tar.gz and .tar.bz2 archives
tar cvf $DEST/wxconfigtool-$VERSION-i386.tar wxconfigtool-$VERSION/*
gzip -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.gz
bzip2 -c $DEST/wxconfigtool-$VERSION-i386.tar > $DEST/wxconfigtool-$VERSION-i386.tar.bz2
}
dobuild()
{
makeapp release full
}
usage()
{
echo Usage: $PROGNAME "cvs-dir bin-dir deliver-dir version-number [ options ]"
echo Options:
echo " --help Display this help message"
echo " --upx Compress executable with UPX"
echo " --build Invoke 'maketarball.sh release full' first"
echo For example: maketarball.sh ~/wxconfigtool /tmp/build-app /tmp/wxconfigtool-deliver 1.20
exit 1
}
# Process command line options.
shift 4
for i in "$@"; do
case "$i" in
--build) BUILD=1 ;;
--upx) UPX=1 ;;
*)
usage
exit
;;
esac
done
if [ ! -d "$DEST" ]; then
mkdir -p $DEST
fi
if [ ! -d "$SRC" ]; then
echo Source directory $SRC not found.
usage
exit 1
fi
if [ ! -d "$BINARYSRC" ]; then
echo Location of wxconfigtool binary $BINARYSRC not found.
usage
exit 1
fi
if [ "$VERSION" = "" ]; then
echo Pass the version number as the fourth argument.
usage
exit 1
fi
echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and wxconfigtool binary in $BINARYSRC.
#echo Press return to continue.
#read dummy
# Remove all existing files
if [ ! -d "$DEST/wxconfigtool" ]; then
rm -f -r $DEST/wxconfigtool
fi
# Skip INNO setup if INNO is 0.
if [ "$BUILD" = "1" ]; then
dobuild
fi
dotar
echo ConfigTool archived.

View File

@@ -0,0 +1,144 @@
### List of variables for the purposes of generating an application's
### setup.exe
#-------------------------------------------------------------------------
# The application name
#-------------------------------------------------------------------------
APPNAME=wxconfigtool
#-------------------------------------------------------------------------
# The application title
#-------------------------------------------------------------------------
APPTITLE="wxWindows Configuration Tool"
#-------------------------------------------------------------------------
# The application author (copyright holder)
#-------------------------------------------------------------------------
AUTHOR="Julian Smart"
#-------------------------------------------------------------------------
# The application vendor (organisation)
#-------------------------------------------------------------------------
VENDOR="Anthemion Software"
#-------------------------------------------------------------------------
# The application data file extension
#-------------------------------------------------------------------------
APPEXTENSION=wxs
#-------------------------------------------------------------------------
# The symbol to use when querying for the version number
#-------------------------------------------------------------------------
VERSIONSYMBOL=ctVERSION_NUMBER
#-------------------------------------------------------------------------
# The top-level directory of the application source tree
#-------------------------------------------------------------------------
APPDIR=c:/wx2dev/wxWindows/utils/configtool
#-------------------------------------------------------------------------
# The destination directory of the setup
#-------------------------------------------------------------------------
DESTDIR=$APPDIR/deliver
#-------------------------------------------------------------------------
# The temporary image directory to use when preparing the setup
#-------------------------------------------------------------------------
SETUPIMAGEDIR=$APPDIR/deliver/image
#-------------------------------------------------------------------------
# The name of the file with $VERSIONSYMBOL in it
#-------------------------------------------------------------------------
VERSIONSYMBOLFILE=$APPDIR/src/symbols.h
#-------------------------------------------------------------------------
# The locations of the project's Inno Setup header and footer files
#-------------------------------------------------------------------------
INNOTOP=$APPDIR/scripts/innotop.txt
INNOBOTTOM=$APPDIR/scripts/innobott.txt
#-------------------------------------------------------------------------
# The location of the generated setup script
#-------------------------------------------------------------------------
SETUPSCRIPTNAME=$DESTDIR/$APPNAME.iss
#-------------------------------------------------------------------------
# The locations of the readme and license files
#-------------------------------------------------------------------------
READMEFILE=$APPDIR/docs/readme.txt
READMEAFTERFILE=$APPDIR/docs/readme-after.txt
LICENSEFILE=$APPDIR/docs/licence.txt
#-------------------------------------------------------------------------
# The binary to include in the setup
#-------------------------------------------------------------------------
APPBINARY=$APPDIR/src/ReleaseStable/$APPNAME.exe
#-------------------------------------------------------------------------
# The location of the setup compiler
#-------------------------------------------------------------------------
SETUPCOMPILER="c:/Program Files/Inno Setup 2/compil32.exe"
#-------------------------------------------------------------------------
# Whether we will compress the binary (0 or 1).
# Use --upx or --no-upx to override this default value.
#-------------------------------------------------------------------------
UPX=0
#-------------------------------------------------------------------------
# Whether we will make a manual (0 or 1)
# Use --make-manual or --no-make-manual to override this default value.
#-------------------------------------------------------------------------
MAKEMANUAL=1
#-------------------------------------------------------------------------
# The manual filename(s)
#-------------------------------------------------------------------------
MANUALFILES="$APPDIR/docs/manual/configtool.chm $APPDIR/docs/manual/configtool.htb"
WXMANUALCHM="$APPDIR/../../docs/htmlhelp/wx.chm"
WXMANUALHTB="$APPDIR/../../docs/htb/wx.htb"
#-------------------------------------------------------------------------
# The directory containing the manual source. We assume
# that there is a Makefile in this directory for making the
# manual.
#-------------------------------------------------------------------------
MANUALDIR=$APPDIR/docs/manual
#-------------------------------------------------------------------------
# The resources file to compile, if any (e.g. myapp.bin).
# This is just a zip containing files to be used by the
# application, usually stored in src/resources.
#
# If this is left empty, no resources will be compiled.
#-------------------------------------------------------------------------
#RESOURCESFILE=${APPNAME}.bin
#-------------------------------------------------------------------------
# The directory containing the resources.
#
# If this is left empty, no resources will be compiled.
#-------------------------------------------------------------------------
RESOURCESDIR=$APPDIR/src/resources

View File

@@ -0,0 +1,219 @@
#
# File: Makefile for wxconfigtool
# Author: Julian Smart
# Created: 2002.05.12
# Updated:
# Copyright: (c) Julian Smart
#
# To make absolutely everything:
#
# % mkdir /tmp/wxconfigtool-build
# % cd /tmp/wxconfigtool-build
# % make -f $(APPDIR)/src/Makefile WXDIR=$(WXDIR) WXBUILDDIR=$(WXBUILDDIR) APPDIR=$(APPDIR) LEVEL=debug full
#
# To make just ConfigTool:
#
# % make ... LEVEL=debug wxconfigtool
#
# To make wxWindows library:
#
# % make ... LEVEL=debug wx
#
# The result will be subdirectories under your /tmp/wxconfigtool-build (or other specified
# directory) containing:
#
# wxconfigtool-build-debug/
# wxwin-build-debug/
#
# To make a release version, specify LEVEL=release instead of LEVEL=debug.
#
# Current (build) directory
CURRDIR = $(shell pwd)
BUILDDIR=$(CURRDIR)
top_srcdir = $(WXDIR)
top_builddir = $(WXBUILDDIR)
program_dir =
# If we don't specify a location for wxWindows to be
# built, use a default.
ifeq "$(top_builddir)" ""
topbuilddir = $(CURRDIR)/wxwin-build-$(LEVEL)
WXBUILDDIR=$(top_builddir)
endif
# ConfigTool build directory
APPBUILDDIR=$(BUILDDIR)/wxconfigtool-build-$(LEVEL)
# StartingBlocks source hierarchy
# You have to specify this when invoking make.
APPDIR=You_should_override_the_APPDIR_variable
# ConfigTool source directory
APPSRCDIR=$(APPDIR)/src
# ConfigTool include directory
APPINCDIR=$(APPDIR)/src
# Extra includes
APPEXTRADEFS= \
-I$(WXDIR)/contrib/include \
-I$(APPSRCDIR) \
# -I$(UTILSDIR) \
WXVERSION=2.4
# Use the small C++ support library
APPEXTRALIBS=-lsupc++ ${top_builddir}/lib/libwx_$(WXTOOLKIT)$(WXDEBUGSUFFIX)_xrc-$(WXVERSION).a
PLATFORM_OS=$(shell echo $(OS))
ifeq "$(PLATFORM_OS)" "Windows_NT"
ARCHITECTURE="i686"
WXTOOLKIT=msw
else
ARCHITECTURE=$(shell arch)
ifeq "$(ARCHITECTURE)" "i686"
WXTOOLKIT=gtk
else
WXTOOLKIT=mac
endif
endif
#printit:
# @echo $(PLATFORM_OS)
ifeq "$(LEVEL)" "debug"
WXDEBUGSUFFIX=d
else
WXDEBUGSUFFIX=
endif
# Where to find the wx-config file
WXCONFIG=$(WXBUILDDIR)/wx-config $(WXCONFIGFLAGS)
ifeq "$(LEVEL)" "debug"
WXDEBUGFLAGS=--enable-debug --enable-debug_gdb --enable-debug_cntxt
endif
PROGRAM=$(APPBUILDDIR)/wxconfigtool
OBJECTS = \
$(APPBUILDDIR)/appsettings.o \
$(APPBUILDDIR)/configitem.o \
$(APPBUILDDIR)/configitemselector.o \
$(APPBUILDDIR)/configtooldoc.o \
$(APPBUILDDIR)/configtoolview.o \
$(APPBUILDDIR)/configtree.o \
$(APPBUILDDIR)/custompropertydialog.o \
$(APPBUILDDIR)/htmlparser.o \
$(APPBUILDDIR)/mainframe.o \
$(APPBUILDDIR)/propeditor.o \
$(APPBUILDDIR)/property.o \
$(APPBUILDDIR)/settingsdialog.o \
$(APPBUILDDIR)/utils.o \
$(APPBUILDDIR)/wxconfigtool.o
DEPFILES=$(PROGRAM).d
ifeq "$(USEDUMMYMAKEPROG)" "1"
include $(APPSRCDIR)/makeprog.env
else
include $(top_builddir)/src/makeprog.env
endif
CC=gcc
CXX=gcc
mkbuilddir:
mkdir -p $(APPBUILDDIR)
full: wx all
# --with-libpng=builtin --with-zlib=builtin --with-libjpeg=builtin
wx:
@mkdir -p $(WXBUILDDIR) ; \
cd $(WXBUILDDIR) ; \
if test ! -f Makefile ; then rm -f *.o *.d ; \
rm -f *.cache ; \
$(WXDIR)/configure --disable-shared --enable-gui --enable-log $(WXDEBUGFLAGS) --with-threads --disable-no_rtti --without-sockets --without-odbc --with-libjpeg --with-libpng=builtin --with-zlib=builtin --enable-wave ; \
fi; \
make; cd contrib/src/xrc; make
cleanapp: clean
cleanwx:
rm -f -r $(WXBUILDDIR)
cleanall: cleanapp cleanwx
wxconfigtool: mkbuilddir all
# Making a binary, RH Linux tarball release using the setup script.
# It will put the result in /tmp/wxconfigtool-deliver.
release:
echo "#include <stdio.h>" > /tmp/appver.c
echo "#include \"symbols.h\"" >> /tmp/appver.c
echo "int main() { printf(\"%.2f\", ctVERSION_NUMBER); }" >> /tmp/appver.c
cc /tmp/appver.c -I$(APPSRCDIR) -o /tmp/appver
chmod a+x $(APPSRCDIR)/../scripts/maketarball.sh
$(APPSRCDIR)/../scripts/maketarball.sh $(APPDIR) $(APPBUILDDIR) /tmp/wxconfigtool-deliver `/tmp/appver` # --upx
echo The release is in /tmp/wxconfigtool-deliver.
# rm -f /tmp/appver /tmp/appver.c
# Gives a list of targets
help:
@echo "Targets: full, wxconfigtool, wx, cleanall, clean, cleanwx, release"
### File dependencies
# Main app files
$(APPBUILDDIR)/wxconfigtool.o: $(APPSRCDIR)/wxconfigtool.cpp $(APPINCDIR)/wxconfigtool.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/appsettings.o: $(APPSRCDIR)/appsettings.cpp $(APPSRCDIR)/appsettings.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/configitem.o: $(APPSRCDIR)/configitem.cpp $(APPSRCDIR)/configitem.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/configitemselector.o: $(APPSRCDIR)/configitemselector.cpp $(APPSRCDIR)/configitemselector.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/configtooldoc.o: $(APPSRCDIR)/configtooldoc.cpp $(APPSRCDIR)/configtooldoc.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/configtoolview.o: $(APPSRCDIR)/configtoolview.cpp $(APPSRCDIR)/configtoolview.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/configtree.o: $(APPSRCDIR)/configtree.cpp $(APPSRCDIR)/configtree.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/custompropertydialog.o: $(APPSRCDIR)/custompropertydialog.cpp $(APPSRCDIR)/custompropertydialog.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/htmlparser.o: $(APPSRCDIR)/htmlparser.cpp $(APPSRCDIR)/htmlparser.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/mainframe.o: $(APPSRCDIR)/mainframe.cpp $(APPINCDIR)/mainframe.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/propeditor.o: $(APPSRCDIR)/propeditor.cpp $(APPINCDIR)/propeditor.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/property.o: $(APPSRCDIR)/property.cpp $(APPINCDIR)/property.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/settingsdialog.o: $(APPSRCDIR)/settingsdialog.cpp $(APPINCDIR)/settingsdialog.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/utils.o: $(APPSRCDIR)/utils.cpp $(APPINCDIR)/imagewindow.h $(APPSRCDIR)/symbols.h
$(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $<
$(APPBUILDDIR)/wxconfigtool_resources.o: $(APPSRCDIR)/wxconfigtool.rc
$(RESCOMP) -i $< -o $@ $(RESFLAGS) --include-dir $(APPSRCDIR)

View File

@@ -0,0 +1,28 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 2003
# Updated:
# Copyright: (c) 2003 Julian Smart
#
# "%W% %G%"
#
# Makefile for wxWindows Configuration Tool (Unix)
top_srcdir = @top_srcdir@/..
top_builddir = ../../..
program_dir = utils/configtool/src
PROGRAM=wxconfigtool
OBJECTS = wxconfigtool.o appsettings.o configitem.o configitemselector.o configtooldoc.o \
configtoolview.o configtree.o custompropertydialog.o htmlparser.o mainframe.o \
propeditor.o property.o settingsdialog.o utils.o
DEPFILES=wxconfigtool.d appsettings.d configitem.d configitemselector.d configtooldoc.d \
configtoolview.d configtree.d custompropertydialog.d htmlparser.d mainframe.d \
propeditor.d property.d settingsdialog.o utils.d
include ../../../src/makeprog.env
-include $(DEPFILES)

View File

@@ -0,0 +1,272 @@
/////////////////////////////////////////////////////////////////////////////
// Name: appsettings.cpp
// Purpose: Implements settings-related functionality
// Author: Julian Smart
// Modified by:
// Created: 2002-09-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation appsettings.h
#endif
#include "wx/wx.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/wfstream.h"
#include "wx/datstrm.h"
#include "wx/config.h"
#include "wx/fileconf.h"
#include "wx/dir.h"
#include "wx/valgen.h"
#include "wx/colordlg.h"
#include "wx/wxhtml.h"
#include "wx/effects.h"
#include "wx/spinctrl.h"
#include "wx/tooltip.h"
#include "utils.h"
#include "wxconfigtool.h"
#include "appsettings.h"
#include "mainframe.h"
#include "symbols.h"
#include "settingsdialog.h"
/*
* User-changeable settings
*/
IMPLEMENT_DYNAMIC_CLASS(ctSettings, wxObject)
ctSettings::ctSettings()
{
m_noUses = 0;
m_showToolBar = TRUE;
m_showWelcomeDialog = TRUE;
m_exportDir = wxEmptyString;
m_frameSize = wxRect(10, 10, 600, 500);
// m_backgroundColour = wxColour(140, 172, 179); // blue-grey
m_editWindowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
m_appName = wxT("wxWindows Configuration Tool");
m_appNameShort = wxT("Configuration Tool");
m_showSplashScreen = FALSE;
m_userName = wxEmptyString;
m_frameStatus = ctSHOW_STATUS_NORMAL;
m_loadLastDocument = TRUE;
m_firstTimeRun = TRUE;
m_smallToolbar = TRUE;
m_mainSashSize = 200;
m_useToolTips = TRUE;
m_showTrayIcon = TRUE;
m_trayIconIsShown = FALSE;
m_useEnvironmentVariable = TRUE;
m_frameworkDir = wxEmptyString;
}
// Copy constructor
ctSettings::ctSettings(const ctSettings& settings)
{
Copy(settings);
}
ctSettings::~ctSettings()
{
}
void ctSettings::operator = (const ctSettings& settings)
{
Copy(settings);
}
void ctSettings::Copy (const ctSettings& settings)
{
m_currentDocumentDir = settings.m_currentDocumentDir;
m_lastDocument = settings.m_lastDocument;
m_showToolBar = settings.m_showToolBar;
m_frameSize = settings.m_frameSize;
m_editWindowFont = settings.m_editWindowFont;
m_showSplashScreen = settings.m_showSplashScreen;
m_userName = settings.m_userName;
m_loadLastDocument = settings.m_loadLastDocument;
m_exportDir = settings.m_exportDir;
m_firstTimeRun = settings.m_firstTimeRun;
m_noUses = settings.m_noUses;
m_smallToolbar = settings.m_smallToolbar;
m_useToolTips = settings.m_useToolTips;
m_showWelcomeDialog = settings.m_showWelcomeDialog;
m_mainSashSize = settings.m_mainSashSize;
m_showTrayIcon = settings.m_showTrayIcon;
m_trayIconIsShown = settings.m_trayIconIsShown;
m_useEnvironmentVariable = settings.m_useEnvironmentVariable;
m_frameworkDir = settings.m_frameworkDir;
}
// Do some initialisation within stApp::OnInit
bool ctSettings::Init()
{
m_currentDocumentDir = wxEmptyString;
if (m_userName.IsEmpty())
m_userName = wxGetUserName();
return TRUE;
}
// Create new filename
wxString ctSettings::GenerateFilename(const wxString& rootName)
{
wxString path;
if (!m_lastFilename.IsEmpty())
path = wxPathOnly(m_lastFilename);
else
path = wxGetApp().GetAppDir();
wxString filename(path);
if (filename.Last() != wxFILE_SEP_PATH )
filename += wxFILE_SEP_PATH;
filename += rootName;
wxString fullFilename = filename + wxT(".wxs");
int i = 0;
wxString postfixStr;
while (wxFileExists(fullFilename))
{
i ++;
postfixStr.Printf("%d", i);
fullFilename = filename + postfixStr + wxT(".wxs");
}
m_lastFilename = fullFilename;
return fullFilename;
}
// Load config info
bool ctSettings::LoadConfig()
{
wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWindows"));
config.Read(wxT("Files/LastFile"), & m_lastFilename);
config.Read(wxT("Files/DocumentDir"), & m_currentDocumentDir);
config.Read(wxT("Files/ExportDir"), & m_exportDir);
config.Read(wxT("Files/FrameworkDir"), & m_frameworkDir);
config.Read(wxT("Files/UseEnvironmentVariable"), (bool*) & m_useEnvironmentVariable);
config.Read(wxT("Misc/UserName"), & m_userName);
config.Read(wxT("Misc/FrameStatus"), & m_frameStatus);
config.Read(wxT("Misc/ShowToolTips"), (bool*) & m_useToolTips);
config.Read(wxT("Misc/LastDocument"), & m_lastDocument);
config.Read(wxT("Misc/LoadLastDocument"), (bool*) & m_loadLastDocument);
config.Read(wxT("Misc/ShowWelcomeDialog"), (bool*) & m_showWelcomeDialog);
config.Read(wxT("Misc/Ran"), & m_noUses);
config.Read(wxT("Misc/ShowTrayIcon"), (bool*) & m_showTrayIcon);
m_noUses ++;
config.Read(wxT("Windows/ShowToolBar"), (bool*) & m_showToolBar);
m_firstTimeRun = !(config.Read(wxT("Windows/WindowX"), & m_frameSize.x));
config.Read(wxT("Windows/WindowY"), & m_frameSize.y);
config.Read(wxT("Windows/WindowWidth"), & m_frameSize.width);
config.Read(wxT("Windows/WindowHeight"), & m_frameSize.height);
config.Read(wxT("Windows/ShowSplashScreen"), (bool*) & m_showSplashScreen);
config.Read(wxT("Windows/SmallToolbar"), (bool*) & m_smallToolbar);
config.Read(wxT("Windows/MainSashSize"), & m_mainSashSize);
wxString fontSpec;
fontSpec = wxEmptyString;
config.Read(wxT("Style/EditWindowFont"), & fontSpec);
if (!fontSpec.IsEmpty())
m_editWindowFont = apStringToFont(fontSpec);
// Crash-resistance
int runningProgram = 0;
config.Read(wxT("Misc/RunningProgram"), & runningProgram);
#ifndef __WXDEBUG__
// runningProgram should be zero if all is well. If 1,
// it crashed during a run, so we should disable the auto-load
// facility just in case it's trying to load a damaged file.
if (runningProgram != 0)
{
m_loadLastDocument = FALSE;
}
#endif
config.Write(wxT("Misc/RunningProgram"), (long) 1);
return TRUE;
}
// Save config info
bool ctSettings::SaveConfig()
{
wxConfig config(wxGetApp().GetSettings().GetAppName(), wxT("wxWindows"));
config.Write(wxT("Files/LastFile"), m_lastFilename);
config.Write(wxT("Files/DocumentDir"), m_currentDocumentDir);
config.Write(wxT("Files/ExportDir"), m_exportDir);
config.Write(wxT("Files/FrameworkDir"), m_frameworkDir);
config.Write(wxT("Files/UseEnvironmentVariable"), m_useEnvironmentVariable);
config.Write(wxT("Misc/UserName"), m_userName);
config.Write(wxT("Misc/FrameStatus"), (long) m_frameStatus);
config.Write(wxT("Misc/ShowToolTips"), m_useToolTips);
config.Write(wxT("Misc/LastDocument"), m_lastDocument);
config.Write(wxT("Misc/LoadLastDocument"), (long) m_loadLastDocument);
config.Write(wxT("Misc/ShowWelcomeDialog"), (long) m_showWelcomeDialog);
config.Write(wxT("Misc/Ran"), m_noUses);
config.Write(wxT("Misc/ShowTrayIcon"), (long) m_showTrayIcon);
config.Write(wxT("Windows/ShowToolBar"), m_showToolBar);
config.Write(wxT("Windows/WindowX"), (long) m_frameSize.x);
config.Write(wxT("Windows/WindowY"), (long) m_frameSize.y);
config.Write(wxT("Windows/WindowWidth"), (long) m_frameSize.width);
config.Write(wxT("Windows/WindowHeight"), (long) m_frameSize.height);
config.Write(wxT("Windows/ShowSplashScreen"), m_showSplashScreen);
config.Write(wxT("Windows/SmallToolbar"), (long) m_smallToolbar);
config.Write(wxT("Windows/MainSashSize"), (long) m_mainSashSize);
/*
wxString backgroundColour(apColourToHexString(m_backgroundColour));
config.Write(wxT("Style/BackgroundColour"), backgroundColour);
*/
config.Write(wxT("Style/EditWindowFont"), apFontToString(m_editWindowFont));
// Indicate that we're no longer running, so we know if the program
// crashed last time around.
config.Write(wxT("Misc/RunningProgram"), (long) 0);
{
config.SetPath(wxT("FileHistory/"));
wxGetApp().GetDocManager()->FileHistorySave(config);
}
return TRUE;
}
void ctSettings::ShowSettingsDialog(const wxString& page)
{
ctSettingsDialog* dialog = new ctSettingsDialog(wxGetApp().GetTopWindow());
// if (!page.IsEmpty())
// dialog->GetNotebook()->SetSelection(apFindNotebookPage(dialog->GetNotebook(), page));
/* int ret = */ dialog->ShowModal();
dialog->Destroy();
}

View File

@@ -0,0 +1,124 @@
/////////////////////////////////////////////////////////////////////////////
// Name: appsettings.h
// Purpose: Settings-related classes
// Author: Julian Smart
// Modified by:
// Created: 2002-09-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _AP_APPSETTINGS_H_
#define _AP_APPSETTINGS_H_
#ifdef __GNUG__
#pragma interface appsettings.cpp
#endif
#include "wx/notebook.h"
#include "wx/dialog.h"
#include "wx/datetime.h"
#include "wx/wave.h"
#include "wxconfigtool.h"
// Frame status
#define ctSHOW_STATUS_NORMAL 0x01
#define ctSHOW_STATUS_MINIMIZED 0x02
#define ctSHOW_STATUS_MAXIMIZED 0x03
/*!
* \brief ctSettings holds all the settings that can be altered
* by the user (and probably some that can't).
*/
class ctSettings: public wxObject
{
DECLARE_DYNAMIC_CLASS(ctSettings)
public:
/// Default constructor.
ctSettings();
/// Copy constructor.
ctSettings(const ctSettings& settings);
/// Destructor.
~ctSettings();
// Operations
/// Assignment operator.
void operator = (const ctSettings& settings);
/// Copy function.
void Copy (const ctSettings& settings);
/// Loads configuration information from the registry or a file.
bool LoadConfig();
/// Saves configuration information to the registry or a file.
bool SaveConfig();
/// Initialisation before LoadConfig is called.
bool Init();
/// Shows the settings dialog.
void ShowSettingsDialog(const wxString& page = wxEmptyString);
/// Generates a new document filename.
wxString GenerateFilename(const wxString& rootName);
// Accessors
/// Returns the long application name. This name is used
/// for the registry key and main frame titlebar.
wxString GetAppName() const { return m_appName; }
/// Returns the short application name.
wxString GetShortAppName() const { return m_appNameShort; }
/// Gets the name of the last filename to be loaded.
/// May not be needed in this application.
wxString& GetLastFilename() { return m_lastFilename; }
/// Returns TRUE if this is the first time the application
/// has been run.
bool GetFirstTimeRun() const { return m_firstTimeRun; }
public:
wxString m_currentDocumentDir; // Not yet used
wxString m_lastDocument; // Last document
bool m_showToolBar;
bool m_smallToolbar;
wxRect m_frameSize;
// wxColour m_backgroundColour; // background colour
wxFont m_editWindowFont;
int m_noUses; // Number of times the app was invoked
wxString m_appName; // The current name of the app...
wxString m_appNameShort; // The short name of the app...
bool m_showSplashScreen; // Show the splash screen
wxString m_userName;
wxString m_lastFilename; // So we can auto-generate sensible filenames
bool m_loadLastDocument;
bool m_useToolTips; // Use tooltips on dialogs
int m_frameStatus;
wxString m_exportDir; // Where files are exported to
wxString m_frameworkDir; // Where the wxWin hierarchy is
bool m_useEnvironmentVariable; // Use WXWIN
/// This isn't explicitly held in the registry
/// but deduced from whether there are values there
bool m_firstTimeRun;
bool m_showWelcomeDialog; // Show opening helpful dialog
int m_mainSashSize;
bool m_showTrayIcon;
bool m_trayIconIsShown;
};
#endif
// _AP_APPSETTINGS_H_

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * checked_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" ............ ",
" .XXXXXXXXXXo ",
" .X o ",
" .X X o ",
" .X XX o ",
" .X X XXX o ",
" .X XX XXX o ",
" .X XXXXX o ",
" .X XXX o ",
" .X X o ",
" .X o ",
" .ooooooooooo ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * checked_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" ............ ",
" .XXXXXXXXXXo ",
" .Xoooooooooo ",
" .Xooooooo.oo ",
" .Xoooooo..oo ",
" .Xo.ooo...oo ",
" .Xo..o...ooo ",
" .Xo.....oooo ",
" .Xoo...ooooo ",
" .Xooo.oooooo ",
" .Xoooooooooo ",
" .ooooooooooo ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *checkedfolder_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c #FFFF00",
"o c #C0C0C0",
"O c #FFFFFF",
"+ c #000000",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoXoXoXo+oX.+",
" .OoXoXoXo++Xo.+",
" .OXo+oXo+++oX.+",
" .OoX++o+++oXo.+",
" .OXo+++++oXoX.+",
" .OoXo+++oXoXo.+",
" .OXoXo+oXoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *checkedfolder_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c #C0C0C0",
"o c #000000",
" ",
" ..... ",
" .XXXXX. ",
".XXXXXXX...... ",
".XXXXXXXXXXXX.o ",
".XXXXXXXXX.XX.o ",
".XXXXXXXX..XX.o ",
".XXX.XXX...XX.o ",
".XXX..X...XXX.o ",
".XXX.....XXXX.o ",
".XXXX...XXXXX.o ",
".XXXXX.XXXXXX.o ",
"..............o ",
" oooooooooooooo ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char * closedfolder_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c Yellow",
"o c #c0c0c0",
"O c Gray100",
"+ c Black",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *closedfolder_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c #C0C0C0",
"o c #000000",
" ",
" ..... ",
" .XXXXX. ",
" .XXXXXXX...... ",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" ..............o",
" oooooooooooooo",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *copy_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
". c Black",
"X c Gray100",
"o c #000080",
/* pixels */
" ",
" ...... ",
" .XXXX.. ",
" .XXXX.X. ",
" .X..X.oooooo ",
" .XXXXXoXXXXoo ",
" .X....oXXXXoXo ",
" .XXXXXoX..Xoooo",
" .X....oXXXXXXXo",
" .XXXXXoX.....Xo",
" ......oXXXXXXXo",
" oX.....Xo",
" oXXXXXXXo",
" ooooooooo",
" "
};

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *cut_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
". c Black",
"X c #000080",
/* pixels */
" ",
" . . ",
" . . ",
" . . ",
" .. .. ",
" . . ",
" ... ",
" . ",
" X.X ",
" X XXX ",
" XXX X X ",
" X X X X ",
" X X X X ",
" X X XX ",
" XX "
};

View File

@@ -0,0 +1,21 @@
/* XPM */
static char *ellipsis_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. .. .. ",
" .. .. .. ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char * folder1_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c Yellow",
"o c None",
"O c Gray100",
"+ c Black",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" .OoXoXoXoXoXo.+",
" .OXoXoXoXoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *help_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
". c Black",
"X c #008080",
/* pixels */
" ",
" ...... ",
" .XXXXX.. ",
" .XX...XX.. ",
" .X.. .X.. ",
" .X.. .XX.. ",
" .. .XX.. ",
" .XX.. ",
" .X.. ",
" .X.. ",
" .X.. ",
" .. ",
" .XX.. ",
" .XX.. ",
" ... "
};

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *helpcs_xpm[] = {
/* width height num_colors chars_per_pixel */
" 16 15 2 1",
/* colors */
". c #000000",
"# c None",
/* pixels */
"################",
".########.....##",
"..######..###..#",
"...####..####...",
"....###..####...",
".....###..###..#",
"......######..##",
".......####..###",
"........##..####",
".....#####..####",
"..#..###########",
".###..####...###",
"####..####...###",
"#####..#########",
"#####..#########"
};

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *new_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
/* pixels */
" ",
" ........ ",
" .XXXXXX.. ",
" .XXXXXX.X. ",
" .XXXXXX.... ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" ........... ",
" "
};

View File

@@ -0,0 +1,26 @@
/* XPM */
static char *open_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c None",
". c Black",
"X c Yellow",
"o c Gray100",
"O c #bfbf00",
/* pixels */
" ",
" ... ",
" . . .",
" ..",
" ... ...",
" .XoX....... ",
" .oXoXoXoXo. ",
" .XoXoXoXoX. ",
" .oXoX..........",
" .XoX.OOOOOOOOO.",
" .oo.OOOOOOOOO. ",
" .X.OOOOOOOOO. ",
" ..OOOOOOOOO. ",
" ........... ",
" "
};

View File

@@ -0,0 +1,27 @@
/* XPM */
static char *paste_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 6 1",
" c None",
". c Black",
"X c Yellow",
"o c #808080",
"O c #000080",
"+ c Gray100",
/* pixels */
" ",
" .... ",
" .....XX..... ",
".ooo.X..X.ooo. ",
".oo. .oo. ",
".oo........oo. ",
".oooooooooooo. ",
".oooooOOOOOOO. ",
".oooooO+++++OO ",
".oooooO+++++O+O ",
".oooooO+OOO+OOO ",
".oooooO+++++++O ",
".oooooO+OOOOO+O ",
" .....O+++++++O ",
" OOOOOOOOO "
};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *radiofolderoff_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c #FFFF00",
"o c #C0C0C0",
"O c #FFFFFF",
"+ c #000000",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoX...XoXoX.+",
" .OoX.OOO.XoXo.+",
" .OX.OOOOO.XoX.+",
" .Oo.OOOOO.oXo.+",
" .OX.OOOOO.XoX.+",
" .OoX.OOO.XoXo.+",
" .OXoX...XoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *radiofolderoff_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c #C0C0C0",
"o c #000000",
" ",
" ..... ",
" .XXXXX. ",
" .XXXXXXX...... ",
" .XXXXXXXXXXXX.o",
" .XXXX...XXXXX.o",
" .XXX.XXX.XXXX.o",
" .XX.XXXXX.XXX.o",
" .XX.XXXXX.XXX.o",
" .XX.XXXXX.XXX.o",
" .XXX.XXX.XXXX.o",
" .XXXX...XXXXX.o",
" ..............o",
" oooooooooooooo",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *radiofolderon_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c #FFFF00",
"o c #C0C0C0",
"O c #FFFFFF",
"+ c #000000",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoX...XoXoX.+",
" .OoX.OOO.XoXo.+",
" .OX.O+++O.XoX.+",
" .Oo.O+++O.oXo.+",
" .OX.O+++O.XoX.+",
" .OoX.OOO.XoXo.+",
" .OXoX...XoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *radiofolderon_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c #C0C0C0",
"o c #000000",
" ",
" ..... ",
" .XXXXX. ",
" .XXXXXXX...... ",
" .XXXXXXXXXXXX.o",
" .XXXX...XXXXX.o",
" .XXX.XXX.XXXX.o",
" .XX.X...X.XXX.o",
" .XX.X...X.XXX.o",
" .XX.X...X.XXX.o",
" .XXX.XXX.XXXX.o",
" .XXXX...XXXXX.o",
" ..............o",
" oooooooooooooo",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * radiooff_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" .... ",
" ..XXXX.. ",
" .XX XXo ",
" .X oo ",
" .X oo ",
" .X oo ",
" .X oo ",
" .X oo ",
" .X oo ",
" .oo ooo ",
" oooooooo ",
" oooo ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * radiooff_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" .... ",
" ..XXXX.. ",
" .XXooooXXo ",
" .Xoooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooo ",
" .ooooooooo ",
" oooooooo ",
" oooo ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * radioon_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" .... ",
" ..XXXX.. ",
" .XX XXo ",
" .X oo ",
" .X XX oo ",
" .X XXXX oo ",
" .X XXXX oo ",
" .X XX oo ",
" .X oo ",
" .oo ooo ",
" oooooooo ",
" oooo ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * radioon_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" .... ",
" ..XXXX.. ",
" .XXooooXXo ",
" .Xoooooooo ",
" .Xooo..ooooo ",
" .Xoo....oooo ",
" .Xoo....oooo ",
" .Xooo..ooooo ",
" .Xoooooooo ",
" .ooooooooo ",
" oooooooo ",
" oooo ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *redo_xpm[] = {
/* width height num_colors chars_per_pixel */
" 16 15 3 1",
/* colors */
". c #000080",
"# c #c0c0c0",
"a c #808080",
/* pixels */
"################",
"################",
"################",
"################",
"###a....########",
"##a.####..###.##",
"##.#######.#..##",
"##.########...##",
"##.#######....##",
"##a.#####.....##",
"###.a###########",
"################",
"################",
"################",
"################"
};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *save_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
". c Black",
"X c #808000",
"o c #808080",
/* pixels */
" ",
" .............. ",
" .X. . . ",
" .X. ... ",
" .X. .X. ",
" .X. .X. ",
" .X. .X. ",
" .X. .X. ",
" .XX........oX. ",
" .XXXXXXXXXXXX. ",
" .XX.........X. ",
" .XX...... .X. ",
" .XX...... .X. ",
" .XX...... .X. ",
" ............. "
};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * unchecked_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" ............ ",
" .XXXXXXXXXXo ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .X o ",
" .ooooooooooo ",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char * unchecked_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c Black",
"o c #c0c0c0",
" ",
" ",
" ............ ",
" .XXXXXXXXXXo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .Xoooooooooo ",
" .ooooooooooo ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *uncheckedfolder_xpm[] = {
"16 16 6 1",
" c None",
". c #808080",
"X c #FFFF00",
"o c #C0C0C0",
"O c #FFFFFF",
"+ c #000000",
" ",
" ..... ",
" .XoXoX. ",
" .XoXoXoX...... ",
" .OOOOOOOOOOOO.+",
" .OXoXoXoXoXoX.+",
" .OoX++oX++oXo.+",
" .OXoX++++oXoX.+",
" .OoXoX++oXoXo.+",
" .OXoX++++oXoX.+",
" .OoX++oX++oXo.+",
" .OXoXoXoXoXoX.+",
" ..............+",
" ++++++++++++++",
" ",
" "};

View File

@@ -0,0 +1,23 @@
/* XPM */
static char *uncheckedfolder_dis_xpm[] = {
"16 16 4 1",
" c None",
". c #808080",
"X c #C0C0C0",
"o c #000000",
" ",
" ..... ",
" .XXXXX. ",
" .XXXXXXX...... ",
" .XXXXXXXXXXXX.o",
" .XXXXXXXXXXXX.o",
" .XXX..XX..XXX.o",
" .XXXX....XXXX.o",
" .XXXXX..XXXXX.o",
" .XXXX....XXXX.o",
" .XXX..XX..XXX.o",
" .XXXXXXXXXXXX.o",
" ..............o",
" oooooooooooooo",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *undo_xpm[] = {
/* width height num_colors chars_per_pixel */
" 16 15 3 1",
/* colors */
". c #000080",
"# c #c0c0c0",
"a c #808080",
/* pixels */
"################",
"################",
"################",
"################",
"########....a###",
"##.###..####.a##",
"##..#.#######.##",
"##...########.##",
"##....#######.##",
"##.....#####.a##",
"###########a.###",
"################",
"################",
"################",
"################"
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,41 @@
/* XPM */
static char *wxconfigtool_xpm[] = {
"32 32 6 1",
" c None",
". c #000000",
"X c #000084",
"o c #FFFFFF",
"O c #FFFF00",
"+ c #FF0000",
" ",
" ",
" ",
" ",
" ",
" .............. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXX..............",
" .XooXXXXXX.OOOOOOOOOOOO.",
".........XooXXXXXX.OOOOOOOOOOOO.",
".+++++++.XooXXXXXX.OooOOOOOOOOO.",
".+++++++.XooXXXXXX.OooOOOOOOOOO.",
".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
".+oo++++...........OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OOOOOOOOOOOO.",
".+oo+++++++++. .OOOOOOOOOOOO.",
".++++++++++++. ..............",
".++++++++++++. ",
".............. ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *wxconfigtool16x16_xpm[] = {
"16 16 6 1",
" c None",
". c #000000",
"X c #000084",
"o c #FFFFFF",
"O c #FFFF00",
"+ c #FF0000",
" ",
" ",
" ",
" ....... ",
" .XXXXX. ",
" .oXXXX. ",
" .oXXX.......",
".....oXXX.OOOOO.",
".+++.XXXX.oOOOO.",
".o++......oOOOO.",
".o++++. .oOOOO.",
".o++++. .OOOOO.",
".+++++. .......",
"....... ",
" ",
" "};

View File

@@ -0,0 +1,41 @@
/* XPM */
static char *wxconfigtool32x32_xpm[] = {
"32 32 6 1",
" c None",
". c #000000",
"X c #000084",
"o c #FFFFFF",
"O c #FFFF00",
"+ c #FF0000",
" ",
" ",
" ",
" ",
" ",
" .............. ",
" .XXXXXXXXXXXX. ",
" .XXXXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXXXXX. ",
" .XooXXXXXX..............",
" .XooXXXXXX.OOOOOOOOOOOO.",
".........XooXXXXXX.OOOOOOOOOOOO.",
".+++++++.XooXXXXXX.OooOOOOOOOOO.",
".+++++++.XooXXXXXX.OooOOOOOOOOO.",
".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
".+oo++++.XXXXXXXXX.OooOOOOOOOOO.",
".+oo++++...........OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OooOOOOOOOOO.",
".+oo+++++++++. .OOOOOOOOOOOO.",
".+oo+++++++++. .OOOOOOOOOOOO.",
".++++++++++++. ..............",
".++++++++++++. ",
".............. ",
" ",
" ",
" ",
" ",
" "};

View File

@@ -0,0 +1,755 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configitem.cpp
// Purpose: wxWindows Configuration Tool config item class
// Author: Julian Smart
// Modified by:
// Created: 2003-06-03
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "configitem.h"
#endif
// Includes other headers for precompiled compilation
#include "wx/wx.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/tokenzr.h"
#include "configitem.h"
#include "configtree.h"
#include "configtooldoc.h"
#include "configtoolview.h"
#include "wxconfigtool.h"
#include "mainframe.h"
IMPLEMENT_CLASS(ctConfigItem, wxObject)
ctConfigItem::ctConfigItem()
{
m_modified = FALSE;
m_type = ctTypeBoolCheck;
m_treeItemId = wxTreeItemId();
m_enabled = TRUE;
m_parent = NULL;
m_active = TRUE;
}
ctConfigItem::ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name)
{
m_modified = FALSE;
m_type = type;
m_treeItemId = wxTreeItemId();
m_enabled = FALSE;
m_active = TRUE;
SetName(name);
m_parent = parent;
if (parent)
parent->AddChild(this);
}
ctConfigItem::~ctConfigItem()
{
ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
if (m_treeItemId.IsOk() && treeCtrl)
{
ctTreeItemData* data = (ctTreeItemData*) treeCtrl->GetItemData(m_treeItemId);
if (data)
data->SetConfigItem(NULL);
}
if (GetParent())
GetParent()->RemoveChild(this);
else
{
if (wxGetApp().GetMainFrame()->GetDocument() &&
wxGetApp().GetMainFrame()->GetDocument()->GetTopItem() == this)
wxGetApp().GetMainFrame()->GetDocument()->SetTopItem(NULL);
}
Clear();
}
/// Can we edit this property?
bool ctConfigItem::CanEditProperty(const wxString& propName) const
{
ctProperty* prop = m_properties.FindProperty(propName);
if (prop)
return !prop->GetReadOnly();
else
return FALSE;
}
/// Assignment operator.
void ctConfigItem::operator= (const ctConfigItem& item)
{
m_properties = item.m_properties;
m_modified = item.m_modified;
m_defaultProperty = item.m_defaultProperty;
m_type = item.m_type;
m_enabled = item.m_enabled;
m_active = item.m_active;
}
/// Sets the name property.
void ctConfigItem::SetName(const wxString& name )
{
m_properties.SetProperty(wxT("name"), name);
}
/// Clear children
void ctConfigItem::Clear()
{
wxNode* node = m_children.GetFirst();
while (node)
{
wxNode* next = node->GetNext();
ctConfigItem* child = (ctConfigItem*) node->GetData();
// This should delete 'node' too, assuming
// child's m_parent points to 'this'. If not,
// it'll be cleaned up by m_children.Clear().
delete child;
node = next;
}
m_children.Clear();
}
// Get the nth child
ctConfigItem* ctConfigItem::GetChild(int n) const
{
wxASSERT ( n < GetChildCount() && n > -1 );
if ( n < GetChildCount() && n > -1 )
{
ctConfigItem* child = wxDynamicCast(m_children.Nth(n)->Data(), ctConfigItem);
return child;
}
else
return NULL;
}
// Get the child count
int ctConfigItem::GetChildCount() const
{
return m_children.GetCount();
}
/// Add a child
void ctConfigItem::AddChild(ctConfigItem* item)
{
m_children.Append(item);
item->SetParent(this);
}
/// Remove (but don't delete) a child
void ctConfigItem::RemoveChild(ctConfigItem* item)
{
m_children.DeleteObject(item);
item->SetParent(NULL);
}
/// Initialise standard properties
void ctConfigItem::InitProperties()
{
ctProperty* prop = m_properties.FindProperty(wxT("name"));
if (!prop)
{
prop = new ctProperty;
m_properties.AddProperty(prop);
}
prop->SetDescription(_("<B>Name</B><P> The name of the configuration setting."));
prop->SetReadOnly(TRUE);
m_properties.AddProperty(
new ctProperty(
wxT("<B>Description</B><P> The setting description."),
wxVariant(wxT(""), wxT("description")),
wxT("multiline")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Default-state</B><P> The default state."),
wxVariant((bool) TRUE, wxT("default-state")),
wxT("bool")));
if (GetType() == ctTypeString)
{
m_properties.AddProperty(
new ctProperty(
wxT("<B>Default-value</B><P> The default value."),
wxVariant((bool) TRUE, wxT("default-value")),
wxT("")));
}
else if (GetType() == ctTypeInteger)
{
m_properties.AddProperty(
new ctProperty(
wxT("<B>Default-value</B><P> The default value."),
wxVariant((long) 0, wxT("default-value")),
wxT("")));
}
m_properties.AddProperty(
new ctProperty(
wxT("<B>Requires</B><P> When any of the given settings are 0, this setting <I>must</I> be 0. Taking wxUSE_ZIPSTREAM as an example:<P> If wxUSE_STREAMS is 0, then wxUSE_ZIPSTREAM must be 0.<BR>If wxUSE_STREAMS is 1, then wxUSE_ZIPSTREAM may be 0 or 1."),
wxVariant(wxT(""), wxT("requires")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Precludes</B><P> When any of these settings are 1, this setting <I>must</I> be 0. Taking wxUSE_ODBC as an example:<P> If wxUSE_UNICODE is 1, then wxUSE_ODBC must be 0.<BR>If wxUSE_UNICODE is 0, then wxUSE_ODBC may be 0 or 1."),
wxVariant(wxT(""), wxT("precludes")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Enabled-if</B><P> When any of these settings are 1, this setting <I>must</I> be 1."),
wxVariant(wxT(""), wxT("enabled-if")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Enabled-if-not</B><P> When any of these settings are 0, this setting <I>must</I> be 1. Taking wxUSE_TOOLBAR_SIMPLE as an example:<P>If wxUSE_TOOLBAR_NATIVE is 0, wxUSE_TOOLBAR_SIMPLE must be 1.<BR>If wxUSE_TOOLBAR_NATIVE is 1, wxUSE_TOOLBAR_SIMPLE may be 0 or 1."),
wxVariant(wxT(""), wxT("enabled-if-not")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Exclusivity</B><P> The settings that are mutually exclusive with this one."),
wxVariant(wxT(""), wxT("exclusivity")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Context</B><P> A list of symbols (config settings), at least one of which must be enabled for this item to participate in dependency rules.<P>\nIf empty, this item will always be used in dependency rules.<P>\nMostly this will be used to specify the applicable platforms, but it can contain other symbols, for example compilers."),
wxVariant(wxT(""), wxT("context")),
wxT("configitems")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Configure-command</B><P> Configure command to generate if this is on."),
wxVariant(wxT(""), wxT("configure-command")),
wxT("multiline")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Help-topic</B><P> The help topic in the wxWindows manual for this component or setting."),
wxVariant(wxT(""), wxT("help-topic")),
wxT("multiline")));
m_properties.AddProperty(
new ctProperty(
wxT("<B>Notes</B><P> User notes."),
wxVariant(wxT(""), wxT("notes")),
wxT("multiline")));
m_defaultProperty = wxT("description");
}
/// Do additional actions to apply the property to the internal
/// representation.
void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& oldValue)
{
ctConfigToolDoc* doc = GetDocument();
bool oldModified = doc->IsModified();
doc->Modify(TRUE);
wxString name = prop->GetName();
if (name == wxT("requires") ||
name == wxT("precludes") ||
name == wxT("enabled-if") ||
name == wxT("enabled-if-not") ||
name == wxT("context"))
{
doc->RefreshDependencies();
}
if (doc && doc->GetFirstView() && oldModified != doc->IsModified())
((ctConfigToolView*)doc->GetFirstView())->OnChangeFilename();
}
/// Get the associated document (currently, assumes
/// there's only ever one document active)
ctConfigToolDoc* ctConfigItem::GetDocument()
{
ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
return doc;
}
/// Convert string containing config item names to
/// an array of config item names
void ctConfigItem::StringToArray(const wxString& items, wxArrayString& itemsArray)
{
wxStringTokenizer tokenizer(items, wxT(","));
while (tokenizer.HasMoreTokens())
{
wxString token = tokenizer.GetNextToken();
itemsArray.Add(token);
}
}
/// Convert array containing config item names to
/// a string
void ctConfigItem::ArrayToString(const wxArrayString& itemsArray, wxString& items)
{
items = wxEmptyString;
size_t i;
for (i = 0; i < itemsArray.GetCount(); i++)
{
items += itemsArray[i];
if (i < (itemsArray.GetCount() - 1))
items += wxT(",");
}
}
/// Populate a list of items found in the string.
void ctConfigItem::StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list)
{
wxArrayString strArray;
StringToArray(items, strArray);
size_t i;
for (i = 0; i < strArray.GetCount(); i++)
{
wxString str(strArray[i]);
ctConfigItem* item = topItem->FindItem(str);
if (item)
list.Append(item);
}
}
/// Find an item in this hierarchy
ctConfigItem* ctConfigItem::FindItem(const wxString& name)
{
if (GetName() == name)
return this;
for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
ctConfigItem* found = child->FindItem(name);
if (found)
return found;
}
return NULL;
}
/// Find the next sibling
ctConfigItem* ctConfigItem::FindNextSibling()
{
if (!GetParent())
return NULL;
wxNode* node = GetParent()->GetChildren().Member(this);
if (node && node->GetNext())
{
return (ctConfigItem*) node->GetNext()->GetData();
}
return NULL;
}
/// Find the previous sibling
ctConfigItem* ctConfigItem::FindPreviousSibling()
{
if (!GetParent())
return NULL;
wxNode* node = GetParent()->GetChildren().Member(this);
if (node && node->GetPrevious())
{
return (ctConfigItem*) node->GetPrevious()->GetData();
}
return NULL;
}
/// Sync appearance
void ctConfigItem::Sync()
{
if (GetDocument())
{
ctConfigToolView* view = (ctConfigToolView*) GetDocument()->GetFirstView();
if (view)
{
view->SyncItem(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), this);
}
}
}
/// Create a clone of this and children
ctConfigItem* ctConfigItem::DeepClone()
{
ctConfigItem* newItem = Clone();
for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
ctConfigItem* newChild = child->DeepClone();
newItem->AddChild(newChild);
}
return newItem;
}
/// Detach: remove from parent, and remove tree items
void ctConfigItem::Detach()
{
if (GetParent())
GetParent()->RemoveChild(this);
else
GetDocument()->SetTopItem(NULL);
SetParent(NULL);
wxTreeItemId treeItem = GetTreeItemId();
DetachFromTree();
// Will delete the branch, but not the config items.
wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->Delete(treeItem);
}
/// Hide from tree: make sure tree deletions won't delete
/// the config items
void ctConfigItem::DetachFromTree()
{
wxTreeItemId item = GetTreeItemId();
ctTreeItemData* data = (ctTreeItemData*) wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetItemData(item);
data->SetConfigItem(NULL);
m_treeItemId = wxTreeItemId();
for ( wxNode* node = GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
child->DetachFromTree();
}
}
/// Attach: insert after the given position
void ctConfigItem::Attach(ctConfigItem* parent, ctConfigItem* insertBefore)
{
if (parent)
{
SetParent(parent);
wxNode* node = NULL;
if (insertBefore)
node = parent->GetChildren().Member(insertBefore);
if (node)
parent->GetChildren().Insert(node, this);
else
parent->GetChildren().Append(this);
}
else
{
GetDocument()->SetTopItem(this);
}
}
/// Can have children?
bool ctConfigItem::CanHaveChildren() const
{
return (GetType() == ctTypeGroup ||
GetType() == ctTypeCheckGroup ||
GetType() == ctTypeRadioGroup);
}
// An item is in the active context if:
// The context field is empty; or
// The context field contains a symbol that is currently enabled.
bool ctConfigItem::IsInActiveContext()
{
wxString context = GetPropertyString(wxT("context"));
if (context.IsEmpty())
return TRUE;
wxList contextItems;
StringToItems(GetDocument()->GetTopItem(), context, contextItems);
for ( wxNode* node = contextItems.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (otherItem->IsEnabled())
return TRUE;
}
return FALSE;
}
/// Evaluate the requires properties:
/// if any of the 'requires' items are disabled,
/// then this one is disabled (and inactive).
void ctConfigItem::EvaluateDependencies()
{
wxList items;
wxString requires = GetPropertyString(wxT("requires"));
wxString precludes = GetPropertyString(wxT("precludes"));
wxString enabledIf = GetPropertyString(wxT("enabled-if"));
wxString enabledIfNot = GetPropertyString(wxT("enabled-if-not"));
bool active = TRUE;
bool enabled = IsEnabled();
bool oldEnabled = enabled;
bool oldActive = IsActive();
bool explicitlyEnabled = FALSE;
bool explicitlyDisabled = FALSE;
bool inActiveContext = IsInActiveContext();
// Add the parent to the list of dependencies, if the
// parent is a check or radio group.
ctConfigItem* parent = GetParent();
if (parent &&
(parent->GetType() == ctTypeCheckGroup ||
parent->GetType() == ctTypeRadioGroup))
items.Append(parent);
wxList tempItems;
StringToItems(GetDocument()->GetTopItem(), requires, tempItems);
wxNode* node;
for ( node = tempItems.GetFirst(); node; node = node->GetNext() )
{
// Only consider the dependency if both items are in
// an active context.
// Each is in the active context if:
// The context field is empty; or
// The context field contains a symbol that is currently enabled.
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (inActiveContext && otherItem->IsInActiveContext())
items.Append(otherItem);
}
{
int enabledCount = 0;
for ( node = items.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (otherItem->IsEnabled())
{
enabledCount ++;
}
}
if (items.GetCount() > 0 && enabledCount == 0)
{
// None of the items were enabled
enabled = FALSE;
active = FALSE;
explicitlyDisabled = TRUE;
}
}
items.Clear();
if (!enabledIfNot.IsEmpty())
{
StringToItems(GetDocument()->GetTopItem(), enabledIfNot, items);
int disabledCount = 0;
int inContextCount = 0;
for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (inActiveContext && otherItem->IsInActiveContext())
{
// Make this enabled and inactive, _unless_ it's
// already been explicitly disabled in the previous
// requires evaluation (it really _has_ to be off)
if (!otherItem->IsEnabled())
{
disabledCount ++;
}
inContextCount ++;
}
}
// Enable if there were no related items that were enabled
if (inContextCount > 0 && (disabledCount == inContextCount) && !explicitlyDisabled)
{
explicitlyEnabled = TRUE;
enabled = TRUE;
active = FALSE;
}
}
items.Clear();
if (!enabledIf.IsEmpty())
{
StringToItems(GetDocument()->GetTopItem(), enabledIf, items);
int enabledCount = 0;
int inContextCount = 0;
for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (inActiveContext && otherItem->IsInActiveContext())
{
// Make this enabled and inactive, _unless_ it's
// already been explicitly disabled in the previous
// requires evaluation (it really _has_ to be off)
if (otherItem->IsEnabled())
{
enabledCount ++;
}
inContextCount ++;
}
}
// Enable if there were no related items that were disabled
if (inContextCount > 0 && (enabledCount > 0) && !explicitlyDisabled)
{
explicitlyEnabled = TRUE;
enabled = TRUE;
active = FALSE;
}
}
items.Clear();
if (!precludes.IsEmpty())
{
StringToItems(GetDocument()->GetTopItem(), precludes, items);
int enabledCount = 0;
int inContextCount = 0;
for ( wxNode* node = items.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* otherItem = (ctConfigItem*) node->GetData();
if (inActiveContext && otherItem->IsInActiveContext())
{
// Make this enabled and inactive, _unless_ it's
// already been explicitly disabled in the previous
// requires evaluation (it really _has_ to be off)
if (otherItem->IsEnabled())
{
enabledCount ++;
}
}
}
// Disable if there were no related items that were disabled
if (inContextCount > 0 && (enabledCount == inContextCount) && !explicitlyEnabled)
{
enabled = FALSE;
active = FALSE;
}
}
// Finally check a sort of dependency: whether our
// context is active. If not, make this inactive.
if (!IsInActiveContext())
active = FALSE;
SetActive(active);
// If going active, set enabled state to the default state
if (active &&
oldActive != active &&
(GetType() == ctTypeBoolCheck || GetType() == ctTypeCheckGroup) &&
m_properties.FindProperty(wxT("default-state")))
{
bool defaultState = m_properties.FindProperty(wxT("default-state"))->GetVariant().GetBool();
enabled = defaultState;
}
Enable(enabled);
// Deal with setting a radio button
if (enabled && enabled != oldEnabled &&
(GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup))
{
wxList considered;
PropagateRadioButton(considered);
}
}
/// Get description, which may be dynamically
/// generated depending on the property.
wxString ctConfigItem::GetDescription(ctProperty* property)
{
if (property->GetName() == wxT("description"))
{
wxString value(property->GetValue());
if (value.IsEmpty())
return wxT("Double-click on <B>description</B> to write a brief explanation of the setting.<P>");
else
return value;
}
else if (property->GetName() == wxT("notes"))
{
wxString value(property->GetValue());
if (value.IsEmpty())
return wxT("Double-click on <B>notes</B> to write notes about this setting.<P>");
else
return value;
}
return property->GetDescription();
}
/// Get the title for the property editor
wxString ctConfigItem::GetTitle()
{
wxString title(GetName());
if (GetType() == ctTypeCheckGroup ||
GetType() == ctTypeRadioGroup ||
GetType() == ctTypeBoolCheck ||
GetType() == ctTypeBoolRadio)
{
if (IsEnabled())
title = title + _T(" - enabled");
else
title = title + _T(" - disabled");
}
return title;
}
/// Propagate a change in enabled/disabled status
void ctConfigItem::PropagateChange(wxList& considered)
{
if (GetType() == ctTypeCheckGroup ||
GetType() == ctTypeRadioGroup ||
GetType() == ctTypeBoolCheck ||
GetType() == ctTypeBoolRadio)
{
// TODO: what about string, integer? Can they have
// dependencies?
for ( wxNode* node = GetDependents().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
// Avoid loops
if (!considered.Member(child))
{
considered.Append(child);
child->EvaluateDependencies();
child->Sync();
child->PropagateChange(considered);
}
}
}
}
/// Process radio button selection
void ctConfigItem::PropagateRadioButton(wxList& considered)
{
if ((GetType() == ctTypeBoolRadio || GetType() == ctTypeRadioGroup) && IsEnabled())
{
wxString mutuallyExclusive(GetPropertyString(wxT("exclusivity")));
wxList list;
StringToItems(GetDocument()->GetTopItem(), mutuallyExclusive, list);
for ( wxNode* node = list.GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
if (child->IsEnabled() && child != this)
{
child->Enable(FALSE);
child->Sync();
if (!considered.Member(child))
child->PropagateChange(considered);
}
}
}
}

View File

@@ -0,0 +1,279 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configitem.h
// Purpose: wxWindows Configuration Tool config item class
// Author: Julian Smart
// Modified by:
// Created: 2003-06-03
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _CT_CONFIGITEM_H_
#define _CT_CONFIGITEM_H_
#ifdef __GNUG__
#pragma interface "configitem.cpp"
#endif
#include "wx/wx.h"
#include "wx/treectrl.h"
#include "property.h"
class ctConfigToolDoc;
/*!
* The type of config item
*/
enum ctConfigType
{
ctTypeUnknown,
ctTypeGroup, // A group with no checkbox
ctTypeCheckGroup, // A group that can be switched on/off (check)
ctTypeRadioGroup, // A group that can be switched on/off (radio)
ctTypeString, // An option with a string value
ctTypeInteger, // An option with an integer value
ctTypeBoolCheck, // An on/off option
ctTypeBoolRadio // An on/off mutually exclusive option
};
/*!
* ctConfigItem represents a configuration setting.
* Each setting has a number of properties, some of
* which may be specific to a particular kind of
* setting, so we make it quite generic and extensible
* by using a property list.
*/
class ctConfigItem: public wxObject
{
public:
/// Ctor and dtor
ctConfigItem(ctConfigItem* parent, ctConfigType type, const wxString& name);
ctConfigItem();
~ctConfigItem();
/// Copy constructor.
ctConfigItem(const ctConfigItem& item)
{
(*this) = item;
}
/// Operations
/// Assignment operator.
void operator= (const ctConfigItem& item);
/// Create a clone
ctConfigItem* Clone()
{
ctConfigItem* item = new ctConfigItem;
*item = *this;
return item;
}
/// Create a clone of this and children
ctConfigItem* DeepClone();
/// Do additional actions to apply the property to the internal
/// representation.
void ApplyProperty(ctProperty* prop, const wxVariant& oldValue);
/// Clear children
void Clear();
/// Add a child
void AddChild(ctConfigItem* item);
/// Remove (but don't delete) a child
void RemoveChild(ctConfigItem* item);
/// Initialise standard properties
void InitProperties();
/// Convert string containing config item names to
/// an array of config item names
static void StringToArray(const wxString& items, wxArrayString& itemsArray);
/// Convert array containing config item names to
/// a string
static void ArrayToString(const wxArrayString& itemsArray, wxString& items);
/// Populate a list of items found in the string.
static void StringToItems(ctConfigItem* topItem, const wxString& items, wxList& list);
/// Find an item in this hierarchy
ctConfigItem* FindItem(const wxString& name);
/// Find the next sibling
ctConfigItem* FindNextSibling();
/// Find the previous sibling
ctConfigItem* FindPreviousSibling();
/// Sync appearance
void Sync();
/// Detach: remove from parent, and remove tree items
void Detach();
/// Attach: insert before the given position
void Attach(ctConfigItem* parent, ctConfigItem* insertbefore);
/// Hide from tree: make sure tree deletions won't delete
/// the config items
void DetachFromTree();
/// Evaluate the depends-on properties:
/// if any of the depends-on items are disabled,
/// then this one is disabled (and inactive).
void EvaluateDependencies();
/// Propagate a change in enabled/disabled status
void PropagateChange(wxList& considered);
/// Process radio button selection
void PropagateRadioButton(wxList& considered);
// An item is in the active context if:
// The context field is empty; or
// The context field contains a symbol that is currently enabled.
bool IsInActiveContext();
/// Accessors
/// Returns the name property.
wxString GetName() const { return GetPropertyString(wxT("name")); }
/// Sets the name property.
void SetName(const wxString& name ) ;
/// Returns the value property.
wxVariant GetValue() const { return m_properties.FindPropertyValue(wxT("value")); }
/// Sets the value property.
void SetValue(const wxVariant& value ) ;
/// Returns the string for the given property.
wxString GetPropertyString(const wxString& propName) const { return m_properties.FindPropertyValueString(propName); }
/// Sets the string for the given property.
void SetPropertyString(const wxString& propName, const wxString& value) { m_properties.SetProperty(propName, value); }
/// Can we edit this property?
bool CanEditProperty(const wxString& propName) const ;
/// Returns the list of properties for
/// this item.
ctProperties& GetProperties() { return m_properties; }
/// Set the default property.
void SetDefaultProperty(const wxString& defaultProp) { m_defaultProperty = defaultProp; }
/// Get the default property.
wxString GetDefaultProperty() const { return m_defaultProperty; }
/// Is this item modified?
bool IsModified() const { return m_modified; }
/// Mark this as modified.
void Modify(bool modified = TRUE) { m_modified = modified; }
/// Is this item enabled? (checked/unchecked)
bool IsEnabled() const { return m_enabled; }
/// Enable or disable (check/uncheck)
void Enable(bool enable = TRUE) { m_enabled = enable; }
/// Is this item active? (sensitive to user input)
bool IsActive() const { return m_active; }
/// Make this (in)active
void SetActive(bool active = TRUE) { m_active = active; }
/// Set the type
void SetType(ctConfigType type) { m_type = type; }
// Get the type
ctConfigType GetType() const { return m_type; }
/// Set the tree item id
void SetTreeItem(wxTreeItemId id) { m_treeItemId = id; }
// Get the type
wxTreeItemId GetTreeItemId() const { return m_treeItemId ; }
/// Get the list of children
wxList& GetChildren() { return m_children; }
/// Get the nth child
ctConfigItem* GetChild(int n) const;
/// Get the child count
int GetChildCount() const;
/// Get the list of dependents
wxList& GetDependents() { return m_dependents; }
/// Get the parent
ctConfigItem* GetParent() const { return m_parent; }
/// Set the parent
void SetParent(ctConfigItem* parent) { m_parent = parent; }
/// Get the associated document (currently, assumes
/// there's only ever one document active)
ctConfigToolDoc* GetDocument() ;
/// Can have children?
bool CanHaveChildren() const;
/// Get description, which may be dynamically
/// generated depending on the property.
wxString GetDescription(ctProperty* property);
/// Get the title for the property editor
wxString GetTitle();
protected:
/// The properties for this item.
ctProperties m_properties;
/// The default property, from the point of
/// of double-clicking the config item.
wxString m_defaultProperty;
/// Whether modified
bool m_modified;
/// The type of the config item
ctConfigType m_type;
/// The corresponding tree item
wxTreeItemId m_treeItemId;
/// Is this option enabled? (checked/unchecked)
bool m_enabled;
/// Is this option active? (i.e. sensitive to user input)
bool m_active;
/// The list of children.
wxList m_children;
/// The list of items that are dependent upon
// this one. This is refreshed when the configuration
// structurally changes, and is not saved to file.
wxList m_dependents;
/// The parent config item
ctConfigItem* m_parent;
DECLARE_CLASS(ctConfigItem)
};
#endif
// _CT_CONFIGITEM_H_

View File

@@ -0,0 +1,266 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configitemselector.cpp
// Purpose: Selector for one or more config items
// Author: Julian Smart
// Modified by:
// Created: 2003-06-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation configitemselector.cpp
#endif
#include <wx/wx.h>
#include <wx/cshelp.h>
#include <wx/statline.h>
#include <wx/splitter.h>
#include <wx/scrolwin.h>
#include <wx/spinctrl.h>
#include <wx/spinbutt.h>
#include <wx/valgen.h>
#include "configitemselector.h"
#include "configtooldoc.h"
#include "configtoolview.h"
#include "configitem.h"
#include "mainframe.h"
#include "wxconfigtool.h"
////@begin XPM images
////@end XPM images
/*!
* ctConfigItemsSelector type definition
*/
IMPLEMENT_CLASS( ctConfigItemsSelector, wxDialog )
/*!
* ctConfigItemsSelector event table definition
*/
BEGIN_EVENT_TABLE( ctConfigItemsSelector, wxDialog )
////@begin ctConfigItemsSelector event table entries
EVT_BUTTON( ID_CONFIG_ADD, ctConfigItemsSelector::OnConfigAdd )
EVT_UPDATE_UI( ID_CONFIG_ADD, ctConfigItemsSelector::OnUpdateConfigAdd )
EVT_BUTTON( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnConfigRemove )
EVT_UPDATE_UI( ID_CONFIG_REMOVE, ctConfigItemsSelector::OnUpdateConfigRemove )
EVT_BUTTON( wxID_OK, ctConfigItemsSelector::OnOk )
////@end ctConfigItemsSelector event table entries
END_EVENT_TABLE()
/*!
* ctConfigItemsSelector constructor
*/
ctConfigItemsSelector::ctConfigItemsSelector( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
InitSourceConfigList();
}
/*!
* Control creation for ctConfigItemsSelector
*/
void ctConfigItemsSelector::CreateControls()
{
////@begin ctConfigItemsSelector content construction
ctConfigItemsSelector* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(TRUE);
wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
item2->Add(item3, 1, wxGROW|wxALL, 5);
wxStaticText* item4 = new wxStaticText(item1, wxID_STATIC, _("Please edit the list of configuration items by selecting from the\nlist below."), wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item4, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxStaticText* item5 = new wxStaticText(item1, wxID_STATIC, _("&Available items:"), wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item5, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxString* item6Strings = NULL;
wxListBox* item6 = new wxListBox(item1, ID_AVAILABLE_CONFIG_ITEMS, wxDefaultPosition, wxSize(-1, 150), 0, item6Strings, wxLB_SINGLE|wxLB_SORT);
item3->Add(item6, 1, wxGROW|wxALL, 5);
wxStaticText* item7 = new wxStaticText(item1, wxID_STATIC, _("&List of configuration items:"), wxDefaultPosition, wxDefaultSize, 0);
item3->Add(item7, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxBoxSizer* item8 = new wxBoxSizer(wxHORIZONTAL);
item3->Add(item8, 0, wxGROW, 5);
wxString* item9Strings = NULL;
wxListBox* item9 = new wxListBox(item1, ID_CONFIG_ITEMS, wxDefaultPosition, wxSize(-1, 100), 0, item9Strings, wxLB_SINGLE);
item8->Add(item9, 1, wxGROW|wxALL, 5);
wxBoxSizer* item10 = new wxBoxSizer(wxVERTICAL);
item8->Add(item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* item11 = new wxButton(item1, ID_CONFIG_ADD, _("A&dd"), wxDefaultPosition, wxDefaultSize, 0);
item10->Add(item11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* item12 = new wxButton(item1, ID_CONFIG_REMOVE, _("&Remove"), wxDefaultPosition, wxDefaultSize, 0);
item10->Add(item12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxBoxSizer* item13 = new wxBoxSizer(wxHORIZONTAL);
item3->Add(item13, 0, wxGROW, 5);
item13->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* item15 = new wxButton(item1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);
item15->SetDefault();
item13->Add(item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* item16 = new wxButton(item1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0);
item13->Add(item16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end ctConfigItemsSelector content construction
}
/*!
* Event handler for ID_CONFIG_ADD
*/
void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event )
{
wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
if (masterList)
{
if (masterList->GetSelection() > -1)
{
wxString str = masterList->GetStringSelection();
if (m_configItems.Index(str) == wxNOT_FOUND)
{
listBox->Append(str);
m_configItems.Add(str);
}
}
}
}
/*!
* Event handler for ID_CONFIG_REMOVE
*/
void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& event )
{
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
if (listBox)
{
if (listBox->GetSelection() > -1)
{
wxString str = listBox->GetStringSelection();
listBox->Delete(listBox->GetSelection());
m_configItems.Remove(str);
}
}
}
/*!
* Event handler for wxID_OK
*/
void ctConfigItemsSelector::OnOk( wxCommandEvent& event )
{
// Replace with custom code
event.Skip();
}
/*!
* Should we show tooltips?
*/
bool ctConfigItemsSelector::ShowToolTips()
{
return TRUE;
}
/*!
* Update event handler for ID_CONFIG_ADD
*/
void ctConfigItemsSelector::OnUpdateConfigAdd( wxUpdateUIEvent& event )
{
wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
event.Enable(masterList && masterList->GetSelection() != -1);
}
/*!
* Update event handler for ID_CONFIG_REMOVE
*/
void ctConfigItemsSelector::OnUpdateConfigRemove( wxUpdateUIEvent& event )
{
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
event.Enable(listBox && listBox->GetSelection() != -1);
}
/// Initialise the master list
void ctConfigItemsSelector::InitSourceConfigList(ctConfigItem* item)
{
wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
if (!item)
item = wxGetApp().GetMainFrame()->GetDocument()->GetTopItem();
if (!item)
return;
bool addIt = FALSE;
if (item->GetType() == ctTypeGroup)
addIt = FALSE;
else if (item->GetType() == ctTypeCheckGroup)
addIt = TRUE;
else if (item->GetType() == ctTypeRadioGroup)
addIt = TRUE;
else if (item->GetType() == ctTypeString)
addIt = TRUE;
else if (item->GetType() == ctTypeBoolCheck)
addIt = TRUE;
else if (item->GetType() == ctTypeBoolRadio)
addIt = TRUE;
else if (item->GetType() == ctTypeInteger)
addIt = TRUE;
if (addIt)
{
masterList->Append(item->GetName());
}
wxNode* node = item->GetChildren().GetFirst();
while (node)
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
InitSourceConfigList(child);
node = node->Next();
}
}
/// Set the initial list
void ctConfigItemsSelector::SetConfigList(const wxArrayString& items)
{
m_configItems = items;
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
listBox->Clear();
size_t i;
for (i = 0; i < items.GetCount(); i++)
listBox->Append(items[i]);
}

View File

@@ -0,0 +1,104 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configitemselector.h
// Purpose: Selector for one or more config items
// Author: Julian Smart
// Modified by:
// Created: 2003-06-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _CONFIGITEMSELECTOR_H_
#define _CONFIGITEMSELECTOR_H_
#ifdef __GNUG__
#pragma interface configitemselector.h
#endif
/*!
* Includes
*/
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_AVAILABLE_CONFIG_ITEMS 10002
#define ID_CONFIG_ITEMS 10005
#define ID_CONFIG_ADD 10006
#define ID_CONFIG_REMOVE 10007
////@end control identifiers
class ctConfigItem;
/*!
* ctConfigItemsSelector class declaration
*/
class ctConfigItemsSelector: public wxDialog
{
public:
/// Constructor
ctConfigItemsSelector( wxWindow* parent, wxWindowID id = -1, const wxString& caption = _("Configuration Items Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU );
/// Creates the controls and sizers
void CreateControls();
////@begin ctConfigItemsSelector event handler declarations
/// Event handler for ID_CONFIG_ADD
void OnConfigAdd( wxCommandEvent& event );
/// Update event handler for ID_CONFIG_ADD
void OnUpdateConfigAdd( wxUpdateUIEvent& event );
/// Event handler for ID_CONFIG_REMOVE
void OnConfigRemove( wxCommandEvent& event );
/// Update event handler for ID_CONFIG_REMOVE
void OnUpdateConfigRemove( wxUpdateUIEvent& event );
/// Event handler for wxID_OK
void OnOk( wxCommandEvent& event );
////@end ctConfigItemsSelector event handler declarations
////@begin ctConfigItemsSelector member function declarations
////@end ctConfigItemsSelector member function declarations
/// Initialise the master list
void InitSourceConfigList(ctConfigItem* item = NULL);
/// Set the initial list
void SetConfigList(const wxArrayString& items);
/// Get the list
const wxArrayString& GetConfigList() const { return m_configItems; }
/// Should we show tooltips?
static bool ShowToolTips();
DECLARE_CLASS( ctConfigItemsSelector )
DECLARE_EVENT_TABLE()
protected:
wxArrayString m_configItems;
};
#endif
// _CONFIGITEMSELECTOR_H_

View File

@@ -0,0 +1,992 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configtooldoc.h
// Purpose: Document class
// Author: Julian Smart
// Modified by:
// Created: 2003-06-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "configtooldoc.h"
#endif
#include "wx/wx.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/config.h"
#include "wx/textfile.h"
#include "wx/process.h"
#include "wx/mimetype.h"
#include "wx/process.h"
#include "wx/wfstream.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "configtooldoc.h"
#include "configtoolview.h"
#include "configtree.h"
#include "mainframe.h"
#include "utils.h"
#include "wxconfigtool.h"
#include "htmlparser.h"
IMPLEMENT_DYNAMIC_CLASS(ctConfigToolDoc, wxDocument)
// Ctor
ctConfigToolDoc::ctConfigToolDoc()
{
m_topItem = NULL;
m_clipboardItem = NULL;
}
// Dtor
ctConfigToolDoc::~ctConfigToolDoc()
{
DeleteItems();
ClearClipboard();
if (GetCommandProcessor())
GetCommandProcessor()->SetEditMenu(NULL);
}
// Delete all the items not already deleted
void ctConfigToolDoc::DeleteItems()
{
if (m_topItem)
delete m_topItem;
m_topItem = NULL;
}
/// Clears the clipboard item.
void ctConfigToolDoc::ClearClipboard()
{
if (m_clipboardItem)
delete m_clipboardItem;
m_clipboardItem = NULL;
}
/// Sets the clipboard item.
void ctConfigToolDoc::SetClipboardItem(ctConfigItem* item)
{
if (m_clipboardItem)
delete m_clipboardItem;
m_clipboardItem = item;
}
// Closes and clears the document
bool ctConfigToolDoc::OnCloseDocument()
{
if (wxDocument::OnCloseDocument())
{
ctConfigToolHint hint(NULL, ctClear);
UpdateAllViews (NULL, & hint);
DeleteItems();
return TRUE;
}
else
{
return FALSE;
}
}
// Saves the doc
bool ctConfigToolDoc::Save()
{
bool ret = FALSE;
if (!IsModified() && m_savedYet) return TRUE;
if (m_documentFile == wxT("") || !m_savedYet)
ret = SaveAs();
else
ret = OnSaveDocument(m_documentFile);
if ( ret )
SetDocumentSaved(TRUE);
return ret;
}
// Create the document
bool ctConfigToolDoc::OnCreate(const wxString& path, long flags)
{
GetCommandProcessor()->SetEditMenu(wxGetApp().GetMainFrame()->GetEditMenu());
GetCommandProcessor()->Initialize();
GetCommandProcessor()->ClearCommands();
// wxGetApp().m_currentDoc = this;
if (flags & wxDOC_NEW)
{
ctConfigItem* rootItem = new ctConfigItem(NULL, ctTypeGroup, _T("Configuration"));
//rootItem->InitProperties();
rootItem->GetProperties().AddProperty(
new ctProperty(
wxT("The item description."),
wxVariant(wxT(""), wxT("description")),
wxT("multiline")));
rootItem->SetPropertyString(_T("description"),
_T("<B>This is the top-level configuration item.</B>"));
SetTopItem(rootItem);
Modify(FALSE);
SetDocumentSaved(FALSE);
wxString rootName(wxT("untitled"));
wxStripExtension(rootName);
SetFilename(wxGetApp().GetSettings().GenerateFilename(rootName));
}
// Creates the view, so do any view updating after this
bool success = wxDocument::OnCreate(path, flags);
if (success)
{
if (flags & wxDOC_NEW)
{
wxBusyCursor wait;
ctConfigToolHint hint(NULL, ctInitialUpdate);
UpdateAllViews (NULL, & hint);
SetFilename(GetFilename(), TRUE);
}
}
return success;
}
// Save the document
bool ctConfigToolDoc::OnSaveDocument(const wxString& filename)
{
wxBusyCursor cursor;
const wxString strOldPath(GetFilename());
// Do some backing up first
// This is the backup filename
wxString backupFilename(filename);
backupFilename += wxT(".bak");
// This is the temporary copy of the backup
wxString tempFilename(filename);
tempFilename += wxT(".tmp");
if (wxFileExists(tempFilename))
wxRemoveFile(tempFilename);
bool leaveBackup = TRUE;
bool saved = DoSave(tempFilename);
if (saved)
{
// Remove the old .bak file
if (wxFileExists(backupFilename))
{
wxRemoveFile(backupFilename);
}
// Copy the old file to the .bak
if (leaveBackup)
{
if (wxFileExists(filename))
{
if (!wxRenameFile(filename, backupFilename))
{
wxCopyFile(filename, backupFilename);
wxRemoveFile(filename);
}
}
}
else
{
if (wxFileExists(filename))
wxRemoveFile(filename);
}
// Finally, copy the temporary file to the proper filename
if (!wxRenameFile(tempFilename, filename))
{
wxCopyFile(tempFilename, filename);
wxRemoveFile(tempFilename);
}
Modify(FALSE);
((ctConfigToolView*)GetFirstView())->OnChangeFilename();
SetDocumentSaved(TRUE);
SetFilename(filename);
wxGetApp().GetSettings().m_lastFilename = filename;
} else
{
SetFilename(strOldPath);
}
wxGetApp().GetMainFrame()->UpdateFrameTitle();
return saved;
}
// Open the document
bool ctConfigToolDoc::OnOpenDocument(const wxString& filename)
{
wxBusyCursor cursor;
bool opened = DoOpen(filename);
if (opened)
{
SetFilename(filename);
wxGetApp().GetSettings().m_lastFilename = filename;
((ctConfigToolView*)GetFirstView())->OnChangeFilename();
RefreshDependencies();
// ctConfigToolHint hint(NULL, ctFilenameChanged);
ctConfigToolHint hint(NULL, ctInitialUpdate);
UpdateAllViews (NULL, & hint);
}
SetDocumentSaved(TRUE); // Necessary or it will pop up the Save As dialog
return opened;
}
/// Save the settings file
bool ctConfigToolDoc::DoSave(const wxString& filename)
{
wxFileOutputStream stream(filename);
if (!stream.Ok())
return FALSE;
stream << wxT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
stream << wxT("<settings xmlns=\"http://www.wxwindows.org/wxs\" version=\"2.5.0.1\">");
DoSave(m_topItem, stream, 1);
stream << wxT("\n</settings>\n");
return TRUE;
}
inline static void OutputIndentation(wxOutputStream& stream, int indent)
{
wxString str = wxT("\n");
for (int i = 0; i < indent; i++)
str << wxT(' ') << wxT(' ');
stream << str ;
}
/// Recursive helper function for file saving
bool ctConfigToolDoc::DoSave(ctConfigItem* item, wxOutputStream& stream, int indent)
{
OutputIndentation(stream, indent*2);
wxString name(item->GetName());
wxString s;
wxString typeStr;
if (item->GetType() == ctTypeGroup)
typeStr = wxT("group");
else if (item->GetType() == ctTypeCheckGroup)
typeStr = wxT("check-group");
else if (item->GetType() == ctTypeRadioGroup)
typeStr = wxT("radio-group");
else if (item->GetType() == ctTypeString)
typeStr = wxT("string");
else if (item->GetType() == ctTypeBoolCheck)
typeStr = wxT("bool-check");
else if (item->GetType() == ctTypeBoolRadio)
typeStr = wxT("bool-radio");
else if (item->GetType() == ctTypeInteger)
typeStr = wxT("integer");
else
typeStr = wxT("unknown");
stream << wxT("<setting type=\"") << typeStr << wxT("\">");
indent ++;
OutputIndentation(stream, indent*2);
if (item->IsActive())
stream << wxT("<active>1</active>");
else
stream << wxT("<active>0</active>");
OutputIndentation(stream, indent*2);
if (item->IsEnabled())
stream << wxT("<enabled>1</enabled>");
else
stream << wxT("<enabled>0</enabled>");
// Output properties
wxNode* node = item->GetProperties().GetList().GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
OutputIndentation(stream, indent*2);
stream << wxT("<") << prop->GetName() ;
if (prop->IsCustom())
{
stream << wxT(" custom=\"true\"");
stream << wxT(" type=\"") << prop->GetVariant().GetType() << wxT("\"");
stream << wxT(" editor-type=\"") << prop->GetEditorType() << wxT("\"");
stream << wxT(" description=\"") << prop->GetDescription() << wxT("\"");
if (prop->GetChoices().GetCount() > 0)
{
wxString choices;
ctConfigItem::ArrayToString(prop->GetChoices(), choices);
stream << wxT(" choices=\"") << choices << wxT("\"");
}
}
stream << wxT(">");
stream << ctEscapeHTMLCharacters(prop->GetVariant().GetString()) ;
stream << wxT("</") << prop->GetName() << wxT(">");
node = node->Next();
}
// Output children
node = item->GetChildren().GetFirst();
while (node)
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
DoSave(child, stream, indent);
node = node->Next();
}
indent --;
OutputIndentation(stream, indent*2);
stream << wxT("</setting>");
return TRUE;
}
/// Open the settings file
bool ctConfigToolDoc::DoOpen(const wxString& filename)
{
wxSimpleHtmlParser parser;
if (parser.ParseFile(filename))
{
ctConfigToolHint hint(NULL, ctClear);
UpdateAllViews (NULL, & hint);
m_topItem = NULL;
if (parser.GetTopLevelTag()->GetChildren())
{
wxSimpleHtmlTag* settingsTag = parser.GetTopLevelTag()->GetChildren()->FindTag(wxT("settings"));
if (settingsTag && settingsTag->GetChildren())
{
wxSimpleHtmlTag* firstSettingTag = settingsTag->GetChildren();
if (firstSettingTag)
DoOpen(firstSettingTag, NULL);
return TRUE;
}
return TRUE;
}
}
return FALSE;
}
static bool GetHtmlBoolValue(const wxString& value)
{
if (value == wxT("true") || value == wxT("TRUE") || value == wxT("1"))
return TRUE;
else
return FALSE;
}
static int GetHtmlIntegerValue(const wxString& value)
{
return wxAtoi(value);
}
static double GetHtmlDoubleValue(const wxString& value)
{
return wxAtof(value);
}
bool ctConfigToolDoc::DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent)
{
ctConfigItem* newItem = NULL;
if (tag->NameIs(wxT("setting")))
{
wxSimpleHtmlAttribute* attr = tag->FindAttribute(wxT("type"));
if (attr)
{
ctConfigType type = ctTypeUnknown;
wxString typeStr(attr->GetValue());
if (typeStr == wxT("group"))
type = ctTypeGroup;
else if (typeStr == wxT("option-group") || typeStr == wxT("check-group"))
type = ctTypeCheckGroup;
else if (typeStr == wxT("radio-group"))
type = ctTypeRadioGroup;
else if (typeStr == wxT("bool-check"))
type = ctTypeBoolCheck;
else if (typeStr == wxT("bool-radio"))
type = ctTypeBoolRadio;
else if (typeStr == wxT("string"))
type = ctTypeString;
else if (typeStr == wxT("integer"))
type = ctTypeInteger;
else
{
wxLogError(wxT("Unknown type %s"), (const wxChar*) typeStr);
}
if (type != ctTypeUnknown)
{
newItem = new ctConfigItem(parent, type, wxT(""));
newItem->InitProperties();
if (!parent)
SetTopItem(newItem);
}
}
}
wxSimpleHtmlTag* childTag = tag->GetChildren();
while (childTag)
{
if (childTag->GetType() == wxSimpleHtmlTag_Open)
{
if (childTag->GetName() == wxT("setting"))
{
DoOpen(childTag, newItem);
}
else if (childTag->GetName() == wxT("name"))
{
if (newItem)
{
wxString name(childTag->GetNext()->GetTagText());
newItem->SetName(name);
}
}
else if (childTag->GetName() == wxT("active"))
{
if (newItem)
newItem->SetActive(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
}
else if (childTag->GetName() == wxT("enabled"))
{
if (newItem)
newItem->Enable(GetHtmlBoolValue(childTag->GetNext()->GetTagText()));
}
else
{
if (newItem)
{
ctProperty* prop = newItem->GetProperties().FindProperty(childTag->GetName());
if (!prop)
{
// A custom property, else an obsolete
// property that we should ignore.
wxString isCustom;
if (childTag->GetAttributeValue(isCustom, wxT("custom")) &&
isCustom == wxT("true"))
{
prop = new ctProperty;
wxString name(childTag->GetName());
wxString type(wxT("string"));
wxString choices;
wxString editorType(wxT("string"));
wxString description(wxT(""));
childTag->GetAttributeValue(type, wxT("type"));
childTag->GetAttributeValue(type, wxT("editor-type"));
childTag->GetAttributeValue(type, wxT("choices"));
childTag->GetAttributeValue(description, wxT("description"));
if (type == wxT("bool"))
prop->GetVariant() = wxVariant((bool) FALSE, name);
else if (type == wxT("double"))
prop->GetVariant() = wxVariant((double) 0.0, name);
else if (type == wxT("long"))
prop->GetVariant() = wxVariant((long) 0, name);
else
prop->GetVariant() = wxVariant(wxT(""), name);
prop->SetDescription(description);
prop->SetCustom(TRUE);
prop->SetEditorType(editorType);
if (!choices.IsEmpty())
{
wxArrayString arr;
ctConfigItem::StringToArray(choices, arr);
prop->SetChoices(arr);
}
newItem->GetProperties().AddProperty(prop);
}
}
if (prop)
{
if (prop->GetVariant().GetType() == wxT("string"))
prop->GetVariant() = childTag->GetNext()->GetTagText();
else if (prop->GetVariant().GetType() == wxT("long"))
prop->GetVariant() = (long) GetHtmlIntegerValue(childTag->GetNext()->GetTagText());
else if (prop->GetVariant().GetType() == wxT("bool"))
prop->GetVariant() = (bool) GetHtmlBoolValue(childTag->GetNext()->GetTagText());
else if (prop->GetVariant().GetType() == wxT("double"))
prop->GetVariant() = (double) GetHtmlDoubleValue(childTag->GetNext()->GetTagText());
}
}
}
}
childTag = childTag->GetNext();
}
return TRUE;
}
/// Clear dependencies
void ctConfigToolDoc::ClearDependencies(ctConfigItem* item)
{
if (!item)
item = GetTopItem();
item->GetDependents().Clear();
for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
ClearDependencies(child);
}
}
/// Refresh dependencies
void ctConfigToolDoc::RefreshDependencies()
{
ClearDependencies(GetTopItem());
RefreshDependencies(GetTopItem());
}
/// Refresh dependencies
void ctConfigToolDoc::RefreshDependencies(ctConfigItem* item)
{
wxArrayString requiresArr;
wxString requires = item->GetPropertyString(wxT("requires"));
wxString precludes = item->GetPropertyString(wxT("precludes"));
wxString enabledIf = item->GetPropertyString(wxT("enabled-if"));
wxString enabledIfNot = item->GetPropertyString(wxT("enabled-if-not"));
wxString context = item->GetPropertyString(wxT("context"));
if (!requires.IsEmpty())
item->StringToArray(requires, requiresArr);
if (!precludes.IsEmpty())
item->StringToArray(precludes, requiresArr);
if (!enabledIfNot.IsEmpty())
item->StringToArray(enabledIfNot, requiresArr);
if (!enabledIf.IsEmpty())
item->StringToArray(enabledIf, requiresArr);
// Add the parent to the list of dependencies, if the
// parent is a check or radio group.
ctConfigItem* parent = item->GetParent();
if (parent &&
(parent->GetType() == ctTypeCheckGroup ||
parent->GetType() == ctTypeRadioGroup))
requiresArr.Add(parent->GetName());
// Also look in 'context' since these items
// are another kind of dependency (switching to
// a different platform may cause the dependencies
// to be evaluated differently).
if (!context.IsEmpty())
item->StringToArray(context, requiresArr);
size_t i;
for (i = 0; i < requiresArr.GetCount(); i++)
{
wxString itemName(requiresArr[i]);
ctConfigItem* otherItem = GetTopItem()->FindItem(itemName);
if (otherItem && !otherItem->GetDependents().Member(item))
{
otherItem->GetDependents().Append(item);
}
}
for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
RefreshDependencies(child);
}
}
/// Generate the text of a setup.h
wxString ctConfigToolDoc::GenerateSetup()
{
wxString str;
str << wxT("/*\n * setup.h\n * Generated by wxConfigTool\n *\n */\n\n");
GenerateSetup(GetTopItem(), str);
return str;
}
/// Helper function
void ctConfigToolDoc::GenerateSetup(ctConfigItem* item, wxString& str)
{
// Generate the setup.h entries for this item
wxString name = item->GetName();
// We don't process the platform choice
if (item->GetName() == wxT("Platform"))
return;
if (item->IsInActiveContext() &&
(item->GetType() == ctTypeCheckGroup ||
item->GetType() == ctTypeRadioGroup ||
item->GetType() == ctTypeBoolCheck ||
item->GetType() == ctTypeBoolRadio))
{
// TODO: write description
wxString name = item->GetName();
if (name.Left(6) == wxT("wxUSE_") ||
name == wxT("REMOVE_UNUSED_ARG") || // Hack alert: change to wxUSE_UNUSED_ARG_REMOVAL
name.Find(wxT("COMPATIBILITY")) != wxNOT_FOUND)
{
str << wxT("#define ") << name ;
if (item->IsEnabled())
str << wxT(" 1");
else
str << wxT(" 0");
str << wxT("\n\n");
}
}
for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
GenerateSetup(child, str);
}
}
/// Generate a configure command
wxString ctConfigToolDoc::GenerateConfigureCommand()
{
wxString str;
str << wxT("# configurewx\n# Generated by wxConfigTool\n\n");
wxString path = GetFrameworkDir(TRUE);
bool makeUnix = TRUE;
if (!path.IsEmpty())
{
if (makeUnix)
path += wxT("/");
else
path += wxFILE_SEP_PATH ;
}
str << path << wxT("configure");
// Find the platform option to use
ctConfigItem* platformsFolder = GetTopItem()->FindItem(wxT("Platform"));
if (platformsFolder)
{
for ( wxNode* node = platformsFolder->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
if (child->GetType() == ctTypeBoolRadio && child->IsEnabled())
{
wxString configureCommand = child->GetPropertyString(wxT("configure-command"));
if (!configureCommand.IsEmpty())
str << wxT(" ") << configureCommand;
}
}
}
GenerateConfigureCommand(GetTopItem(), str);
return str;
}
/// Helper function
void ctConfigToolDoc::GenerateConfigureCommand(ctConfigItem* item, wxString& str)
{
// We don't process the platform group, since we've
// already done so.
if (item->GetName() == wxT("Platform"))
return;
if (item->IsInActiveContext() &&
(item->GetType() == ctTypeCheckGroup ||
item->GetType() == ctTypeRadioGroup ||
item->GetType() == ctTypeBoolCheck ||
item->GetType() == ctTypeBoolRadio))
{
wxString name = item->GetName();
wxString configureCommand = item->GetPropertyString(wxT("configure-command"));
if (!configureCommand.IsEmpty())
{
if (!item->IsEnabled())
{
// Replace 'enable' with 'disable' if this
// option is off.
configureCommand.Replace(wxT("--enable-"), wxT("--disable-"));
configureCommand.Replace(wxT("--with-"), wxT("--without-"));
}
ctProperty* prop = item->GetProperties().FindProperty(wxT("builtin"));
if (prop && prop->GetVariant().GetType() == wxT("bool"))
{
bool builtin = prop->GetVariant().GetBool();
str << wxT(" ") << configureCommand;
if (builtin)
str << wxT("=builtin");
else
str << wxT("=sys");
}
else
{
ctProperty* prop = item->GetProperties().FindProperty(wxT("value"));
if (prop && prop->GetVariant().GetType() == wxT("string"))
{
wxString val = prop->GetVariant().GetString();
if (item->IsEnabled() && !val.IsEmpty())
{
str << wxT(" ") << configureCommand;
str << wxT("=\"") << val << wxT("\"");
}
// If the string is empty, ignore this parameter,
// since it's obviously intended to be supplied
// only if there's a string to use and it's enabled.
}
else
{
str << wxT(" ") << configureCommand;
}
}
}
}
for ( wxNode* node = item->GetChildren().GetFirst(); node; node = node->GetNext() )
{
ctConfigItem* child = (ctConfigItem*) node->GetData();
GenerateConfigureCommand(child, str);
}
}
/// Gets the current framework directory
wxString ctConfigToolDoc::GetFrameworkDir(bool makeUnix)
{
wxString path = wxGetApp().GetSettings().m_frameworkDir;
if (wxGetApp().GetSettings().m_useEnvironmentVariable)
{
// Should probably allow other variables
// to be used, and maybe expand variables within m_frameworkDir
path = wxGetenv(wxT("WXWIN"));
#ifdef __WXMSW__
if (makeUnix)
path.Replace(wxT("\\"), wxT("/"));
#endif
}
return path;
}
/*
* Implements a document editing command.
*/
ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
ctConfigItem* activeState, ctConfigItem* savedState,
ctConfigItem* parent, ctConfigItem* insertBefore,
bool ignoreFirstTime): wxCommand(TRUE, name)
{
m_activeState = activeState;
m_savedState = savedState;
m_ignoreThis = ignoreFirstTime;
m_cmdId = cmdId;
m_properties = NULL;
m_parent = parent;
m_insertBefore = insertBefore;
}
ctConfigCommand::ctConfigCommand(const wxString& name, int cmdId,
ctConfigItem* activeState, ctProperties* properties,
bool ignoreFirstTime): wxCommand(TRUE, name)
{
m_activeState = activeState;
m_savedState = NULL;
m_properties = properties;
m_ignoreThis = ignoreFirstTime;
m_cmdId = cmdId;
m_properties = properties;
m_parent = NULL;
m_insertBefore = NULL;
}
ctConfigCommand::~ctConfigCommand()
{
if (m_savedState)
delete m_savedState;
if (m_properties)
delete m_properties;
}
bool ctConfigCommand::Do()
{
return DoAndUndo(TRUE);
}
bool ctConfigCommand::Undo()
{
return DoAndUndo(FALSE);
}
// Combine Do and Undo into one
bool ctConfigCommand::DoAndUndo(bool doCmd)
{
switch (m_cmdId)
{
case ctCMD_CUT:
{
if (doCmd)
{
wxASSERT(m_savedState == NULL);
wxASSERT(m_activeState != NULL);
ctConfigItem* newItem = m_activeState->DeepClone();
ctConfigToolDoc* doc = m_activeState->GetDocument();
// This will delete the old clipboard contents, if any.
doc->SetClipboardItem(newItem);
m_parent = m_activeState->GetParent();
m_insertBefore = m_activeState->FindNextSibling();
m_activeState->Detach();
m_savedState = m_activeState;
m_activeState = NULL;
m_savedState->GetDocument()->Modify(TRUE);
ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
view->OnChangeFilename();
}
else
{
wxASSERT(m_savedState != NULL);
wxASSERT(m_activeState == NULL);
m_savedState->GetDocument()->Modify(TRUE);
m_savedState->Attach(m_parent, m_insertBefore);
ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
m_activeState = m_savedState;
m_savedState = NULL;
m_parent = NULL;
m_insertBefore = NULL;
view->OnChangeFilename();
}
break;
}
case ctCMD_PASTE:
{
if (doCmd)
{
wxASSERT(m_savedState != NULL);
wxASSERT(m_activeState == NULL);
m_savedState->GetDocument()->Modify(TRUE);
m_savedState->Attach(m_parent, m_insertBefore);
ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
m_activeState = m_savedState;
m_savedState = NULL;
view->OnChangeFilename();
}
else
{
wxASSERT(m_savedState == NULL);
wxASSERT(m_activeState != NULL);
m_activeState->GetDocument()->Modify(TRUE);
ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
m_activeState->Detach();
m_savedState = m_activeState;
m_activeState = NULL;
view->OnChangeFilename();
}
break;
}
case ctCMD_NEW_ELEMENT:
{
if (doCmd)
{
wxASSERT(m_savedState != NULL);
wxASSERT(m_activeState == NULL);
m_savedState->GetDocument()->Modify(TRUE);
m_savedState->Attach(m_parent, m_insertBefore);
ctConfigToolView* view = (ctConfigToolView*) m_savedState->GetDocument()->GetFirstView();
view->AddItems(wxGetApp().GetMainFrame()->GetConfigTreeCtrl(), m_savedState);
wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(m_savedState->GetTreeItemId());
m_activeState = m_savedState;
m_savedState = NULL;
}
else
{
wxASSERT(m_savedState == NULL);
wxASSERT(m_activeState != NULL);
m_activeState->GetDocument()->Modify(TRUE);
m_activeState->Detach();
m_savedState = m_activeState;
m_activeState = NULL;
}
break;
}
case ctCMD_APPLY_PROPERTY:
{
wxASSERT(m_properties != NULL);
wxASSERT(m_activeState != NULL);
// Don't update the properties editor first time
// around since it will be done one property at a time
// initially (and no property editor update required)
if (!m_ignoreThis)
{
// Just swap the saved and current properties.
ctProperties propsTemp = m_activeState->GetProperties() ;
m_activeState->GetProperties() = (* m_properties);
(* m_properties) = propsTemp;
// Apply only those that need applying
// (those properties in activeState that are not in propsTemp)
wxNode* node = m_activeState->GetProperties().GetList().GetFirst();
while (node)
{
ctProperty* prop = (ctProperty*) node->GetData();
ctProperty* otherProp = propsTemp.FindProperty(prop->GetName());
if (otherProp && ((*prop) != (*otherProp)))
{
m_activeState->ApplyProperty(prop, otherProp->GetVariant());
}
node = node->GetNext();
}
m_activeState->GetDocument()->Modify(TRUE);
ctConfigToolView* view = (ctConfigToolView*) m_activeState->GetDocument()->GetFirstView();
if (view)
{
ctConfigToolHint hint(NULL, ctValueChanged);
m_activeState->GetDocument()->UpdateAllViews (NULL, & hint);
}
}
m_ignoreThis = FALSE;
break;
}
}
return TRUE;
}

View File

@@ -0,0 +1,149 @@
/////////////////////////////////////////////////////////////////////////////
// Name: configtooldoc.h
// Purpose: Document class
// Author: Julian Smart
// Modified by:
// Created: 2003-06-04
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _CT_CONFIGTOOLDOC_H_
#define _CT_CONFIGTOOLDOC_H_
#ifdef __GNUG__
#pragma interface "configtooldoc.cpp"
#endif
#include "wx/docview.h"
#include "wx/cmdproc.h"
#include "configitem.h"
class wxSimpleHtmlTag;
/*!
* ctConfigToolDoc
*/
class ctConfigToolDoc: public wxDocument
{
DECLARE_DYNAMIC_CLASS(ctConfigToolDoc)
public:
ctConfigToolDoc();
~ctConfigToolDoc();
//// Overrides
virtual bool OnCreate(const wxString& path, long flags);
virtual bool OnOpenDocument(const wxString& filename);
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnNewDocument() { return TRUE; }
virtual bool OnCloseDocument() ;
virtual bool Save(); // Overridden only to correct bug in wxWindows, docview.cpp
//// Accessors
/// Returns the top item.
ctConfigItem* GetTopItem() const { return m_topItem; }
/// Sets the top item.
void SetTopItem(ctConfigItem* item) { m_topItem = item; }
/// Returns the clipboard item.
ctConfigItem* GetClipboardItem() const { return m_clipboardItem; }
/// Sets the clipboard item.
void SetClipboardItem(ctConfigItem* item) ;
/// Clears the clipboard item.
void ClearClipboard() ;
/// Gets the current framework directory
wxString GetFrameworkDir(bool makeUnix);
//// Operations
/// Add items
void AddItems();
/// Delete items
void DeleteItems();
/// Save the settings file
bool DoSave(const wxString& filename);
/// Recursive helper function for file saving
bool DoSave(ctConfigItem* item, wxOutputStream& stream, int indent);
/// Open the settings file
bool DoOpen(const wxString& filename);
/// Helper for file opening.
bool DoOpen(wxSimpleHtmlTag* tag, ctConfigItem* parent);
/// Refresh dependencies
void RefreshDependencies();
void RefreshDependencies(ctConfigItem* item);
/// Clear dependencies
void ClearDependencies(ctConfigItem* item);
/// Generate the text of a setup.h
wxString GenerateSetup();
/// Helper function
void GenerateSetup(ctConfigItem* item, wxString& str);
/// Generate a configure command
wxString GenerateConfigureCommand();
/// Helper function
void GenerateConfigureCommand(ctConfigItem* item, wxString& str);
protected:
ctConfigItem* m_topItem;
ctConfigItem* m_clipboardItem;
};
/*!
* Implements a document editing command.
* We only need to store one state at a time,
* since we don't have (or need) multiple selection.
*/
#define ctCMD_NEW_ELEMENT 1
#define ctCMD_PASTE 2
#define ctCMD_CUT 3
#define ctCMD_APPLY_PROPERTY 4
class ctConfigCommand: public wxCommand
{
public:
ctConfigCommand(const wxString& name, int cmdId,
ctConfigItem* activeState, ctConfigItem* savedState,
ctConfigItem* parent = NULL, ctConfigItem* insertBefore = NULL,
bool ignoreFirstTime = FALSE);
ctConfigCommand(const wxString& name, int cmdId,
ctConfigItem* activeState, ctProperties* properties,
bool ignoreFirstTime = FALSE);
~ctConfigCommand();
bool Do();
bool Undo();
bool DoAndUndo(bool doCmd); // Combine Do and Undo into one
protected:
ctConfigItem* m_activeState;
ctConfigItem* m_savedState;
ctProperties* m_properties;
bool m_ignoreThis; // Ignore 1st Do because we already did it
int m_cmdId;
ctConfigItem* m_parent;
ctConfigItem* m_insertBefore;
};
#endif
// _CT_CONFIGTOOLDOC_H_

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