Merge branch 'master' of https://github.com/Amebis/ZRCola
This commit is contained in:
commit
f766fae8e3
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/ipch
|
||||||
|
/output/Win32.Debug
|
||||||
|
/output/Win32.Release
|
||||||
|
/output/x64.Debug
|
||||||
|
/output/x64.Release
|
||||||
|
/*.sdf
|
||||||
|
/*.suo
|
||||||
|
*.user
|
||||||
|
temp
|
||||||
|
/*.opensdf
|
674
LICENSE
Normal file
674
LICENSE
Normal file
@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. 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
|
||||||
|
them 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 prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. 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.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey 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;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If 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 convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU 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 that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
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.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
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
|
||||||
|
state 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) {year} {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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
{project} Copyright (C) {year} {fullname}
|
||||||
|
This program 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, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU 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 Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
41
ZRCola.sln
Normal file
41
ZRCola.sln
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRCola", "ZRCola\ZRCola.vcxproj", "{CD9E4170-92DD-440E-980C-D15F62032249}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtend.vcxproj", "{A3A36689-AC35-4026-93DA-A3BA0C0E767C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.Build.0 = Release|x64
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.Build.0 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{A3A36689-AC35-4026-93DA-A3BA0C0E767C} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
14
ZRCola/ZRCola.props
Normal file
14
ZRCola/ZRCola.props
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>..\lib\wxExtend\include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
101
ZRCola/ZRCola.vcxproj
Normal file
101
ZRCola/ZRCola.vcxproj
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{CD9E4170-92DD-440E-980C-D15F62032249}</ProjectGuid>
|
||||||
|
<RootNamespace>ZRCola</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\include\Win32.props" />
|
||||||
|
<Import Project="..\include\Debug.props" />
|
||||||
|
<Import Project="ZRCola.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\include\x64.props" />
|
||||||
|
<Import Project="..\include\Debug.props" />
|
||||||
|
<Import Project="ZRCola.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\include\Win32.props" />
|
||||||
|
<Import Project="..\include\Release.props" />
|
||||||
|
<Import Project="ZRCola.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\include\x64.props" />
|
||||||
|
<Import Project="..\include\Release.props" />
|
||||||
|
<Import Project="ZRCola.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="main.cpp" />
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="zrcolaapp.cpp" />
|
||||||
|
<ClCompile Include="zrcolaframe.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\ZRCola.h" />
|
||||||
|
<ClInclude Include="stdafx.h" />
|
||||||
|
<ClInclude Include="zrcolaapp.h" />
|
||||||
|
<ClInclude Include="zrcolaframe.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\lib\wxExtend\build\wxExtend.vcxproj">
|
||||||
|
<Project>{a3a36689-ac35-4026-93da-a3ba0c0e767c}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
45
ZRCola/ZRCola.vcxproj.filters
Normal file
45
ZRCola/ZRCola.vcxproj.filters
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="main.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="zrcolaapp.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="zrcolaframe.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\ZRCola.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="zrcolaapp.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="zrcolaframe.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
59
ZRCola/main.cpp
Normal file
59
ZRCola/main.cpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow)
|
||||||
|
//{
|
||||||
|
// UNREFERENCED_PARAMETER(hInstance);
|
||||||
|
// UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
|
// UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
// UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
//
|
||||||
|
// Sleep(10000);
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// INPUT input[2];
|
||||||
|
//
|
||||||
|
// input[0].type = INPUT_KEYBOARD;
|
||||||
|
// input[0].ki.wVk = 0;
|
||||||
|
// input[0].ki.wScan = 0x00d2;
|
||||||
|
// input[0].ki.dwFlags = KEYEVENTF_UNICODE;
|
||||||
|
// input[0].ki.time = 0;
|
||||||
|
// input[0].ki.dwExtraInfo = 0;
|
||||||
|
//
|
||||||
|
// input[1].type = INPUT_KEYBOARD;
|
||||||
|
// input[1].ki.wVk = 0;
|
||||||
|
// input[1].ki.wScan = 0x00d2;
|
||||||
|
// input[1].ki.dwFlags = KEYEVENTF_UNICODE | KEYEVENTF_KEYUP;
|
||||||
|
// input[1].ki.time = 0;
|
||||||
|
// input[1].ki.dwExtraInfo = 0;
|
||||||
|
//
|
||||||
|
// SendInput(_countof(input), input, sizeof(INPUT));
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return 0;
|
||||||
|
//}
|
20
ZRCola/stdafx.cpp
Normal file
20
ZRCola/stdafx.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
28
ZRCola/stdafx.h
Normal file
28
ZRCola/stdafx.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../include/ZRCola.h"
|
||||||
|
#include "zrcolaapp.h"
|
||||||
|
#include "zrcolaframe.h"
|
||||||
|
|
||||||
|
#include <wx/menu.h>
|
||||||
|
#include <wx/msgdlg.h>
|
||||||
|
#include <wxex/common.h>
|
43
ZRCola/zrcolaapp.cpp
Normal file
43
ZRCola/zrcolaapp.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// ZRColaApp
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
wxIMPLEMENT_APP(ZRColaApp);
|
||||||
|
|
||||||
|
|
||||||
|
bool ZRColaApp::OnInit()
|
||||||
|
{
|
||||||
|
if (wxLocale::IsAvailable(wxLANGUAGE_SLOVENIAN)) {
|
||||||
|
wxString sPath(wxPathOnly(argv[0]));
|
||||||
|
sPath << wxT("\\..\\locale");
|
||||||
|
m_locale.AddCatalogLookupPathPrefix(sPath);
|
||||||
|
wxVERIFY(m_locale.Init(wxLANGUAGE_SLOVENIAN));
|
||||||
|
wxVERIFY(m_locale.AddCatalog(wxT("ZRCola")));
|
||||||
|
}
|
||||||
|
|
||||||
|
ZRColaFrame *frame = new ZRColaFrame(_("Hello World"), wxPoint(50, 50), wxSize(450, 340));
|
||||||
|
frame->Show(true);
|
||||||
|
return true;
|
||||||
|
}
|
35
ZRCola/zrcolaapp.h
Normal file
35
ZRCola/zrcolaapp.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <wx/app.h>
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// ZRCola application
|
||||||
|
///
|
||||||
|
class ZRColaApp: public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool OnInit();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxLocale m_locale;
|
||||||
|
};
|
69
ZRCola/zrcolaframe.cpp
Normal file
69
ZRCola/zrcolaframe.cpp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// ZRColaFrame
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
wxBEGIN_EVENT_TABLE(ZRColaFrame, wxAppBar)
|
||||||
|
EVT_MENU(ZRColaFrame::ID_Hello, ZRColaFrame::OnHello)
|
||||||
|
EVT_MENU(wxID_EXIT, ZRColaFrame::OnExit)
|
||||||
|
EVT_MENU(wxID_ABOUT, ZRColaFrame::OnAbout)
|
||||||
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxAppBar(NULL, wxID_ANY, title, wxSTATE_FLOAT, wxFLAG_ALLOWFLOAT | wxFLAG_ALLOWDOCKHORIZONTAL | wxFLAG_ALLOWSIZING | wxFLAG_HIDETASKBARTABWHENDOCKED, pos, size)
|
||||||
|
{
|
||||||
|
wxMenu *menuFile = new wxMenu;
|
||||||
|
menuFile->Append(ZRColaFrame::ID_Hello, _("&Hello...\tCtrl+H"), _("Help string shown in status bar for this menu item"));
|
||||||
|
menuFile->AppendSeparator();
|
||||||
|
menuFile->Append(wxID_EXIT);
|
||||||
|
|
||||||
|
wxMenu *menuHelp = new wxMenu;
|
||||||
|
menuHelp->Append(wxID_ABOUT);
|
||||||
|
|
||||||
|
wxMenuBar *menuBar = new wxMenuBar;
|
||||||
|
menuBar->Append(menuFile, _("&File"));
|
||||||
|
menuBar->Append(menuHelp, _("&Help"));
|
||||||
|
SetMenuBar(menuBar);
|
||||||
|
|
||||||
|
//CreateStatusBar();
|
||||||
|
//SetStatusText(_("Welcome to wxWidgets!"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZRColaFrame::OnExit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZRColaFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxMessageBox(_("This is a wxWidgets' Hello world sample"), _("About Hello World"), wxOK | wxICON_INFORMATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZRColaFrame::OnHello(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxLogMessage(_("Hello world from wxWidgets!"));
|
||||||
|
}
|
42
ZRCola/zrcolaframe.h
Normal file
42
ZRCola/zrcolaframe.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <wxex/appbar.h>
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// ZRCola main frame
|
||||||
|
///
|
||||||
|
class ZRColaFrame : public wxAppBar
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ID_Hello = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void OnHello(wxCommandEvent& event);
|
||||||
|
void OnExit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
};
|
44
include/Debug.props
Normal file
44
include/Debug.props
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>ZRCola Debug</_PropertySheetDisplayName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<SmallerTypeCheck>true</SmallerTypeCheck>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
|
||||||
|
<Message Text="Signing output file..." />
|
||||||
|
<SignFile CertificateThumbprint="$(ManifestCertificateThumbprint)" SigningTarget="$(OutDir)$(TargetName)$(TargetExt)" />
|
||||||
|
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
67
include/Release.props
Normal file
67
include/Release.props
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>ZRCola Release</_PropertySheetDisplayName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Full</Optimization>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Target Name="Sign" Condition="'$(ManifestCertificateThumbprint)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary')" AfterTargets="_Manifest" BeforeTargets="RegisterOutput" Inputs="$(OutDir)$(TargetName)$(TargetExt)" Outputs="$(IntDir)$(TargetName).sign">
|
||||||
|
<Message Text="Signing output file..." />
|
||||||
|
<SignFile CertificateThumbprint="$(ManifestCertificateThumbprint)" TimestampUrl="$(ManifestTimestampUrl)" SigningTarget="$(OutDir)$(TargetName)$(TargetExt)" />
|
||||||
|
<Touch Files="$(IntDir)$(TargetName).sign" AlwaysCreate="true" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
39
include/Win32.props
Normal file
39
include/Win32.props
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="common.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>ZRCola Win32</_PropertySheetDisplayName>
|
||||||
|
<LibraryPath>$(WX_INSTALL_PATH)\lib\vc$(PlatformToolsetVersion)_dll;$(LibraryPath)</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<Lib>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Lib>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
20
include/ZRCola.h
Normal file
20
include/ZRCola.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
50
include/common.props
Normal file
50
include/common.props
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets" />
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<IntDir>temp\$(ProjectName).$(Platform).$(Configuration).$(PlatformToolset)\</IntDir>
|
||||||
|
<_PropertySheetDisplayName>ZRCola Common</_PropertySheetDisplayName>
|
||||||
|
<OutDir>temp\$(ProjectName).$(Platform).$(Configuration).$(PlatformToolset)\</OutDir>
|
||||||
|
<IncludePath>$(WX_INSTALL_PATH)\include\msvc;$(WX_INSTALL_PATH)\include;$(IncludePath)</IncludePath>
|
||||||
|
<SourcePath>$(WX_INSTALL_PATH)\src\aui;$(WX_INSTALL_PATH)\src\cocoa;$(WX_INSTALL_PATH)\src\common;$(WX_INSTALL_PATH)\src\dfb;$(WX_INSTALL_PATH)\src\expat;$(WX_INSTALL_PATH)\src\generic;$(WX_INSTALL_PATH)\src\gtk;$(WX_INSTALL_PATH)\src\gtk1;$(WX_INSTALL_PATH)\src\html;$(WX_INSTALL_PATH)\src\jpeg;$(WX_INSTALL_PATH)\src\motif;$(WX_INSTALL_PATH)\src\msdos;$(WX_INSTALL_PATH)\src\msw;$(WX_INSTALL_PATH)\src\os2;$(WX_INSTALL_PATH)\src\osx;$(WX_INSTALL_PATH)\src\png;$(WX_INSTALL_PATH)\src\propgrid;$(WX_INSTALL_PATH)\src\regex;$(WX_INSTALL_PATH)\src\ribbon;$(WX_INSTALL_PATH)\src\richtext;$(WX_INSTALL_PATH)\src\stc;$(WX_INSTALL_PATH)\src\tiff;$(WX_INSTALL_PATH)\src\univ;$(WX_INSTALL_PATH)\src\unix;$(WX_INSTALL_PATH)\src\x11;$(WX_INSTALL_PATH)\src\xml;$(WX_INSTALL_PATH)\src\xrc;$(WX_INSTALL_PATH)\src\zlib;$(SourcePath)</SourcePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<PreprocessorDefinitions>NTDDI_VERSION=NTDDI_WINXP;_WIN32_WINNT=_WIN32_WINNT_WINXP;wxMSVC_VERSION_AUTO;WXUSINGDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<DisableSpecificWarnings>4100;4505</DisableSpecificWarnings>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>WINVER=0x0501;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
39
include/x64.props
Normal file
39
include/x64.props
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of ZRCola.
|
||||||
|
|
||||||
|
ZRCola 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="common.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_PropertySheetDisplayName>ZRCola x64</_PropertySheetDisplayName>
|
||||||
|
<LibraryPath>$(WX_INSTALL_PATH)\lib\vc$(PlatformToolsetVersion)_x64_dll;$(LibraryPath)</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<Lib>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Lib>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<TargetMachine>MachineX64</TargetMachine>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
</Project>
|
90
lib/wxExtend/build/wxExtend.vcxproj
Normal file
90
lib/wxExtend/build/wxExtend.vcxproj
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\src\appbar.cpp" />
|
||||||
|
<ClCompile Include="..\src\stdafx.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\wxex\appbar.h" />
|
||||||
|
<ClInclude Include="..\include\wxex\common.h" />
|
||||||
|
<ClInclude Include="..\src\stdafx.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{A3A36689-AC35-4026-93DA-A3BA0C0E767C}</ProjectGuid>
|
||||||
|
<RootNamespace>wxExtend</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\include\Win32.props" />
|
||||||
|
<Import Project="..\..\..\include\Debug.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\include\x64.props" />
|
||||||
|
<Import Project="..\..\..\include\Debug.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\include\Win32.props" />
|
||||||
|
<Import Project="..\..\..\include\Release.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
<Import Project="..\..\..\include\x64.props" />
|
||||||
|
<Import Project="..\..\..\include\Release.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup />
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
36
lib/wxExtend/build/wxExtend.vcxproj.filters
Normal file
36
lib/wxExtend/build/wxExtend.vcxproj.filters
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\src\stdafx.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\appbar.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\src\stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\wxex\appbar.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\wxex\common.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
620
lib/wxExtend/include/wxex/appbar.h
Normal file
620
lib/wxExtend/include/wxex/appbar.h
Normal file
@ -0,0 +1,620 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
Based on code written by Jeffrey Richter.
|
||||||
|
|
||||||
|
This file is part of wxExtend.
|
||||||
|
|
||||||
|
wxExtend 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <ShlObj.h>
|
||||||
|
|
||||||
|
#include <wx/frame.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define wxABT_AUTOHIDETIMERID 1
|
||||||
|
#define wxABT_AUTOHIDETIME 300
|
||||||
|
#define wxABT_AUTOHIDETIMERINTERVAL 3000
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Dockable application bar
|
||||||
|
///
|
||||||
|
class wxAppBar : public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
///
|
||||||
|
/// Application bar states
|
||||||
|
///
|
||||||
|
enum wxState {
|
||||||
|
wxSTATE_UNKNOWN = -2,
|
||||||
|
wxSTATE_FLOAT = -1,
|
||||||
|
wxSTATE_LEFT = ABE_LEFT,
|
||||||
|
wxSTATE_TOP = ABE_TOP,
|
||||||
|
wxSTATE_RIGHT = ABE_RIGHT,
|
||||||
|
wxSTATE_BOTTOM = ABE_BOTTOM,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Application bar flags
|
||||||
|
///
|
||||||
|
enum wxFlags {
|
||||||
|
wxFLAG_ALLOWFLOAT = 1 << 0, ///< Is floating application bar allowed?
|
||||||
|
wxFLAG_ALLOWDOCKTOP = 1 << 1, ///< Is docking on top of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKBOTTOM = 1 << 2, ///< Is docking on bottom of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKLEFT = 1 << 3, ///< Is docking left of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKRIGHT = 1 << 4, ///< Is docking right of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKANY = (wxFLAG_ALLOWDOCKTOP | wxFLAG_ALLOWDOCKBOTTOM | wxFLAG_ALLOWDOCKLEFT | wxFLAG_ALLOWDOCKRIGHT), ///< Is docking at any edge of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKHORIZONTAL = (wxFLAG_ALLOWDOCKTOP | wxFLAG_ALLOWDOCKBOTTOM), ///< Is docking on top or bottom of the screen allowed?
|
||||||
|
wxFLAG_ALLOWDOCKVERTICAL = (wxFLAG_ALLOWDOCKLEFT | wxFLAG_ALLOWDOCKRIGHT), ///< Is docking left or right of the screen allowed?
|
||||||
|
wxFLAG_ALLOWANY = (wxFLAG_ALLOWFLOAT | wxFLAG_ALLOWDOCKANY), ///< Is floating and docking at any edge of the screen allowed?
|
||||||
|
|
||||||
|
wxFLAG_ALWAYSONTOP = 1 << 5, ///< Is application bar always on top?
|
||||||
|
wxFLAG_ALWAYSONTOPTASKBAR = 1 << 6, ///< Does application bar follow always on top state of the system taskbar?
|
||||||
|
|
||||||
|
wxFLAG_AUTOHIDE = 1 << 7, ///< Is application bar setup for auto-hide?
|
||||||
|
wxFLAG_AUTOHIDETASKBAR = 1 << 8, ///< Does application bar follow auto-hide state of the system taskbar?
|
||||||
|
|
||||||
|
wxFLAG_ALLOWSIZING = 1 << 9, ///< Is application bar's sizing allowed?
|
||||||
|
|
||||||
|
wxFLAG_HIDETASKBARTABWHENFLOATING = 1 << 10, ///< Should application bar's tab on the system taskbar hide when floating?
|
||||||
|
wxFLAG_HIDETASKBARTABWHENDOCKED = 1 << 11, ///< Should application bar's tab on the system taskbar hide when docked?
|
||||||
|
wxFLAG_ALWAYSHIDETASKBARTAB = (wxFLAG_HIDETASKBARTABWHENFLOATING | wxFLAG_HIDETASKBARTABWHENDOCKED), ///< Should application bar's tab on the system taskbar hide always?
|
||||||
|
|
||||||
|
// Internal flags
|
||||||
|
wxFLAG_FULLSCREENAPPOPEN = 1 << 12, ///< Is full-screen application open?
|
||||||
|
wxFLAG_AUTOHIDDEN = 1 << 13, ///< Is application bar auto-hidden right now?
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
wxAppBar();
|
||||||
|
wxAppBar(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
wxState state = wxSTATE_FLOAT,
|
||||||
|
int flags = wxFLAG_ALLOWANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
|
bool Create(wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxString& title,
|
||||||
|
wxState state = wxSTATE_FLOAT,
|
||||||
|
int flags = wxFLAG_ALLOWANY,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
|
virtual ~wxAppBar();
|
||||||
|
|
||||||
|
public:
|
||||||
|
/// \name Application bar general management
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns current state of the application bar.
|
||||||
|
///
|
||||||
|
inline wxState GetState() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns whether application bar is displayed always on top.
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - true when application bar is always on top
|
||||||
|
/// - false otherwise
|
||||||
|
///
|
||||||
|
inline bool IsAlwaysOnTop() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Sets whether application bar is displayed always on top.
|
||||||
|
///
|
||||||
|
/// \param[in] alwaysOnTop Logical variable to control whether always-on-top behaviour is to be enabled (true) or disabled (false).
|
||||||
|
///
|
||||||
|
inline bool SetAlwaysOnTop(bool alwaysOnTop = true);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns if application bar is configured for auto-hide.
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - true if application bar is configured for auto-hide
|
||||||
|
/// - false otherwise
|
||||||
|
///
|
||||||
|
inline bool IsAutoHide() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Sets whether application bar is displayed always on top.
|
||||||
|
///
|
||||||
|
/// \param[in] autoHide Logical variable to control whether auto-hide behaviour is to be enabled (true) or disabled (false).
|
||||||
|
///
|
||||||
|
inline bool SetAutoHide(bool autoHide = true);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns if sizing of the application bar is allowed.
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - true if sizing of the application bar is allowed
|
||||||
|
/// - false otherwise
|
||||||
|
///
|
||||||
|
inline bool GetAllowSizing() const;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Sets whether resizing of the application bar is allowed.
|
||||||
|
///
|
||||||
|
/// \param[in] bAllowSizing Logical variable to control whether resizing is to be enabled (true) or disabled (false).
|
||||||
|
///
|
||||||
|
inline bool SetAllowSizing(bool bAllowSizing = true);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns if application bar is auto-hidden right now.
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - true if application bar is auto-hidden right now
|
||||||
|
/// - false otherwise
|
||||||
|
inline bool GetAutoHidden() const;
|
||||||
|
|
||||||
|
//bool GetAppBarPlacement(LPAPPBARPLACEMENT lpPlacement) const;
|
||||||
|
//bool SetAppBarPlacement(LPCAPPBARPLACEMENT lpPlacement);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Minimize application bar to the edge of the desktop.
|
||||||
|
///
|
||||||
|
/// \param[in] edge The edge at which to dock. Must be either of: wxSTATE_LEFT, wxSTATE_TOP, wxSTATE_RIGHT, or wxSTATE_BOTTOM.
|
||||||
|
/// \param[in] wnd When the undocked and docked window is different, this parameter denotes the undocked version.
|
||||||
|
///
|
||||||
|
void MinimiseToEdge(wxState edge, wxWindow* wnd = NULL);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Restore application bar from the edge of the desktop.
|
||||||
|
///
|
||||||
|
/// \param[in] rect The desired coordinates of the restored window. If NULL internally saved coordinates are used.
|
||||||
|
/// \param[in] wnd When the undocked and docked window is different, this parameter denotes the undocked version.
|
||||||
|
///
|
||||||
|
void MaximiseFromEdge(const RECT* rect = NULL);
|
||||||
|
void MaximiseFromEdge(wxWindow *wnd);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Shows or hides auto-hide application bar.
|
||||||
|
///
|
||||||
|
/// \param[in] bShow Logical variable to control whether application bar is be shown (true) or hidden (false).
|
||||||
|
///
|
||||||
|
void ShowAutoHideAppBar(bool bShow = true);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Hides auto-hide application bar.
|
||||||
|
///
|
||||||
|
inline void HideAutoHideAppBar() { ShowAutoHideAppBar(false); }
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/// \name Notification handlers
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Notification handler when the new state of the application bar is proposed.
|
||||||
|
///
|
||||||
|
/// Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.
|
||||||
|
///
|
||||||
|
/// \param[in] stateNew New state about to take effect.
|
||||||
|
///
|
||||||
|
virtual void OnChangeState(wxState stateNew);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Notification handler when the Windows' task bar state changes.
|
||||||
|
///
|
||||||
|
/// Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.
|
||||||
|
///
|
||||||
|
/// \param[in] state New task bar state.
|
||||||
|
///
|
||||||
|
virtual void OnChangeTaskBarState(UINT_PTR state);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Notification handler when desktop windows are being arranged (cascaded, tiled, ...)
|
||||||
|
///
|
||||||
|
/// Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.
|
||||||
|
///
|
||||||
|
/// \param[in] bBeginning true when windows arrangement starts and false when arrangement ends.
|
||||||
|
///
|
||||||
|
virtual void OnWindowsArrange(bool bBeginning);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Called when application bar was forced from auto-hide to normal docking.
|
||||||
|
///
|
||||||
|
/// Default implementation displays a warning dialog.
|
||||||
|
///
|
||||||
|
virtual void OnAutoHideDenied();
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
|
||||||
|
private:
|
||||||
|
inline bool DockAppBar(wxState state);
|
||||||
|
inline bool UndockAppBar();
|
||||||
|
inline bool RegisterAutoHide(wxState state);
|
||||||
|
inline bool UnregisterAutoHide(wxState state);
|
||||||
|
inline bool GetDockedRect(wxState state, LPRECT rect) const;
|
||||||
|
inline bool GetAutoHideRect(wxState state, bool bAutoHidden, LPRECT rect) const;
|
||||||
|
inline static bool IsDocked(wxState state);
|
||||||
|
inline static bool IsDockedVert(wxState state);
|
||||||
|
inline static bool IsDockedHoriz(wxState state);
|
||||||
|
inline static WXHWND GetZWnd(wxState state, int flags);
|
||||||
|
inline static UINT_PTR GetTaskBarState();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxState m_state; ///< Current state of the application bar
|
||||||
|
wxState m_stateDesired; ///< Desired state of the application bar while moving/resizing
|
||||||
|
int m_flags; ///< Flags describing application bar's behaviour
|
||||||
|
|
||||||
|
SIZE m_sizeFloat; ///< Window size when floating (we need it to restore floating size, when we undock)
|
||||||
|
SIZE m_sizeDocked; ///< Size of the window when docked (height when wxSTATE_TOP or wxSTATE_BOTTOM, width when wxSTATE_LEFT or wxSTATE_RIGHT)
|
||||||
|
SIZE m_sizeMin; ///< Minimum window size
|
||||||
|
|
||||||
|
UINT_PTR m_stateTaskBar; ///< TaskBar's current state
|
||||||
|
UINT_PTR m_timerID; ///< Application bar's timer id.
|
||||||
|
|
||||||
|
ITaskbarList *m_taskbarList; ///< Windows's taskbar list interface
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const UINT WM_AB_NOTIFY; ///< Application bar notification message
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline wxAppBar::wxState wxAppBar::GetState() const
|
||||||
|
{
|
||||||
|
return m_stateDesired != wxSTATE_UNKNOWN ? m_stateDesired : m_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::IsAlwaysOnTop() const
|
||||||
|
{
|
||||||
|
return (m_flags & wxFLAG_ALWAYSONTOP) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::SetAlwaysOnTop(bool alwaysOnTop)
|
||||||
|
{
|
||||||
|
if (alwaysOnTop)
|
||||||
|
m_flags |= wxFLAG_ALWAYSONTOP;
|
||||||
|
else
|
||||||
|
m_flags &= ~wxFLAG_ALWAYSONTOP;
|
||||||
|
|
||||||
|
if (::IsWindowVisible(m_hWnd)) {
|
||||||
|
// Set the Z-order.
|
||||||
|
wxCHECK(::SetWindowPos(m_hWnd, GetZWnd(m_state, m_flags), 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOSENDCHANGING), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::IsAutoHide() const
|
||||||
|
{
|
||||||
|
return (m_flags & wxFLAG_AUTOHIDE) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::SetAutoHide(bool autoHide)
|
||||||
|
{
|
||||||
|
bool autoHidePrev = IsAutoHide();
|
||||||
|
|
||||||
|
if (autoHide)
|
||||||
|
m_flags |= wxFLAG_AUTOHIDE;
|
||||||
|
else
|
||||||
|
m_flags &= ~wxFLAG_AUTOHIDE;
|
||||||
|
|
||||||
|
if (autoHidePrev != autoHide && IsDocked(m_state) && ::IsWindowVisible(m_hWnd)) {
|
||||||
|
if (autoHide) {
|
||||||
|
// Application bar should be auto-hidden. Try to setup it so.
|
||||||
|
|
||||||
|
// We undock to free the space before registering auto-hide, otherwise system will leave application bar's space reserved.
|
||||||
|
UndockAppBar();
|
||||||
|
|
||||||
|
// Register auto-hide application bar.
|
||||||
|
if (!RegisterAutoHide(m_state)) {
|
||||||
|
// Auto-hide failed; some other application bar must be hidden on this edge already. Dock back instead.
|
||||||
|
DockAppBar(m_state);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Unregister the auto-hidden application bar and dock.
|
||||||
|
UnregisterAutoHide(m_state);
|
||||||
|
DockAppBar(m_state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::GetAllowSizing() const
|
||||||
|
{
|
||||||
|
return (m_flags & wxFLAG_ALLOWSIZING) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::SetAllowSizing(bool bAllowSizing)
|
||||||
|
{
|
||||||
|
if (bAllowSizing)
|
||||||
|
m_flags |= wxFLAG_ALLOWSIZING;
|
||||||
|
else
|
||||||
|
m_flags &= ~wxFLAG_ALLOWSIZING;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::GetAutoHidden() const
|
||||||
|
{
|
||||||
|
return (m_flags & wxFLAG_AUTOHIDDEN) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::DockAppBar(wxState state)
|
||||||
|
{
|
||||||
|
wxASSERT(IsDocked(state));
|
||||||
|
|
||||||
|
// Calculate docked window rect and dock the window there.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, 0, state };
|
||||||
|
GetDockedRect(state, &(abd.rc));
|
||||||
|
wxCHECK(::SHAppBarMessage(ABM_SETPOS, &abd), false);
|
||||||
|
wxCHECK(::SetWindowPos(m_hWnd, GetZWnd(state, m_flags), abd.rc.left, abd.rc.top, abd.rc.right - abd.rc.left, abd.rc.bottom - abd.rc.top, SWP_NOACTIVATE | SWP_DRAWFRAME | SWP_FRAMECHANGED), false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::UndockAppBar()
|
||||||
|
{
|
||||||
|
// Free application bar's space to undock.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, 0, wxSTATE_LEFT };
|
||||||
|
wxASSERT(!abd.rc.left && !abd.rc.top && !abd.rc.right && !abd.rc.bottom);
|
||||||
|
wxCHECK(::SHAppBarMessage(ABM_SETPOS, &abd), false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::RegisterAutoHide(wxState state)
|
||||||
|
{
|
||||||
|
wxASSERT(IsDocked(state));
|
||||||
|
|
||||||
|
// Register application bar as auto-hide.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, 0, state, {}, (LPARAM)true };
|
||||||
|
if (::SHAppBarMessage(ABM_SETAUTOHIDEBAR, &abd)) {
|
||||||
|
// Auto-hide succeeded.
|
||||||
|
m_flags |= wxFLAG_AUTOHIDE;
|
||||||
|
m_flags &= ~wxFLAG_AUTOHIDDEN;
|
||||||
|
|
||||||
|
// Calculate auto-hidden window rect and move the window there.
|
||||||
|
GetAutoHideRect(state, false, &(abd.rc));
|
||||||
|
wxCHECK(::SetWindowPos(m_hWnd, GetZWnd(state, m_flags), abd.rc.left, abd.rc.top, abd.rc.right - abd.rc.left, abd.rc.bottom - abd.rc.top, SWP_NOACTIVATE | SWP_DRAWFRAME | SWP_FRAMECHANGED), false);
|
||||||
|
|
||||||
|
// Reset auto-hide timer.
|
||||||
|
m_timerID = ::SetTimer(m_hWnd, wxABT_AUTOHIDETIMERID, wxABT_AUTOHIDETIMERINTERVAL, NULL);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// Auto-hide failed; some other application bar must be hidden on this edge already.
|
||||||
|
m_flags &= ~(wxFLAG_AUTOHIDE | wxFLAG_AUTOHIDDEN);
|
||||||
|
|
||||||
|
// Post a message to user.
|
||||||
|
OnAutoHideDenied();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::UnregisterAutoHide(wxState state)
|
||||||
|
{
|
||||||
|
wxASSERT(IsDocked(state));
|
||||||
|
|
||||||
|
// Unregister application bar as auto-hide.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, 0, state, {}, (LPARAM)false };
|
||||||
|
wxCHECK(::SHAppBarMessage(ABM_SETAUTOHIDEBAR, &abd), false);
|
||||||
|
m_flags &= ~wxFLAG_AUTOHIDDEN;
|
||||||
|
|
||||||
|
// Cancel the timer.
|
||||||
|
if (m_timerID) {
|
||||||
|
::KillTimer(m_hWnd, m_timerID);
|
||||||
|
m_timerID = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::GetDockedRect(wxState state, LPRECT rect) const
|
||||||
|
{
|
||||||
|
wxASSERT(rect);
|
||||||
|
wxASSERT(IsDocked(state));
|
||||||
|
|
||||||
|
// Set dimensions to full screen.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, 0, state, { 0, 0, ::GetSystemMetrics(SM_CXSCREEN), ::GetSystemMetrics(SM_CYSCREEN) } };
|
||||||
|
wxCHECK(::SHAppBarMessage(ABM_QUERYPOS, &abd), false);
|
||||||
|
|
||||||
|
// Correct our dimensions accordingly.
|
||||||
|
switch (state) {
|
||||||
|
case wxSTATE_LEFT:
|
||||||
|
rect->left = abd.rc.left;
|
||||||
|
rect->top = abd.rc.top;
|
||||||
|
rect->right = abd.rc.left + m_sizeDocked.cx;
|
||||||
|
rect->bottom = abd.rc.bottom;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_TOP:
|
||||||
|
rect->left = abd.rc.left;
|
||||||
|
rect->top = abd.rc.top;
|
||||||
|
rect->right = abd.rc.right;
|
||||||
|
rect->bottom = abd.rc.top + m_sizeDocked.cy;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_RIGHT:
|
||||||
|
rect->left = abd.rc.right - m_sizeDocked.cx;
|
||||||
|
rect->top = abd.rc.top;
|
||||||
|
rect->right = abd.rc.right;
|
||||||
|
rect->bottom = abd.rc.bottom;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_BOTTOM:
|
||||||
|
rect->left = abd.rc.left;
|
||||||
|
rect->top = abd.rc.bottom - m_sizeDocked.cy;
|
||||||
|
rect->right = abd.rc.right;
|
||||||
|
rect->bottom = abd.rc.bottom;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Unknown state.
|
||||||
|
wxFAIL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::GetAutoHideRect(wxState state, bool bAutoHidden, LPRECT rect) const
|
||||||
|
{
|
||||||
|
wxASSERT(rect);
|
||||||
|
wxASSERT(IsDocked(state));
|
||||||
|
|
||||||
|
// Keep a part of the application bar visible at all times
|
||||||
|
const int iBorder = ::GetSystemMetrics(IsDockedVert(state) ? SM_CXBORDER : SM_CYBORDER) * 2;
|
||||||
|
const RECT rcScreen = {
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
::GetSystemMetrics(SM_CXSCREEN),
|
||||||
|
::GetSystemMetrics(SM_CYSCREEN)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Correct our dimensions accordingly.
|
||||||
|
switch (state) {
|
||||||
|
case wxSTATE_LEFT:
|
||||||
|
rect->top = rcScreen.top;
|
||||||
|
rect->bottom = rcScreen.bottom;
|
||||||
|
rect->right = rcScreen.left + (bAutoHidden ? iBorder : m_sizeDocked.cx);
|
||||||
|
rect->left = rect->right - m_sizeDocked.cx;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_TOP:
|
||||||
|
rect->left = rcScreen.left;
|
||||||
|
rect->right = rcScreen.right;
|
||||||
|
rect->bottom = rcScreen.top + (bAutoHidden ? iBorder : m_sizeDocked.cy);
|
||||||
|
rect->top = rect->bottom - m_sizeDocked.cy;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_RIGHT:
|
||||||
|
rect->left = rcScreen.right - (bAutoHidden ? iBorder : m_sizeDocked.cx);
|
||||||
|
rect->top = rcScreen.top;
|
||||||
|
rect->right = rect->left + m_sizeDocked.cx;
|
||||||
|
rect->bottom = rcScreen.bottom;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxSTATE_BOTTOM:
|
||||||
|
rect->left = rcScreen.left;
|
||||||
|
rect->top = rcScreen.bottom - (bAutoHidden ? iBorder : m_sizeDocked.cy);
|
||||||
|
rect->right = rcScreen.right;
|
||||||
|
rect->bottom = rect->top + m_sizeDocked.cy;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Unknown state.
|
||||||
|
wxFAIL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::IsDocked(wxState state)
|
||||||
|
{
|
||||||
|
return wxSTATE_LEFT <= state && state <= wxSTATE_BOTTOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::IsDockedVert(wxState state)
|
||||||
|
{
|
||||||
|
return state == wxSTATE_LEFT || state == wxSTATE_RIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool wxAppBar::IsDockedHoriz(wxState state)
|
||||||
|
{
|
||||||
|
return state == wxSTATE_TOP || state == wxSTATE_BOTTOM;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline WXHWND wxAppBar::GetZWnd(wxState state, int flags)
|
||||||
|
{
|
||||||
|
if (flags & wxFLAG_FULLSCREENAPPOPEN) {
|
||||||
|
// If full screen app is open, clear the always-on-top flag.
|
||||||
|
return HWND_NOTOPMOST;
|
||||||
|
}
|
||||||
|
|
||||||
|
//_AFX_THREAD_STATE* pThreadState = AfxGetThreadState();
|
||||||
|
//if (::IsWindow(pThreadState->m_hTrackingWindow)) {
|
||||||
|
// // We're tracking another window/menu, position behind it.
|
||||||
|
// return pThreadState->m_hTrackingWindow;
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (state == wxSTATE_FLOAT) {
|
||||||
|
// When floating, decide according to the flags.
|
||||||
|
return (flags & wxFLAG_ALWAYSONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsDocked(state)) {
|
||||||
|
if (flags & wxFLAG_AUTOHIDE) {
|
||||||
|
// Auto-hidden docked application bar is always on top.
|
||||||
|
return HWND_TOPMOST;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags & wxFLAG_ALWAYSONTOP) {
|
||||||
|
// Regular docked always-on-top application bar.
|
||||||
|
WXHWND hWndTaskbar = ::FindWindow(_T("Shell_TrayWnd"), _T(""));
|
||||||
|
if (hWndTaskbar) {
|
||||||
|
// We found the taskbar window. Position directly after it. Otherwise our window overlaps Vista's Start button orb.
|
||||||
|
return hWndTaskbar;
|
||||||
|
} else {
|
||||||
|
// Only always-on-top windows are allowed to resize properly outside the desktop rect.
|
||||||
|
// If window is docked and not always on top, resizing a window to smaller size is obstructed by desktop rect limit.
|
||||||
|
return HWND_TOPMOST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Regular docked non-always-on-top application bar.
|
||||||
|
return HWND_NOTOPMOST;
|
||||||
|
} else {
|
||||||
|
// Unknown state. Do nothing.
|
||||||
|
wxFAIL;
|
||||||
|
return HWND_TOP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline UINT_PTR wxAppBar::GetTaskBarState()
|
||||||
|
{
|
||||||
|
APPBARDATA abd = { sizeof(abd) };
|
||||||
|
return ::SHAppBarMessage(ABM_GETSTATE, &abd);
|
||||||
|
}
|
77
lib/wxExtend/include/wxex/common.h
Normal file
77
lib/wxExtend/include/wxex/common.h
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of wxExtend.
|
||||||
|
|
||||||
|
wxExtend 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <wx/debug.h>
|
||||||
|
#include <wx/defs.h>
|
||||||
|
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
// Usual debugging macros
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#if wxDEBUG_LEVEL
|
||||||
|
#define wxVERIFY(x) wxASSERT((x))
|
||||||
|
#else
|
||||||
|
#define wxVERIFY(x) (x)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns whether windows animation is enabled.
|
||||||
|
///
|
||||||
|
/// \returns
|
||||||
|
/// - true when window animation is enabled
|
||||||
|
/// - false otherwise
|
||||||
|
///
|
||||||
|
inline bool wxGetDoWndAnimation()
|
||||||
|
{
|
||||||
|
ANIMATIONINFO ai = { sizeof(ai) };
|
||||||
|
wxCHECK(SystemParametersInfo(SPI_GETANIMATION, sizeof(ai), &ai, 0), false);
|
||||||
|
return ai.iMinAnimate ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Modifies window extended style.
|
||||||
|
///
|
||||||
|
/// \param[in] hWnd Handle of the window to modify.
|
||||||
|
/// \param[in] dwRemove Set of extended styles to remove.
|
||||||
|
/// \param[in] dwAdd Set of extended styles to add.
|
||||||
|
/// \param[in] nFlags Additional SWP_ flags to pass to SetWindowPos(). If zero, SetWindowPos() is not called.
|
||||||
|
/// \returns
|
||||||
|
/// - true when the window extended style was modified
|
||||||
|
/// - false if the window extended style was not neccessary
|
||||||
|
///
|
||||||
|
inline bool wxModifyStyleEx(_In_ WXHWND hWnd, _In_ DWORD dwRemove, _In_ DWORD dwAdd, _In_ UINT nFlags = 0)
|
||||||
|
{
|
||||||
|
wxASSERT(IsWindow(hWnd));
|
||||||
|
|
||||||
|
DWORD dwStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
|
||||||
|
DWORD dwNewStyle = (dwStyle & ~dwRemove) | dwAdd;
|
||||||
|
if(dwStyle == dwNewStyle)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
SetWindowLong(hWnd, GWL_EXSTYLE, dwNewStyle);
|
||||||
|
if(nFlags != 0)
|
||||||
|
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | nFlags);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
829
lib/wxExtend/src/appbar.cpp
Normal file
829
lib/wxExtend/src/appbar.cpp
Normal file
@ -0,0 +1,829 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of wxExtend.
|
||||||
|
|
||||||
|
wxExtend 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// wxAppBar
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
const UINT wxAppBar::WM_AB_NOTIFY = ::RegisterWindowMessage(_T("AppBarNotify"));
|
||||||
|
|
||||||
|
|
||||||
|
wxAppBar::wxAppBar() :
|
||||||
|
m_timerID(0),
|
||||||
|
m_taskbarList(NULL),
|
||||||
|
wxFrame()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxAppBar::wxAppBar(wxWindow *parent, wxWindowID id, const wxString& title, wxState state, int flags, const wxPoint& pos, const wxSize& size, long style, const wxString& name) :
|
||||||
|
m_timerID(0),
|
||||||
|
m_taskbarList(NULL),
|
||||||
|
wxFrame()
|
||||||
|
{
|
||||||
|
Create(parent, id, title, state, flags, pos, size, style, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool wxAppBar::Create(wxWindow *parent, wxWindowID id, const wxString& title, wxState state, int flags, const wxPoint& pos, const wxSize& size, long style, const wxString& name)
|
||||||
|
{
|
||||||
|
// Save initial floating window size.
|
||||||
|
m_sizeFloat.cx = size.x;
|
||||||
|
m_sizeFloat.cy = size.y;
|
||||||
|
|
||||||
|
// Save initial docked window width/height.
|
||||||
|
m_sizeDocked.cx = size.x;
|
||||||
|
m_sizeDocked.cy = size.y;
|
||||||
|
|
||||||
|
// Save initial state and flags.
|
||||||
|
m_state = state;
|
||||||
|
m_stateDesired = wxSTATE_UNKNOWN;
|
||||||
|
m_flags = flags;
|
||||||
|
|
||||||
|
// Find the taskbar list's interface.
|
||||||
|
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_ALL, IID_ITaskbarList, (LPVOID*)&m_taskbarList)), false);
|
||||||
|
wxCHECK(SUCCEEDED(m_taskbarList->HrInit()), false);
|
||||||
|
|
||||||
|
// If any taskbar list tab's hiding is in affect, set application bar's style as tool window to avoid being displayed on the taskbar initially.
|
||||||
|
if (state == wxSTATE_FLOAT) {
|
||||||
|
if (flags & wxFLAG_HIDETASKBARTABWHENFLOATING) {
|
||||||
|
// Hide our application bar's entry on the Windows's taskbar.
|
||||||
|
style |= wxFRAME_TOOL_WINDOW;
|
||||||
|
} else if (flags & wxFLAG_HIDETASKBARTABWHENDOCKED) {
|
||||||
|
// Show our application bar's entry on the Windows's taskbar.
|
||||||
|
style &= ~wxFRAME_TOOL_WINDOW;
|
||||||
|
}
|
||||||
|
} else if (IsDocked(state)) {
|
||||||
|
if (flags & wxFLAG_HIDETASKBARTABWHENDOCKED) {
|
||||||
|
// Hide our application bar's entry on the Windows's taskbar.
|
||||||
|
style |= wxFRAME_TOOL_WINDOW;
|
||||||
|
} else if (flags & wxFLAG_HIDETASKBARTABWHENFLOATING) {
|
||||||
|
// Show our application bar's entry on the Windows's taskbar.
|
||||||
|
style &= ~wxFRAME_TOOL_WINDOW;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Unknown state.
|
||||||
|
wxFAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create frame.
|
||||||
|
wxCHECK(wxFrame::Create(parent, id, title, pos, size, style, name), false);
|
||||||
|
|
||||||
|
// Register our application bar.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd, WM_AB_NOTIFY, m_state };
|
||||||
|
wxCHECK(::SHAppBarMessage(ABM_NEW, &abd), false);
|
||||||
|
|
||||||
|
// Get the state of the Windows taskbar.
|
||||||
|
m_stateTaskBar = GetTaskBarState();
|
||||||
|
|
||||||
|
if (m_flags & wxFLAG_AUTOHIDETASKBAR) {
|
||||||
|
// Mimic the auto-hide state of taskbar.
|
||||||
|
SetAutoHide((m_stateTaskBar & ABS_AUTOHIDE) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_flags & wxFLAG_ALWAYSONTOPTASKBAR) {
|
||||||
|
// Mimic the always-on-top state of taskbar.
|
||||||
|
SetAlwaysOnTop((m_stateTaskBar & ABS_ALWAYSONTOP) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxAppBar::~wxAppBar()
|
||||||
|
{
|
||||||
|
wxASSERT(m_timerID == 0);
|
||||||
|
|
||||||
|
// Remove the application bar.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd };
|
||||||
|
wxVERIFY(::SHAppBarMessage(ABM_REMOVE, &abd));
|
||||||
|
|
||||||
|
if (m_taskbarList)
|
||||||
|
m_taskbarList->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//bool wxAppBar::GetAppBarPlacement(LPAPPBARPLACEMENT lpPlacement) const
|
||||||
|
//{
|
||||||
|
// wxASSERT(lpPlacement);
|
||||||
|
//
|
||||||
|
// if (lpPlacement->dwSize >= sizeof(APPBARPLACEMENT1)) {
|
||||||
|
// lpPlacement->dwState = (DWORD)m_state;
|
||||||
|
// lpPlacement->dwFlags = m_flags;
|
||||||
|
// if (m_state == wxSTATE_FLOAT) {
|
||||||
|
// // Current application bar's rect is floating rect.
|
||||||
|
// lpPlacement->rcFloat = m_rect;
|
||||||
|
// } else if (IsDocked(m_state)) {
|
||||||
|
// // Application bar is docked. Calc floating rect from m_sizeFloat.
|
||||||
|
// lpPlacement->rcFloat.left = 0;
|
||||||
|
// lpPlacement->rcFloat.top = 0;
|
||||||
|
// lpPlacement->rcFloat.right = m_sizeFloat.cx;
|
||||||
|
// lpPlacement->rcFloat.bottom = m_sizeFloat.cy;
|
||||||
|
// } else {
|
||||||
|
// // Application bar's state is unknown.
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// lpPlacement->szDocked = m_sizeDocked;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// lpPlacement->dwSize = sizeof(*lpPlacement);
|
||||||
|
//
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//bool wxAppBar::SetAppBarPlacement(LPCAPPBARPLACEMENT lpPlacement)
|
||||||
|
//{
|
||||||
|
// wxASSERT(lpPlacement);
|
||||||
|
//
|
||||||
|
// if (lpPlacement->dwSize >= sizeof(APPBARPLACEMENT1)) {
|
||||||
|
// if (lpPlacement->dwState != wxSTATE_FLOAT && !IsDocked(lpPlacement->dwState)) {
|
||||||
|
// // The state is unknown. Abort, before we mix up internal state.
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Clean previous docking/auto-hide settings if required.
|
||||||
|
// if (IsDocked(m_state) &&
|
||||||
|
// (lpPlacement->dwState == wxSTATE_FLOAT || lpPlacement->dwState != m_state && IsDocked(lpPlacement->dwState)))
|
||||||
|
// {
|
||||||
|
// if (IsAutoHide())
|
||||||
|
// UnregisterAutoHide(m_state);
|
||||||
|
// else if (lpPlacement->dwState == wxSTATE_FLOAT)
|
||||||
|
// UndockAppBar();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Update application bar's flags, size and position.
|
||||||
|
// m_flags |= wxFLAG_POSITIONSET;
|
||||||
|
// m_sizeDocked = lpPlacement->szDocked;
|
||||||
|
// if (lpPlacement->dwState == wxSTATE_FLOAT) {
|
||||||
|
// m_rect = lpPlacement->rcFloat;
|
||||||
|
// } else if (IsDocked(lpPlacement->dwState)) {
|
||||||
|
// m_sizeFloat.cx = lpPlacement->rcFloat.right - lpPlacement->rcFloat.left;
|
||||||
|
// m_sizeFloat.cy = lpPlacement->rcFloat.bottom - lpPlacement->rcFloat.top;
|
||||||
|
// GetDockedRect(lpPlacement->dwState, &m_rect);
|
||||||
|
// } else {
|
||||||
|
// // Application bar's state is unknown.
|
||||||
|
// wxFAIL;
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Notify about the change of state.
|
||||||
|
// OnChangeState(lpPlacement->dwState);
|
||||||
|
// m_state = lpPlacement->dwState;
|
||||||
|
//
|
||||||
|
// SetAutoHide(lpPlacement->dwFlags & wxFLAG_AUTOHIDE);
|
||||||
|
// SetAlwaysOnTop(lpPlacement->dwFlags & wxFLAG_ALWAYSONTOP);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return true;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::MinimiseToEdge(wxState edge, wxWindow *wnd)
|
||||||
|
{
|
||||||
|
wxASSERT(IsDocked(edge));
|
||||||
|
|
||||||
|
WXHWND hWnd;
|
||||||
|
if (!wnd) {
|
||||||
|
// No other window was specified. Minimize ourself.
|
||||||
|
wnd = this;
|
||||||
|
hWnd = m_hWnd;
|
||||||
|
} else
|
||||||
|
hWnd = wnd->GetHWND();
|
||||||
|
|
||||||
|
// If our window is hidden, there's nothing we can do.
|
||||||
|
if (hWnd == m_hWnd && !::IsWindowVisible(m_hWnd))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_state == wxSTATE_FLOAT) {
|
||||||
|
// Remember the last floating size.
|
||||||
|
RECT rect = {};
|
||||||
|
wxVERIFY(::GetWindowRect(hWnd, &rect));
|
||||||
|
m_sizeFloat.cx = rect.right - rect.left;
|
||||||
|
m_sizeFloat.cy = rect.bottom - rect.top;
|
||||||
|
}
|
||||||
|
|
||||||
|
RECT rectTo;
|
||||||
|
if (IsAutoHide())
|
||||||
|
GetAutoHideRect(edge, false, &rectTo);
|
||||||
|
else
|
||||||
|
GetDockedRect(edge, &rectTo);
|
||||||
|
|
||||||
|
if (::wxGetDoWndAnimation()) {
|
||||||
|
// Do the animation.
|
||||||
|
RECT rectFrom;
|
||||||
|
wxVERIFY(::GetWindowRect(hWnd, &rectFrom));
|
||||||
|
wxVERIFY(::DrawAnimatedRects(hWnd, IDANI_CAPTION, &rectFrom, &rectTo));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notify about the change of state.
|
||||||
|
OnChangeState(edge);
|
||||||
|
m_state = edge;
|
||||||
|
|
||||||
|
if (hWnd != m_hWnd) {
|
||||||
|
// Hide the source window.
|
||||||
|
wnd->Hide();
|
||||||
|
// ::SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) &~ WS_VISIBLE);
|
||||||
|
|
||||||
|
// Show the application bar.
|
||||||
|
Show();
|
||||||
|
} else {
|
||||||
|
if (IsAutoHide()) {
|
||||||
|
// Register auto-hide application bar.
|
||||||
|
RegisterAutoHide(edge);
|
||||||
|
} else {
|
||||||
|
// Auto-hide failed or wasn't desired at all.
|
||||||
|
DockAppBar(edge);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::SetActiveWindow(m_hWnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::MaximiseFromEdge(const RECT* rect)
|
||||||
|
{
|
||||||
|
wxASSERT(::IsWindowVisible(m_hWnd));
|
||||||
|
|
||||||
|
RECT rectTo;
|
||||||
|
|
||||||
|
if (!rect) {
|
||||||
|
// Calculate the destination rect.
|
||||||
|
rectTo.left = (::GetSystemMetrics(SM_CXSCREEN) - m_sizeFloat.cx) / 2;
|
||||||
|
rectTo.top = (::GetSystemMetrics(SM_CYSCREEN) - m_sizeFloat.cy) / 2;
|
||||||
|
rectTo.right = rectTo.left + m_sizeFloat.cx;
|
||||||
|
rectTo.bottom = rectTo.top + m_sizeFloat.cy;
|
||||||
|
|
||||||
|
rect = &rectTo;
|
||||||
|
} else {
|
||||||
|
m_sizeFloat.cx = rect->right - rect->left;
|
||||||
|
m_sizeFloat.cy = rect->bottom - rect->top;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (::wxGetDoWndAnimation()) {
|
||||||
|
// Do the animation.
|
||||||
|
RECT rectFrom;
|
||||||
|
wxVERIFY(::GetWindowRect(m_hWnd, &rectFrom));
|
||||||
|
wxVERIFY(::DrawAnimatedRects(m_hWnd, IDANI_CAPTION, &rectFrom, rect));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean previous docking/auto-hide settings if required.
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
if (IsAutoHide())
|
||||||
|
UnregisterAutoHide(m_state);
|
||||||
|
else
|
||||||
|
UndockAppBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notify about the change of state.
|
||||||
|
OnChangeState(wxSTATE_FLOAT);
|
||||||
|
m_state = wxSTATE_FLOAT;
|
||||||
|
|
||||||
|
wxVERIFY(::SetWindowPos(m_hWnd, GetZWnd(wxSTATE_FLOAT, m_flags), rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, SWP_NOACTIVATE | SWP_DRAWFRAME | SWP_FRAMECHANGED));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::MaximiseFromEdge(wxWindow *wnd)
|
||||||
|
{
|
||||||
|
wxASSERT(wnd);
|
||||||
|
wxASSERT(::IsWindowVisible(m_hWnd));
|
||||||
|
|
||||||
|
WXHWND hWnd = wnd->GetHWND();
|
||||||
|
|
||||||
|
RECT rectTo = {};
|
||||||
|
wxVERIFY(::GetWindowRect(hWnd, &rectTo));
|
||||||
|
m_sizeFloat.cx = rectTo.right - rectTo.left;
|
||||||
|
m_sizeFloat.cy = rectTo.bottom - rectTo.top;
|
||||||
|
|
||||||
|
if (::wxGetDoWndAnimation()) {
|
||||||
|
// Do the animation.
|
||||||
|
RECT rectFrom;
|
||||||
|
wxVERIFY(::GetWindowRect(m_hWnd, &rectFrom));
|
||||||
|
wxVERIFY(::DrawAnimatedRects(hWnd, IDANI_CAPTION, &rectFrom, &rectTo));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hide our window and show the destination window.
|
||||||
|
Hide();
|
||||||
|
wnd->Show();
|
||||||
|
// ::SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) | WS_VISIBLE);
|
||||||
|
wxVERIFY(::SetForegroundWindow(hWnd));
|
||||||
|
::SetActiveWindow(hWnd);
|
||||||
|
// wxVERIFY(::RedrawWindow(hWnd, NULL, NULL, RDW_UPDATENOW | RDW_ALLCHILDREN | RDW_FRAME | RDW_INVALIDATE | RDW_ERASE));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::ShowAutoHideAppBar(bool bShow)
|
||||||
|
{
|
||||||
|
RECT rcEnd;
|
||||||
|
bool
|
||||||
|
bFullDragOn,
|
||||||
|
bHidden = GetAutoHidden(),
|
||||||
|
bVisible = ::IsWindowVisible(m_hWnd) ? true : false;
|
||||||
|
|
||||||
|
if (!IsAutoHide() || bHidden != bShow) {
|
||||||
|
// We're not setup for auto-hide or already in the desired state.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get our end window location.
|
||||||
|
GetAutoHideRect(m_state, !bHidden, &rcEnd);
|
||||||
|
|
||||||
|
if (bVisible) {
|
||||||
|
RECT rcStart;
|
||||||
|
|
||||||
|
// Only slide the window if the user has FullDrag turned on.
|
||||||
|
if (!::SystemParametersInfo(SPI_GETDRAGFULLWINDOWS, 0, &bFullDragOn, 0))
|
||||||
|
bFullDragOn = false;
|
||||||
|
|
||||||
|
// Get our start window location.
|
||||||
|
GetAutoHideRect(m_state, bHidden, &rcStart);
|
||||||
|
|
||||||
|
if (bFullDragOn && (rcStart.left != rcEnd.left || rcStart.top != rcEnd.top || rcStart.right != rcEnd.right || rcStart.bottom != rcEnd.bottom)) {
|
||||||
|
// Get our starting and ending time.
|
||||||
|
DWORD dwTimeStart = ::GetTickCount();
|
||||||
|
DWORD dwTimeElapsed;
|
||||||
|
RECT rcDelta;
|
||||||
|
|
||||||
|
// Calculate difference between ending and starting rectangle.
|
||||||
|
rcDelta.left = rcEnd.left - rcStart.left;
|
||||||
|
rcDelta.top = rcEnd.top - rcStart.top;
|
||||||
|
rcDelta.right = rcEnd.right - rcStart.right;
|
||||||
|
rcDelta.bottom = rcEnd.bottom - rcStart.bottom;
|
||||||
|
|
||||||
|
while ((dwTimeElapsed = ::GetTickCount() - dwTimeStart) < wxABT_AUTOHIDETIME) {
|
||||||
|
// Do the linear interpolation.
|
||||||
|
RECT rect;
|
||||||
|
rect.left = rcStart.left + ::MulDiv(rcDelta.left, dwTimeElapsed, wxABT_AUTOHIDETIME);
|
||||||
|
rect.top = rcStart.top + ::MulDiv(rcDelta.top, dwTimeElapsed, wxABT_AUTOHIDETIME);
|
||||||
|
rect.right = rcStart.right + ::MulDiv(rcDelta.right, dwTimeElapsed, wxABT_AUTOHIDETIME);
|
||||||
|
rect.bottom = rcStart.bottom + ::MulDiv(rcDelta.bottom, dwTimeElapsed, wxABT_AUTOHIDETIME);
|
||||||
|
|
||||||
|
// Show the window at its changed position
|
||||||
|
wxVERIFY(::SetWindowPos(m_hWnd, NULL, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOACTIVATE));
|
||||||
|
wxVERIFY(::UpdateWindow(m_hWnd));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bShow)
|
||||||
|
m_flags &= ~wxFLAG_AUTOHIDDEN;
|
||||||
|
else
|
||||||
|
m_flags |= wxFLAG_AUTOHIDDEN;
|
||||||
|
|
||||||
|
if (bVisible) {
|
||||||
|
wxVERIFY(::SetWindowPos(m_hWnd, NULL, rcEnd.left, rcEnd.top, rcEnd.right - rcEnd.left, rcEnd.bottom - rcEnd.top, SWP_NOZORDER | SWP_NOACTIVATE));
|
||||||
|
wxVERIFY(::UpdateWindow(m_hWnd));
|
||||||
|
// Reset auto-hide timer.
|
||||||
|
m_timerID = ::SetTimer(m_hWnd, wxABT_AUTOHIDETIMERID, wxABT_AUTOHIDETIMERINTERVAL, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::OnChangeState(wxState stateNew)
|
||||||
|
{
|
||||||
|
if (stateNew == wxSTATE_FLOAT) {
|
||||||
|
if (m_flags & wxFLAG_HIDETASKBARTABWHENFLOATING) {
|
||||||
|
// Hide our application bar's entry on the Windows's taskbar.
|
||||||
|
wxModifyStyleEx(m_hWnd, 0, WS_EX_TOOLWINDOW);
|
||||||
|
if (m_taskbarList)
|
||||||
|
wxVERIFY(SUCCEEDED(m_taskbarList->DeleteTab(m_hWnd)));
|
||||||
|
} else if (m_flags & wxFLAG_HIDETASKBARTABWHENDOCKED) {
|
||||||
|
// Show our application bar's entry on the Windows's taskbar.
|
||||||
|
wxModifyStyleEx(m_hWnd, WS_EX_TOOLWINDOW, 0);
|
||||||
|
if (m_taskbarList)
|
||||||
|
wxVERIFY(SUCCEEDED(m_taskbarList->AddTab(m_hWnd)));
|
||||||
|
}
|
||||||
|
} else if (IsDocked(stateNew)) {
|
||||||
|
if (m_flags & wxFLAG_HIDETASKBARTABWHENDOCKED) {
|
||||||
|
// Hide our application bar's entry on the Windows's taskbar.
|
||||||
|
wxModifyStyleEx(m_hWnd, 0, WS_EX_TOOLWINDOW);
|
||||||
|
if (m_taskbarList)
|
||||||
|
wxVERIFY(SUCCEEDED(m_taskbarList->DeleteTab(m_hWnd)));
|
||||||
|
} else if (m_flags & wxFLAG_HIDETASKBARTABWHENFLOATING) {
|
||||||
|
// Show our application bar's entry on the Windows's taskbar.
|
||||||
|
wxModifyStyleEx(m_hWnd, WS_EX_TOOLWINDOW, 0);
|
||||||
|
if (m_taskbarList)
|
||||||
|
wxVERIFY(SUCCEEDED(m_taskbarList->AddTab(m_hWnd)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Unknown state.
|
||||||
|
wxFAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::OnChangeTaskBarState(UINT_PTR state)
|
||||||
|
{
|
||||||
|
if (state != m_stateTaskBar) {
|
||||||
|
// No change, no fun.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_flags & wxFLAG_ALWAYSONTOPTASKBAR) &&
|
||||||
|
(m_stateTaskBar & ABS_ALWAYSONTOP) != (state & ABS_ALWAYSONTOP)) {
|
||||||
|
// Always-on-top state of the taskbar changed and we're supposed to mimic it.
|
||||||
|
SetAlwaysOnTop((state & ABS_ALWAYSONTOP) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_flags & wxFLAG_AUTOHIDETASKBAR) &&
|
||||||
|
(m_stateTaskBar & ABS_AUTOHIDE) != (state & ABS_AUTOHIDE)) {
|
||||||
|
// Auto-hide state of the taskbar changed and we're supposed to mimic it.
|
||||||
|
SetAutoHide((state & ABS_AUTOHIDE) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remember the state.
|
||||||
|
m_stateTaskBar = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::OnWindowsArrange(bool WXUNUSED(bBeginning))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxAppBar::OnAutoHideDenied()
|
||||||
|
{
|
||||||
|
wxMessageBox(wxT("There is already an auto hidden bar on this edge.\nOnly one auto hidden bar is allowed on each edge.\nAuto-hide feature is now off."), wxT("Warning"), wxOK | wxICON_WARNING, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WXLRESULT wxAppBar::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) {
|
||||||
|
case WM_SHOWWINDOW:
|
||||||
|
if (wParam) {
|
||||||
|
// Do the false change of state notification, to allow initialization.
|
||||||
|
OnChangeState(m_state);
|
||||||
|
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
if (IsAutoHide()) {
|
||||||
|
// Register auto-hide application bar.
|
||||||
|
RegisterAutoHide(m_state);
|
||||||
|
} else {
|
||||||
|
// Auto-hide failed or wasn't desired at all.
|
||||||
|
DockAppBar(m_state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We're all set. Show the window now.
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
} else {
|
||||||
|
// Hide the window first, to avoid flicker.
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
// Clean previous docking/auto-hide settings if required.
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
if (IsAutoHide())
|
||||||
|
UnregisterAutoHide(m_state);
|
||||||
|
else
|
||||||
|
UndockAppBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_WINDOWPOSCHANGING: {
|
||||||
|
if (m_state != m_stateDesired && IsDocked(m_stateDesired)) {
|
||||||
|
wxASSERT(lParam);
|
||||||
|
LPWINDOWPOS lpwndpos = (LPWINDOWPOS)lParam;
|
||||||
|
|
||||||
|
// When about to get docked, fix position and size to avoid Aero Snap interfering with window size.
|
||||||
|
RECT rect;
|
||||||
|
GetDockedRect(m_stateDesired, &rect);
|
||||||
|
lpwndpos->x = rect.left;
|
||||||
|
lpwndpos->y = rect.top;
|
||||||
|
lpwndpos->cx = rect.right - rect.left;
|
||||||
|
lpwndpos->cy = rect.bottom - rect.top;
|
||||||
|
lpwndpos->flags &= ~(SWP_NOMOVE | SWP_NOSIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_WINDOWPOSCHANGED: {
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
// When our window changes position, tell the Shell so that any
|
||||||
|
// auto-hidden application bar on our edge stays on top of our window making it
|
||||||
|
// always accessible to the user.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd };
|
||||||
|
wxVERIFY(::SHAppBarMessage(ABM_WINDOWPOSCHANGED, &abd));
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_ENTERSIZEMOVE:
|
||||||
|
m_stateDesired = m_state;
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_EXITSIZEMOVE: {
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
// Clean previous docking/auto-hide settings if required.
|
||||||
|
if (IsDocked(m_state) &&
|
||||||
|
(m_stateDesired == wxSTATE_FLOAT || m_stateDesired != m_state && IsDocked(m_stateDesired)))
|
||||||
|
{
|
||||||
|
if (IsAutoHide())
|
||||||
|
UnregisterAutoHide(m_state);
|
||||||
|
else if (m_stateDesired == wxSTATE_FLOAT)
|
||||||
|
UndockAppBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup new docking/auto-hide settings.
|
||||||
|
if (IsDocked(m_stateDesired)) {
|
||||||
|
if (IsAutoHide()) {
|
||||||
|
// Application bar should be auto-hide. Try to setup it as so.
|
||||||
|
// Register auto-hide application bar.
|
||||||
|
RegisterAutoHide(m_stateDesired);
|
||||||
|
} else {
|
||||||
|
// Auto-hide failed or wasn't desired at all.
|
||||||
|
DockAppBar(m_stateDesired);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notify about the change of state.
|
||||||
|
OnChangeState(m_stateDesired);
|
||||||
|
m_state = m_stateDesired;
|
||||||
|
m_stateDesired = wxSTATE_UNKNOWN;
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_MOVING: {
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
wxASSERT(lParam);
|
||||||
|
LPRECT lpRect = (LPRECT)lParam;
|
||||||
|
|
||||||
|
// Phase 1. - Determine the desired state (which screen edge or floating) according to the mouse position.
|
||||||
|
|
||||||
|
wxState uStateDesiredPrev = m_stateDesired;
|
||||||
|
DWORD dwPoint = ::GetMessagePos();
|
||||||
|
wxPoint ptMouse(GET_X_LPARAM(dwPoint), GET_Y_LPARAM(dwPoint));
|
||||||
|
|
||||||
|
m_stateDesired = wxSTATE_UNKNOWN;
|
||||||
|
|
||||||
|
if ((m_flags & wxFLAG_ALLOWFLOAT) && (::GetKeyState(VK_CONTROL) < 0 || !(m_flags & wxFLAG_ALLOWDOCKANY))) {
|
||||||
|
// The application bar's style allows floating and user is holding down the Ctrl key, or docking is disabled anyway, so we'll force float.
|
||||||
|
m_stateDesired = wxSTATE_FLOAT;
|
||||||
|
} else {
|
||||||
|
RECT rcWorkArea = {};
|
||||||
|
INT iDist, iDistMin = INT_MAX;
|
||||||
|
|
||||||
|
// Get the rectangle that bounds the size of the screen
|
||||||
|
// minus any docked (but not-autohidden) AppBars.
|
||||||
|
wxVERIFY(::SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, 0));
|
||||||
|
|
||||||
|
// Test all four edges, to find the closest one.
|
||||||
|
if ((m_flags & wxFLAG_ALLOWDOCKTOP) && (iDist = ptMouse.y - rcWorkArea.top) < iDistMin) {
|
||||||
|
m_stateDesired = wxSTATE_TOP;
|
||||||
|
iDistMin = iDist;
|
||||||
|
}
|
||||||
|
if ((m_flags & wxFLAG_ALLOWDOCKBOTTOM) && (iDist = rcWorkArea.bottom - ptMouse.y) < iDistMin) {
|
||||||
|
m_stateDesired = wxSTATE_BOTTOM;
|
||||||
|
iDistMin = iDist;
|
||||||
|
}
|
||||||
|
if ((m_flags & wxFLAG_ALLOWDOCKLEFT) && (iDist = ptMouse.x - rcWorkArea.left) < iDistMin) {
|
||||||
|
m_stateDesired = wxSTATE_LEFT;
|
||||||
|
iDistMin = iDist;
|
||||||
|
}
|
||||||
|
if ((m_flags & wxFLAG_ALLOWDOCKRIGHT) && (iDist = rcWorkArea.right - ptMouse.x) < iDistMin) {
|
||||||
|
m_stateDesired = wxSTATE_RIGHT;
|
||||||
|
iDistMin = iDist;
|
||||||
|
}
|
||||||
|
if ((m_flags & wxFLAG_ALLOWFLOAT) && (iDist = wxMax(::GetSystemMetrics(SM_CXVSCROLL), ::GetSystemMetrics(SM_CYHSCROLL))) < iDistMin) {
|
||||||
|
m_stateDesired = wxSTATE_FLOAT;
|
||||||
|
iDistMin = iDist;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We must had come up with some useful state.
|
||||||
|
wxASSERT(m_stateDesired != wxSTATE_UNKNOWN);
|
||||||
|
|
||||||
|
// Phase 2. - Calculate the desired rectangle, according to the desired state.
|
||||||
|
|
||||||
|
if (m_stateDesired == wxSTATE_FLOAT) {
|
||||||
|
if (IsDocked(uStateDesiredPrev)) {
|
||||||
|
// We just switched from docked to floating state. Align the window according to the mouse pointer.
|
||||||
|
lpRect->left = ptMouse.x - m_sizeFloat.cx / 2;
|
||||||
|
lpRect->top = ptMouse.y;
|
||||||
|
|
||||||
|
// We also resize back to floating window size.
|
||||||
|
lpRect->right = lpRect->left + m_sizeFloat.cx;
|
||||||
|
lpRect->bottom = lpRect->top + m_sizeFloat.cy;
|
||||||
|
}
|
||||||
|
} else if (IsDocked(m_stateDesired)) {
|
||||||
|
if (IsAutoHide()) {
|
||||||
|
// Calculate auto-hide window rect.
|
||||||
|
GetAutoHideRect(m_stateDesired, false, lpRect);
|
||||||
|
} else {
|
||||||
|
// Calculate docked window rect.
|
||||||
|
GetDockedRect(m_stateDesired, lpRect);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Window is not floating. It's not docked either. Then what?
|
||||||
|
wxFAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_stateDesired != uStateDesiredPrev) {
|
||||||
|
// Notify about the proposed change of state, but don't change the state yet.
|
||||||
|
OnChangeState(m_stateDesired);
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_SIZING: {
|
||||||
|
wxASSERT(lParam);
|
||||||
|
LPRECT lpRect = (LPRECT)lParam;
|
||||||
|
|
||||||
|
if (m_stateDesired == wxSTATE_FLOAT) {
|
||||||
|
// Remember the floating window size.
|
||||||
|
m_sizeFloat.cx = lpRect->right - lpRect->left;
|
||||||
|
m_sizeFloat.cy = lpRect->bottom - lpRect->top;
|
||||||
|
} else if (IsDocked(m_stateDesired)) {
|
||||||
|
// Remember the docked window size.
|
||||||
|
if (IsDockedVert(m_stateDesired))
|
||||||
|
m_sizeDocked.cx = lpRect->right - lpRect->left;
|
||||||
|
else
|
||||||
|
m_sizeDocked.cy = lpRect->bottom - lpRect->top;
|
||||||
|
} else {
|
||||||
|
// Unknown state.
|
||||||
|
wxFAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_GETMINMAXINFO: {
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
wxASSERT(lParam);
|
||||||
|
LPMINMAXINFO lpMMI = (LPMINMAXINFO)lParam;
|
||||||
|
|
||||||
|
// Convert client size to window size.
|
||||||
|
RECT rectClient = {};
|
||||||
|
wxVERIFY(::GetClientRect(m_hWnd, &rectClient));
|
||||||
|
if (rectClient.right - rectClient.left && rectClient.bottom - rectClient.top) {
|
||||||
|
RECT rectWindow = {};
|
||||||
|
wxVERIFY(::GetWindowRect(m_hWnd, &rectWindow));
|
||||||
|
lpMMI->ptMinTrackSize.x = m_sizeMin.cx + (rectWindow.right - rectWindow.left) - (rectClient.right - rectClient.left);
|
||||||
|
lpMMI->ptMinTrackSize.y = m_sizeMin.cy + (rectWindow.bottom - rectWindow.top ) - (rectClient.bottom - rectClient.top );
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_NCMOUSEMOVE:
|
||||||
|
// If we are a docked, auto-hidden application bar, shown us
|
||||||
|
// when the user moves over our non-client area
|
||||||
|
ShowAutoHideAppBar(true);
|
||||||
|
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_NCHITTEST: {
|
||||||
|
// Find out what the base class thinks is the hit test code.
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
if (HTSIZEFIRST <= lResult && lResult <= HTSIZELAST) {
|
||||||
|
if (GetAllowSizing()) {
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
// When the application bar is docked, the user can resize only one edge.
|
||||||
|
// This next section determines which edge the user can resize.
|
||||||
|
// To allow resizing, the application bar window must have the WS_THICKFRAME style.
|
||||||
|
|
||||||
|
RECT rcClient = {};
|
||||||
|
wxPoint point(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||||
|
|
||||||
|
// Resizing IS allowed for the edge that the application bar is docked on.
|
||||||
|
// Get the location of the appbar's client area in screen coordinates.
|
||||||
|
wxVERIFY(::GetClientRect(m_hWnd, &rcClient));
|
||||||
|
wxVERIFY(::ClientToScreen(m_hWnd, (LPPOINT)&rcClient));
|
||||||
|
wxVERIFY(::ClientToScreen(m_hWnd, ((LPPOINT)&rcClient) + 1));
|
||||||
|
|
||||||
|
// Assume that we can't resize
|
||||||
|
lResult = HTBORDER;
|
||||||
|
|
||||||
|
switch (m_state) {
|
||||||
|
case wxSTATE_LEFT: if (point.x > rcClient.right) lResult = HTRIGHT; break;
|
||||||
|
case wxSTATE_TOP: if (point.y > rcClient.bottom) lResult = HTBOTTOM; break;
|
||||||
|
case wxSTATE_RIGHT: if (point.x < rcClient.left) lResult = HTLEFT; break;
|
||||||
|
case wxSTATE_BOTTOM: if (point.y < rcClient.top) lResult = HTTOP; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// The sizing is locked. Pretend that the mouse is not on a resize border.
|
||||||
|
lResult = HTBORDER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_ACTIVATE: {
|
||||||
|
WXLRESULT lResult = wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
if (IsDocked(m_state)) {
|
||||||
|
// When our window changes activation state, tell the Shell so that any
|
||||||
|
// auto-hidden application bar on our edge stays on top of our window making it
|
||||||
|
// always accessible to the user.
|
||||||
|
APPBARDATA abd = { sizeof(abd), m_hWnd };
|
||||||
|
wxVERIFY(::SHAppBarMessage(ABM_ACTIVATE, &abd));
|
||||||
|
|
||||||
|
if (LOWORD(wParam) == WA_INACTIVE && IsAutoHide()) {
|
||||||
|
// Hide the application bar if we are docked and auto-hidden.
|
||||||
|
ShowAutoHideAppBar(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
if (wParam == wxABT_AUTOHIDETIMERID) {
|
||||||
|
if (!GetAutoHidden() &&
|
||||||
|
IsDocked(m_state) &&
|
||||||
|
GetActiveWindow() != m_hWnd)
|
||||||
|
{
|
||||||
|
// Get the position of the mouse and the application bar's position
|
||||||
|
// Everything must be in screen coordinates.
|
||||||
|
DWORD dwPoint = ::GetMessagePos();
|
||||||
|
wxPoint pointMouse(GET_X_LPARAM(dwPoint), GET_Y_LPARAM(dwPoint));
|
||||||
|
RECT rect = {};
|
||||||
|
wxVERIFY(::GetWindowRect(m_hWnd, &rect));
|
||||||
|
wxRect rectBounds(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
|
||||||
|
|
||||||
|
// Add a little margin around the application bar
|
||||||
|
rectBounds.Inflate(2 * ::GetSystemMetrics(SM_CXDOUBLECLK), 2 * ::GetSystemMetrics(SM_CYDOUBLECLK));
|
||||||
|
if (!rectBounds.Contains(pointMouse)) {
|
||||||
|
// If the mouse is NOT over or near the application bar, hide it.
|
||||||
|
ShowAutoHideAppBar(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
} else
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (message == WM_AB_NOTIFY) {
|
||||||
|
switch (wParam) {
|
||||||
|
case ABN_FULLSCREENAPP:
|
||||||
|
if (lParam)
|
||||||
|
m_flags |= wxFLAG_FULLSCREENAPPOPEN;
|
||||||
|
else
|
||||||
|
m_flags &= ~wxFLAG_FULLSCREENAPPOPEN;
|
||||||
|
OnChangeTaskBarState(GetTaskBarState());
|
||||||
|
|
||||||
|
if (::IsWindowVisible(m_hWnd)) {
|
||||||
|
// Set the Z-order.
|
||||||
|
wxVERIFY(::SetWindowPos(m_hWnd, GetZWnd(m_state, m_flags), 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOSENDCHANGING));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABN_POSCHANGED:
|
||||||
|
if (IsDocked(m_state) && !IsAutoHide())
|
||||||
|
DockAppBar(m_state);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABN_STATECHANGE:
|
||||||
|
// Taskbar's state changed.
|
||||||
|
OnChangeTaskBarState(GetTaskBarState());
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ABN_WINDOWARRANGE:
|
||||||
|
OnWindowsArrange(lParam ? true : false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Unknown message.
|
||||||
|
wxFAIL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
} else
|
||||||
|
return wxFrame::MSWWindowProc(message, wParam, lParam);
|
||||||
|
}
|
||||||
|
}
|
20
lib/wxExtend/src/stdafx.cpp
Normal file
20
lib/wxExtend/src/stdafx.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of wxExtend.
|
||||||
|
|
||||||
|
wxExtend 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
27
lib/wxExtend/src/stdafx.h
Normal file
27
lib/wxExtend/src/stdafx.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Amebis
|
||||||
|
|
||||||
|
This file is part of wxExtend.
|
||||||
|
|
||||||
|
wxExtend 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
wxExtend 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 wxExtend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../include/wxex/appbar.h"
|
||||||
|
|
||||||
|
#include "../include/wxex/common.h"
|
||||||
|
|
||||||
|
#include <Windowsx.h>
|
||||||
|
#include <wx/msgdlg.h>
|
BIN
output/locale/sl_SI/ZRCola.mo
Normal file
BIN
output/locale/sl_SI/ZRCola.mo
Normal file
Binary file not shown.
53
output/locale/sl_SI/ZRCola.po
Normal file
53
output/locale/sl_SI/ZRCola.po
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: ZRCola\n"
|
||||||
|
"POT-Creation-Date: 2016-02-04 12:19+0100\n"
|
||||||
|
"PO-Revision-Date: 2016-02-04 12:19+0100\n"
|
||||||
|
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
||||||
|
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
|
||||||
|
"Language: sl_SI\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 1.8.6\n"
|
||||||
|
"X-Poedit-Basepath: ../../../ZRCola\n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||||
|
"%100==4 ? 2 : 3);\n"
|
||||||
|
"X-Poedit-SourceCharset: UTF-8\n"
|
||||||
|
"X-Poedit-KeywordsList: _\n"
|
||||||
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
|
#: zrcolaapp.cpp:40
|
||||||
|
msgid "Hello World"
|
||||||
|
msgstr "Zdravo svet"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:37
|
||||||
|
msgid "&Hello...\tCtrl+H"
|
||||||
|
msgstr "&Pozdrav ...\tCtrl+H"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:37
|
||||||
|
msgid "Help string shown in status bar for this menu item"
|
||||||
|
msgstr "Niz s pomočjo prikazan v statusni vrstici za to točko menija"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:45
|
||||||
|
msgid "&File"
|
||||||
|
msgstr "&Datoteka"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:46
|
||||||
|
msgid "&Help"
|
||||||
|
msgstr "&Pomoč"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:62
|
||||||
|
msgid "This is a wxWidgets' Hello world sample"
|
||||||
|
msgstr "To je primer Zdravo svet v wxWidgets"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:62
|
||||||
|
msgid "About Hello World"
|
||||||
|
msgstr "O Zdravo svet"
|
||||||
|
|
||||||
|
#: zrcolaframe.cpp:68
|
||||||
|
msgid "Hello world from wxWidgets!"
|
||||||
|
msgstr "Zdravo svet iz wxWidgets!"
|
||||||
|
|
||||||
|
#~ msgid "Welcome to wxWidgets!"
|
||||||
|
#~ msgstr "Dobrodošli v wxWidgets!"
|
BIN
output/locale/sl_SI/wxstd.mo
Normal file
BIN
output/locale/sl_SI/wxstd.mo
Normal file
Binary file not shown.
9822
output/locale/sl_SI/wxstd.po
Normal file
9822
output/locale/sl_SI/wxstd.po
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user