Стартовый пул
This commit is contained in:
31
ECC/CHANGELOG.txt
Normal file
31
ECC/CHANGELOG.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
2014-05-13 0.0.1.9
|
||||
==================
|
||||
TECColorCombo now displays correctly items (closed and dropped-down normal/selected) in Win32/Qt4/GTK2.
|
||||
(Reason: Canvas.Font.Color and Canvas.Brush.Color wasn't set properly to clWindowText, clHighlightText, clWindow and clHighlight).
|
||||
|
||||
Added small abstract class TBaseScrollControl to unit ECTypes. It manages scrollbars only.
|
||||
|
||||
Added glyphs egdSizeArrUp, egdSizeArrRight, egdSizeArrDown and egdSizeArrLeft to TGlyphDesign (and implemented in TCanvasHelper class).
|
||||
|
||||
Improved calculation of InvalidateRect of TCustomECGrpCtrls when Orientation = eooVertical.
|
||||
|
||||
TBaseECSlider (and descendants) are now creaed with DoubleBuffered = True.
|
||||
(Reason: some users experienced flickering.)
|
||||
|
||||
Methods Resize(); are replaced with message methods WMSize(); (TCustomECSpeedBtn, TCustomECSwitch, TCustomECRuler, TBaseECSlider, TCustomECGrpCtrls).
|
||||
(Reason: Better optimalized code. LCL triggers more Resize(); and less WMSize();.)
|
||||
|
||||
In TCustomECImageMenu.DrawItem() is (odSelected in State) replaced with Focused. It repairs calculation of item-background color in GTK2.
|
||||
(Reason: (odSelected in State) does not work in GTK2.)
|
||||
|
||||
Improved repainting of TCustomECSpeedBtn and TCustomECRuler when these components are resized in GTK2.
|
||||
(Reason: GTK2 needs extra Invalidate; on resizing, while Qt4 invalidates automatically.)
|
||||
|
||||
2014-05-09 0.0.1.7
|
||||
===================
|
||||
TCustomECGrpCtrls - controling via keyboard (0 for all up, 1..9 for switch items 0-8) is moved from KeyDown to KeyPress.
|
||||
(Reason: GTk2 and Qt4 sends different key codes for 0..9, while KeyPress works properly.)
|
||||
|
||||
2014-04-25 0.0.1.7
|
||||
===================
|
||||
Initial release on Lazarus Mailing List.
|
481
ECC/COPYING.LGPL.txt
Normal file
481
ECC/COPYING.LGPL.txt
Normal file
@@ -0,0 +1,481 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if
|
||||
you distribute copies of the library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the source code distributed need not include anything that is normally
|
||||
distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
150
ECC/Demos/project1.lpi
Normal file
150
ECC/Demos/project1.lpi
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
<Item2 Name="Final">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="ecsas"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="."/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
<AllowLabel Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<TargetCPU Value="x86_64"/>
|
||||
<TargetOS Value="linux"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsStabs"/>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-godwarfsets"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
<SharedMatrixOptions Count="2">
|
||||
<Item1 ID="273360387965" Type="IDEMacro" MacroName="LCLWidgetType" Value="qt"/>
|
||||
<Item2 ID="793081410046" Type="IDEMacro" MacroName="LCLWidgetType" Value="gtk2"/>
|
||||
</SharedMatrixOptions>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="RunTimeTypeInfoControls"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="eccontrols"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="include;$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="."/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
<AllowLabel Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="0"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<UseHeaptrc Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-godwarfsets"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
23
ECC/Demos/project1.lpr
Normal file
23
ECC/Demos/project1.lpr
Normal file
@@ -0,0 +1,23 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
clocale,
|
||||
{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, runtimetypeinfocontrols, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
8730
ECC/Demos/unit1.lfm
Normal file
8730
ECC/Demos/unit1.lfm
Normal file
File diff suppressed because it is too large
Load Diff
1111
ECC/Demos/unit1.pas
Normal file
1111
ECC/Demos/unit1.pas
Normal file
File diff suppressed because it is too large
Load Diff
14
ECC/README.txt
Normal file
14
ECC/README.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
ECControls requires following change in controls.pp:
|
||||
these two methods must be virtual:
|
||||
line ~722 procedure GetSpaceAround(var SpaceAround: TRect); virtual;
|
||||
|
||||
line ~724 function GetSpace(Kind: TAnchorKind): Integer; virtual;
|
||||
|
||||
This is done in Lazarus trunk 44805.
|
||||
That's all. Without it will package not compile.
|
||||
No matter if you have stable Lazarus (1.2) or trunk (1.3).
|
||||
No matter if you have stable FPC (2.6.4) or trunk (2.7.1)
|
||||
(but there were some patches to fpdoc which are not in 2.6.4,
|
||||
so if you want to create html docs via attached script, you need 2.7.1).
|
||||
|
||||
|
7
ECC/create_docs.bat
Normal file
7
ECC/create_docs.bat
Normal file
@@ -0,0 +1,7 @@
|
||||
fpdoc --format=html --package=eccontrols --descr-dir=docs ^
|
||||
--input=ectypes.pas --input=ecscale.pas ^
|
||||
--input=ecslider.pas --input=ecprogressbar.pas ^
|
||||
--input=ecswitch.pas --input=ecruler.pas ^
|
||||
--input=ecspinctrls.pas --input=eceditbtns.pas ^
|
||||
--input=ecimagemenu.pas --input=ecgroupctrls.pas ^
|
||||
--output=docs/html --dont-trim
|
7
ECC/create_docs.sh
Normal file
7
ECC/create_docs.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
fpdoc --format=html --package=eccontrols --descr-dir=docs \
|
||||
--input=ectypes.pas --input=ecscale.pas \
|
||||
--input=ecslider.pas --input=ecprogressbar.pas \
|
||||
--input=ecswitch.pas --input=ecruler.pas \
|
||||
--input=ecspinctrls.pas --input=eceditbtns.pas \
|
||||
--input=ecimagemenu.pas --input=ecgroupctrls.pas \
|
||||
--output=docs/html --dont-trim
|
11
ECC/create_lrs.sh
Normal file
11
ECC/create_lrs.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecslider.lrs tecslider.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecprogressbar.lrs tecprogressbar.png tecpositionbar.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecruler.lrs tecruler.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecspinctrls.lrs tecspinbtns.png tecspinedit.png tectimer.png tecspincontroller.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres eceditbtns.lrs teceditbtn.png teccolorbtn.png tecspeedbtn.png teccombobtn.png teccolorcombo.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecswitch.lrs tecswitch.png fullcircle8.png zero8.png fullcircle4.png zero4.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecimagemenu.lrs tecimagemenu.png
|
||||
~/Lazarus_Qt/lazarus/tools/lazres ecgroupctrls.lrs teccheckgroup.png tecradiogroup.png
|
||||
|
87
ECC/docs/eceditbtns.xml
Normal file
87
ECC/docs/eceditbtns.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECEditBtns"><element name="TECCombo"><short>Visual component. Combo with associated button.</short>
|
||||
</element><element name="TECColorBtn"><short>Visual component for selecting color. Line edit displays color code in various formats while associated button triggers color dialog.</short>
|
||||
</element><element name="TCustomECColorBtn"><short>Base class for TECColorBtn. No <b>published</b> properties, no abstract methods.</short>
|
||||
</element><element name="TECEditBtn"><short>Visual component. An alternative to TEditButton.</short>
|
||||
</element><element name="TCustomECEditBtn"><short>Base class for TCustomECColorBtn and TECEditBtn. No <b>published</b> properties, no abstract methods.</short>
|
||||
</element><element name="TECSpeedBtnPlus"><short>Visual component. A button designed to be associated to line-edit or combobox.</short>
|
||||
</element><element name="TCustomECSpeedBtn"><short>Base class for TECSpeedBtn and TECSpeedBtnPlus. No <b>published</b> properties, no abstract methods.</short>
|
||||
</element><element name="TECSpeedBtn"><short>Visual component - stand alone button with advanced features and built-in glyphs. An alternative to TSpeedButton.</short>
|
||||
<descr>Features and differences from TSpeedButton:
|
||||
|
||||
TSpeedButton has property <i>Glyph: TBitmap</i>. TECSpeedBtn has properties <i>ImageIndex: Integer</i> and <i>Images: TImageList</i> instead.
|
||||
|
||||
TECSpeedBtn has property Delay and built-in timer. Therefore it can work as a delay-button (Delay>0) or toggle-box (Delay<0).
|
||||
|
||||
TECSpeedBtn has more than 80 built-in glyph (painted via TCanvas helper). Glyphs can be various for checked and unchecked state.
|
||||
|
||||
Similarly to TSpeedButton, TECSpeedBtn has properties GroupIndex, Checked and AllowAllUp so buttons can be grouped to radio-group.
|
||||
|
||||
TECSpeedBtn cannot obtain focus but can be pressed by acceleration key (Alt+ [underlined key]).
|
||||
|
||||
TECSpeedBtn can be linked with TAction too.
|
||||
</descr><seealso><link id="TCustomECSpeedBtn.Delay"/><link id="TCustomECSpeedBtn.OnRelease"/>
|
||||
</seealso>
|
||||
</element><element name="TECSpeedBtnActionLink"><short>Class needed for linking with TAction.</short>
|
||||
</element><element name="TColorString"><short>Enumerated type denoting format of color string.</short>
|
||||
</element><element name="TColorString.ecsRGBColor"><short>Displays color in this order: Red, Green, Blue</short>
|
||||
</element><element name="TColorString.ecsBGRColor"><short>Displays color in this order: Blue, Green, Red</short>
|
||||
</element><element name="TColorString.ecsARGBColor"><short>Displays color in this order: Alpha, Red, Green, Blue</short>
|
||||
</element><element name="TColorString.ecsABGRColor"><short>Displays color in this order: Alpha, Blue, Green, Red</short>
|
||||
</element><element name="TColorString.ecsSystemBGR"><short>Displays names of known colors, like clBlue, clRed etc. Unknown color displys in this order: Blue, Green, Red.</short>
|
||||
</element><element name="TEBOption"><short>Enumerated type. Options for TCustomECEditBtn (or descendants) and TECCombo.</short>
|
||||
</element><element name="TEBOptions"><short>Set of TEBOption.</short>
|
||||
</element><element name="TEBOption.eboClickAltEnter"><short>Alt+Enter executes click on associated button.</short>
|
||||
</element><element name="TEBOption.eboClickCtrlEnter"><short>Ctrl+Enter executes click on associated button.</short>
|
||||
</element><element name="TEBOption.eboClickShiftEnter"><short>Shift+Enter executes click on associated button.</short>
|
||||
</element><element name="TCustomECSpeedBtn.Checked"><short>Denotes whether TECSpeedBtn is checked. This component has no State property and no state cbGrayed.</short><descr>Checked can be True only when Delay < 0 (button behaves like a TToggleBox) or Delay > 0 (button works with Delay).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.Delay"><short>Behaviour of button depends on value (negative, 0, positive).</short><descr>Delay = 0 (defalut): button behaves like TSpeedBtn<br/>
|
||||
|
||||
Delay < 0: button behaves like TToggleBox<br/>
|
||||
|
||||
Delay > 0: means value [miliseconds]. On click, button stays pushed. After this delay, it gets back to normal state.<br/><br/>
|
||||
|
||||
In all cases, it triggers OnRelease when changed form pushed to normal state.</descr>
|
||||
</element><element name="TCustomECSpeedBtn.GlyphColor"><short>Color of built-in glyph.</short>
|
||||
</element><element name="TCustomECSpeedBtn.OnRelease"><short>Triggered when button changes its state from pushed back to normal.</short>
|
||||
</element><element name="TCustomECSpeedBtn.OnChange"><short>Triggered when <link id="TCustomECSpeedBtn.Checked">Checked</link> property is changed.</short><descr>Property Checked changes only when button is in delay-mode (Delay > 0) or as a togglebox (Delay < 0).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.OnDrawGlyph"><short>Event triggered before glyph is painted to internal image (bitmap) of button. This enables to draw user-defined glyph.</short><descr>The OnDrawGlyph has the highest precedence. The second is TCustomECSpeedBtn.ImageIndex (if image exists in Images). The last is built-in glyph.</descr>
|
||||
</element><element name="TCustomECSpeedBtn.GlyphDesign"><short>Selects built-in glyph for Checked = False.</short><descr>This glyph is displayed when:<br/>
|
||||
Normal button (Delay = 0) is in any state (normal, pushed, highlighted or disabled)<br/>
|
||||
ToggleBox (Delay < 0) is unchecked (all states except pushed).<br/>
|
||||
Delay button (Delay > 0) is unchecked (all states except pushed).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.GlyphDsgnChecked"><short>Selects built-in glyph for Checked = True.</short><descr>This glyph is displayed when:<br/>
|
||||
Normal button (Delay = 0) - never<br/>
|
||||
ToggleBox (Delay < 0) is checked (pushed state).<br/>
|
||||
Delay button (Delay > 0) is checked (pushed state).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.Images"><short>Image list. ImageIndex and ImageIdxChecked properties points to this list.</short>
|
||||
</element><element name="TCustomECSpeedBtn.Layout"><short>Alignment of the image.</short>
|
||||
</element><element name="TCustomECSpeedBtn.Spacing"><short>Distance between glyph (or image) and Caption (if both exist). Spacing may mean horizontal or vertical, depends on Layout.</short>
|
||||
</element><element name="TCustomECSpeedBtn.ImageIndex"><short>Index of image from list (Images) for Checked = False.</short><descr>This image is displayed when:<br/>
|
||||
Normal button (Delay = 0) is in any state (normal, pushed, highlighted or disabled)<br/>
|
||||
|
||||
ToggleBox (Delay < 0) is unchecked (all states except pushed).<br/>
|
||||
|
||||
Delay button (Delay > 0) is unchecked (all states except pushed).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.ImageIdxChecked"><short>Index of image from list (Images) for Checked = True.</short><descr>This image is displayed when:<br/>
|
||||
Normal button (Delay = 0) - never<br/>
|
||||
ToggleBox (Delay < 0) is checked (pushed state).<br/>
|
||||
Delay button (Delay > 0) is checked (pushed state).</descr>
|
||||
</element><element name="TCustomECSpeedBtn.Margin"><short>Margin around image and Caption. Applies only when AutoSize = True.</short>
|
||||
</element><element name="TCustomECEditBtn.Button"><short>Subclass. Button associated to line-edit.</short>
|
||||
</element><element name="TCustomECEditBtn.Indent"><short>Indent [pixels] of buttons. Distance between line-edit and button.</short>
|
||||
</element><element name="TCustomECEditBtn.WidthInclBtn"><short>Width including button width. Common property "Width" gives width of edit only. WidthInclBtns gives width including Button and Indent.</short>
|
||||
</element><element name="TCustomECEditBtn.Options"><short>See <link id="TEBOption"/>.</short>
|
||||
</element><element name="TCustomECColorBtn.CustomColor"><short>Selected color. User can select color via associated ColorDialog or type-in the color code to line-edit.</short>
|
||||
</element><element name="TCustomECColorBtn.ColorString"><short>Format of <link id="TCustomECColorBtn.CustomColor">CustomColor</link>.</short>
|
||||
</element><element name="TCustomECColorBtn.Prefix"><short>Prefix of the color code. Default is $. Can be #, nothing or anything else.</short>
|
||||
</element><element name="TCustomECColorBtn.OnCustomColorChanged"><short>Triggered when CuctomColor is changed.</short>
|
||||
</element><element name="TECCombo.Button"><short>Subclass. Button associated to combobox.</short>
|
||||
</element><element name="TECCombo.Options"><short>See <link id="TEBOption"/>.</short>
|
||||
</element><element name="TECCombo.Indent"><short>Indent [pixels] of buttons. Distance between combobox and button.</short>
|
||||
</element><element name="TECCombo.WidthInclBtn"><short>Width including button width. Common property "Width" gives width of combobox only. WidthInclBtns gives width including Button and Indent.</short>
|
||||
</element>
|
||||
<short>Visual components TECSpeedBtn, TECEditBtn, TECColorBtn and TECCombo.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
51
ECC/docs/ecgroupctrls.xml
Normal file
51
ECC/docs/ecgroupctrls.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECGroupCtrls"><element name="TCustomECGroupCtrl"><short>Base abstract class for TECRadioGroup and TECCheckGroup. No <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECRadioGroup"><short>Base class for TECRadioGroup. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECCheckGroup"><short>Base class for TECCheckGroup. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TECRadioGroup"><short>Visual component. An alternative to TRadioGroup.</short>
|
||||
</element><short>Visual components TECRadioGroup and TECCheckGroup.</short><element name="TECItemState"><short>Enumerated type denoting state of items of TECRadioGroup and TECCheckGroup.</short>
|
||||
</element><element name="TECGCOption"><short>Enumerated type. Options for TECRadioGroup and TECCheckGroup.</short>
|
||||
</element><element name="TECGCOption.egoAllowAllUp"><short>Allow all items to be unchecked. <i>False</i> means that one item of TECRadioGroup and at least one item of TECCheckGroup is always selected.</short>
|
||||
</element><element name="TECGCOption.egoCaptionBy"><short>Caption is displayed by the box, i.e. on the left or on the right - depends on the BiDiMode.</short>
|
||||
</element><element name="TECGCOption.egoCentered"><short>Glyphs, images and texts of items are horizontally centered.</short>
|
||||
</element><element name="TECGCOption.egoColumnThenRow"><short>Determines order of items. Default is left to right, next row and again left to right (assumes horizonal orientation and left-to-right language).</short>
|
||||
</element><element name="TECGCOption.egoNativeGlyphs"><short>Items have native glyph, i.e. empty or full small circle (TECRadioGroup) and empty or checked square (TECCheckGroup).</short>
|
||||
</element><element name="TECGCOption.egoSplitted"><short>Items are separated with vertical and vertical spliters (beveled lines).</short>
|
||||
</element><element name="TECGCOptions"><short>Set of TECGCOption.</short>
|
||||
</element>
|
||||
<element name="TGroupCtrlItem"><short>Group Control item. RadioGroup or CheckGroup is collection of these items.</short>
|
||||
</element><element name="TGroupCtrlItems"><short>Collection of items. Subclass for TCustomECGroupCtrl and descendants.</short>
|
||||
</element>
|
||||
<element name="TGroupCtrlItem.Caption"><short>Caption of the item. Display depends on properties Font, (Un)CheckedFontColor and (Un)CheckedFontStyles of TCustomECGroupCtrl.</short>
|
||||
</element><element name="TGroupCtrlItem.Checked"><short>Determines whether the item (radiobutton or checkbox) is checked (selected) or not. Can be set via code to True or False, regardless on egoAllowAllUp option.</short>
|
||||
</element><element name="TGroupCtrlItem.ImageIndex"><short>Index of image. Parent (TCustomECGroupCtrl) contains link to ImageList (property Images).</short>
|
||||
</element><element name="TGroupCtrlItems.Add"><short>Adds new item to collection.</short>
|
||||
</element><element name="TGroupCtrlItems.Items"><short>Collection of items.</short>
|
||||
</element><element name="TGroupCtrlItems.Reset"><short>Set all items to unchecked (Checked=False), regardless on egoAllowAllUp option.</short>
|
||||
</element><element name="TGroupCtrlItems.Click"><short>This method is called on item click (i.e. mouse click or key-up event). Method respects egoAllowAllUp option.</short>
|
||||
</element><element name="TCustomECGroupCtrl.BlockColor"><short>Color of the component. Applies only when Style = eosPanel.</short>
|
||||
</element><element name="TCustomECGroupCtrl.CheckedFontColor"><short>Font color of checked items.</short>
|
||||
</element><element name="TCustomECGroupCtrl.CheckedFontStyles"><short>Font styles (bold, italic, underline) of checked items.</short>
|
||||
</element><element name="TCustomECGroupCtrl.UncheckedFontStyles"><short>Font styles (bold, italic, underline) of unchecked items.</short>
|
||||
</element><element name="TCustomECGroupCtrl.UncheckedFontColor"><short>Font color of unchecked items.</short>
|
||||
</element><element name="TCustomECGroupCtrl.Images"><short>Item images are taken from this image list.</short>
|
||||
</element><element name="TCustomECGroupCtrl.Indent"><short>Distance between caption and block with items. Applies only when Caption is not empty string.</short>
|
||||
</element><element name="TCustomECGroupCtrl.Items"><short>Subclass containing items.</short>
|
||||
</element><element name="TCustomECGroupCtrl.Spacing"><short>Distance between glyph, image and text of item. Also distance between border and content (when egoCentered is not in Options).</short>
|
||||
</element><element name="TCustomECGroupCtrl.Options"><short>See <link id="TECGCOption"/>.</short>
|
||||
</element><element name="TCustomECGroupCtrl.RowCount"><short>Number of rows.</short>
|
||||
</element><element name="TCustomECRadioGroup.ItemIndex"><short>Index of item that is currently selected. -1 or any other negative value means that no items is selected.</short>
|
||||
</element><element name="TCustomECRadioGroup.OnSelectionChange"><short>Triggered when ItemIndex changes. Changes from negative to other negative value are not allowed.</short>
|
||||
</element><element name="TCustomECCheckGroup.OnItemClick"><short>Triggered when any item changed its state (property Checked). Both True=>False and False=>True are valid.</short>
|
||||
</element><element name="TCustomECCheckGroup.Checked"><short>Maps property Checked of items. This property was added for compatibility with TCheckGroup.</short><seealso><link id="TGroupCtrlItem.Checked"/>
|
||||
</seealso>
|
||||
</element><element name="TECCheckGroup"><short>Visual component. An alternative to TCheckGroup.</short>
|
||||
</element>
|
||||
<element name="TECRadioGroup.Orientation"><short>Denotes orientation of the group control.</short>
|
||||
<example file="examples/tecgroupctrls_ori.txt"/>
|
||||
</element>
|
||||
<element name="TECCheckGroup.Orientation"><short>Denotes orientation of the group control.</short><example file="examples/tecgroupctrls_ori.txt"/>
|
||||
</element>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
27
ECC/docs/ecimagemenu.xml
Normal file
27
ECC/docs/ecimagemenu.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECImageMenu"><element name="TCaptionAlignment"><short>Enumerated type denoting alingment of the caption.</short>
|
||||
</element><element name="TCaptionAlignment.ecaImageSide"><short>Caption is aligned to image.</short>
|
||||
</element><element name="TCaptionAlignment.ecaOpposite"><short>Caption is aligned to the opposite side of the image.</short>
|
||||
</element><element name="TCaptionAlignment.ecaCentered"><short>Caption is centered in the space by the image.</short>
|
||||
</element><element name="TECImageMenu"><short>Visual component. Vertical menu with images. Similar component is frequently used in KDE4 applications.</short>
|
||||
</element><element name="TCustomECImageMenu"><short>Base class for TECImageMenu. No <b>published</b> properties, no abstract classes.</short>
|
||||
</element><element name="TImageMenuItem"><short>Menu item. Menu is collection of these items.</short>
|
||||
</element><element name="TImageMenuItem.Caption"><short>Caption of menu item. Usually displayed with larger, bold font.</short>
|
||||
</element><element name="TImageMenuItem.Description"><short>Description of menu item. Usually displayed with smaller font.</short>
|
||||
</element><element name="TImageMenuItem.ImageIndex"><short>Index of image. Owner (TCustomECImageMenu) contains link to ImageList (property Images).</short>
|
||||
</element><element name="TImageMenuItems"><short>Collection of menu items. Subclass for TECImageMenu.</short>
|
||||
</element><element name="TCustomECImageMenu.Alternate"><short>Determines whether odd and even menu items are drawn with different (lighter and darker) background.</short>
|
||||
</element><element name="TCustomECImageMenu.CaptionAlign"><short>Alignment of the menu captions.</short><descr>Applies only when Layout = eopLeft or eopRight.
|
||||
Caption is always centered when Layout = eopTop or eopBottom.</descr>
|
||||
</element><element name="TCustomECImageMenu.CaptionFontOptions"><short>Font options of menu captions. Captions are usually displayed with larger, bold font while descriptions are displayed with small font.</short>
|
||||
</element><element name="TCustomECImageMenu.Images"><short>Menu images are taken from this image list.</short>
|
||||
</element><element name="TCustomECImageMenu.Layout"><short>Alignment of the image.</short>
|
||||
</element><element name="TCustomECImageMenu.MenuItems"><short>Subclass containing menu items.</short>
|
||||
</element><element name="TCustomECImageMenu.Spacing"><short>Spacing around images and captions.</short>
|
||||
</element>
|
||||
<short>Visual component TECImageMenu.</short><element name="TImageMenuItems.Items"><short>Collection of menu items.</short>
|
||||
</element><element name="TImageMenuItems.Add"><short>Adds new menu item to collection.</short>
|
||||
</element>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
26
ECC/docs/ecprogressbar.xml
Normal file
26
ECC/docs/ecprogressbar.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECProgressBar"><element name="TECProgressBar"><short>Visual component. An advanced alternative to TProgressBar.</short>
|
||||
</element><element name="TCustomECProgressBar.CaptionInline"><short>Determines whether caption is drawn on the progress bar, together with Position and Units.</short>
|
||||
</element><element name="TCustomECProgressBar.ProgressDigits"><short>Number of digits or decimal places (formating). Depends on Scale.ValueFormat.</short>
|
||||
</element><element name="TCustomECProgressBar.ProgressFontOptions"><short>Font options of the progress text. Determines font-size, color and font-styles (bold, italic) of the text written inside progress bar.</short>
|
||||
</element><element name="TCustomECProgressBar.ProgressTextAlign"><short>Aligning of the text inside the progress bar.</short><descr>0: Progress text is centered.<br/>
|
||||
Negative values orientation [pixels]: Progress text is aligned to the left (horizontal orientation) or to the bottom (vertical orientation).<br/>
|
||||
Positive values [pixels]: Progress text is aligned to the right (horizontal orientation) or to the top (vertical orientation).</descr>
|
||||
</element><element name="TProgressTextStyle"><short>Enumerated type denoting style of the progress text.</short>
|
||||
</element><element name="TProgressTextStyle.eptNone"><short>No text displayed.</short>
|
||||
</element><element name="TProgressTextStyle.eptSolid"><short>Text is rendered with a solid color.</short>
|
||||
</element><element name="TProgressTextStyle.eptInverted"><short>Text is displayed inverted.</short>
|
||||
</element><element name="TCustomECProgressBar.ProgressTextStyle"><short>Style of the progress text.</short><descr>eptSolid: Text color is ProgressFontOptions.FontColor.
|
||||
eptInverted: Text color is ProgressColor (out of progress) or background color (over progress) - usually clBtnFace. </descr>
|
||||
</element><element name="TCustomECProgressBar.Units"><short>Units are displayed by the value as a part of the progress text. Usually %.</short>
|
||||
</element><element name="TCustomECProgressBar"><short>Base class for TECProgressBar. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECPositionBar"><short>Base class for TECPositionBar. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECPositionBar.ProgressSign"><short>A sign (mark) showing actual position of the progress.</short>
|
||||
</element><element name="TECPositionBar"><short>Visual component. An alternative to TTrackBar or TScrollBar. Similar components are used in Blender (3D graphics software).</short>
|
||||
</element><element name="TCustomECPositionBar.MouseDragPixels"><short>Mouse drag parameter. Number of pixels that is needed to drag to increment or decrement progress position by one pixel.</short><descr>Default is 1, i.e. dragging and progress are 1:1.</descr>
|
||||
</element><element name="TCustomECPositionBar.MouseDragPixelsFine"><short>Mouse drag parameter. CTRL is pressed. Number of pixels that is needed to drag to increment or decrement progress position by one pixel.</short><descr>Default is 10, i.e. dragging and progress are 10:1. Used for fine adjusting.</descr>
|
||||
</element>
|
||||
<short>Visual components TECProgressBar and TECPositionBar.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
33
ECC/docs/ecruler.xml
Normal file
33
ECC/docs/ecruler.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECRuler"><element name="TECRulerScale"><short>Class is used as a subclass of TECRuler.</short>
|
||||
</element><element name="TPointerStyle"><short>Style of the ruler pointer.</short>
|
||||
</element><element name="TPointerMode"><short>Mode of the ruler pointer. epmMovable means that pointer moves on mouse hovering.</short>
|
||||
</element><element name="TCaptionAlign"><short>Aligning of the Caption on the ruler.</short>
|
||||
</element><element name="TCaptionAlign.ecaBorder"><short>Caption is aligned to the border (bevel) of the ruler.</short>
|
||||
</element><element name="TCaptionAlign.ecaScale"><short>Caption is aligned to the scale.</short>
|
||||
</element><element name="TCaptionAlign.ecaCenter"><short>Caption is centered between border and scale.</short>
|
||||
</element><element name="TECRuler"><short>Visual component - advanced ruler.</short>
|
||||
</element><element name="TCustomECRuler"><short>Base class for TECRuler. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECRuler.SetCaptionPos"/><element name="TCustomECRuler.SetCaptionAlign"/><element name="TCustomECRuler.CaptionAlign"><short>Aligning of the Caption. </short>
|
||||
</element><element name="TCustomECRuler.CaptionPos"><short>Position of the Caption. Left or right for horizontal rulers, top or bottom for vertical rulers.</short>
|
||||
</element><element name="TCustomECRuler.IndentBottomRight"><short>Indentation of the scale from the right/bottom side of the border of the ruler.</short>
|
||||
</element><element name="TCustomECRuler.IndentTopLeft"><short>Indentation of the scale from the left/top side of the border of the ruler.</short>
|
||||
</element><element name="TCustomECRuler.Max"><short>Maximum.</short>
|
||||
</element><element name="TCustomECRuler.Min"><short>Minimum.</short>
|
||||
</element><element name="TCustomECRuler.PointerColor"><short>Color of the pointer.</short>
|
||||
</element><element name="TCustomECRuler.PointerMode"><short>Mode of the pointer. epmMovable moves pointer on mouse hovering.</short>
|
||||
</element><element name="TCustomECRuler.PointerStyle"><short>Style of the pointer (solid, dotted or dashed).</short>
|
||||
</element><element name="TCustomECRuler.PointerWidth"><short>Width of the pointer.</short>
|
||||
</element><element name="TCustomECRuler.Position"><short>Actual position of the pointer on the ruler.</short>
|
||||
</element><element name="TCustomECRuler.PositionToHint"><short>Denotes that current position is displayed in the Hint component.</short>
|
||||
</element><element name="TCustomECRuler.Reversed"><short>Reversed slider, i.e. from Max to Min.</short>
|
||||
</element><element name="TCustomECRuler.Scale"><short>Subclass.</short>
|
||||
</element><element name="TCustomECRuler.ScaleFontOptions"><short>Font options of the scale. Determines font-size, color and font-styles (bold, italic) of the values.</short>
|
||||
</element><element name="TCustomECRuler.ScalePos"><short>Position of the scale on the component. Scale can be aligned to the top/bottom (horizontal ruler) or to the left/right (vertical ruler).</short>
|
||||
</element><element name="TCustomECRuler.OnChangePosition"><short>Triggered when Position is changed.</short>
|
||||
</element><element name="TCustomECRuler.Transparent"><short>Transparent ruler.</short>
|
||||
</element>
|
||||
<short>Visual component TECRuler.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
89
ECC/docs/ecscale.xml
Normal file
89
ECC/docs/ecscale.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECScale"><element name="TCustomECScale"><descr>You can use this class as a subclass for your own visual components.</descr>
|
||||
<short>Base class for TECScale and TECRulerScale. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECScale.Correction">
|
||||
</element><element name="TCustomECScale.DateTimeFormat"><short>Format of values. For ValueFormat = esvfDate or esvfTime only.</short>
|
||||
</element><element name="TCustomECScale.Digits"><short>Number of digits. Depends on <b>ValueFormat</b>.</short><descr>case <var>ValueFormat</var> of
|
||||
<i>esvfAutoRound</i>: numbers of decimal places (i.e. 10,000 for <var>Digits</var> = 3)
|
||||
<i>esvfFixedRound</i>: numbers of decimal places (i.e. 10,000 for <var>Digits</var> = 3)
|
||||
<i>esvfSmartRound</i>: numbers of decimal places (i.e. 10,50 for <var>Digits</var> = 3)
|
||||
<i>esvfExponential</i>: number of digits of exponent (i.e. 1,00E+001 for <var>Digits</var> = 3)
|
||||
<i>esvfHexadecimal</i>: numbers of digits (i.e. 00A for <var>Digits</var> = 3)
|
||||
<i>esvfMarkHexadec</i>: numbers of digits (i.e. $00A for <var>Digits</var> = 3)
|
||||
<i>esvfOctal</i>: numbers of digits (i.e. 036 for <var>Digits</var> = 3)
|
||||
<i>esvfBinary</i>: numbers of digits (i.e. 1100100 for <var>Digits</var> = 7)
|
||||
<i>esvfDate</i>: does not affect
|
||||
<i>esvfTime</i>: does not affect
|
||||
<i>esvfText</i>: does not affect</descr>
|
||||
</element><element name="TCustomECScale.FontOrientation"><short>Orientation of values (0-3600, 900 ~ 90 degrees)</short>
|
||||
</element><element name="TCustomECScale.LogarithmBase"><short>Only for ScaleType = estLogarithmic.</short>
|
||||
</element><element name="TCustomECScale.ScaleType"><short>Scale can be <i>estLinear</i> or <i>estLogarithmic</i>
|
||||
</short>
|
||||
</element><element name="TCustomECScale.Text"><short>Text can be used instead of values. Values are then indexes of TStringList.</short>
|
||||
</element><element name="TCustomECScale.TickAlign"><short>Alignment of the ticks. Can be <i>etaOuter</i>, <i>etaInner</i>, <i>etaCenter</i>
|
||||
</short>
|
||||
</element><element name="TCustomECScale.TickColor"><short>Color of the ticks. clDefault is clBtnText. Only for TickDesing = etdSimple or etdThick.</short>
|
||||
</element><element name="TCustomECScale.TickDesign"><short>Design of ticks. Can be: <i>etdSimple</i>, <i>etdThick</i>, <i>etd3DLowered</i>, <i>etd3DRaised</i>
|
||||
</short>
|
||||
</element><element name="TCustomECScale.TickIndent"><short>Indent of ticks. Distance of ticks from the edge of component or from the groove of ECSlider.</short>
|
||||
</element><element name="TCustomECScale.TickLength"><short>Length of the long ticks. Medium ticks are 0.7 of this value. Short ticks are 0.5 of this value.</short>
|
||||
</element><element name="TCustomECScale.TickLongValue"><short>Common divisor for long ticks. Only long ticks can have value. Default is 10. For range 0..100 will exist long ticks 0, 10, 20, ... 90, 100.</short>
|
||||
</element><element name="TCustomECScale.TickMiddleValue"><short>Common divisor for middle ticks. Default is 5.</short>
|
||||
</element><element name="TCustomECScale.TickShortValue"><short>Common divisor for short ticks. Default is 1.</short>
|
||||
</element><element name="TCustomECScale.TickVisible"><short>Visibility of ticks (short, middle, long).</short>
|
||||
</element><element name="TCustomECScale.ValueDisplay"><short>Displaying of the values.</short>
|
||||
<seealso><link id="TValueDisplay"/>, <link id="TCustomECScale.ValueIndent"/>, <link id="TCustomECScale.ValueShift"/>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TValueDisplay.evdNormal"><short>Value is centered to tick (horizontaly in case of horizontal scale).</short>
|
||||
</element><element name="TValueDisplay.evdTopLeft"><short>Values are aligned to the left from tick (in case of horizontal scale).</short>
|
||||
</element><element name="TValueDisplay.evdBottomRight"><short>Values are aligned to the right from tick (in case of horizontal scale).</short>
|
||||
</element><element name="TValueDisplay.evdTopLeftInside"><short>Values are aligned to the left from tick (in case of horizontal scale).</short>
|
||||
</element><element name="TValueDisplay.evdBttmRightInside"><short>Values are aligned to the right from tick (in case of horizontal scale).</short>
|
||||
</element><element name="TValueDisplay.evdCompactTopLeft"><short>Behaves like evdTopLeftInside in case of horizontal scale. In case of vertical scale are values separated to digits and diplayed as a column.</short>
|
||||
</element><element name="TValueDisplay.evdCompactBttmRight"><short>Behaves like evdBttmRightInside in case of horizontal scale. In case of vertical scale are values separated to digits and diplayed as a column.</short>
|
||||
</element><element name="TValueDisplay"><short>Enumeration denoting displaying values of the scale.</short><descr>Position of the values also influe:<br/>
|
||||
|
||||
ValueIndent: distance form tick (vertical in case of horizontal scale)<br/>
|
||||
|
||||
ValueShift: distance ( -/+) from centered position (horizontal in case of horizontal scale)</descr><seealso><link id="TCustomECScale.ValueIndent"/><link id="TCustomECScale.ValueShift"/>
|
||||
</seealso><example file="examples/tvaluedisplay.txt"/>
|
||||
</element>
|
||||
<element name="TCustomECScale.ValueIndent"><short>Distance between ticks and values.</short><seealso><link id="TCustomECScale.ValueDisplay"/>, <link id="TCustomECScale.ValueShift"/>
|
||||
</seealso>
|
||||
</element><element name="TCustomECScale.ValueShift"><short>Shift (in pixels) from the acccurate position.</short><seealso><link id="TCustomECScale.ValueDisplay"/>, <link id="TCustomECScale.ValueIndent"/>
|
||||
</seealso>
|
||||
</element><element name="TScaleType"><short>Enumeration denoting type of a scale.</short>
|
||||
</element><element name="TECScale"><short>Class is used as a subclass of TECSlider, TECProgressBar and TECPositionBar or third party visual components.</short>
|
||||
</element><element name="TTickAlign"><short>Enumeration denoting aligning of the ticks. etaInner means aligning to the groove of a slider or to the edge of a ruler.</short>
|
||||
</element><element name="TTickSize"><short>Enumeration denoting length of the tick. Private type.</short>
|
||||
</element><element name="TTickMetrics"><short>Record containing position and size of the tick. Private type.</short>
|
||||
</element><element name="TTicksVisible"><short>Enumeration denoting visibility of the ticks (short, middle, long).</short>
|
||||
</element><element name="TScaleValueFormat"><short>Enumeration denoting format of the values.</short>
|
||||
</element><element name="TScaleValueFormat.esvfAutoRound"><short>Automatic round.</short>
|
||||
</element><element name="TScaleValueFormat.esvfFixedRound"><short>Fixed number of decimal places.</short>
|
||||
</element><element name="TScaleValueFormat.esvfSmartRound"><short>Advanced rounding.</short>
|
||||
</element><element name="TScaleValueFormat.esvfMarkHexadec"><short>Hexadecimal numbers with $ prefix.</short>
|
||||
</element><element name="TScaleValueFormat.esvfOctal"><short>Octal numbers.</short>
|
||||
</element><element name="TScaleValueFormat.esvfBinary"><short>Binary numbers.</short>
|
||||
</element><element name="TScaleValueFormat.esvfDate"><short>Date.</short>
|
||||
</element><element name="TScaleValueFormat.esvfTime"><short>Time.</short>
|
||||
</element><element name="TScaleValueFormat.esvfHexadecimal"><short>Hexadecimal numbers.</short>
|
||||
</element><element name="TScaleValueFormat.esvfExponential"><short>Decimal numbers with exponent.</short>
|
||||
</element><element name="TCustomECScale.OnPrepareValue"><short>Triggered before the value is painted. Enables user-defined formating.</short><seealso><link id="TCustomECScale.ValueFormat"/>
|
||||
</seealso>
|
||||
</element><element name="TCustomECScale.ValueVisible"><short>Visibility of values (none, bound, regular, all).</short>
|
||||
</element><element name="TCustomECScale.ValueFormat"><short>Format of values (round, hexadecimal, date, time, ... ).</short><seealso><link id="TCustomECScale.OnPrepareValue"/>
|
||||
</seealso>
|
||||
</element><element name="TCustomECScale.GetStringMax"><short>Returns string representation of maximum (Max). Applies correct formatting.</short>
|
||||
</element><element name="TCustomECScale.GetStringMin"><short>Returns string representation of minimum (Min). Applies correct formatting.</short>
|
||||
</element><element name="TCustomECScale.GetPreferredWidth"><short>Returns preferred width (or height) needed to draw a scale. Width for vertical scales, height for horizontal.</short>
|
||||
</element><element name="TCustomECScale.GetStringPosition"><short>Returns string representation of current position. Applies correct formatting.</short>
|
||||
</element><element name="TCustomECScale.SetScaleBounds"><short>Sets bounds of the scale.</short><descr>This method must be called before GetPreferredWidth(), CalcTickPosAndValues() and Draw().</descr>
|
||||
</element><element name="TCustomECScale.CalcTickPosAndValues"><short>Calculates positions of ticks and values. Must be called before Draw().</short>
|
||||
</element><element name="TCustomECScale.Draw"><short>Draws the scale on canvas. CalcTickPosAndValues() must be called before.</short>
|
||||
</element>
|
||||
<short>Class TECScale. Not a component but can draw itself to any canvas.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
57
ECC/docs/ecslider.xml
Normal file
57
ECC/docs/ecslider.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECSlider"><element name="TProgressStyle"><short>Enumerated type denoting style of the progress.</short>
|
||||
</element><element name="TBaseECSlider"><short>Base class for TCustomECSlider, TCustomECProgressBar and TCustomECPositionBar</short>
|
||||
<descr>This class contains abstract classes. Do not instantiate.</descr>
|
||||
</element><element name="TECSlider"><short>Visual component. An advanced alternative to TTrackBar.</short>
|
||||
</element>
|
||||
<element name="TBaseECSlider.CaptionPos"><short>Position of the Caption.</short>
|
||||
</element><element name="TBaseECSlider.GrooveBevelWidth"><short>Width of the groove bevel. Applies only when GrooveStyle = eosPanel.</short>
|
||||
</element><element name="TBaseECSlider.GrooveColor"><short>Groove color. Applies only when <link id="TBaseECSlider.GrooveTransparent">GrooveTransparent</link> = False. clDefault is clBtnText.</short>
|
||||
</element><element name="TBaseECSlider.GrooveStyle"><short>Denotes the style (button-like, panel-like) of the groove.</short>
|
||||
</element><element name="TBaseECSlider.GrooveTransparent"><short>Deotes whether the groove is transparent or opaque (filled with <link id="TBaseECSlider.GrooveColor">GrooveColor</link>).</short>
|
||||
</element><element name="TBaseECSlider.GrooveWidth"><short>Width of the groove.</short>
|
||||
</element><element name="TBaseECSlider.ImageIndex"><short>Index of the image in ImageList.</short>
|
||||
</element><element name="TBaseECSlider.ImagePos"><short>Position of the image.</short><descr>May depend on <link id="TBaseECSlider.CaptionPos">CaptionPos</link> and Orientation.</descr>
|
||||
</element><element name="TBaseECSlider.Images"><short>Link to associated TImageList.</short>
|
||||
</element><element name="TBaseECSlider.LogarithmicPosition"><short>Logarithmic position. Useful when Scale.ScaleType is estLogarithmic.</short>
|
||||
</element><element name="TBaseECSlider.Indent"><short>Indent of Caption, Scale, Groove, Image etc.</short>
|
||||
</element><element name="TBaseECSlider.Max"><short>Maximal value of the Slider/ProgressBar/PositionBar.</short>
|
||||
</element><element name="TBaseECSlider.Min"><short>Minimal value of the Slider/ProgressBar/PositionBar.</short>
|
||||
</element><element name="TBaseECSlider.Position"><short>Current position.</short>
|
||||
</element><element name="TBaseECSlider.PositionToHint"><short>Denotes that current position is displayed in the Hint component.</short>
|
||||
</element><element name="TBaseECSlider.ProgressColor"><short>Color of the progress.</short>
|
||||
</element><element name="TProgressMark"><short>Enumerated type denoting position of progress mark(s) by the groove.</short><descr>Progress mark(s) can be visible only when GrooveFromMiddle = True.</descr>
|
||||
</element><element name="TProgressVisibility"><short>Enumerated type denoting visibility of the progress.</short>
|
||||
</element><element name="TTickMark"><short>Enumerated type denoting position of the scale (ticks and values) by the groove.</short>
|
||||
</element><element name="TBaseECSlider.ProgressColor2"><short>The second color of the progress.</short>
|
||||
</element><element name="TBaseECSlider.ProgressFromMiddle"><short>Determines the behaviour of the slider.</short><descr>False: Common slider. Progress is painted from Min to Position.<br/>
|
||||
|
||||
True: Slider has defined ProgressMiddlePos. Progress is painted from ProgressMiddlePos to Position.</descr>
|
||||
</element><element name="TBaseECSlider.ProgressMark"><short>Small marks denoting the middle position. Applies only when ProgressFromMiddle = True.</short>
|
||||
</element><element name="TBaseECSlider.ProgressMarkSize"><short>Size of the small marks denoting the middle position. Applies only when ProgressFromMiddle = True.</short>
|
||||
</element><element name="TBaseECSlider.ProgressMiddlePos"><short>The middle position. Should be between Min and Max. Applies only when ProgressFromMiddle = True.</short>
|
||||
</element><element name="TBaseECSlider.ProgressParameter"><short>Design parameter. Applies only when progress is visible and ProgressStyle = epsAesthetic.</short>
|
||||
</element><element name="TBaseECSlider.ProgressVisible"><short>Visibility of the progress.</short><descr>Default is epvProgress. Progress can be also invisible or always fully visible. The second is useful in combination with OnDrawProgressBMP where user can define own progress (for example rainbow gradient for selecting color).</descr>
|
||||
</element><element name="TBaseECSlider.Reversed"><short>Reversed slider, i.e. from Max to Min.</short>
|
||||
</element><element name="TBaseECSlider.Scale"><short>Subclass.</short>
|
||||
</element><element name="TBaseECSlider.ScaleFontOptions"><short>Font options of the scale. Determines font-size, color and font-styles (bold, italic) of the values.</short>
|
||||
</element><element name="TBaseECSlider.ScaleTickPos"><short>Determines whether the ticks of the scale will be on the left, on the right or on both sides of the groove (in case of vertical slider).</short>
|
||||
</element><element name="TBaseECSlider.ScaleValuePos"><short>Determines whether the values of the scale will be on the left, on the right or on both sides of the groove (in case of vertical slider).</short>
|
||||
</element><element name="TBaseECSlider.OnChange"><short>Triggered when <link id="TBaseECSlider.Position">Position</link> is changed.</short>
|
||||
</element><element name="TBaseECSlider.OnDrawProgressBMP"><short>Triggered when internal bitmap of the progress is painted. This enables to draw user-defined progress.</short>
|
||||
</element><element name="TCustomECSlider"><short>Base class for TECSlider. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TCustomECSlider.Knob"><short>Subclass.</short>
|
||||
</element><element name="TCustomECSlider.PageSize"><short>The value that increments to Position when user presses PageUp/PageDown or single clicks the left-mouse button on the groove.</short>
|
||||
</element><element name="TCustomECSlider.Increment"><short>The value that increments to Position when user presses arrow keys, [+] or [-].</short><descr>Note: Some widgetsets (like GTK2) uses arrow keys for changing focus of visual components.</descr>
|
||||
</element><element name="TCustomECSlider.DiscreteChange"><short>Applies when Mode = eimDiscrete. Position of the slider can be integer multiple of the DiscreteChange only.</short>
|
||||
</element><element name="TCustomECSlider.Mode"><short>Denoting whether the slider is in eimContinuous (normal, default) or eimDiscrete mode. In discrete mode. Position of the slider can be integer multiple of the DiscreteChange only.</short>
|
||||
</element><element name="TCustomECSlider.RelativeScaleLength"><short>Relative length of the scale. Applies only when Orientation = eooHorizontal and CaptionPos = eopLeft or eopRight.</short><descr>Negative value (default) fits the scale and caption within the component.<br/>
|
||||
Positive value (percents) is the relative scale length.<br/>
|
||||
Useful when more sliders with different captions (like Red, Green, Blue) need to be aligned.</descr>
|
||||
</element><element name="TCustomECSlider.ScaleIndent"><short>Indent of the scale from the groove. Groove length = Scale length + 2 * ScaleIndent.</short>
|
||||
</element><element name="TECSliderKnob"><short>Visual subclass. Knob of the TECSlider.</short>
|
||||
</element>
|
||||
<short>Visual component TECSlider and base classes for TECProgressBar and TECPositionBar.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
158
ECC/docs/ecspinctrls.xml
Normal file
158
ECC/docs/ecspinctrls.xml
Normal file
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECSpinCtrls"><element name="TButtonStyle"><short>Enumerated type denoting style of the spin buttons.</short>
|
||||
</element><element name="TButtonStyle.ebsSeparated"><short>Each glyph is drawn on its own button (using ThemeServices).</short>
|
||||
</element><element name="TButtonStyle.ebsClearBlock"><short>All glyphs are drawn on one big button without any separtor.</short>
|
||||
</element><element name="TButtonStyle.ebsSplittedBlock"><short>All glyphs are drawn on one big button (using ThemeServices). They are separated with 3D lowered bevel.</short>
|
||||
</element><element name="TBtnKind"><short>Enumerated type denoting kind of the button.</short>
|
||||
</element><element name="TBtnKind.ebkMin"><short>Sets minumal value.</short>
|
||||
</element><element name="TBtnKind.ebkBigDec"><short>Big decrement.</short>
|
||||
</element><element name="TBtnKind.ebkDec"><short>Small decrement.</short>
|
||||
</element><element name="TBtnKind.ebkMiddle"><short>Sets middle value.</short>
|
||||
</element><element name="TBtnKind.ebkMax"><short>Sets maximal value.</short>
|
||||
</element><element name="TBtnKind.ebkBigInc"><short>Big increment.</short>
|
||||
</element><element name="TBtnKind.ebkInc"><short>Small increment.</short>
|
||||
</element><element name="TBtnKind.ebkMenu"><short>Menu button. Can invoke menu.</short>
|
||||
</element><element name="TBtnKind.ebkDrag"><short>Sets value by mouse dragging.</short>
|
||||
</element><element name="TDragOrientation"><short>Enumerated type denoting direction of mouse dragging.</short>
|
||||
</element><element name="TDragOrientation.edoBoth"><short>Both directions. Vertical dragging for approximate and horizontal dragging for fine setting (or reversely).</short>
|
||||
</element><element name="TDrawGlyphEvent"><short>Method type. Enables user-defined glyphs of buttons.</short>
|
||||
</element><element name="TESOption"><short>Enumerated type. Options for TECSpinEdit.</short>
|
||||
</element><element name="TESOption.esoArrowKeysExceed"><short>Arrow keys, Home/End and PageUp/PageDown can exceed Min and Max values and reach MaxInEdit and MinInEdit.</short>
|
||||
</element><element name="TESOption.esoEditingChangesValue"><short>Editing immediately changes value, it does not wait for EditingDone.</short>
|
||||
</element><element name="TESOption.esoGridMode"><short>Key is reseted if used in KeyDown (Key := #0;).</short>
|
||||
</element><element name="TESOption.esoHomeEndAlt"><short>Alt key is a modifier. Alt + Home/End can reach Max/Min.</short>
|
||||
</element><element name="TESOption.esoHomeEndCtrl"><short>Ctrl key is a modifier. Ctrl + Home/End can reach Max/Min.</short>
|
||||
</element><element name="TESOption.esoUpDownAlt"><short>Alt key is a modifier. Alt + arrow keys can reach spin.</short>
|
||||
</element><element name="TESOption.esoUpDownCtrl"><short>Ctrl key is a modifier. Ctrl + arrow keys can reach spin.</short>
|
||||
</element><element name="TESOption.esoUpDownShift"><short>Shiftt key is a modifier. Shift + arrow keys can reach spin.</short>
|
||||
</element><element name="TESOption.esoUpDownOnly"><short>No modifier. Arrow keys can reach spin.</short>
|
||||
</element><element name="TESOption.esoSpaceClicksMiddle"><short>Modifiers + Space clicks Middle, otherwise it opens Menu.</short>
|
||||
</element><element name="TESOptions"><short>Set of TESOption.</short>
|
||||
</element><element name="TGlyphStyle"><short>Style of built-in glyphs.</short>
|
||||
</element><element name="TModifierEnter"><short>Enumerated type denoting behaviour of modifier (alt, ctrl, meta, shift) + enter key.</short>
|
||||
</element><element name="TValueFormat"><short>Enumerated type denoting format of values.</short>
|
||||
</element>
|
||||
<element name="TCustomControlTimer"><short>Base class for TControlTimer. No <b>published</b> properties, no abstract classes.</short>
|
||||
</element><element name="TControlTimer"><short>Non visual component - advanced timer.</short>
|
||||
</element><element name="TCustomControlTimer.Delay"><short>The very first interval [miliseconds].</short>
|
||||
</element><element name="TCustomControlTimer.Repeating"><short>All the next intervals after the very first (2-nd, 3-rd, 4-th ...) [miliseconds].</short>
|
||||
</element><element name="TCustomControlTimer.Count"/><element name="TCustomControlTimer.MaxCount"><short>Count of intervals. 0 (default) or negative value means infinite count. After reaching this value is timer automatically disabled and OnTimerStop event is triggered.</short>
|
||||
</element><element name="TCustomControlTimer.Counter"><short>Count of intervals.</short>
|
||||
</element>
|
||||
<element name="TSingleSpinBtn"><short>Subclass. <link id="TCustomSpinBtns">TCustomSpinBtns</link> (or descendants) contain nine TSingleSpinBtn instances (one for each small button).</short>
|
||||
</element><element name="TECSpinBtns"><short>Visual component. Advanced alternative to TUpDown.</short>
|
||||
</element><element name="TECSpinBtnsPlus"><short>Visual component. Subclass designed for TECSpinEdit.</short>
|
||||
</element><element name="TECSpinEdit"><short>Visual component. Alternative to TSpinEdit and TFloatSpinEdit.</short>
|
||||
</element><element name="TECSpinController"><short>Non visual component. Designed for controlling properties of multiple <link id="TECSpinBtns">TECSpinBtns</link> and <link id="TECSpinEdit">TECSpinEdit</link>.</short>
|
||||
</element><element name="TECSpinController.ClientList"><short>Generic list of clients (TECSpinBtns and TECSpinEdits).</short>
|
||||
</element><element name="TECSpinController.ActionAltEnter"><short>Controls ActionAltEnter property of all TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.ActionCtrlEnter"><short>Controls ActionCtrlEnter property of all TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.ActionShiftEnter"><short>Controls ActionShiftEnter property of all TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnBigDecWidth"><short>Controls BtnBigDecWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnBigIncWidth"><short>Controls BtnBigIncWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnDecWidth"><short>Controls BtnDecWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnDragWidth"><short>Controls BtnDragWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnIncWidth"><short>Controls BtnIncWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnMaxWidth"><short>Controls BtnMaxWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnMenuWidth"><short>Controls BtnMenuWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnMiddleWidth"><short>Controls BtnMiddleWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.BtnMinWidth"><short>Controls BtnMinWidth property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.GlyphStyle"><short>Controls GlyphStyle property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.Indent"><short>Controls Indent property of all TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.Reversed"><short>Controls Reversed property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.Spacing"><short>Controls Spacing property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.Style"><short>Controls Style property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.TimerDelay"><short>Controls TimerDelay property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.TimerRepeating"><short>Controls TimerRepeating property of all TECSpinBtns and TECSpinEdit clients.</short>
|
||||
</element><element name="TECSpinController.Options"><short>Controls Options property of all TECSpinEdit clients.</short>
|
||||
</element><element name="TCustomSpinBtns"><short>Base class for <link id="TECSpinBtns">TECSpinBtns</link> and <link id="TECSpinBtnsPlus">TECSpinBtnsPlus</link>. No <b>published</b> properties, no abstract classes.</short>
|
||||
</element><element name="TSingleSpinBtn.BtnOrder"><short>Order for button. Buttons can be arranged to any order.</short>
|
||||
</element><element name="TSingleSpinBtn.Caption"><short>Caption. Only short captions (one or two letters) are recommended.</short>
|
||||
</element><element name="TSingleSpinBtn.GlyphColor"><short>Glyph color. Also font color of Caption.</short>
|
||||
</element><element name="TSingleSpinBtn.ImageIndex"><short>Image index. Image is taken from Parent's ImageList (property Images).</short>
|
||||
</element><element name="TSingleSpinBtn.Left"><short>Position of the button (0 is the most left etc.).</short>
|
||||
</element><element name="TSingleSpinBtn.Visible"><short>Visibility. Usually nine buttons are not needed. <link id="TCustomSpinBtns">TCustomSpinBtns</link> (or descendants) can consist from 1-9 buttons.</short>
|
||||
</element><element name="TSingleSpinBtn.Width"><short>Width of button. Each of buttons can have different width.</short>
|
||||
</element><element name="TSingleSpinBtn.Parent"><short>Determines Parent which this button belongs to.</short>
|
||||
</element><element name="TSingleSpinBtn.FEnabled"/><element name="TSingleSpinBtn.Enabled"><short>Buttons ebkMin, ebkMax, ebkDec, ebkInc, ebkBigDec and ebkBigInc are disabled when TECSpinBtns reaches minimum (Min) or maximum (Max).</short>
|
||||
</element><element name="TSingleSpinBtn.Kind"><short>Kind of button.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnBigDec"><short>Subclass. Button designed for big decrease.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnBigInc"><short>Subclass. Button designed for big increase.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnDec"><short>Subclass. Button designed for small decrease.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnInc"><short>Subclass. Button designed for small increase.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnDrag"><short>Subclass. Button designed for mouse dragging, i.e. changing value by mouse move while left mouse button is held.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnMax"><short>Subclass. Button designed for setting maximal possible value.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnMin"><short>Subclass. Button designed for setting minimal possible value.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnMiddle"><short>Subclass. Button designed for setting middle value. It can be 0 or any other user-defined value.</short>
|
||||
</element><element name="TCustomSpinBtns.BtnMenu"><short>Subclass. Button designed for executing menu or other user-defined action.</short>
|
||||
</element><element name="TCustomSpinBtns.OnMenuClick"><short>Event triggered on BtnMenu click.</short>
|
||||
</element><element name="TCustomSpinBtns.OnDrawGlyph"><short>Event triggered before glyph is painted to internal image (bitmap) of button. This enables to draw user-defined glyph.</short><descr>The OnDrawGlyph has the highest precedence. The second is TSingleSpinBtn.Caption. The third is image from Images. The last is built-in glyph.</descr>
|
||||
</element><element name="TCustomSpinBtns.OnChange"><short>Event triggered on change of Value property.</short>
|
||||
</element><element name="TCustomSpinBtns.Value"><short>Actual value. TECSpinBtns is designed in floating point arithmetic. If you need integer value, use trunc() or round() functions.</short>
|
||||
</element><element name="TCustomSpinBtns.TimerRepeating"><short>The next Intervals [miliseconds], i.e. 2-nd, 3-rd, 4-th and all following intervals. </short>
|
||||
</element><element name="TCustomSpinBtns.TimerDelay"><short>The very fisrt interval [miliseconds].</short>
|
||||
</element><element name="TCustomSpinBtns.Style"><short>Style of button glyphs.</short>
|
||||
</element><element name="TCustomSpinBtns.Spacing"><short>Spacing [pixels]. Distance between buttons.</short>
|
||||
</element><element name="TCustomSpinBtns.Reversed"><short>Determines whether button spinning is reversed.</short><descr>Reversed = False: UP - increases value; DOWN - decrases value (default)<br/>
|
||||
|
||||
Reversed = True: UP - decreases value; DOWN - increases value</descr>
|
||||
</element><element name="TCustomSpinBtns.PageSize"><short>Big increment or decrement. Used by BtnBigInc and BtnBigDec.</short>
|
||||
</element><element name="TCustomSpinBtns.DragControl"><short>Determines which mouse buttons can be used for dragging besides the drag button (BtnDrag). User can always use BtnDrag and left mouse button.</short><descr>This enables mouse dragging even if BtnDrag is not visible.<br/>
|
||||
Example: DragControl = [mbMiddle] captures mouse and enables dragging when any button of TECSpinBtns (including disabled ones and BtnDrag) is clicked by middle mouse button.</descr>
|
||||
</element><element name="TCustomSpinBtns.MenuControl"><short>Determines which mouse buttons can be used for executing menu besides the menu button (BtnMenu). User can always use BtnMenu and left mouse button.</short><descr>This enables executing of menu or user defined action even if BtnMenu is not visible.<br/>
|
||||
|
||||
Example: MenuControl = [mbMiddle] executes menu or user defined action when any button of TECSpinBtns (including disabled ones and BtnMenu) is clicked by middle mouse button.</descr>
|
||||
</element><element name="TCustomSpinBtns.Min"><short>Minimal possible value.</short>
|
||||
</element><element name="TCustomSpinBtns.Max"><short>Maximal possible value.</short>
|
||||
</element><element name="TCustomSpinBtns.Increment"><short>Small increment or decrement. Used by BtnInc and BtnDec.</short>
|
||||
</element><element name="TCustomSpinBtns.DragOrientation"><short>Orientation of mouse dragging. Possible directions: vertical (edoVertical, default), horizontal (edoHorizontal) and both (edoBoth).</short>
|
||||
</element><element name="TCustomSpinBtns.GlyphStyle"><short>Style of glyphs.</short>
|
||||
</element><element name="TCustomSpinBtns.Images"><short>Image list. Single buttons can take images from here. They have ImageIndex property for this purpose.</short>
|
||||
</element><element name="TCustomSpinBtns.Middle"><short>Middle (0) or any other user-defined value.</short>
|
||||
</element><element name="TCustomSpinBtns.MouseFromMiddle"><short>Determines whether mouse dragging starts at actual value (False, default) or at Middle value (True).</short>
|
||||
</element><element name="TCustomSpinBtns.Mode"><short>Denoting whether the spin control is in eimContinuous (normal, default) or eimDiscrete mode. In discrete mode. <link id="TCustomSpinBtns.Value">Value</link> of the spin control can be integer multiple of the DiscreteChange only.</short>
|
||||
</element><element name="TCustomSpinBtns.DiscreteChange"><short>Applies only when Mode = eimDiscrete. <link id="TCustomSpinBtns.Value">Value</link>can hold only integer multiples of DiscreteChange.</short>
|
||||
</element><element name="TCustomSpinBtns.MouseStepPixelsX"><short>Mouse sensitivity in horizontal direction.</short>
|
||||
</element><element name="TCustomSpinBtns.MouseStepPixelsY"><short>Mouse sensitivity in vertical direction.</short>
|
||||
</element><element name="TCustomSpinBtns.MouseIncrementX"><short>Increment for horizontal mouse dragging.</short>
|
||||
</element><element name="TCustomSpinBtns.MouseIncrementY"><short>Increment for vertical mouse dragging.</short>
|
||||
</element><element name="TECSpinBtnsPlus.MaxInEdit"><short>Designed specially for TECSpinEdit. Value edited by keyboard can exceed Max.</short><descr>Feature for experienced users. Usually, Max = MaxInEdit.</descr>
|
||||
</element><element name="TECSpinBtnsPlus.MinInEdit"><short>Designed specially for TECSpinEdit. Value edited by keyboard can exceed Min.</short><descr>Feature for experienced users. Usually, Min = MinInEdit.</descr>
|
||||
</element><element name="TECSpinEdit.ActionAltEnter"><short>Determines what action will happen when user presses Alt+Enter.</short><descr>Possibilities: No action (default), menu button click, middle button click.</descr>
|
||||
</element><element name="TECSpinEdit.ActionCtrlEnter"><short>Determines what action will happen when user presses Ctrl+Enter.</short><descr>Possibilities: No action, menu button click (default), middle button click.</descr>
|
||||
</element><element name="TECSpinEdit.ActionShiftEnter"><short>Determines what action will happen when user presses Shift+Enter.</short><descr>Possibilities: No action (default), menu button click, middle button click.</descr>
|
||||
</element><element name="TECSpinEdit.Buttons"><short>Subclass. Spin-buttons associated to line-edit.</short>
|
||||
</element><element name="TECSpinEdit.Indent"><short>Indent [pixels] of buttons. Distance between line-edit and buttons.</short>
|
||||
</element><element name="TECSpinEdit.BiDiMode"><short>Bi-directional mode. Inherited property.</short><descr>Buttons are sticked to the right for left-to-right languages and to the left for right-to-left languages.</descr>
|
||||
</element><element name="TECSpinBtns.Controller"><short>Link to <link id="TECSpinController">TECSpinController</link>. Controller will control set selected properties.</short>
|
||||
</element><element name="TECSpinEdit.Controller"><short>Link to <link id="TECSpinController">TECSpinController</link>. Controller will control selected set of properties.</short>
|
||||
</element><element name="TECSpinEdit.WidthInclBtns"><short>Width including button width. Common property "Width" gives width of edit only. WidthInclBtns gives width including Buttons and Indent.</short>
|
||||
</element><element name="TECSpinEdit.Value"><short>Actual value. This property reads and writes value from Buttons.Value.</short>
|
||||
</element><element name="TECSpinEdit.ValueFormat"><short>Format of value in line-edit.</short>
|
||||
</element><element name="TECSpinEdit.Items"><short>Applies only for ValueFormat = evfText or evfCombined. Value is index of this string list.</short>
|
||||
</element><element name="TECSpinEdit.MantissaExp"><short>Applies only for ValueFormat = evfExponent or evfMantissa.</short><descr>evfExponent: Value is exponent, MantissaExp is mantissa.<br/>
|
||||
|
||||
evfMantissa: Value is mantissa, MantissaExp is exponent.<br/><br/>
|
||||
|
||||
Example:<br/>
|
||||
|
||||
MantissaExp = 2<br/>
|
||||
|
||||
evfExponent: 1, 2, 4, 8, 16, 32, 64, ...<br/>
|
||||
evfMantissa: 1, 4, 9, 16, 25, 36, 49, 64, ...</descr>
|
||||
</element><element name="TECSpinEdit.DateTimeFormat"><short>Applies only for ValueFormat = evfDate or evfTime.</short>
|
||||
</element><element name="TECSpinEdit.Options"><short>See <link id="TESOption"/>.</short>
|
||||
</element><element name="TECSpinEdit.Digits"><short>Number of digits. Applies to several ValueFormats.</short><descr>evfRound: number of decimal places.<br/>
|
||||
evfExponent: number of decimal places.<br/>
|
||||
evfExponential: number of decimal places and digits of exponent.<br/>
|
||||
evfMantissa: number of decimal places.<br/>
|
||||
evfHexadecimal: number of digits.<br/>
|
||||
evfMarkHexadec: number of digits after $.<br/>
|
||||
evfOctal: number of digits.<br/>
|
||||
evfBinary: number of digits.<br/>
|
||||
</descr>
|
||||
</element>
|
||||
<short>Visual components TECSpinBtns and TECSpinEdit. Non visual components TControlTimer and TECSpinController.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
26
ECC/docs/ecswitch.xml
Normal file
26
ECC/docs/ecswitch.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECSwitch"><element name="TECSwitchKnob"><short>Visual subclass. Knob of the TECSwitch.</short>
|
||||
</element><element name="TGlyphStyle"><short>Enumerated type denoting style of the glyphs on the groove of TECSwitch.</short>
|
||||
</element><element name="TECSwitchActionLink"><short>Class needed for linking with TAction.</short>
|
||||
</element><element name="TECSwitchActionLinkClass"><short>Class needed for linking with TAction.</short>
|
||||
</element><element name="TCustomECSwitch"><short>Base class for TECSwitch. No abstract classes, no <b>published</b> properties.</short>
|
||||
</element><element name="TECSwitch"><short>Visual component. An advanced alternative to TCheckBox.</short>
|
||||
</element><element name="TCustomECSwitch.AllowGrayed"><short>Denotes whether TCustomECSwitch/TECSwitch can be grayed, i.e. not checked nor unchecked.</short>
|
||||
</element><element name="TCustomECSwitch.CaptionPos"><short>Position of the Caption.</short>
|
||||
</element><element name="TCustomECSwitch.Checked"><short>Denotes whether TECSwitch is On or Off. When State = cbGrayed, Checked is False.</short>
|
||||
</element><element name="TCustomECSwitch.GlyphStyle"><short>Selects style of small glyphs on the groove. Glyphs are built-in, they are stored in resources.</short>
|
||||
</element><element name="TCustomECSwitch.GrooveCheckedClr"><short>Color of the groove of checked switch. clDefault is clActiveCaption.</short>
|
||||
</element><element name="TCustomECSwitch.GrooveUncheckedClr"><short>Color of the groove of unchecked switch. clDefault is cl3DDkShadow.</short>
|
||||
</element><element name="TCustomECSwitch.GrooveIndent"><short>Space (pixels) around groove.</short>
|
||||
</element><element name="TCustomECSwitch.Knob"><short>Subclass.</short>
|
||||
</element><element name="TCustomECSwitch.KnobIndent"><short>Space (pixels) around Knob.</short>
|
||||
</element><element name="TCustomECSwitch.State"><short>State of the switch. Just like TCheckBox, it can be cbUnchecked, cbChecked and cbGrayed.</short>
|
||||
</element><element name="TCustomECSwitch.SwitchColor"><short>Color of the component. Applies only when Style = eosPanel.</short>
|
||||
</element><element name="TCustomECSwitch.SwitchHeight"><short>Height of the switch (does NOT include Caption).</short>
|
||||
</element><element name="TCustomECSwitch.SwitchWidth"><short>Width of the switch (does NOT include Caption).</short>
|
||||
</element><element name="TCustomECSwitch.OnChange"><short>Triggered when State property is changed.</short>
|
||||
</element>
|
||||
<short>Visual component TECSwitch.</short>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
157
ECC/docs/ectypes.xml
Normal file
157
ECC/docs/ectypes.xml
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions><package name="eccontrols"><module name="ECTypes"><element name="TECCustomKnob"><short>Base class for TECSliderKnob and TECSwitchKnob.</short>
|
||||
</element>
|
||||
<element name="TECBaseControl"><short>Base abstract class for TBaseECSlider, TCustomECRuler, TCustomECSwitch.</short>
|
||||
<descr>This class contains many abstract classes. Do not instantiate.</descr>
|
||||
</element>
|
||||
<element name="TItemState"><short>Enumerated type denoting state of TECSpeedBtn, TECSpinBtns or TECGroupCtrls.</short>
|
||||
</element><element name="TItemState.eisPushedDisabled"><short>Item or Button is pushed but not enabled.</short>
|
||||
</element><element name="TGlyphDesign"><short>Enumerated type selecting the built-in glyph of canvas helper class.</short>
|
||||
</element><element name="TGlyphDesign.egdNone"><short>No built-in glyph selected.</short>
|
||||
</element><element name="TGlyphDesign.egdRectBeveled"><short>Color rectangle, frame is 3D lowered.</short>
|
||||
</element><element name="TGlyphDesign.egdRectFramed"><short>Color rectangle, frame is drawn with clBtnText.</short>
|
||||
</element><element name="TIncrementalMode"><short>Enumerated type denoting mode of TECSlider or TECSpinBtns.</short>
|
||||
<descr>Control in mode eimContinuous can hold any floating point value between Min and Max.
|
||||
|
||||
Control in mode eimDiscret can hold only integer multipliers of DiscreteChange (i.e. 0.1, 0.2, 0.3 ... for DiscreteChange = 0.1; it can never be 0.05, 0.15, 0.25).</descr>
|
||||
</element><element name="TIncrementalMode.eimContinuous"><short>TECSlider or TECSpinBtns can hold any floating-point value between Min and Max.</short>
|
||||
</element><element name="TIncrementalMode.eimDiscrete"><short>TECSlider or TECSpinBtns can only hold integer multiples of DiscreteChange.</short>
|
||||
</element><element name="TObjectOrientation"><short>Enumerated type denoting horizontal or vertical orientation of visual component.</short>
|
||||
</element><element name="TObjectPos"><short>Enumerated type denoting position of the element (Caption, Image) within the visual component.</short>
|
||||
</element><element name="TObjectStyle"><short>Enumerated type denoting the style of visual component.</short>
|
||||
</element><element name="TObjectStyle.eosButton"><short>Component is drawn as a PushButton using ThemeServices.</short>
|
||||
</element><element name="TObjectStyle.eosPanel"><short>Component is drawn as a panel using 3D-lowered or 3D-raised frames.</short>
|
||||
</element><element name="TRedrawMode"><short>Enumerated type designed for efficient repainting of complex visual components.</short><descr>For higher efficiency, TBaseECSlider derived components are drawn to bitmaps and these bitmaps (or their parts) are copied to component's Canvas on Paint method.</descr>
|
||||
</element><element name="TRedrawMode.ermHoverKnob"><short>Only Knob of ECSlider is repainted.</short>
|
||||
</element><element name="TRedrawMode.ermMoveKnob"><short>Knob is moved from A to B. Rectangle determined by A, B and space between them is repainted.</short>
|
||||
</element><element name="TRedrawMode.ermFreeRedraw"><short>The most common value. Whole component is repainted. Value can fall to lower state (ermHoverKnob or ermMoveKnob).</short>
|
||||
</element><element name="TRedrawMode.ermRedrawBkgnd"><short>Internal bitmaps are repainted. Whole component is repainted. Value cannot fall to lower states.</short>
|
||||
</element><element name="TRedrawMode.ermRecalcRedraw"><short>Component is recalculated. Internal bitmaps are repainted. Whole component is repainted. Value cannot fall to lower states.</short>
|
||||
</element><element name="TTickDesign"><short>Enumerated type denoting design of ticks (ticks of TECScale or ticks on Knob of TECSlider or TECSwitch).</short>
|
||||
</element><element name="TBasicPos"><short>Enumerated type denoting position of the element (Caption, Scale) within the visual component.</short>
|
||||
<descr>This type is simpilfied. Depends on orientation of object.</descr>
|
||||
</element><element name="TBasicPos.etpTopLeft"><short>Position is <i>Top</i> (in case of horizontal component) or <i>Left</i> (in case of vertical component).</short>
|
||||
</element><element name="TBasicPos.etpBottomRight"><short>Position is <i>Bottom</i> (in case of horizontal component) or <i>Right</i> (in case of vertical component).</short>
|
||||
</element><element name="TTickStyle"><short>Enumerated type denoting style of ticks on the Knob of TECSlider or TECSwitch.</short>
|
||||
</element><element name="TValuesVisibility"><short>Enumerated type denoting visibility of values (numbers) of TECScale.</short>
|
||||
</element><element name="TValuesVisibility.evvNone"><short>No values are displayed.</short>
|
||||
</element><element name="TValuesVisibility.evvBounds"><short>Only bound values are displayed.</short>
|
||||
</element><element name="TValuesVisibility.evvValues"><short>Only regular values are displayed.</short>
|
||||
</element><element name="TValuesVisibility.evvAll"><short>Regular and bound values are displayed (useful when bound values are not regular).</short>
|
||||
</element><element name="TCanvasHelper"><short>Helper class; it can paint built-in glyphs of TECpeedBtn or backgrounds for many EC controls.</short>
|
||||
</element><element name="TCanvasHelper.DrawButtonBackground"><short>Draws Button like background on the canvas. Uses ThemeServices.</short>
|
||||
</element><element name="TCanvasHelper.DrawGlyph"><short>Draws built-in glyphs on the canvas.</short>
|
||||
</element><element name="TCanvasHelper.DrawPanelBackground"><short>Draws panel-like background on the canvas.</short>
|
||||
</element><element name="TCanvasHelper.GlyphExtent"><short>Returns size of glyph.</short>
|
||||
</element><element name="TCanvasHelper.SetRealGlyphColor"><short>Set glyph color. clDefault is clBtnText for Enabled = True. For Enabled = False is color merged: 67% glyph color and 33% background.</short>
|
||||
</element>
|
||||
<element name="TBitmapHelper.TransparentClear"><short>Fills bitmap with transparent color.</short>
|
||||
</element><element name="TFontOptions"><short>Class is used as a subclass for visual components.</short><descr>Visual component has sometimes more text elements which need to have different font parameters. Implementing new TFont instance is exaggerating (memory consuming). TFontOptions is used instead.</descr>
|
||||
</element><element name="TFontOptions.FontColor"><short>Alternative color of parent's font.</short>
|
||||
</element><element name="TFontOptions.FontSize"><short>Alternative font-size of parent's font.</short>
|
||||
</element><element name="TFontOptions.FontStyles"><short>Alternative font-styles of parent's font.</short>
|
||||
</element><element name="TECBaseControl.BeginUpdate"><short>Increases UpdateCount. It reduces number of internal redraws when more than one visual property (color, bevel ...) is changed at a time.</short>
|
||||
</element><element name="TECBaseControl.EndUpdate"><short>Decreases UpdateCount.</short><descr>When UpdateCount is decreased to 0 then depends on Recalculate:<br/>
|
||||
True: calls <link id="TECBaseControl.RecalcRedraw"/><br/>
|
||||
False: calls <link id="TECBaseControl.Redraw"/>
|
||||
</descr>
|
||||
</element><element name="TECBaseControl.RecalcRedraw"><short>Recalculates and redraws internal bitmaps. Abstract method.</short>
|
||||
</element><element name="TECBaseControl.Redraw"><short>Redraws internal bitmaps. Abstract method.</short>
|
||||
</element><element name="TECBaseControl.Redraw_Invalidate"><short>Only calls Invalidate (if UpdateCount = 0). This method does not Redraw internal bitmaps.</short>
|
||||
</element><element name="TECBaseControl.BevelInner"><short>Style of inner bevel. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Color3DLight"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.BevelOuter"><short>Style of outer bevel. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Color3DLight"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.BevelSpace"><short>Space between inner and outer bevel. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Color3DLight"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.BevelWidth"><short>Width of inner and outer bevel. Inner and outer bevel cannot have different width. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Color3DLight"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.Color3DDark"><short>Color of shadowed patrs of the bevel. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DLight"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.Color3DLight"><short>Color of enlighted parts of the bevel. Applies only when Style = eosPanel.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Redraw3DColorAreas"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.Orientation"><short>Denotes whether the visual component is oriented vertically or horizontally.</short>
|
||||
<seealso><link id="TECBaseControl.OrientationChanged"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.Style"><short>Denotes the style (button-like, panel-like) of the visual component.</short>
|
||||
<seealso><link id="TECBaseControl.StyleChanged"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.UpdateCount"><short>Counter of updates. UpdateCount > 0 means that component is being updated.</short>
|
||||
</element><element name="TECBaseControl.Redraw3DColorAreas"><short>Redraws those parts of internal bitmaps, which are drawn by Color3DDark or Color3DLight. Abstract method.</short>
|
||||
<seealso><link id="TECBaseControl.BevelInner"/><link id="TECBaseControl.BevelOuter"/><link id="TECBaseControl.BevelSpace"/><link id="TECBaseControl.BevelWidth"/><link id="TECBaseControl.Color3DDark"/><link id="TECBaseControl.Color3DLight"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.HasCaption"><short>Returns True when visual component has any caption.</short>
|
||||
</element><element name="TECBaseControl.GetBorderWidth"><short>Returns width of border, i.e. inner bevel width + bevel space + outer bevel width.</short>
|
||||
</element><element name="TECBaseControl.OrientationChanged"><short>Triggered when <link id="TECBaseControl.Orientation">Orientation</link> changed.</short>
|
||||
<seealso><link id="TECBaseControl.Orientation"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.StyleChanged"><short>Triggered when <link id="TECBaseControl.Style">Style</link> changed.</short>
|
||||
<seealso><link id="TECBaseControl.Style"/>
|
||||
</seealso>
|
||||
</element><element name="TECBaseControl.SetAutoSize"/><element name="TECBaseControl.InvalidateGrooveKnobRect"><short>Abstract method.</short>
|
||||
</element><element name="TECCustomKnob.BevelWidth"><short>Bevel width. Applies only when Style = eosPanel.</short>
|
||||
</element><element name="TECCustomKnob.Color"><short>Color of the knob. </short><descr>clDefault is:<br/>
|
||||
clBtnFace when Style = eosButton.<br/>
|
||||
Parent's color when Style = eosPanel.
|
||||
</descr>
|
||||
</element><element name="TECCustomKnob.Style"><short>Denotes the style (button-like, panel-like) of the knob.</short>
|
||||
</element><element name="TECCustomKnob.Height"><short>Height of the knob.</short>
|
||||
</element><element name="TECCustomKnob.Width"><short>Width of the knob.</short>
|
||||
</element><element name="TECCustomKnob.Cursor"><short>TECSlider changes cursor (crHandPoint is default) when knob is hovered. TECSwitch doesn't.</short>
|
||||
</element><element name="TECCustomKnob.TickMarkCount"><short>Number of ticks on the knob.</short>
|
||||
</element><element name="TECCustomKnob.TickMarkDesign"><short>Design of the ticks (etdSimple, etdThick, etd3DLowered or etd3DRaised).</short>
|
||||
</element><element name="TECCustomKnob.TickMarkStyle"><short>Style of the ticks (solid or dotted lines).</short>
|
||||
</element><element name="TECCustomKnob.TickMarkSpacing"><short>Spacing (number of pixels) around ticks.</short>
|
||||
</element><element name="TECCustomKnob.BackgroundColor"><short>Sets unique transparent color for internal bitmaps.</short>
|
||||
</element><element name="TECCustomKnob.DrawKnobs"><short>Draws normal, disabled and highlighted knobs to internal bitmaps.</short>
|
||||
</element><element name="TECCustomKnob.SetSize"><short>Changes size of internal bitmaps and redraws them.</short>
|
||||
</element><element name="TECCustomKnob.RecalcRedraw"><short>Triggers parent's <link id="TECBaseControl.RecalcRedraw">RecalcRedraw</link> method.</short>
|
||||
</element><element name="ARGBToColor"><short>Converts separate 8-bit alpha, red, green and blue values to 32-bit TColor.</short>
|
||||
</element><element name="ColorToRGBA"><short>Splits 32-bit TColor to separate 8-bit alpha, red, green and blue values.</short>
|
||||
</element><element name="GetColorResolvingDefault"><short>Returns color but avoids clDefault because it is a system constant.</short><descr>Returns ASourceColor if it is not <i>clDefault</i>. If yes, returns ADefColor.</descr>
|
||||
</element><element name="GetColorResolvingDefAndEnabled"><short>Returns color but avoids clDefault because it is a system constant. Color is monochromatic when AEnabled = False.</short><descr>Returns ASourceColor if it is not <i>clDefault</i>. If yes, returns ADefColor.
|
||||
If AEnabled = <i>False</i>, returned color is monochromatic.</descr>
|
||||
</element><element name="GetMonochromaticColor"><short>Returns monochromatic color with the same intensity as AColor.</short>
|
||||
</element><element name="GetMergedColor"><short>Merges two colors with defined proportion.</short><descr>AProportion should be between 0 and 1.<br/>
|
||||
Proportion 1 returns AColor.<br/>
|
||||
Proportion 0 returns BColor.</descr>
|
||||
</element><element name="IsInRange"><short>Returns True if AValue is in interval (including endpoint).</short><descr>Regardless the order of endpoints, i.e IsInRange(2, 1, 3) and IsInRange (2, 3, 1) gives the same result (<i>True</i>).</descr>
|
||||
</element><element name="LinearToLogarithmic"><short>Converts linear position on the logarithmic scale to the logarithmic value.</short>
|
||||
<example file="examples/lineartologarithmic.txt"/><descr>Note: Negative bounds are set to 0.</descr>
|
||||
</element>
|
||||
<short>Base types and classes for Eye Candy Controls (EC-C).</short>
|
||||
<element name="TObjectMethod"><short>Alias for the simpliest method without any parmeters.</short>
|
||||
</element>
|
||||
<element name="TItemState.eisDisabled"><short>Item or Button is not enabled and not pushed.</short>
|
||||
</element><element name="TItemState.eisHighlighted"><short>Item or Button is enabled and is hovered by mouse.</short>
|
||||
</element><element name="TItemState.eisEnabled"><short>Item or Button is enabled and not hovered by mouse.</short>
|
||||
</element><element name="TItemState.eisPushed"><short>Item or Button is enabled, pushed and not hovered by mouse.</short>
|
||||
</element><element name="TItemState.eisPushedHihlighted"><short>Item or Button is enabled, pushed and hovered by mouse.</short>
|
||||
</element><element name="TItemStates"><short>Set of TItemState.</short><descr>Images of TECSpeedBtn and TECGroupCtrls are stored in internal bitmaps. This type denotes which states are actually needed (i.e. [eisHighlighted, eisEnabled, eisPushed, eisPushedHihlighted] when Enabled = True and [eisDisabled, eisPushedDisabled] when Enabled = False). This type was introduced for optimalization. It reduces overhead these controls stores 4 or 2 bitmaps instead of 6.</descr>
|
||||
</element>
|
||||
<element name="TTickDesign.etdSimple"><short>Simple line 1 pixel wide.</short>
|
||||
</element><element name="TTickDesign.etdThick"><short>Simple line 2 pixels wide.</short>
|
||||
</element><element name="TTickDesign.etd3DLowered"><short>Two lines with different colors simulate lowered bevel.</short>
|
||||
</element><element name="TTickDesign.etd3DRaised"><short>Two lines with different colors simulate raised bevel.</short>
|
||||
</element><element name="TMouseMethod"><short>Method used for grouped controls. Parameters are mouse-button and shift-state.</short>
|
||||
</element><element name="TOnPrepareValue"><short>Event. Can be used for modify values of TECScale for custom-drawn scales.</short>
|
||||
</element><element name="TBitmapHelper.SetProperties"><short>Sets basic properties for bitmaps used in many EC-Controls.</short>
|
||||
</element><element name="TFontOptions.Parent"><short>Parent of the class. Is responsible for freeing.</short>
|
||||
</element><element name="TFontOptions.OnRecalcRedraw"><short>Method that is called when parent component needs to be recalculated (when font-size is changed).</short>
|
||||
</element><element name="TFontOptions.OnRedraw"><short>Method that is called when parent component needs to be redrawn (when font-color is changed).</short>
|
||||
</element>
|
||||
<element name="TECBaseControl.InvalidateNonUpdated"><short>Invalidates component only when UpdateCount = 0.</short>
|
||||
</element><element name="TECBaseControl.InvalidateCustomRect"><short>Invalidates custom rectangle, i.e. when knob of slider is moved.</short>
|
||||
</element><element name="TECBaseControl.WMPaint"><short>This message method resolves difference between Paints invoked by InvalidateRect and by system. It prevents controls from unwanted vanishing.</short>
|
||||
</element><element name="TECBaseControl.RedrawMode"><short>Redraw mode of TECBaseControl.</short><seealso><link id="TRedrawMode"/>
|
||||
</seealso>
|
||||
</element>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
18
ECC/docs/examples/lineartologarithmic.txt
Normal file
18
ECC/docs/examples/lineartologarithmic.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
{Assume the logathmic scale from 10 to 1000.
|
||||
|
||||
We are in the middle, i.e. "linear" 505.}
|
||||
|
||||
//See the code
|
||||
|
||||
aProportion := (505-10)/(1000-10) = 495/990 = 0.5
|
||||
|
||||
AMin := logn(10, 10) = 1
|
||||
|
||||
AMax := logn(10, 1000) = 3
|
||||
|
||||
Result := 10^(1+(3+1)*0.5) = 10^2 = 100
|
||||
|
||||
{... which is correct since 100 is in the middle of logarithmic scale 10 .. 1000.}
|
||||
|
||||
| | | | | | | ||| | | | | | | ||
|
||||
10 100 (505) 1000
|
80
ECC/docs/examples/tecgroupctrls_ori.txt
Normal file
80
ECC/docs/examples/tecgroupctrls_ori.txt
Normal file
@@ -0,0 +1,80 @@
|
||||
{ Orientation = eooHorizontal, BiDiMode = bdLeftToRight, [] in Options }
|
||||
|
||||
1 2 3
|
||||
|
||||
{ or }
|
||||
|
||||
1 2
|
||||
3 4
|
||||
|
||||
{ Orientation = eooHorizontal, BiDiMode = bdLeftToRight, [egoColumnThenRow] in Options }
|
||||
|
||||
1 2 3
|
||||
|
||||
{ or }
|
||||
|
||||
1 3
|
||||
2 4
|
||||
|
||||
{ Orientation = eooHorizontal, BiDiMode = bdRightToLeft, [] in Options }
|
||||
|
||||
3 2 1
|
||||
|
||||
{ or }
|
||||
|
||||
2 1
|
||||
4 3
|
||||
|
||||
{ Orientation = eooHorizontal, BiDiMode = bdRightToLeft, [egoColumnThenRow] in Options }
|
||||
|
||||
3 2 1
|
||||
|
||||
{ or }
|
||||
|
||||
3 1
|
||||
4 2
|
||||
|
||||
{ Orientation = eooVertical, BiDiMode = bdLeftToRight, [] in Options }
|
||||
|
||||
3
|
||||
2
|
||||
1
|
||||
|
||||
{ or }
|
||||
|
||||
2 4
|
||||
1 3
|
||||
|
||||
{ Orientation = eooVertical, BiDiMode = bdLeftToRight, [egoColumnThenRow] in Options }
|
||||
|
||||
3
|
||||
2
|
||||
1
|
||||
|
||||
{ or }
|
||||
|
||||
3 4
|
||||
1 2
|
||||
|
||||
{ Orientation = eooVertical, BiDiMode = bdRightToLeft, [] in Options }
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
|
||||
{ or }
|
||||
|
||||
1 3
|
||||
2 4
|
||||
|
||||
{ Orientation = eooVertical, BiDiMode = bdRightToLeft, [egoColumnThenRow] in Options }
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
|
||||
{ or }
|
||||
|
||||
1 2
|
||||
3 4
|
||||
|
122
ECC/docs/examples/tvaluedisplay.txt
Normal file
122
ECC/docs/examples/tvaluedisplay.txt
Normal file
@@ -0,0 +1,122 @@
|
||||
Horizontal Scales:
|
||||
|
||||
evdNormal:
|
||||
| | | | | | | | | | |
|
||||
| | |
|
||||
|
|
||||
|
||||
125
|
||||
|
||||
evdTopLeft:
|
||||
| | | | | | | | | | |
|
||||
| | |
|
||||
|
|
||||
|
||||
125
|
||||
|
||||
evdBottomRight:
|
||||
| | | | | | | | | | |
|
||||
| | |
|
||||
|
|
||||
|
||||
125
|
||||
|
||||
evdTopLeftInside, evdCompactTopLeft:
|
||||
| | | | | | | | | | |
|
||||
| | |
|
||||
125|
|
||||
|
||||
|
||||
evdBttmRightInside, evdCompactBttmRight:
|
||||
| | | | | | | | | | |
|
||||
| | |
|
||||
|125
|
||||
|
||||
|
||||
|
||||
Vertical Scales:
|
||||
|
||||
evdNormal:
|
||||
--
|
||||
--
|
||||
125 -----
|
||||
--
|
||||
--
|
||||
|
||||
evdTopLeft:
|
||||
___
|
||||
__
|
||||
__
|
||||
__
|
||||
125 __
|
||||
_____
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
___
|
||||
|
||||
evdBottomRight:
|
||||
___
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
_____
|
||||
125 __
|
||||
__
|
||||
__
|
||||
__
|
||||
___
|
||||
|
||||
evdTopLeftInside:
|
||||
___
|
||||
__
|
||||
__
|
||||
__
|
||||
125 __
|
||||
_____
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
___
|
||||
|
||||
evdBttmRightInside:
|
||||
___
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
_____
|
||||
125 __
|
||||
__
|
||||
__
|
||||
__
|
||||
___
|
||||
|
||||
evdCompactTopLeft:
|
||||
_____ (130)
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
___
|
||||
__
|
||||
1 __
|
||||
2 __
|
||||
5 __
|
||||
_____ (125)
|
||||
|
||||
evdCompactBttmRight:
|
||||
_____ (125)
|
||||
1 __
|
||||
2 __
|
||||
5 __
|
||||
__
|
||||
___
|
||||
__
|
||||
__
|
||||
__
|
||||
__
|
||||
_____ (120)
|
101
ECC/eccontrols.lpk
Normal file
101
ECC/eccontrols.lpk
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Name Value="eccontrols"/>
|
||||
<Author Value="Vojtěch Čihák"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<AllowLabel Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="Set of visual components based on Themes. Contains ruler, position-bar, image menu and visually atractive alternatives to TTrackBar, TProgressBar, TCheckBox, TRadioGroup, TCheckGroup, TSpeedButton, TEditButton, TColorEdit, TFloatSpinEdit and TUpDown with some extra options."/>
|
||||
<License Value="Written for fpc/Lazarus.
|
||||
See the file COPYING.LGPL.txt, included in this distribution, for details about the license."/>
|
||||
<Version Release="1" Build="9"/>
|
||||
<Files Count="10">
|
||||
<Item1>
|
||||
<Filename Value="ectypes.pas"/>
|
||||
<UnitName Value="ECTypes"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="ecscale.pas"/>
|
||||
<UnitName Value="ECScale"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="ecimagemenu.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECImageMenu"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="ecspinctrls.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECSpinCtrls"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="ecswitch.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECSwitch"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="eceditbtns.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECEditBtns"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="ecslider.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECSlider"/>
|
||||
</Item7>
|
||||
<Item8>
|
||||
<Filename Value="ecprogressbar.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECProgressBar"/>
|
||||
</Item8>
|
||||
<Item9>
|
||||
<Filename Value="ecruler.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECRuler"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
<Filename Value="ecgroupctrls.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="ECGroupCtrls"/>
|
||||
</Item10>
|
||||
</Files>
|
||||
<LazDoc Paths="docs"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCLBase"/>
|
||||
</Item1>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
29
ECC/eccontrols.pas
Normal file
29
ECC/eccontrols.pas
Normal file
@@ -0,0 +1,29 @@
|
||||
{ This file was automatically created by Lazarus. Do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit eccontrols;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ECTypes, ECScale, ECImageMenu, ECSpinCtrls, ECSwitch, ECEditBtns, ECSlider, ECProgressBar,
|
||||
ECRuler, ECGroupCtrls, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('ECImageMenu', @ECImageMenu.Register);
|
||||
RegisterUnit('ECSpinCtrls', @ECSpinCtrls.Register);
|
||||
RegisterUnit('ECSwitch', @ECSwitch.Register);
|
||||
RegisterUnit('ECEditBtns', @ECEditBtns.Register);
|
||||
RegisterUnit('ECSlider', @ECSlider.Register);
|
||||
RegisterUnit('ECProgressBar', @ECProgressBar.Register);
|
||||
RegisterUnit('ECRuler', @ECRuler.Register);
|
||||
RegisterUnit('ECGroupCtrls', @ECGroupCtrls.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('eccontrols', @Register);
|
||||
end.
|
887
ECC/ecdrawglyph.inc
Normal file
887
ECC/ecdrawglyph.inc
Normal file
@@ -0,0 +1,887 @@
|
||||
{****************************************************
|
||||
This file is part of the Eye Candy Controls (EC-C)
|
||||
This is *include* file, belongs to ectypes.pas
|
||||
|
||||
Copyright (C) 2013 Vojtěch Čihák, Czech Republic
|
||||
|
||||
This library is free software.
|
||||
|
||||
See the file COPYING.LGPL.txt,
|
||||
included in this distribution,
|
||||
for details about the license.
|
||||
****************************************************}
|
||||
|
||||
procedure TCanvasHelper.DrawGlyph(ARect: TRect; AGlyphDesign: TGlyphDesign);
|
||||
var aEvenH, aEvenW, x, y, x2, y2: SmallInt;
|
||||
|
||||
procedure DrawArrowDown(ATop: SmallInt; ASize: SmallInt = 4);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
for i := 4 - ASize to 2 do
|
||||
begin
|
||||
Line(x + i, ATop, x2 - i, ATop);
|
||||
inc(ATop);
|
||||
end;
|
||||
if aEvenW = 1
|
||||
then Line(x + 3, ATop, x2 - 3, ATop)
|
||||
else Pixels[x + 3, ATop] := Pen.Color;
|
||||
end;
|
||||
|
||||
procedure DrawArrowLeft(ALeft: SmallInt; ASize: SmallInt = 4);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
if aEvenH = 1
|
||||
then Line(ALeft, y + 3, aLeft, y2 - 3)
|
||||
else Pixels[ALeft, y + 3] := Pen.Color;
|
||||
for i := 2 downto 4 - ASize do
|
||||
begin
|
||||
inc(ALeft);
|
||||
Line(ALeft, y + i, ALeft, y2 - i);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DrawArrowRight(ALeft: SmallInt; ASize: SmallInt = 4);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
for i := 4 - ASize to 2 do
|
||||
begin
|
||||
Line(ALeft, y + i, ALeft, y2 - i);
|
||||
inc(ALeft);
|
||||
end;
|
||||
if aEvenH = 1
|
||||
then Line(ALeft, y + 3, aLeft, y2 - 3)
|
||||
else Pixels[ALeft, y + 3] := Pen.Color;
|
||||
end;
|
||||
|
||||
procedure DrawArrowUp(ATop: SmallInt; ASize: SmallInt = 4);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
if aEvenW = 1
|
||||
then Line(x + 3, ATop, x2 - 3, ATop)
|
||||
else Pixels[x + 3, ATop] := Pen.Color;
|
||||
for i := 2 downto 4 - ASize do
|
||||
begin
|
||||
inc(ATop);
|
||||
Line(x + i, ATop, x2 - i, ATop);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DrawArrowUL(ATop: SmallInt);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x + 1;
|
||||
Line(i, ATop, x2 - 1, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 2, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 3, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 4, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 5, ATop);
|
||||
if aEvenW = 1 then inc(ATop);
|
||||
Pixels[i, ATop] := Pen.Color;
|
||||
end;
|
||||
|
||||
procedure DrawArrowUR(ATop: SmallInt);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x2 - 1;
|
||||
Line(x + 1, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 2, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 3, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 4, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 5, ATop, i, ATop);
|
||||
if aEvenW = 1 then inc(ATop);
|
||||
dec(i);
|
||||
Pixels[i, ATop] := Pen.Color;
|
||||
end;
|
||||
|
||||
procedure DrawArrowDL(ATop: SmallInt);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x + 1;
|
||||
Pixels[i, ATop + 1] := Pen.Color;
|
||||
if aEvenW = 1 then inc(ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 5, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 4, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 3, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 2, ATop);
|
||||
inc(ATop);
|
||||
Line(i, ATop, x2 - 1, ATop);
|
||||
end;
|
||||
|
||||
procedure DrawArrowDR(ATop: SmallInt);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x2 - 1;
|
||||
Pixels[i - 1, ATop + 1] := Pen.Color;
|
||||
if aEvenW = 1 then inc(ATop);
|
||||
inc(ATop);
|
||||
Line(x + 5, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 4, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 3, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 2, ATop, i, ATop);
|
||||
inc(ATop);
|
||||
Line(x + 1, ATop, i, ATop);
|
||||
end;
|
||||
|
||||
procedure DrawArrowBDown(ATop: SmallInt; ASharpOdd: Boolean = True);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x;
|
||||
Line(i, ATop, i, ATop + 2);
|
||||
inc(i);
|
||||
Line(i, ATop, i, ATop + 3);
|
||||
inc(i);
|
||||
Line(i, ATop + 1, i, ATop + 4);
|
||||
inc(i);
|
||||
if (aEvenW = 1) or ASharpOdd
|
||||
then Line(i, ATop + 2, i, ATop + 5)
|
||||
else Line(i, ATop + 2, i, ATop + 4);
|
||||
inc(i);
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
Line(i, ATop + 2, i, ATop + 5);
|
||||
inc(i);
|
||||
end;
|
||||
Line(i, ATop + 1, i, ATop + 4);
|
||||
inc(i);
|
||||
Line(i, ATop, i, ATop + 3);
|
||||
inc(i);
|
||||
Line(i, ATop, i, ATop + 2);
|
||||
end;
|
||||
|
||||
procedure DrawArrowBLeft(ALeft: SmallInt; ASharpOdd: Boolean = True);
|
||||
var j: SmallInt;
|
||||
begin
|
||||
j := y;
|
||||
Line(ALeft + 3, j, ALeft + 5, j);
|
||||
inc(j);
|
||||
Line(ALeft + 2, j, ALeft + 5, j);
|
||||
inc(j);
|
||||
Line(ALeft + 1, j, ALeft + 4, j);
|
||||
inc(j);
|
||||
if (aEvenH = 1) or ASharpOdd
|
||||
then Line(ALeft, j, ALeft + 3, j)
|
||||
else Line(ALeft + 1, j, ALeft + 3, j);
|
||||
inc(j);
|
||||
if aEvenH = 1 then
|
||||
begin
|
||||
Line(ALeft, j, ALeft + 3, j);
|
||||
inc(j);
|
||||
end;
|
||||
Line(ALeft + 1, j, ALeft + 4, j);
|
||||
inc(j);
|
||||
Line(ALeft + 2, j, ALeft + 5, j);
|
||||
inc(j);
|
||||
Line(ALeft + 3, j, ALeft + 5, j);
|
||||
end;
|
||||
|
||||
procedure DrawArrowBRight(ALeft: SmallInt; ASharpOdd: Boolean = True);
|
||||
var j: SmallInt;
|
||||
begin
|
||||
j := y;
|
||||
Line(ALeft, j, ALeft + 2, j);
|
||||
inc(j);
|
||||
Line(ALeft, j, ALeft + 3, j);
|
||||
inc(j);
|
||||
Line(ALeft + 1, j, ALeft + 4, j);
|
||||
inc(j);
|
||||
if (aEvenH = 1) or ASharpOdd
|
||||
then Line(ALeft + 2, j, ALeft + 5, j)
|
||||
else Line(ALeft + 2, j, ALeft + 4, j);
|
||||
inc(j);
|
||||
if aEvenH = 1 then
|
||||
begin
|
||||
Line(ALeft + 2, j, ALeft + 5, j);
|
||||
inc(j);
|
||||
end;
|
||||
Line(ALeft + 1, j, ALeft + 4, j);
|
||||
inc(j);
|
||||
Line(ALeft, j, ALeft + 3, j);
|
||||
inc(j);
|
||||
Line(ALeft, j, ALeft + 2, j);
|
||||
end;
|
||||
|
||||
procedure DrawArrowBUp(ATop: SmallInt; ASharpOdd: Boolean = True);
|
||||
var i: SmallInt;
|
||||
begin
|
||||
i := x;
|
||||
Line(i, ATop + 3, i, ATop + 5);
|
||||
inc(i);
|
||||
Line(i, ATop + 2, i, ATop + 5);
|
||||
inc(i);
|
||||
Line(i, ATop + 1, i, ATop + 4);
|
||||
inc(i);
|
||||
if (aEvenW = 1) or ASharpOdd
|
||||
then Line(i, ATop, i, ATop + 3)
|
||||
else Line(i, ATop + 1, i, ATop + 3);
|
||||
inc(i);
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
Line(i, ATop, i, ATop + 3);
|
||||
inc(i);
|
||||
end;
|
||||
Line(i, ATop + 1, i, ATop + 4);
|
||||
inc(i);
|
||||
Line(i, ATop + 2, i, ATop + 5);
|
||||
inc(i);
|
||||
Line(i, ATop + 3, i, ATop + 5);
|
||||
end;
|
||||
|
||||
begin
|
||||
Pen.Style:=psSolid;
|
||||
Pen.Width:=1;
|
||||
case AGlyphDesign of
|
||||
egdSizeArrUp:
|
||||
begin
|
||||
x := ARect.Left + 1;
|
||||
x2 := ARect.Right - 1;
|
||||
y2 := (ARect.Bottom+ARect.Top) div 2 + (x2 - x) div 4;
|
||||
while x<x2 do
|
||||
begin
|
||||
Line(x, y2, x2, y2);
|
||||
inc(x);
|
||||
dec(x2);
|
||||
dec(y2);
|
||||
end;
|
||||
end;
|
||||
egdSizeArrRight:
|
||||
begin
|
||||
y := ARect.Top + 1;
|
||||
y2 := ARect.Bottom - 1;
|
||||
x2 := (ARect.Right+ARect.Left) div 2 - (y2 - y) div 4;
|
||||
while y<y2 do
|
||||
begin
|
||||
Line(x2, y, x2, y2);
|
||||
inc(y);
|
||||
dec(y2);
|
||||
inc(x2);
|
||||
end;
|
||||
end;
|
||||
egdSizeArrDown:
|
||||
begin
|
||||
x := ARect.Left + 1;
|
||||
x2 := ARect.Right - 1;
|
||||
y2 := (ARect.Bottom+ARect.Top) div 2 - (x2 - x) div 4 + 1;
|
||||
while x<x2 do
|
||||
begin
|
||||
Line(x, y2, x2, y2);
|
||||
inc(x);
|
||||
dec(x2);
|
||||
inc(y2);
|
||||
end;
|
||||
end;
|
||||
egdSizeArrLeft:
|
||||
begin
|
||||
y := ARect.Top + 1;
|
||||
y2 := ARect.Bottom - 1;
|
||||
x2 := (ARect.Right+ARect.Left) div 2 + (y2 - y) div 4;
|
||||
while y<y2 do
|
||||
begin
|
||||
Line(x2, y, x2, y2);
|
||||
inc(y);
|
||||
dec(y2);
|
||||
dec(x2);
|
||||
end;
|
||||
end;
|
||||
egdRectBeveled:
|
||||
begin
|
||||
Frame3D(ARect, 1, bvLowered);
|
||||
FillRect(ARect);
|
||||
end;
|
||||
egdRectFramed:
|
||||
begin
|
||||
Pen.Color := clBtnText;
|
||||
Rectangle(ARect);
|
||||
end;
|
||||
egdWinRectClr:
|
||||
begin
|
||||
Pen.Color := clBtnText;
|
||||
Frame(ARect);
|
||||
y := ARect.Top + 1;
|
||||
Line(ARect.Left + 1, y, ARect.Left + 3, y);
|
||||
Line(ARect.Right - 3, y, ARect.Right - 1, y);
|
||||
inc(y);
|
||||
Line(ARect.Left + 1, y, ARect.Right - 1, y);
|
||||
FillRect(ARect.Left + 2, y + 2 , ARect.Right - 2, ARect.Bottom - 2);
|
||||
end;
|
||||
egdWinRoundClr:
|
||||
begin
|
||||
Pen.Color := clBtnText;
|
||||
InflateRect(ARect, -1, -1);
|
||||
Frame(ARect);
|
||||
x := ARect.Left - 1;
|
||||
Line(x, ARect.Top, x, ARect.Bottom);
|
||||
x := ARect.Right;
|
||||
Line(x, ARect.Top, x, ARect.Bottom);
|
||||
y := ARect.Top - 1;
|
||||
Line(ARect.Left, y, ARect.Right, y);
|
||||
y := ARect.Bottom;
|
||||
Line(ARect.Left, y, ARect.Right, y);
|
||||
FillRect(ARect.Left + 2, ARect.Top + 5, ARect.Right - 2, ARect.Bottom - 2);
|
||||
Brush.Color := clBtnText;
|
||||
y := ARect.Top + 2;
|
||||
FillRect(ARect.Left + 2, y, ARect.Right - 2, y + 2);
|
||||
end;
|
||||
egdWindowRect:
|
||||
begin
|
||||
Frame(ARect);
|
||||
y := ARect.Top + 1;
|
||||
Line(ARect.Left + 1, y, ARect.Left + 3, y);
|
||||
Line(ARect.Right - 3, y, ARect.Right - 1, y);
|
||||
inc(y);
|
||||
Line(ARect.Left + 1, y, ARect.Right - 1, y);
|
||||
y := (ARect.Bottom + ARect.Top + 2) div 2;
|
||||
Line(ARect.Left + 3, y, ARect.Right - 3, y);
|
||||
dec(y, 2);
|
||||
Line(ARect.Left + 3, y, ARect.Right - 3, y);
|
||||
inc(y, 4);
|
||||
if y < ARect.Bottom then Line(ARect.Left + 3, y, ARect.Right - 3, y);
|
||||
end;
|
||||
egdWindowRound:
|
||||
begin
|
||||
InflateRect(ARect, -1, -1);
|
||||
Frame(ARect);
|
||||
x := ARect.Left - 1;
|
||||
Line(x, ARect.Top, x, ARect.Bottom);
|
||||
x := ARect.Right;
|
||||
Line(x, ARect.Top, x, ARect.Bottom);
|
||||
y := ARect.Top - 1;
|
||||
Line(ARect.Left, y, ARect.Right, y);
|
||||
y := ARect.Bottom;
|
||||
Line(ARect.Left, y, ARect.Right, y);
|
||||
y := ARect.Top + 2;
|
||||
FillRect(ARect.Left + 2, y, ARect.Right - 2, y + 2);
|
||||
y := (ARect.Bottom + ARect.Top + 1) div 2;
|
||||
Line(ARect.Left + 2, y, ARect.Right - 2, y);
|
||||
inc(y, 2);
|
||||
if y < ARect.Bottom then Line(ARect.Left + 2, y, ARect.Right - 2, y);
|
||||
end;
|
||||
otherwise
|
||||
x := ARect.Right - ARect.Left;
|
||||
y := ARect.Bottom - ARect.Top;
|
||||
aEvenW := (x + 1) mod 2;
|
||||
aEvenH := (y + 1) mod 2;
|
||||
x := ARect.Left + (x - 7) div 2;
|
||||
y := ARect.Top + (y - 7) div 2;
|
||||
x2 := x + 7 + aEvenW;
|
||||
y2 := y + 7 + aEvenH;
|
||||
case AGlyphDesign of
|
||||
egdNone: ;
|
||||
egdArrowDec:
|
||||
begin
|
||||
if aEvenH = 1 then inc(y);
|
||||
Line(x, y, x2, y);
|
||||
inc(y);
|
||||
Line(x, y, x2, y);
|
||||
inc(y);
|
||||
Line(x + 1, y, x2 - 1, y);
|
||||
inc(y);
|
||||
Line(x + 1, y, x2 - 1, y);
|
||||
inc(y);
|
||||
Line(x + 2, y, x2 - 2, y);
|
||||
inc(y);
|
||||
Line(x + 2, y, x2 - 2, y);
|
||||
inc(y);
|
||||
if aEvenW = 1
|
||||
then Line(x + 3, y, x2 - 3, y)
|
||||
else Pixels[x + 3, y] := Pen.Color;
|
||||
end;
|
||||
egdArrowInc:
|
||||
begin
|
||||
if aEvenW = 1
|
||||
then Line(x + 3, y, x2 - 3, y)
|
||||
else Pixels[x + 3, y] := Pen.Color;
|
||||
inc(y);
|
||||
Line(x + 2, y, x2 - 2, y);
|
||||
inc(y);
|
||||
Line(x + 2, y, x2 - 2, y);
|
||||
inc(y);
|
||||
Line(x + 1, y, x2 - 1, y);
|
||||
inc(y);
|
||||
Line(x + 1, y, x2 - 1, y);
|
||||
inc(y);
|
||||
Line(x, y, x2, y);
|
||||
inc(y);
|
||||
Line(x, y, x2, y);
|
||||
end;
|
||||
egdArrowUp: DrawArrowUp(y + 1 + aEvenH);
|
||||
egdArrowRight: DrawArrowRight(x + 2 + aEvenW);
|
||||
egdArrowDown: DrawArrowDown(y + 2);
|
||||
egdArrowLeft: DrawArrowLeft(x + 1 + aEvenW);
|
||||
egdArrowUR: DrawArrowUR(y + 1);
|
||||
egdArrowDR: DrawArrowDR(y);
|
||||
egdArrowDL: DrawArrowDL(y);
|
||||
egdArrowUL: DrawArrowUL(y + 1);
|
||||
egdArrowsUU:
|
||||
begin
|
||||
DrawArrowUp(y - 1 + aEvenH);
|
||||
DrawArrowUp(y + 3 + aEvenH);
|
||||
end;
|
||||
egdArrowsRR:
|
||||
begin
|
||||
DrawArrowRight(x + aEvenW);
|
||||
DrawArrowRight(x + 4 + aEvenW);
|
||||
end;
|
||||
egdArrowsDD:
|
||||
begin
|
||||
DrawArrowDown(y);
|
||||
DrawArrowDown(y + 4);
|
||||
end;
|
||||
egdArrowsLL:
|
||||
begin
|
||||
DrawArrowLeft(x - 1 + aEvenW);
|
||||
DrawArrowLeft(x + 3 + aEvenW);
|
||||
end;
|
||||
egdArrowsUD:
|
||||
begin
|
||||
DrawArrowUp(y - 1);
|
||||
DrawArrowDown(y + 4 + aEvenH);
|
||||
end;
|
||||
egdArrowsMiddle:
|
||||
begin
|
||||
DrawArrowDown(y - 1);
|
||||
FillRect(x, y + 3, x2, y + 4 + aEvenH);
|
||||
DrawArrowUp(y + 4 + aEvenH);
|
||||
end;
|
||||
egdArrowsLR:
|
||||
begin
|
||||
DrawArrowLeft(x - 1);
|
||||
DrawArrowRight(x + 4 + aEvenW);
|
||||
end;
|
||||
egdArrowsHMiddle:
|
||||
begin
|
||||
DrawArrowRight(x - 1);
|
||||
FillRect(x + 3, y, x + 4 + aEvenW, y2);
|
||||
DrawArrowLeft(x + 4 + aEvenW);
|
||||
end;
|
||||
egdArrowsMax:
|
||||
begin
|
||||
FillRect(x, y - 1, x2, y + aEvenH);
|
||||
DrawArrowUp(y + aEvenH);
|
||||
DrawArrowUp(y + 4 + aEvenH);
|
||||
end;
|
||||
egdArrowMax:
|
||||
begin
|
||||
FillRect(x, y + 1, x2, y + 2 + aEvenH);
|
||||
DrawArrowUp(y + 2 + aEvenH);
|
||||
end;
|
||||
egdArrowMin:
|
||||
begin
|
||||
DrawArrowDown(y + 1);
|
||||
FillRect(x, y + 5, x2, y + 6 + aEvenH);
|
||||
end;
|
||||
egdArrowsMin:
|
||||
begin
|
||||
DrawArrowDown(y - 1);
|
||||
DrawArrowDown(y + 3);
|
||||
FillRect(x, y + 7, x2, y + 8 + aEvenH);
|
||||
end;
|
||||
egdArrowsHMax:
|
||||
begin
|
||||
DrawArrowRight(x - 1);
|
||||
DrawArrowRight(x + 3);
|
||||
FillRect(x + 7, y, x + 8 + aEvenW, y2);
|
||||
end;
|
||||
egdArrowHMax:
|
||||
begin
|
||||
DrawArrowRight(x + 1);
|
||||
FillRect(x + 5, y, x + 6 + aEvenW, y2);
|
||||
end;
|
||||
egdArrowHMin:
|
||||
begin
|
||||
FillRect(x + 1, y, x + 2 + aEvenW, y2);
|
||||
DrawArrowLeft(x + 2 + aEvenW);
|
||||
end;
|
||||
egdArrowsHMin:
|
||||
begin
|
||||
FillRect(x - 1, y, x + aEvenW, y2);
|
||||
DrawArrowLeft(x + aEvenW);
|
||||
DrawArrowLeft(x + 4 + aEvenW);
|
||||
end;
|
||||
egdArrowsUDHor:
|
||||
begin
|
||||
Line(x - 3, y + 2, x + 4, y + 2); {Down}
|
||||
Line(x - 2, y + 3, x + 3, y + 3);
|
||||
Line(x - 1, y + 4, x + 2, y + 4);
|
||||
Pixels[x, y + 5] := Pen.Color;
|
||||
Pixels[x2 - 1, y2 - 6] := Pen.Color; {Up}
|
||||
Line(x2 - 2, y2 - 5, x2 + 1, y2 - 5);
|
||||
Line(x2 - 3, y2 - 4, x2 + 2, y2 - 4);
|
||||
Line(x2 - 4, y2 - 3, x2 + 3, y2 - 3);
|
||||
end;
|
||||
egdArrowsURDL_S:
|
||||
begin
|
||||
Pixels[x + 1, y - 1] := Pen.Color; {Up}
|
||||
Line(x, y, x + 3, y);
|
||||
Line(x - 1, y + 1, x + 4, y + 1);
|
||||
Line(x - 2, y + 2, x + 4 + aEvenW, y + 2);
|
||||
Line(x2 - 4 - aEvenW, y2 - 3, x2 + 2, y2 - 3); {Down}
|
||||
Line(x2 - 4, y2 - 2, x2 + 1, y2 - 2);
|
||||
Line(x2 - 3, y2 - 1, x2 , y2 - 1);
|
||||
Pixels[x2 - 2, y2] := Pen.Color;
|
||||
Line(x2 - 2, y - 3, x2 - 2, y + 3 + aEvenH); {Right}
|
||||
Line(x2 - 1, y - 2, x2 - 1, y + 3);
|
||||
Line(x2, y - 1, x2, y + 2);
|
||||
Pixels[x2 + 1, y] := Pen.Color;
|
||||
Line(x + 1, y2 - 3 - aEvenH, x + 1, y2 + 3); {Left}
|
||||
Line(x, y2 - 3, x, y2 + 2);
|
||||
Line(x - 1, y2 - 2, x - 1, y2 + 1);
|
||||
Pixels[x - 2, y2 - 1] := Pen.Color;
|
||||
end;
|
||||
egdArrowsURDL_M:
|
||||
begin
|
||||
DrawArrowUp(y - 4);
|
||||
Line(x2 - 3, y + 1, x2 - 3, y2 - 1);
|
||||
Line(x2 - 2, y + 1, x2 - 2, y2 - 1);
|
||||
Line(x2 - 1, y + 2, x2 - 1, y2 - 2);
|
||||
if aEvenH = 1
|
||||
then Line(x2, y + 3, x2, y2 - 3)
|
||||
else Pixels[x2, y + 3] := Pen.Color;
|
||||
DrawArrowDown(y2);
|
||||
Line(x + 2, y + 1, x + 2, y2 - 1);
|
||||
Line(x + 1, y + 1, x + 1, y2 - 1);
|
||||
Line(x, y + 2, x, y2 - 2);
|
||||
if aEvenH = 1
|
||||
then Line(x - 1, y + 3, x - 1, y2 - 3)
|
||||
else Pixels[x - 1, y + 3] := Pen.Color;
|
||||
end;
|
||||
egdArrowURDL_L:
|
||||
begin
|
||||
DrawArrowUp(y - 4);
|
||||
DrawArrowRight(x2);
|
||||
DrawArrowDown(y2);
|
||||
DrawArrowLeft(x - 4);
|
||||
end;
|
||||
egdArrowURDL_XL:
|
||||
begin
|
||||
DrawArrowUp(y - 5);
|
||||
DrawArrowRight(x2 + 1);
|
||||
DrawArrowDown(y2 + 1);
|
||||
DrawArrowLeft(x - 5);
|
||||
end;
|
||||
egdArrowsUL_DR:
|
||||
begin
|
||||
dec(x);
|
||||
dec(x2);
|
||||
DrawArrowUL(y);
|
||||
inc(x, 2);
|
||||
inc(x2, 2);
|
||||
DrawArrowDR(y2 - 6);
|
||||
end;
|
||||
egdArrowsUR_DL:
|
||||
begin
|
||||
inc(x);
|
||||
inc(x2);
|
||||
DrawArrowUR(y);
|
||||
dec(x, 2);
|
||||
dec(x2, 2);
|
||||
DrawArrowDL(y2 - 6);
|
||||
end;
|
||||
egdArrsB_Min:
|
||||
begin
|
||||
DrawArrowBDown(y - 2, False);
|
||||
DrawArrowBDown(y + 2);
|
||||
FillRect(x, y2, x2, y2 + 2);
|
||||
end;
|
||||
egdArrB_Min:
|
||||
begin
|
||||
DrawArrowBDown(y);
|
||||
FillRect(x, y2 - 2, x2, y2);
|
||||
end;
|
||||
egdArrsB_DD:
|
||||
begin
|
||||
DrawArrowBDown(y, False);
|
||||
DrawArrowBDown(y + 4);
|
||||
end;
|
||||
egdArrB_Down: DrawArrowBDown(y + 2);
|
||||
egdArrsB_Middle:
|
||||
begin
|
||||
DrawArrowBDown(y - 3);
|
||||
FillRect(x, y + 3, x2, y2 - 3);
|
||||
DrawArrowBUp(y2 - 2);
|
||||
end;
|
||||
egdArrsB_UD:
|
||||
begin
|
||||
DrawArrowBUp(y - 2);
|
||||
DrawArrowBDown(y2 - 3);
|
||||
end;
|
||||
egdArrB_Up: DrawArrowBUp(y + 1);
|
||||
egdArrsB_UU:
|
||||
begin
|
||||
DrawArrowBUp(y2 - 8);
|
||||
DrawArrowBUp(y2 - 4, False);
|
||||
end;
|
||||
egdArrB_Max:
|
||||
begin
|
||||
FillRect(x, y, x2, y + 2);
|
||||
DrawArrowBUp(y2 - 5);
|
||||
end;
|
||||
egdArrsB_Max:
|
||||
begin
|
||||
FillRect(x, y - 2, x2, y);
|
||||
DrawArrowBUp(y2 - 7);
|
||||
DrawArrowBUp(y2 - 3, False);
|
||||
end;
|
||||
egdArrsB_HMin:
|
||||
begin
|
||||
FillRect(x - 2, y, x, y2);
|
||||
DrawArrowBLeft(x2 - 7);
|
||||
DrawArrowBLeft(x2 - 3, False);
|
||||
end;
|
||||
egdArrB_HMin:
|
||||
begin
|
||||
FillRect(x, y, x + 2, y2);
|
||||
DrawArrowBLeft(x2 - 5);
|
||||
end;
|
||||
egdArrsB_LL:
|
||||
begin
|
||||
DrawArrowBLeft(x - 1);
|
||||
DrawArrowBLeft(x + 3, False);
|
||||
end;
|
||||
egdArrB_Left: DrawArrowBLeft(x + 1);
|
||||
egdArrsB_HMiddle:
|
||||
begin
|
||||
DrawArrowBRight(x - 2);
|
||||
DrawArrowBLeft(x2 - 3);
|
||||
end;
|
||||
egdArrsB_LR:
|
||||
begin
|
||||
DrawArrowBLeft(x - 2);
|
||||
DrawArrowBRight(x2 -3);
|
||||
end;
|
||||
egdArrB_Right: DrawArrowBRight(x + 2);
|
||||
egdArrsB_RR:
|
||||
begin
|
||||
DrawArrowBRight(x - 1, False);
|
||||
DrawArrowBRight(x + 3);
|
||||
end;
|
||||
egdArrB_HMax:
|
||||
begin
|
||||
DrawArrowBRight(x);
|
||||
FillRect(x2 - 2, y, x2, y2);
|
||||
end;
|
||||
egdArrsB_HMax:
|
||||
begin
|
||||
DrawArrowBRight(x - 2, False);
|
||||
DrawArrowBRight(x + 2);
|
||||
FillRect(x2, y, x2 + 2, y2);
|
||||
end;
|
||||
egdArrC_Min:
|
||||
begin
|
||||
DrawArrowDown(y + 1, 5);
|
||||
Line(x - 1, y + 6, x2 + 1, y + 6);
|
||||
end;
|
||||
egdArrC_DD:
|
||||
begin
|
||||
DrawArrowDown(y2 - 8, 5);
|
||||
DrawArrowDown(y2 - 3, 5);
|
||||
end;
|
||||
egdArrC_Down:
|
||||
begin
|
||||
DrawArrowDown(y + 2, 5);
|
||||
end;
|
||||
egdArrC_Middle:
|
||||
begin
|
||||
DrawArrowDown(y - 2 + aEvenH, 5);
|
||||
if aEvenH = 0 then Line(x - 1, y + 3, x2 + 1, y + 3);
|
||||
DrawArrowUp(y2 - 3 - aEvenH, 5);
|
||||
end;
|
||||
egdArrC_UD:
|
||||
begin
|
||||
DrawArrowUp(y - 2, 5);
|
||||
DrawArrowDown(y2 - 3, 5);
|
||||
end;
|
||||
egdArrC_LR:
|
||||
begin
|
||||
DrawArrowLeft(x - 2, 5);
|
||||
DrawArrowRight(x2 - 3, 5);
|
||||
end;
|
||||
egdArrC_Up:
|
||||
begin
|
||||
DrawArrowUp(y + 1, 5);
|
||||
end;
|
||||
egdArrC_UU:
|
||||
begin
|
||||
DrawArrowUp(y2 - 9, 5);
|
||||
DrawArrowUp(y2 - 4, 5);
|
||||
end;
|
||||
egdArrC_Max:
|
||||
begin
|
||||
Line(x - 1, y + aEvenH, x2 + 1, y + aEvenH);
|
||||
DrawArrowUp(y + 1 + aEvenH, 5);
|
||||
end;
|
||||
egdArrC_URDL:
|
||||
begin
|
||||
DrawArrowUp(y - 7, 5);
|
||||
DrawArrowRight(x2 + 2, 5);
|
||||
DrawArrowDown(y2 + 2, 5);
|
||||
DrawArrowLeft(x - 7, 5);
|
||||
end;
|
||||
egdPlayPause:
|
||||
begin
|
||||
FillRect(x, y, x + 3, y2);
|
||||
FillRect(x2 - 3, y, x2, y2);
|
||||
end;
|
||||
egdPlayUpDown:
|
||||
begin
|
||||
DrawArrowUp(y - 2);
|
||||
FillRect(x, y + 3, x2, y2 - 3);
|
||||
DrawArrowDown(y2 - 2);
|
||||
end;
|
||||
egdPlayStop: FillRect(x, y, x2, y2);
|
||||
egdPlayEject:
|
||||
begin
|
||||
DrawArrowUp(y);
|
||||
FillRect(x, y + 5, x2, y2 - 1);
|
||||
end;
|
||||
egdPlayEjectD:
|
||||
begin
|
||||
FillRect(x, y + 1, x2, y2 - 5);
|
||||
DrawArrowDown(y2 - 4);
|
||||
end;
|
||||
egdMathBigMinus:
|
||||
begin
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
if aEvenH = 0 then dec(y);
|
||||
FillRect(x, y + 3, x2, y + 5);
|
||||
end else
|
||||
FillRect(x - 1, y + 2, x2 + 1, y + 5);
|
||||
end;
|
||||
egdMathMinus:
|
||||
begin
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
if aEvenH = 0 then dec(y);
|
||||
FillRect(x + 1, y + 3, x2 - 1, y + 5);
|
||||
end else
|
||||
FillRect(x, y + 2, x2, y + 5);
|
||||
end;
|
||||
egdMathEqual:
|
||||
begin
|
||||
FillRect(x, y + 1, x2, y + 3);
|
||||
FillRect(x, y2 - 3, x2, y2 - 1);
|
||||
end;
|
||||
egdMathPlusMinus:
|
||||
begin
|
||||
dec(y, 2);
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
FillRect(x + 1, y + 3, x2 - 1, y + 5);
|
||||
FillRect(x + 3, y + 1, x + 5, y + 7);
|
||||
FillRect(x + 1, y + 8, x2 - 1, y + 10);
|
||||
end else
|
||||
begin
|
||||
if aEvenH = 1 then inc(y);
|
||||
FillRect(x, y + 2, x2, y + 5);
|
||||
FillRect(x + 2, y, x + 5, y + 7);
|
||||
FillRect(x, y + 8, x2, y + 10);
|
||||
end;
|
||||
end;
|
||||
egdMathPlus:
|
||||
begin
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
if aEvenH = 0 then dec(y);
|
||||
FillRect(x + 1, y + 3, x2 - 1, y + 5);
|
||||
FillRect(x + 3, y + 1, x + 5, y + 7);
|
||||
end else
|
||||
begin
|
||||
FillRect(x, y + 2, x2, y + 5);
|
||||
FillRect(x + 2, y, x + 5, y + 7);
|
||||
end;
|
||||
end;
|
||||
egdMathBigPlus:
|
||||
begin
|
||||
if aEvenW = 1 then
|
||||
begin
|
||||
if aEvenH = 0 then dec(y);
|
||||
FillRect(x, y + 3, x2, y + 5);
|
||||
FillRect(x + 3, y, x + 5, y + 8);
|
||||
end else
|
||||
begin
|
||||
FillRect(x - 1, y + 2, x2 + 1, y + 5);
|
||||
FillRect(x + 2, y - 1, x + 5, y + 8);
|
||||
end;
|
||||
end;
|
||||
egdCombo:
|
||||
begin
|
||||
dec(x);
|
||||
FillRect(x, y - 1, x2 + 1, y + 1);
|
||||
inc(y, 2);
|
||||
dec(x2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
end;
|
||||
egdList:
|
||||
begin
|
||||
dec(y);
|
||||
if aEvenH = 1 then
|
||||
begin
|
||||
Line(x, y, x2, y);
|
||||
inc(y);
|
||||
end;
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
end;
|
||||
egdFramedList:
|
||||
begin
|
||||
Frame(x - 1, y - 2, x2 + 1, y + 9);
|
||||
inc(x);
|
||||
dec(x2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
inc(y, 2);
|
||||
Line(x, y, x2, y);
|
||||
end;
|
||||
egdGrid:
|
||||
begin
|
||||
if aEvenH = 1 then dec(ARect.Bottom);
|
||||
Frame(ARect);
|
||||
x := ARect.Left + 3;
|
||||
Line(x, ARect.Top + 1, x, ARect.Bottom - 1);
|
||||
y := ARect.Top + 2;
|
||||
while y < (ARect.Bottom - 2) do
|
||||
begin
|
||||
Line(ARect.Left + 1, y, ARect.Right - 1, y);
|
||||
inc(y, 2);
|
||||
end;
|
||||
if (ARect.Right - ARect.Left) > 15 then
|
||||
begin
|
||||
x := x + (ARect.Right - x - 1) div 2;
|
||||
Line(x, ARect.Top + 1, x, ARect.Bottom - 1);
|
||||
end;
|
||||
end;
|
||||
end; { case }
|
||||
end; { case }
|
||||
end;
|
||||
|
2096
ECC/eceditbtns.pas
Normal file
2096
ECC/eceditbtns.pas
Normal file
File diff suppressed because it is too large
Load Diff
1583
ECC/ecgroupctrls.pas
Normal file
1583
ECC/ecgroupctrls.pas
Normal file
File diff suppressed because it is too large
Load Diff
741
ECC/ecimagemenu.pas
Normal file
741
ECC/ecimagemenu.pas
Normal file
@@ -0,0 +1,741 @@
|
||||
{****************************************************
|
||||
This file is part of the Eye Candy Controls (EC-C)
|
||||
|
||||
Copyright (C) 2013 Vojtěch Čihák, Czech Republic
|
||||
|
||||
This library is free software.
|
||||
|
||||
See the file COPYING.LGPL.txt,
|
||||
included in this distribution,
|
||||
for details about the license.
|
||||
****************************************************}
|
||||
|
||||
unit ECImageMenu;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
//{$DEFINE DBGIMGMENU} {don't remove, just comment}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Controls, StdCtrls, Graphics, Forms, ImgList, Math,
|
||||
LCLIntf, LCLProc, LCLType, LMessages, LResources, Themes, Types, ECTypes;
|
||||
|
||||
type
|
||||
{ TImageMenuItem }
|
||||
TImageMenuItem = class(TCollectionItem)
|
||||
private
|
||||
FCaption: TTranslateString;
|
||||
FDescription: TTranslateString;
|
||||
FImageIndex: SmallInt;
|
||||
procedure SetCaption(AValue: TTranslateString);
|
||||
procedure SetDescription(AValue: TTranslateString);
|
||||
procedure SetImageIndex(AValue: SmallInt);
|
||||
protected const
|
||||
cDefCaption = 'MenuItem';
|
||||
protected
|
||||
function GetDisplayName: string; override;
|
||||
public
|
||||
constructor Create(ACollection: TCollection); override;
|
||||
destructor Destroy; override;
|
||||
published
|
||||
property Caption: TTranslateString read FCaption write SetCaption;
|
||||
property Description: TTranslateString read FDescription write SetDescription;
|
||||
property ImageIndex: SmallInt read FImageIndex write SetImageIndex default -1;
|
||||
end;
|
||||
|
||||
TCustomECImageMenu = class;
|
||||
|
||||
{ TImageMenuItems }
|
||||
TImageMenuItems = class(TCollection)
|
||||
private
|
||||
function GetItems(Index: Integer): TImageMenuItem;
|
||||
procedure SetItems(Index: Integer; AValue: TImageMenuItem);
|
||||
protected
|
||||
FAddingOrDeletingItem: Boolean; { Calculate is not needed on Add/Delete item }
|
||||
FImageMenu: TCustomECImageMenu;
|
||||
function GetOwner: TPersistent; override;
|
||||
procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); override;
|
||||
procedure Update(Item: TCollectionItem); override;
|
||||
public
|
||||
constructor Create(AImageMenu: TCustomECImageMenu);
|
||||
function Add: TImageMenuItem;
|
||||
property Items[Index: Integer]: TImageMenuItem read GetItems write SetItems; default;
|
||||
end;
|
||||
|
||||
{ TCustomECImageMenu }
|
||||
TCustomECImageMenu = class(TCustomListBox)
|
||||
private
|
||||
FAlternate: Boolean;
|
||||
FCaptionAlign: SmallInt;
|
||||
FCaptionFontOptions: TFontOptions;
|
||||
FImages: TCustomImageList;
|
||||
FLayout: TObjectPos;
|
||||
FMenuItems: TImageMenuItems;
|
||||
FSpacing: SmallInt;
|
||||
procedure SetAlternate(AValue: Boolean);
|
||||
procedure SetCaptionAlign(AValue: SmallInt);
|
||||
procedure SetCaptionFontOptions(AValue: TFontOptions);
|
||||
procedure SetImages(AValue: TCustomImageList);
|
||||
procedure SetLayout(AValue: TObjectPos);
|
||||
procedure SetMenuItems(AValue: TImageMenuItems);
|
||||
procedure SetSpacing(AValue: SmallInt);
|
||||
protected const
|
||||
cDefSpacing = 5;
|
||||
protected
|
||||
AfterLoad: Boolean;
|
||||
CaptionYPos, DescYPos, ImageYPos: Integer;
|
||||
NeedCalculate: Boolean;
|
||||
procedure Calculate;
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
|
||||
{%H-}WithThemeSpace: Boolean); override;
|
||||
function DialogChar(var Message: TLMKey): boolean; override;
|
||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||
procedure DrawItem(Index: Integer; ARect: TRect; {%H-}State: TOwnerDrawState); override;
|
||||
procedure InitializeWnd; override;
|
||||
procedure InvalidateNonUpdated;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure Loaded; override;
|
||||
procedure RecalcInvalidate;
|
||||
procedure SetAutoSize(Value: Boolean); override;
|
||||
procedure SetBorderStyle(NewStyle: TBorderStyle); override;
|
||||
procedure SetParent(NewParent: TWinControl); override;
|
||||
public
|
||||
UpdateCount: SmallInt;
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate(Recalculate: Boolean = True);
|
||||
procedure Invalidate; override;
|
||||
procedure Add(ACaption, ADescription: TTranslateString; AImageIndex: SmallInt);
|
||||
procedure Delete(AIndex: Integer);
|
||||
procedure Insert(AIndex: Integer; ACaption, ADescription: TTranslateString; AImageIndex: SmallInt);
|
||||
property Alternate: Boolean read FAlternate write SetAlternate default False;
|
||||
property CaptionAlign: SmallInt read FCaptionAlign write SetCaptionAlign default 0;
|
||||
property CaptionFontOptions: TFontOptions read FCaptionFontOptions write SetCaptionFontOptions;
|
||||
property Images: TCustomImageList read FImages write SetImages;
|
||||
property Layout: TObjectPos read FLayout write SetLayout default eopTop;
|
||||
property MenuItems: TImageMenuItems read FMenuItems write SetMenuItems;
|
||||
property Spacing: SmallInt read FSpacing write SetSpacing default cDefSpacing;
|
||||
end;
|
||||
|
||||
TECImageMenu = class(TCustomECImageMenu)
|
||||
published
|
||||
property Align;
|
||||
property Alternate;
|
||||
property Anchors;
|
||||
property AutoSize;
|
||||
property BidiMode;
|
||||
property BorderSpacing;
|
||||
property BorderStyle;
|
||||
property CaptionAlign;
|
||||
property CaptionFontOptions;
|
||||
property Color;
|
||||
property Constraints;
|
||||
property DragCursor;
|
||||
property DragKind;
|
||||
property DragMode;
|
||||
property Enabled;
|
||||
property Font;
|
||||
property Images;
|
||||
property Layout;
|
||||
property MenuItems; { do NOT change order MenuItems / ItemIndex }
|
||||
property ItemIndex;
|
||||
property OnChangeBounds;
|
||||
property OnClick;
|
||||
property OnContextPopup;
|
||||
property OnDblClick;
|
||||
property OnDragDrop;
|
||||
property OnDragOver;
|
||||
property OnEnter;
|
||||
property OnEndDrag;
|
||||
property OnExit;
|
||||
property OnKeyPress;
|
||||
property OnKeyDown;
|
||||
property OnKeyUp;
|
||||
property OnMouseMove;
|
||||
property OnMouseDown;
|
||||
property OnMouseUp;
|
||||
property OnMouseEnter;
|
||||
property OnMouseLeave;
|
||||
property OnMouseWheel;
|
||||
property OnMouseWheelDown;
|
||||
property OnMouseWheelUp;
|
||||
property OnResize;
|
||||
property OnSelectionChange;
|
||||
property OnShowHint;
|
||||
property OnStartDrag;
|
||||
property OnUTF8KeyPress;
|
||||
property ParentBidiMode;
|
||||
property ParentColor;
|
||||
property ParentShowHint;
|
||||
property ParentFont;
|
||||
property PopupMenu;
|
||||
property ScrollWidth;
|
||||
property ShowHint;
|
||||
property Spacing;
|
||||
property TabOrder;
|
||||
property TabStop;
|
||||
property Visible;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
{ TImageMenuItem }
|
||||
|
||||
constructor TImageMenuItem.Create(ACollection: TCollection);
|
||||
begin
|
||||
inherited Create(ACollection);
|
||||
FImageIndex := -1;
|
||||
end;
|
||||
|
||||
destructor TImageMenuItem.Destroy;
|
||||
begin
|
||||
{ normally, Items.Count should be already MenuItems.Count-1 ATM }
|
||||
{ this solves case when item is not deleted via Collection.Delete(Index) }
|
||||
{ but directly via Item.Free (exactly what Collection Editor of IDE does) }
|
||||
{ therefore Notify must be called from here, so count of Items and MenuItems remains same }
|
||||
if assigned(Collection) and assigned(Collection.Owner) and
|
||||
not (csDestroying in (Collection.Owner as TCustomECImageMenu).ComponentState)
|
||||
and (Collection.Count <= (Collection.Owner as TCustomECImageMenu).Items.Count)
|
||||
then TImageMenuItems(Collection).Notify(self, cnDeleting);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TImageMenuItem.GetDisplayName: string;
|
||||
begin
|
||||
Result := Caption;
|
||||
if Result = '' then Result := cDefCaption + inttostr(Index);
|
||||
end;
|
||||
|
||||
procedure TImageMenuItem.SetCaption(AValue: TTranslateString);
|
||||
begin
|
||||
if FCaption = AValue then exit;
|
||||
FCaption := AValue;
|
||||
Changed(Index = 0); { Measurement is done on the first item }
|
||||
end;
|
||||
|
||||
procedure TImageMenuItem.SetDescription(AValue: TTranslateString);
|
||||
begin
|
||||
if FDescription = AValue then exit;
|
||||
FDescription := AValue;
|
||||
Changed(Index = 0); { Measurement is done on the first item }
|
||||
end;
|
||||
|
||||
procedure TImageMenuItem.SetImageIndex(AValue: SmallInt);
|
||||
begin
|
||||
if FImageIndex = AValue then exit;
|
||||
FImageIndex := AValue;
|
||||
Changed(False);
|
||||
end;
|
||||
|
||||
{ TImageMenuItems }
|
||||
|
||||
constructor TImageMenuItems.Create(AImageMenu: TCustomECImageMenu);
|
||||
begin
|
||||
inherited Create(TImageMenuItem);
|
||||
FImageMenu := AImageMenu;
|
||||
end;
|
||||
|
||||
function TImageMenuItems.Add: TImageMenuItem;
|
||||
begin
|
||||
Result := TImageMenuItem(inherited Add);
|
||||
end;
|
||||
|
||||
function TImageMenuItems.GetOwner: TPersistent;
|
||||
begin
|
||||
Result := FImageMenu;
|
||||
end;
|
||||
|
||||
procedure TImageMenuItems.Notify(Item: TCollectionItem; Action: TCollectionNotification);
|
||||
var i: Integer;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TImageMenuItems.Notify'); {$ENDIF}
|
||||
inherited Notify(Item, Action);
|
||||
case Action of
|
||||
cnAdded:
|
||||
begin
|
||||
FAddingOrDeletingItem := True;
|
||||
with Owner as TCustomECImageMenu do
|
||||
begin
|
||||
Items.Add('');
|
||||
if not (csLoading in ComponentState) then
|
||||
TImageMenuItem(Item).FCaption := TImageMenuItem.cDefCaption + inttostr(Item.Index);
|
||||
end;
|
||||
end;
|
||||
cnDeleting:
|
||||
begin
|
||||
FAddingOrDeletingItem := True;
|
||||
with Owner as TCustomECImageMenu do
|
||||
begin
|
||||
i := ItemIndex;
|
||||
Items.Delete(Item.Index);
|
||||
if i < Count then ItemIndex := i
|
||||
else if i > 0 then ItemIndex := i - 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TImageMenuItems.Update(Item: TCollectionItem);
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TImageMenuItems.Update ', BoolToStr(assigned(Item), 'Item', 'All')); {$ENDIF}
|
||||
inherited Update(Item);
|
||||
if not (csLoading in FImageMenu.ComponentState) and (assigned(Item) or FAddingOrDeletingItem)
|
||||
then FImageMenu.InvalidateNonUpdated
|
||||
else FImageMenu.RecalcInvalidate;
|
||||
FAddingOrDeletingItem := False;
|
||||
end;
|
||||
|
||||
{ TImageMenuItems.Setters }
|
||||
|
||||
function TImageMenuItems.GetItems(Index: Integer): TImageMenuItem;
|
||||
begin
|
||||
Result := TImageMenuItem(inherited Items[Index]);
|
||||
end;
|
||||
|
||||
procedure TImageMenuItems.SetItems(Index: Integer; AValue: TImageMenuItem);
|
||||
begin
|
||||
Items[Index].Assign(AValue);
|
||||
end;
|
||||
|
||||
{ TCustomECImageMenu }
|
||||
|
||||
constructor TCustomECImageMenu.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
ClickOnSelChange := False;
|
||||
FMenuItems := TImageMenuItems.Create(self);
|
||||
FCaptionFontOptions := TFontOptions.Create(self);
|
||||
with FCaptionFontOptions do
|
||||
begin
|
||||
FontStyles := [fsBold];
|
||||
OnRecalcRedraw := @RecalcInvalidate;
|
||||
OnRedraw := @InvalidateNonUpdated;
|
||||
end;
|
||||
FSpacing := cDefSpacing;
|
||||
ExtendedSelect := False;
|
||||
MultiSelect := False;
|
||||
Style := lbOwnerDrawVariable; { because of Win32 - it doesn't like lbOwnerDrawFixed }
|
||||
end;
|
||||
|
||||
destructor TCustomECImageMenu.Destroy;
|
||||
begin
|
||||
FreeAndNil(FCaptionFontOptions);
|
||||
FreeAndNil(FMenuItems);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Add(ACaption, ADescription: TTranslateString; AImageIndex: SmallInt);
|
||||
begin
|
||||
Insert(MenuItems.Count, ACaption, ADescription, AImageIndex);
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.BeginUpdate;
|
||||
begin
|
||||
inc(UpdateCount);
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Calculate;
|
||||
var aCaptionHeight, aDescHeight, aImagesHeight, aLeftHeight, aRightHeight, aItemHeight: Integer;
|
||||
aCaption: string;
|
||||
aBMP: TBitmap;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.Calculate'); {$ENDIF}
|
||||
if assigned(Images)
|
||||
then aImagesHeight := Images.Height
|
||||
else aImagesHeight := 0;
|
||||
aCaptionHeight := 0;
|
||||
aDescHeight := 0;
|
||||
if MenuItems.Count > 0 then
|
||||
begin
|
||||
aBMP := TBitmap.Create;
|
||||
aBMP.Canvas.Font.Assign(self.Font); { Description is written with default Font }
|
||||
aCaption := MenuItems[0].Description;
|
||||
if aCaption <> '' then aDescHeight := aBMP.Canvas.TextHeight(aCaption);
|
||||
aBMP.Canvas.Font.Size := CaptionFontOptions.FontSize;
|
||||
aBMP.Canvas.Font.Style := CaptionFontOptions.FontStyles;
|
||||
aCaption := MenuItems[0].Caption;
|
||||
if aCaption <> '' then aCaptionHeight := aBMP.Canvas.TextHeight(aCaption);
|
||||
FreeAndNil(aBMP);
|
||||
end;
|
||||
case FLayout of
|
||||
eopTop:
|
||||
begin
|
||||
ImageYPos := Spacing;
|
||||
if aImagesHeight > 0
|
||||
then CaptionYPos := ImageYPos + aImagesHeight + Spacing
|
||||
else CaptionYPos := ImageYPos;
|
||||
if aCaptionHeight > 0
|
||||
then DescYPos := CaptionYPos + aCaptionHeight + Spacing
|
||||
else DescYPos := CaptionYPos;
|
||||
if aDescHeight > 0
|
||||
then aItemHeight := DescYPos + aDescHeight + Spacing
|
||||
else aItemHeight := DescYPos;
|
||||
end;
|
||||
eopBottom:
|
||||
begin
|
||||
CaptionYPos := Spacing;
|
||||
if aCaptionHeight > 0
|
||||
then ImageYPos := CaptionYPos + aCaptionHeight + Spacing
|
||||
else ImageYPos := CaptionYPos;
|
||||
if aImagesHeight > 0
|
||||
then DescYPos := ImageYPos + aImagesHeight + Spacing
|
||||
else DescYPos := ImageYPos;
|
||||
if aDescHeight > 0
|
||||
then aItemHeight := DescYPos + aDescHeight + Spacing
|
||||
else aItemHeight := DescYPos;
|
||||
end;
|
||||
otherwise { eopRight, eopLeft }
|
||||
if aImagesHeight > 0
|
||||
then aLeftHeight := aImagesHeight + 2*Spacing
|
||||
else aLeftHeight := Spacing;
|
||||
aRightHeight := Spacing;
|
||||
if aCaptionHeight > 0 then aRightHeight := aRightHeight + aCaptionHeight + Spacing;
|
||||
if aDescHeight > 0 then aRightHeight := aRightHeight + aDescHeight + Spacing;
|
||||
aItemHeight := Math.max(aLeftHeight, aRightHeight);
|
||||
ImageYPos := (aItemHeight - aImagesHeight) div 2;
|
||||
if (aCaptionHeight > 0) xor (aDescHeight > 0) then
|
||||
begin
|
||||
CaptionYPos := (aItemHeight - aCaptionHeight) div 2;
|
||||
DescYPos := CaptionYPos;
|
||||
end else
|
||||
begin
|
||||
CaptionYPos := (aItemHeight - aCaptionHeight - aDescHeight - Spacing) div 2;
|
||||
DescYPos := CaptionYPos + aCaptionHeight + Spacing;
|
||||
end;
|
||||
end;
|
||||
inc(UpdateCount); { this avoids calling Calculate twice }
|
||||
ItemHeight := aItemHeight;
|
||||
dec(UpdateCount);
|
||||
NeedCalculate := False;
|
||||
{$IFDEF DBGIMGMENU} DebugLn(DbgSName(self),'.Calc ', inttostr(aItemHeight)); {$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
|
||||
WithThemeSpace: Boolean);
|
||||
var aCaption: string;
|
||||
aImageWidth, aTextWidth, i: Integer;
|
||||
aRect: TRect;
|
||||
begin
|
||||
PreferredHeight := 0;
|
||||
if assigned(Images)
|
||||
then aImageWidth := Images.Width
|
||||
else aImageWidth := 0;
|
||||
aTextWidth := 0;
|
||||
Canvas.Font.Assign(Font);
|
||||
for i := 0 to MenuItems.Count - 1 do
|
||||
aTextWidth := Math.max(aTextWidth, Canvas.TextWidth(MenuItems[i].Description));
|
||||
Canvas.Font.Size := CaptionFontOptions.FontSize;
|
||||
Canvas.Font.Style := CaptionFontOptions.FontStyles;
|
||||
for i := 0 to MenuItems.Count - 1 do
|
||||
begin
|
||||
aCaption := MenuItems[i].Caption;
|
||||
DeleteAmpersands(aCaption);
|
||||
aTextWidth := Math.max(aTextWidth, Canvas.TextWidth(aCaption));
|
||||
end;
|
||||
LCLIntf.GetClientRect(Handle, {%H-}aRect); { Calc. left + right border }
|
||||
i := Width - aRect.Right;
|
||||
if Layout in [eopRight, eopLeft] then
|
||||
begin
|
||||
if aImageWidth*aTextWidth > 0 then inc(aImageWidth, Spacing);
|
||||
PreferredWidth := aImageWidth + aTextWidth + 2*Spacing + i;
|
||||
end else
|
||||
PreferredWidth := Math.max(aImageWidth, aTextWidth) + 2*Spacing + i;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Delete(AIndex: Integer);
|
||||
begin
|
||||
BeginUpdate;
|
||||
MenuItems.Delete(AIndex);
|
||||
EndUpdate(False);
|
||||
end;
|
||||
|
||||
function TCustomECImageMenu.DialogChar(var Message: TLMKey): boolean;
|
||||
var i: Integer;
|
||||
begin
|
||||
Result := False;
|
||||
if Message.Msg = LM_SYSCHAR then
|
||||
begin
|
||||
if IsEnabled and IsVisible then
|
||||
begin
|
||||
for i := 0 to MenuItems.Count - 1 do
|
||||
if IsAccel(Message.CharCode, MenuItems[i].Caption) then
|
||||
begin
|
||||
Selected[i] := True;
|
||||
SetFocus;
|
||||
Result := True;
|
||||
Click;
|
||||
exit; { Exit! }
|
||||
end;
|
||||
Result := inherited DialogChar(Message);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCustomECImageMenu.DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean;
|
||||
begin
|
||||
Result := inherited DoMouseWheelDown(Shift, MousePos);
|
||||
if ItemIndex < (Items.Count - 1) then ItemIndex := ItemIndex + 1;
|
||||
end;
|
||||
|
||||
function TCustomECImageMenu.DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean;
|
||||
begin
|
||||
Result := inherited DoMouseWheelUp(Shift, MousePos);
|
||||
if ItemIndex > 0 then ItemIndex := ItemIndex - 1;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.DrawItem(Index: Integer; ARect: TRect; State: TOwnerDrawState);
|
||||
var aDetails: TThemedElementDetails;
|
||||
aFlags: Cardinal;
|
||||
aImagePoint: TPoint;
|
||||
aTextRect: TRect;
|
||||
bEnabled: Boolean;
|
||||
begin { do not call inherited ! }
|
||||
bEnabled := IsEnabled;
|
||||
if Index = ItemIndex then
|
||||
begin
|
||||
if bEnabled then
|
||||
begin
|
||||
if not Focused then Canvas.Brush.Color :=
|
||||
GetMergedColor(Canvas.Brush.Color, GetColorResolvingDefault(Color, Brush.Color), 0.5);
|
||||
Canvas.FillRect(ARect);
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
if ((Index and 1) = 1) and Alternate then Canvas.Brush.Color :=
|
||||
GetMergedColor(Canvas.Brush.Color, ColorToRGB(clForm), 0.5);
|
||||
Canvas.FillRect(ARect);
|
||||
end;
|
||||
aDetails := ThemeServices.GetElementDetails(caThemedContent[caItemState[bEnabled]]);
|
||||
aTextRect.Left := ARect.Left + Spacing;
|
||||
aTextRect.Right := ARect.Right - Spacing;
|
||||
aTextRect.Bottom := ARect.Bottom;
|
||||
if assigned(Images) then
|
||||
begin
|
||||
case Layout of
|
||||
eopRight:
|
||||
begin
|
||||
aImagePoint.X := ARect.Right - Images.Width - Spacing;
|
||||
dec(aTextRect.Right, Images.Width + Spacing);
|
||||
end;
|
||||
eopLeft:
|
||||
begin
|
||||
aImagePoint.X := ARect.Left + Spacing;
|
||||
inc(aTextRect.Left, Images.Width + Spacing);
|
||||
end;
|
||||
otherwise aImagePoint.X := (ARect.Right - ARect.Left - Images.Width) div 2;
|
||||
end;
|
||||
aImagePoint.Y := ARect.Top + ImageYPos;
|
||||
ThemeServices.DrawIcon(Canvas, aDetails, aImagePoint, Images, MenuItems[Index].ImageIndex);
|
||||
end;
|
||||
aFlags := DT_END_ELLIPSIS or DT_SINGLELINE;
|
||||
if IsRightToLeft then aFlags := aFlags or DT_RTLREADING;
|
||||
if (Layout in [eopTop, eopBottom]) or (CaptionAlign = 0)
|
||||
then aFlags := aFlags or DT_CENTER
|
||||
else if (Layout = eopRight) xor (CaptionAlign > 0) then aFlags := aFlags or DT_RIGHT;
|
||||
if MenuItems[Index].Description <> '' then
|
||||
begin
|
||||
aTextRect.Top := ARect.Top + DescYPos;
|
||||
ARect.Left := aTextRect.Left;
|
||||
ARect.Right := aTextRect.Right;
|
||||
if Layout in [eopTop, eopBottom] then
|
||||
begin
|
||||
if CaptionAlign > 0 then dec(aTextRect.Right, 2*CaptionAlign)
|
||||
else dec(aTextRect.Left, 2*CaptionAlign);
|
||||
end;
|
||||
Canvas.Font.Assign(Font);
|
||||
ThemeServices.DrawText(Canvas, aDetails, MenuItems[Index].Description,
|
||||
aTextRect, aFlags or DT_NOPREFIX, 0);
|
||||
aTextRect.Left := ARect.Left;
|
||||
aTextRect.Right := ARect.Right;
|
||||
end;
|
||||
if MenuItems[Index].Caption <> '' then
|
||||
begin
|
||||
if CaptionFontOptions.FontColor <> clDefault then Canvas.Font.Color := CaptionFontOptions.FontColor;
|
||||
Canvas.Font.Size := CaptionFontOptions.FontSize;
|
||||
Canvas.Font.Style := CaptionFontOptions.FontStyles;
|
||||
aTextRect.Top := ARect.Top + CaptionYPos;
|
||||
if Layout in [eopTop, eopBottom] then
|
||||
begin
|
||||
if CaptionAlign > 0 then inc(aTextRect.Left, 2*CaptionAlign)
|
||||
else inc(aTextRect.Right, 2*CaptionAlign);
|
||||
end;
|
||||
ThemeServices.DrawText(Canvas, aDetails, MenuItems[Index].Caption, aTextRect, aFlags, 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.EndUpdate(Recalculate: Boolean = True);
|
||||
begin
|
||||
dec(UpdateCount);
|
||||
if UpdateCount = 0 then
|
||||
if Recalculate
|
||||
then RecalcInvalidate
|
||||
else Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.InitializeWnd;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('InitWnd ', inttostr(Width), ' ', inttostr(Height), ' Count ', inttostr(MenuItems.Count)); {$ENDIF}
|
||||
if AfterLoad and not NeedCalculate then
|
||||
begin
|
||||
AfterLoad := False;
|
||||
exit;
|
||||
end;
|
||||
if (MenuItems.Count > 0) and (UpdateCount = 0) then Calculate;
|
||||
inherited InitializeWnd;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Insert(AIndex: Integer; ACaption, ADescription: TTranslateString;
|
||||
AImageIndex: SmallInt);
|
||||
var aItem: TCollectionItem;
|
||||
begin
|
||||
if (AIndex >= 0) and (AIndex <= MenuItems.Count) then
|
||||
begin
|
||||
BeginUpdate;
|
||||
aItem := MenuItems.Insert(AIndex);
|
||||
with aItem as TImageMenuItem do
|
||||
begin
|
||||
Caption := ACaption;
|
||||
Description := ADescription;
|
||||
ImageIndex := AImageIndex;
|
||||
end;
|
||||
EndUpdate(False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Invalidate;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.Invalidate'); {$ENDIF}
|
||||
if NeedCalculate and (MenuItems.Count > 0) and HandleAllocated then Calculate;
|
||||
inherited Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.InvalidateNonUpdated;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECIM.InvalidateNonUpdate'); {$ENDIF}
|
||||
if UpdateCount = 0 then Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
if Key in [VK_RETURN, VK_SPACE] then Click;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.Loaded;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.Loaded'); {$ENDIF}
|
||||
inherited Loaded;
|
||||
AfterLoad := True;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.RecalcInvalidate;
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.Recalc'); {$ENDIF}
|
||||
if UpdateCount = 0 then
|
||||
begin
|
||||
if AutoSize then
|
||||
begin
|
||||
InvalidatePreferredSize;
|
||||
BeginUpdateBounds;
|
||||
AdjustSize;
|
||||
EndUpdateBounds;
|
||||
end;
|
||||
NeedCalculate := True;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetAutoSize(Value: Boolean);
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.SetAutoSize'); {$ENDIF}
|
||||
inherited SetAutoSize(Value);
|
||||
if Value then
|
||||
begin
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
NeedCalculate := True;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetBorderStyle(NewStyle: TBorderStyle);
|
||||
begin
|
||||
inherited SetBorderStyle(NewStyle);
|
||||
if AutoSize then RecalcInvalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetParent(NewParent: TWinControl);
|
||||
begin
|
||||
{$IFDEF DBGIMGMENU} DebugLn('TCustomECImageMenu.SetParent'); {$ENDIF}
|
||||
inc(UpdateCount);
|
||||
inherited SetParent(NewParent);
|
||||
if assigned(NewParent) and (MenuItems.Count > 0) then Calculate;
|
||||
dec(UpdateCount);
|
||||
end;
|
||||
|
||||
{ Setters }
|
||||
|
||||
procedure TCustomECImageMenu.SetAlternate(AValue: Boolean);
|
||||
begin
|
||||
if FAlternate = AValue then exit;
|
||||
FAlternate := AValue;
|
||||
InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetCaptionAlign(AValue: SmallInt);
|
||||
begin
|
||||
if FCaptionAlign = AValue then exit;
|
||||
FCaptionAlign := AValue;
|
||||
InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetCaptionFontOptions(AValue: TFontOptions);
|
||||
begin
|
||||
if FCaptionFontOptions = AValue then exit;
|
||||
FCaptionFontOptions := AValue;
|
||||
RecalcInvalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetImages(AValue: TCustomImageList);
|
||||
begin
|
||||
if FImages = AValue then exit;
|
||||
FImages := AValue;
|
||||
RecalcInvalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetLayout(AValue: TObjectPos);
|
||||
begin
|
||||
if FLayout = AValue then exit;
|
||||
FLayout := AValue;
|
||||
RecalcInvalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetMenuItems(AValue: TImageMenuItems);
|
||||
begin
|
||||
if FMenuItems <> AValue then
|
||||
begin
|
||||
FMenuItems.Assign(AValue);
|
||||
RecalcInvalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECImageMenu.SetSpacing(AValue: SmallInt);
|
||||
begin
|
||||
if FSpacing = AValue then exit;
|
||||
FSpacing := AValue;
|
||||
RecalcInvalidate;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
{$I ecimagemenu.lrs}
|
||||
RegisterComponents('EC-C', [TECImageMenu]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
1035
ECC/ecprogressbar.pas
Normal file
1035
ECC/ecprogressbar.pas
Normal file
File diff suppressed because it is too large
Load Diff
815
ECC/ecruler.pas
Normal file
815
ECC/ecruler.pas
Normal file
@@ -0,0 +1,815 @@
|
||||
{****************************************************
|
||||
This file is part of the Eye Candy Controls (EC-C)
|
||||
|
||||
Copyright (C) 2013 Vojtěch Čihák, Czech Republic
|
||||
|
||||
This library is free software.
|
||||
|
||||
See the file COPYING.LGPL.txt,
|
||||
included in this distribution,
|
||||
for details about the license.
|
||||
****************************************************}
|
||||
|
||||
unit ECRuler;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
//{$DEFINE DBGRULER} {don't remove, just comment}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Controls, Graphics, ExtCtrls, ECScale, ECTypes, Math, LCLIntf,
|
||||
LMessages, {$IFDEF DBGRULER} LCLProc, {$ENDIF} LCLType, LResources, Themes, Types;
|
||||
|
||||
type
|
||||
{$PACKENUM 2}
|
||||
TPointerMode = (epmNone, epmFixed, epmMovable);
|
||||
TPointerStyle = (epsSimple, epsDashed, epsDotted);
|
||||
{ Event }
|
||||
TOnChangePosition = procedure(Sender: TObject; APosition: Double) of object;
|
||||
|
||||
{ TECRulerScale }
|
||||
TECRulerScale = class(TCustomECScale)
|
||||
protected const
|
||||
cDefTickAlign = etaInner;
|
||||
cDefValueVisible = evvValues;
|
||||
public
|
||||
constructor Create(AParent: TControl);
|
||||
published
|
||||
property DateTimeFormat;
|
||||
property Digits;
|
||||
{ property FontOrientation; }
|
||||
property LogarithmBase;
|
||||
property Max;
|
||||
property Min;
|
||||
property ScaleType;
|
||||
property Text;
|
||||
property TickAlign default cDefTickAlign;
|
||||
property TickColor;
|
||||
property TickDesign;
|
||||
property TickIndent default 0;
|
||||
property TickLength;
|
||||
property TickLongValue;
|
||||
property TickMiddleValue;
|
||||
property TickShortValue;
|
||||
property TickVisible;
|
||||
property ValueDisplay;
|
||||
property ValueFormat;
|
||||
property ValueIndent;
|
||||
property ValueShift;
|
||||
property ValueVisible default cDefValueVisible;
|
||||
property OnPrepareValue;
|
||||
end;
|
||||
|
||||
{ TCustomECRuler }
|
||||
TCustomECRuler = class(TECBaseControl)
|
||||
private
|
||||
FCaptionAlign: SmallInt;
|
||||
FCaptionPos: TBasicPos;
|
||||
FIndentBottomRight: Integer;
|
||||
FIndentTopLeft: Integer;
|
||||
FMouseCoord: Integer;
|
||||
FOnChangePosition: TOnChangePosition;
|
||||
FPointerColor: TColor;
|
||||
FPointerMode: TPointerMode;
|
||||
FPointerStyle: TPointerStyle;
|
||||
FPointerWidth: SmallInt;
|
||||
FPositionToHint: Boolean;
|
||||
FReversed: Boolean;
|
||||
FScale: TECRulerScale;
|
||||
FScaleFontOptions: TFontOptions;
|
||||
FScalePos: TBasicPos;
|
||||
FTransparent: Boolean;
|
||||
function GetMax: Double;
|
||||
function GetMin: Double;
|
||||
function GetPosition: Double;
|
||||
procedure SetCaptionAlign(AValue: SmallInt);
|
||||
procedure SetCaptionPos(AValue: TBasicPos);
|
||||
procedure SetIndentBottomRight(AValue: Integer);
|
||||
procedure SetIndentTopLeft(AValue: Integer);
|
||||
procedure SetMax(AValue: Double);
|
||||
procedure SetMin(AValue: Double);
|
||||
procedure SetPointerColor(AValue: TColor);
|
||||
procedure SetPointerMode(AValue: TPointerMode);
|
||||
procedure SetPointerStyle(AValue: TPointerStyle);
|
||||
procedure SetPointerWidth(AValue: SmallInt);
|
||||
procedure SetPosition(AValue: Double);
|
||||
procedure SetPositionToHint(AValue: Boolean);
|
||||
procedure SetReversed(AValue: Boolean);
|
||||
procedure SetScalePos(AValue: TBasicPos);
|
||||
procedure SetTransparent(AValue: Boolean);
|
||||
protected const
|
||||
cDefPointerMode = epmMovable;
|
||||
cDefPointerWidth = 1;
|
||||
protected
|
||||
Background: TBitmap;
|
||||
CurrInvRect: TRect;
|
||||
FullBorderWidth: SmallInt;
|
||||
PointerOverlay: Integer;
|
||||
RedrawPointer: procedure(ACoord: Integer) of object;
|
||||
ScaleLength: Double;
|
||||
ScalePxLength, ScalePxStart: Integer;
|
||||
TimeFormat: TFormatSettings;
|
||||
WasEnabled: Boolean; { state of IsEnabled from previous Paint }
|
||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer;
|
||||
{%H-}WithThemeSpace: Boolean); override;
|
||||
procedure Calculate;
|
||||
procedure CMColorChanged(var {%H-}Message: TLMessage); message CM_COLORCHANGED;
|
||||
procedure CMParentColorChanged(var Message: TLMessage); message CM_PARENTCOLORCHANGED;
|
||||
procedure DrawBackground;
|
||||
procedure DrawScaleAndCaption(ACanvas: TCanvas);
|
||||
procedure FontChanged(Sender: TObject); override;
|
||||
procedure InvalidateCustomRect({%H-}AMove: Boolean); override;
|
||||
function MouseCoordToPosition(AMouseCoord: Integer): Double; inline;
|
||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure OrientationChanged(AValue: TObjectOrientation); override;
|
||||
procedure Paint; override;
|
||||
procedure RecalcRedraw; override;
|
||||
procedure Redraw3DColorAreas; override;
|
||||
procedure RedrawHorizontal(X: Integer);
|
||||
procedure RedrawVertical(Y: Integer);
|
||||
procedure SetPointerPenStyle;
|
||||
procedure TextChanged; override;
|
||||
procedure WMSize(var Message: TLMSize); message LM_SIZE;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure BeginUpdate; override;
|
||||
procedure EndUpdate(Recalculate: Boolean=True); override;
|
||||
procedure Redraw; override;
|
||||
procedure SetMouseCoord(AValue: Integer);
|
||||
property CaptionAlign: SmallInt read FCaptionAlign write SetCaptionAlign default 0;
|
||||
property CaptionPos: TBasicPos read FCaptionPos write SetCaptionPos default ebpBottomRight;
|
||||
property IndentBottomRight: Integer read FIndentBottomRight write SetIndentBottomRight default 0;
|
||||
property IndentTopLeft: Integer read FIndentTopLeft write SetIndentTopLeft default 0;
|
||||
property Max: Double read GetMax write SetMax stored False;
|
||||
property Min: Double read GetMin write SetMin stored False;
|
||||
property MouseCoord: Integer read FMouseCoord write SetMouseCoord;
|
||||
property PointerColor: TColor read FPointerColor write SetPointerColor default clDefault;
|
||||
property PointerMode: TPointerMode read FPointerMode write SetPointerMode default cDefPointerMode;
|
||||
property PointerStyle: TPointerStyle read FPointerStyle write SetPointerStyle default epsSimple;
|
||||
property PointerWidth: SmallInt read FPointerWidth write SetPointerWidth default cDefPointerWidth;
|
||||
property Position: Double read GetPosition write SetPosition stored False;
|
||||
property PositionToHint: Boolean read FPositionToHint write SetPositionToHint default False;
|
||||
property Reversed: Boolean read FReversed write SetReversed default False;
|
||||
property Scale: TECRulerScale read FScale write FScale;
|
||||
property ScaleFontOptions: TFontOptions read FScaleFontOptions write FScaleFontOptions;
|
||||
property ScalePos: TBasicPos read FScalePos write SetScalePos default ebpTopLeft;
|
||||
property Transparent: Boolean read FTransparent write SetTransparent default False;
|
||||
property OnChangePosition: TOnChangePosition read FOnChangePosition write FOnChangePosition;
|
||||
end;
|
||||
|
||||
TECRuler = class(TCustomECRuler)
|
||||
published
|
||||
property Align;
|
||||
property Anchors;
|
||||
property AutoSize default True;
|
||||
property BevelInner;
|
||||
property BevelOuter;
|
||||
property BevelSpace;
|
||||
property BevelWidth;
|
||||
property BorderSpacing;
|
||||
property Caption;
|
||||
property CaptionAlign;
|
||||
property CaptionPos;
|
||||
property Color;
|
||||
property Color3DDark;
|
||||
property Color3DLight;
|
||||
property Constraints;
|
||||
property Enabled;
|
||||
property Font;
|
||||
property IndentBottomRight;
|
||||
property IndentTopLeft;
|
||||
property Max;
|
||||
property Min;
|
||||
property Orientation default eooHorizontal;
|
||||
property ParentColor;
|
||||
property ParentFont;
|
||||
property ParentShowHint;
|
||||
property PointerColor;
|
||||
property PointerMode;
|
||||
property PointerStyle;
|
||||
property PointerWidth;
|
||||
property PopupMenu;
|
||||
property Position;
|
||||
property PositionToHint;
|
||||
property Reversed;
|
||||
property Scale;
|
||||
property ScaleFontOptions;
|
||||
property ScalePos;
|
||||
property ShowHint;
|
||||
property Style default eosPanel;
|
||||
property Transparent;
|
||||
property Visible;
|
||||
property OnChangeBounds;
|
||||
property OnChangePosition;
|
||||
property OnClick;
|
||||
property OnContextPopup;
|
||||
property OnDblClick;
|
||||
property OnMouseDown;
|
||||
property OnMouseEnter;
|
||||
property OnMouseLeave;
|
||||
property OnMouseMove;
|
||||
property OnMouseUp;
|
||||
property OnResize;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
{ TECRulerScale }
|
||||
|
||||
constructor TECRulerScale.Create(AParent: TControl);
|
||||
begin
|
||||
inherited Create(AParent);
|
||||
FTickAlign := cDefTickAlign;
|
||||
FTickIndent := 0;
|
||||
FValueVisible := cDefValueVisible;
|
||||
end;
|
||||
|
||||
{ TCustomECRuler }
|
||||
|
||||
constructor TCustomECRuler.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
ControlStyle := ControlStyle + [csNoFocus]
|
||||
- [csSetCaption];
|
||||
FCaptionPos := ebpBottomRight;
|
||||
FMouseCoord := low(Integer);
|
||||
FOrientation := eooHorizontal;
|
||||
RedrawPointer := @RedrawHorizontal;
|
||||
FPointerColor := clDefault;
|
||||
FPointerMode := cDefPointerMode;
|
||||
PointerWidth := cDefPointerWidth; {Set PointerOverlay}
|
||||
FStyle := eosPanel;
|
||||
AutoSize := True;
|
||||
TabStop := False;
|
||||
FScaleFontOptions := TFontOptions.Create(self);
|
||||
with FScaleFontOptions do
|
||||
begin
|
||||
FontSize := 7;
|
||||
OnRecalcRedraw := @self.RecalcRedraw;
|
||||
OnRedraw := @self.Redraw;
|
||||
end;
|
||||
FScale := TECRulerScale.Create(self);
|
||||
with FScale do
|
||||
begin
|
||||
OnRecalcRedraw := @self.RecalcRedraw;
|
||||
OnRedraw := @self.Redraw;
|
||||
end;
|
||||
Background := TBitmap.Create;
|
||||
with Background do
|
||||
begin
|
||||
Transparent := True;
|
||||
TransparentMode := tmFixed;
|
||||
end;
|
||||
SetInitialBounds(0, 0, 320, 50);
|
||||
RedrawMode := ermRecalcRedraw;
|
||||
end;
|
||||
|
||||
destructor TCustomECRuler.Destroy;
|
||||
begin
|
||||
FreeAndNil(Background);
|
||||
FreeAndNil(FScale);
|
||||
FreeAndNil(FScaleFontOptions);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.CalculatePreferredSize(var PreferredWidth,
|
||||
PreferredHeight: Integer; WithThemeSpace: Boolean);
|
||||
var aSize: Integer;
|
||||
begin
|
||||
Canvas.Font.Size := FScaleFontOptions.FontSize;
|
||||
Canvas.Font.Style := FScaleFontOptions.FontStyles;
|
||||
aSize := 2*GetBorderWidth + FScale.GetPreferredSize(Canvas, Orientation=eooHorizontal, True, True);
|
||||
if Orientation = eooHorizontal then
|
||||
begin
|
||||
PreferredHeight := aSize;
|
||||
PreferredWidth := 0;
|
||||
end else
|
||||
begin
|
||||
PreferredHeight := 0;
|
||||
PreferredWidth := aSize;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.BeginUpdate;
|
||||
begin
|
||||
inherited BeginUpdate;
|
||||
FScale.BeginUpdate;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.Calculate;
|
||||
var aBorderWidth, aLength: Integer;
|
||||
begin
|
||||
aBorderWidth := GetBorderWidth;
|
||||
FullBorderWidth := aBorderWidth;
|
||||
if Orientation = eooHorizontal
|
||||
then aLength := Width
|
||||
else aLength := Height;
|
||||
aLength := aLength - IndentTopLeft - IndentBottomRight - 2*aBorderWidth;
|
||||
ScaleLength := Max - Min;
|
||||
ScalePxLength := aLength;
|
||||
ScalePxStart := IndentTopLeft + aBorderWidth;
|
||||
FScale.CalcTickPosAndValues(aLength, Reversed);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.CMColorChanged(var Message: TLMessage);
|
||||
begin
|
||||
Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.CMParentColorChanged(var Message: TLMessage);
|
||||
begin
|
||||
inherited CMParentColorChanged(Message);
|
||||
if (Style = eosPanel) and (Color = clDefault) then Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.DrawBackground;
|
||||
var aColor: TColor;
|
||||
begin
|
||||
{$IFDEF DBGRULER} DebugLn('ECRuler DrawBackground'); {$ENDIF}
|
||||
Background.SetSize(Width, Height);
|
||||
aColor := ColorToRGB(GetColorResolvingDefault(Color, Parent.Brush.Color));
|
||||
if (aColor and $FF) > 0
|
||||
then dec(aColor)
|
||||
else inc(aColor);
|
||||
Background.TransparentColor := aColor;
|
||||
Background.TransparentClear;
|
||||
case Style of
|
||||
eosButton: Background.Canvas.DrawButtonBackground(ClientRect, True);
|
||||
eosPanel: Background.Canvas.DrawPanelBackGround(ClientRect, BevelInner, BevelOuter,
|
||||
BevelSpace, BevelWidth, Color3DDark, Color3DLight,
|
||||
GetColorResolvingDefault(Color, Parent.Brush.Color));
|
||||
end;
|
||||
DrawScaleAndCaption(Background.Canvas);
|
||||
SetPointerPenStyle;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.DrawScaleAndCaption(ACanvas: TCanvas);
|
||||
const cIndent = 3;
|
||||
var aFlags, aHelpFlag: Cardinal;
|
||||
i, j, aAbsCaptionIndent, aBorderWidth, aBottom, aRight: Integer;
|
||||
aRect: TRect;
|
||||
aSize: TSize;
|
||||
begin
|
||||
aBorderWidth := GetBorderWidth;
|
||||
ACanvas.Font.Assign(Font);
|
||||
if Caption <> '' then
|
||||
begin
|
||||
ACanvas.Font.Color := GetColorResolvingDefault(ACanvas.Font.Color, clBtnText);
|
||||
aFlags := DT_NOPREFIX or DT_MODIFYSTRING or DT_END_ELLIPSIS or DT_SINGLELINE;
|
||||
if IsRightToLeft then aFlags := aFlags or DT_RTLREADING;
|
||||
aHelpFlag := DT_TOP;
|
||||
aBottom := Height;
|
||||
aRight := Width;
|
||||
aSize := ACanvas.TextExtent(Caption);
|
||||
aAbsCaptionIndent := abs(CaptionAlign);
|
||||
if Orientation = eooHorizontal then
|
||||
begin { Horizontal }
|
||||
if FScale.TickVisible > etvNone then
|
||||
begin
|
||||
if ScalePos = ebpTopLeft
|
||||
then j := Math.max(aBorderWidth + FScale.TickIndent, cIndent)
|
||||
else j := aBottom - Math.max(FScale.TickIndent + aBorderWidth, cIndent) - aSize.cy;
|
||||
end else
|
||||
begin
|
||||
if FScalePos = ebpTopLeft
|
||||
then j := Math.max(aBorderWidth + FScale.ValueIndent, cIndent)
|
||||
else j := aBottom - Math.max(aBorderWidth + FScale.ValueIndent, cIndent) - aSize.cy;
|
||||
end;
|
||||
if CaptionPos = ebpTopLeft then
|
||||
begin
|
||||
i := aBorderWidth;
|
||||
aRight := ScalePxStart;
|
||||
case CaptionAlign of
|
||||
low(CaptionAlign)..-1: inc(i, aAbsCaptionIndent);
|
||||
0: aHelpFlag := DT_CENTER;
|
||||
1..high(CaptionAlign):
|
||||
begin
|
||||
aHelpFlag := DT_RIGHT;
|
||||
dec(aRight, aAbsCaptionIndent);
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
i := ScalePxStart + ScalePxLength;
|
||||
dec(aRight, aBorderWidth);
|
||||
case CaptionAlign of
|
||||
low(SmallInt)..-1:
|
||||
begin
|
||||
aHelpFlag := DT_RIGHT;
|
||||
dec(aRight, aAbsCaptionIndent);
|
||||
end;
|
||||
0: aHelpFlag := DT_CENTER;
|
||||
1..high(CaptionAlign): inc(i, aAbsCaptionIndent);
|
||||
end;
|
||||
end;
|
||||
dec(aBottom, aBorderWidth);
|
||||
end else
|
||||
begin { Vertical }
|
||||
if FScale.TickVisible > etvNone then
|
||||
begin
|
||||
if ScalePos = ebpTopLeft
|
||||
then i := Math.max(aBorderWidth + FScale.TickIndent, cIndent)
|
||||
else i := aRight - Math.max(FScale.TickIndent + aBorderWidth, cIndent) - aSize.cx;
|
||||
end else
|
||||
begin
|
||||
if ScalePos = ebpTopLeft
|
||||
then i := Math.max(aBorderWidth + FScale.ValueIndent, cIndent)
|
||||
else i := aRight - Math.max(aBorderWidth + FScale.ValueIndent, cIndent) - aSize.cx;
|
||||
end;
|
||||
if CaptionPos = ebpTopLeft then
|
||||
begin
|
||||
j := aBorderWidth;
|
||||
aBottom := ScalePxStart;
|
||||
case CaptionAlign of
|
||||
low(CaptionAlign)..-1: inc(j, aAbsCaptionIndent);
|
||||
0: aHelpFlag := DT_VCENTER;
|
||||
1..high(CaptionAlign):
|
||||
begin
|
||||
aHelpFlag := DT_BOTTOM;
|
||||
dec(aBottom, aAbsCaptionIndent);
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
j := ScalePxStart + ScalePxLength;
|
||||
dec(aBottom, aBorderWidth);
|
||||
case CaptionAlign of
|
||||
low(SmallInt)..-1:
|
||||
begin
|
||||
aHelpFlag := DT_BOTTOM;
|
||||
dec(aBottom, aAbsCaptionIndent);
|
||||
end;
|
||||
0: aHelpFlag := DT_VCENTER;
|
||||
1..high(CaptionAlign): inc(j, aAbsCaptionIndent);
|
||||
end;
|
||||
end;
|
||||
dec(aRight, aBorderWidth);
|
||||
end;
|
||||
aRect := Rect(i, j, aRight, aBottom);
|
||||
aFlags := aFlags or aHelpFlag;
|
||||
with ThemeServices do
|
||||
DrawText(ACanvas, GetElementDetails(caThemedContent[caItemState[IsEnabled]]),
|
||||
Caption, aRect, aFlags, 0);
|
||||
end;
|
||||
ACanvas.Font.Color := GetColorResolvingDefault(FScaleFontOptions.FontColor, clBtnText);
|
||||
ACanvas.Font.Orientation := FScale.FontOrientation;
|
||||
ACanvas.Font.Size := FScaleFontOptions.FontSize;
|
||||
ACanvas.Font.Style := FScaleFontOptions.FontStyles;
|
||||
if Orientation = eooHorizontal then
|
||||
begin
|
||||
if ScalePos = ebpTopLeft
|
||||
then FScale.Draw(ACanvas, True, True, eopBottom,
|
||||
Color3DDark, Color3DLight, Point(ScalePxStart, aBorderWidth - 1), [])
|
||||
else FScale.Draw(ACanvas, True, True, eopTop,
|
||||
Color3DDark, Color3DLight, Point(ScalePxStart, Height - aBorderWidth), []);
|
||||
end else
|
||||
begin
|
||||
if ScalePos = ebpTopLeft
|
||||
then FScale.Draw(ACanvas, True, True, eopRight,
|
||||
Color3DDark, Color3DLight, Point(aBorderWidth - 1, ScalePxStart), [])
|
||||
else FScale.Draw(ACanvas, True, True, eopLeft,
|
||||
Color3DDark, Color3DLight, Point(Width - aBorderWidth, ScalePxStart), []);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.EndUpdate(Recalculate: Boolean);
|
||||
begin
|
||||
FScale.EndUpdate;
|
||||
inherited EndUpdate(Recalculate);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.FontChanged(Sender: TObject);
|
||||
begin
|
||||
inherited FontChanged(Sender);
|
||||
RecalcRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.InvalidateCustomRect(AMove: Boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
function TCustomECRuler.MouseCoordToPosition(AMouseCoord: Integer): Double;
|
||||
begin
|
||||
Result := (AMouseCoord - ScalePxStart)*ScaleLength/(ScalePxLength - 1);
|
||||
if Reversed then Result := Max - Result;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
inherited MouseMove(Shift, X, Y);
|
||||
if (PointerMode = epmMovable) and WasEnabled then
|
||||
begin
|
||||
if Orientation = eooHorizontal
|
||||
then RedrawPointer(X)
|
||||
else RedrawPointer(Y);
|
||||
if PositionToHint then Hint := FScale.GetStringPosition(Position);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.OrientationChanged(AValue: TObjectOrientation);
|
||||
begin
|
||||
if AValue = eooHorizontal
|
||||
then RedrawPointer := @RedrawHorizontal
|
||||
else RedrawPointer := @RedrawVertical;
|
||||
FMouseCoord := low(Integer);
|
||||
if not(csLoading in ComponentState) then SetBounds(Left, Top, Height, Width);
|
||||
inherited OrientationChanged(AValue);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.Paint;
|
||||
var bEnabled: Boolean;
|
||||
|
||||
procedure DrawPointer;
|
||||
var aBorderWidth: SmallInt;
|
||||
begin
|
||||
aBorderWidth := FullBorderWidth + PointerOverlay;
|
||||
if Orientation = eooHorizontal
|
||||
then Canvas.Line(MouseCoord, aBorderWidth + 1, MouseCoord, self.Height - aBorderWidth)
|
||||
else Canvas.Line(aBorderWidth + 1, MouseCoord, self.Width - aBorderWidth, MouseCoord);
|
||||
end;
|
||||
|
||||
begin
|
||||
{$IFDEF DBGRULER} DebugLn('Ruler Paint'); {$ENDIF}
|
||||
inherited Paint;
|
||||
if RedrawMode = ermRecalcRedraw then Calculate;
|
||||
bEnabled := IsEnabled;
|
||||
if bEnabled <> WasEnabled then
|
||||
begin
|
||||
RedrawMode := ermRedrawBkgnd;
|
||||
CurrInvRect := ClientRect; { the case that Position was changed when Disabled }
|
||||
end;
|
||||
if not Transparent then
|
||||
begin
|
||||
if RedrawMode >= ermRedrawBkgnd then DrawBackground;
|
||||
if RedrawMode >= ermFreeRedraw then Canvas.Draw(0, 0, Background);
|
||||
if bEnabled and (PointerMode > epmNone) then
|
||||
begin
|
||||
if RedrawMode < ermFreeRedraw then Canvas.CopyRect(FInvalidRect, Background.Canvas, FInvalidRect);
|
||||
DrawPointer;
|
||||
end;
|
||||
FInvalidRect := CurrInvRect;
|
||||
end else
|
||||
begin
|
||||
Canvas.Pen.Width:=1;
|
||||
DrawScaleAndCaption(Canvas);
|
||||
if bEnabled and (PointerMode > epmNone) then
|
||||
begin
|
||||
SetPointerPenStyle;
|
||||
DrawPointer;
|
||||
end;
|
||||
end;
|
||||
WasEnabled := bEnabled;
|
||||
RedrawMode := ermFreeRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.RecalcRedraw;
|
||||
begin
|
||||
RedrawMode := ermRecalcRedraw;
|
||||
if UpdateCount = 0 then
|
||||
begin
|
||||
if AutoSize then
|
||||
begin
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.Redraw;
|
||||
begin
|
||||
if RedrawMode < ermRedrawBkgnd then RedrawMode := ermRedrawBkgnd;
|
||||
if UpdateCount = 0 then Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.Redraw3DColorAreas;
|
||||
begin
|
||||
Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.RedrawHorizontal(X: Integer);
|
||||
var aRect: TRect;
|
||||
aBorderWidth, i: Integer;
|
||||
begin
|
||||
if MouseCoord <> X then
|
||||
begin
|
||||
if RedrawMode <= ermFreeRedraw then RedrawMode := ermMoveKnob;
|
||||
i := PointerOverlay;
|
||||
aBorderWidth := FullBorderWidth;
|
||||
if (X >= aBorderWidth) and (X <= (Width - aBorderWidth)) then
|
||||
begin
|
||||
FMouseCoord := X;
|
||||
if assigned(FOnChangePosition) then FOnChangePosition(self, MouseCoordToPosition(X));
|
||||
end;
|
||||
if not Transparent then
|
||||
begin
|
||||
aRect := Rect(X - i, aBorderWidth, X + i, Height - aBorderWidth);
|
||||
CurrInvRect := aRect;
|
||||
FInvalidRect.Left := Math.min(FInvalidRect.Left, aRect.Left);
|
||||
FInvalidRect.Right := Math.max(FInvalidRect.Right, aRect.Right);
|
||||
InvalidateRect(Handle, @FInvalidRect, False);
|
||||
end else
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.RedrawVertical(Y: Integer);
|
||||
var aRect: TRect;
|
||||
aBorderWidth, j: Integer;
|
||||
begin
|
||||
if MouseCoord <> Y then
|
||||
begin
|
||||
if RedrawMode <= ermFreeRedraw then RedrawMode := ermMoveKnob;
|
||||
j := PointerOverlay;
|
||||
aBorderWidth := FullBorderWidth;
|
||||
if (Y >= aBorderWidth) and (Y <= (Height - aBorderWidth)) then
|
||||
begin
|
||||
FMouseCoord := Y;
|
||||
if assigned(FOnChangePosition) then FOnChangePosition(self, MouseCoordToPosition(Y));
|
||||
end;
|
||||
if not Transparent then
|
||||
begin
|
||||
aRect := Rect(aBorderWidth, Y - j, Width - aBorderWidth, Y + j);
|
||||
CurrInvRect := aRect;
|
||||
FInvalidRect.Top := Math.min(FInvalidRect.Top, aRect.Top);
|
||||
FInvalidRect.Bottom := Math.max(FInvalidRect.Bottom, aRect.Bottom);
|
||||
InvalidateRect(Handle, @FInvalidRect, False);
|
||||
end else
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPointerPenStyle;
|
||||
begin
|
||||
with Canvas do
|
||||
begin
|
||||
case FPointerStyle of
|
||||
epsSimple: Pen.Style := psSolid;
|
||||
epsDashed: Pen.Style := psDash;
|
||||
epsDotted: Pen.Style := psDot;
|
||||
end;
|
||||
Brush.Style := bsClear; { necessary }
|
||||
Pen.Color := GetColorResolvingDefault(PointerColor, clBtnText);
|
||||
Pen.Width := PointerWidth;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.TextChanged;
|
||||
begin
|
||||
inherited TextChanged;
|
||||
Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.WMSize(var Message: TLMSize);
|
||||
begin
|
||||
inherited WMSize(Message);
|
||||
RedrawMode := ermRecalcRedraw;
|
||||
if UpdateCount = 0 then Invalidate;
|
||||
end;
|
||||
|
||||
{ TCustomECRuler.Setters }
|
||||
|
||||
function TCustomECRuler.GetMax: Double;
|
||||
begin
|
||||
Result := Scale.Max;
|
||||
end;
|
||||
|
||||
function TCustomECRuler.GetMin: Double;
|
||||
begin
|
||||
Result := Scale.Min;
|
||||
end;
|
||||
|
||||
function TCustomECRuler.GetPosition: Double;
|
||||
begin
|
||||
Result := MouseCoordToPosition(MouseCoord)
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetCaptionAlign(AValue: SmallInt);
|
||||
begin
|
||||
if FCaptionAlign = AValue then exit;
|
||||
FCaptionAlign := AValue;
|
||||
if Caption <> '' then Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetCaptionPos(AValue: TBasicPos);
|
||||
begin
|
||||
if FCaptionPos = AValue then exit;
|
||||
FCaptionPos := AValue;
|
||||
if Caption <> '' then Redraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetIndentBottomRight(AValue: Integer);
|
||||
begin
|
||||
if FIndentBottomRight = AValue then exit;
|
||||
FIndentBottomRight := AValue;
|
||||
RecalcRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetIndentTopLeft(AValue: Integer);
|
||||
begin
|
||||
if FIndentTopLeft = AValue then exit;
|
||||
FIndentTopLeft := AValue;
|
||||
RecalcRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetMax(AValue: Double);
|
||||
begin
|
||||
Scale.Max := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetMin(AValue: Double);
|
||||
begin
|
||||
Scale.Min := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetMouseCoord(AValue: Integer);
|
||||
begin
|
||||
if (PointerMode > epmNone) and WasEnabled then RedrawPointer(AValue);
|
||||
FMouseCoord := AValue;
|
||||
if PositionToHint then Hint := FScale.GetStringPosition(Position);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPointerColor(AValue: TColor);
|
||||
begin
|
||||
if FPointerColor = AValue then exit;
|
||||
FPointerColor := AValue;
|
||||
SetPointerPenStyle;
|
||||
if PointerMode > epmNone then InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPointerMode(AValue: TPointerMode);
|
||||
begin
|
||||
if FPointerMode = AValue then exit;
|
||||
FPointerMode := AValue;
|
||||
if AValue > epmNone then CurrInvRect := ClientRect;
|
||||
InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPointerStyle(AValue: TPointerStyle);
|
||||
begin
|
||||
if FPointerStyle = AValue then exit;
|
||||
FPointerStyle := AValue;
|
||||
SetPointerPenStyle;
|
||||
if PointerMode > epmNone then InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPointerWidth(AValue: SmallInt);
|
||||
begin
|
||||
if FPointerWidth = AValue then exit;
|
||||
FPointerWidth := AValue;
|
||||
PointerOverlay := 1 + AValue div 2;
|
||||
SetPointerPenStyle;
|
||||
if PointerMode > epmNone then InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPosition(AValue: Double);
|
||||
var aCoord: Integer;
|
||||
begin
|
||||
if Reversed then AValue := Max - AValue;
|
||||
aCoord := round(AValue*(ScalePxLength - 1) /ScaleLength) + ScalePxStart;
|
||||
if PositionToHint then Hint := FScale.GetStringPosition(AValue);
|
||||
if (PointerMode > epmNone) and WasEnabled then RedrawPointer(aCoord);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetPositionToHint(AValue: Boolean);
|
||||
begin
|
||||
if FPositionToHint = AValue then exit;
|
||||
FPositionToHint := AValue;
|
||||
if AValue then Hint := FScale.GetStringPosition(Position);
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetReversed(AValue: Boolean);
|
||||
begin
|
||||
if FReversed = AValue then exit;
|
||||
FReversed := AValue;
|
||||
RecalcRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetScalePos(AValue: TBasicPos);
|
||||
begin
|
||||
if FScalePos = AValue then exit;
|
||||
FScalePos := AValue;
|
||||
if (FScale.TickVisible > etvNone) or (FScale.ValueVisible > evvNone) then RecalcRedraw;
|
||||
end;
|
||||
|
||||
procedure TCustomECRuler.SetTransparent(AValue: Boolean);
|
||||
begin
|
||||
if FTransparent = AValue then exit;
|
||||
FTransparent := AValue;
|
||||
if not AValue then RedrawMode := ermRedrawBkgnd;
|
||||
InvalidateNonUpdated;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
{$I ecruler.lrs}
|
||||
RegisterComponents('EC-C', [TECRuler]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
1220
ECC/ecscale.pas
Normal file
1220
ECC/ecscale.pas
Normal file
File diff suppressed because it is too large
Load Diff
2245
ECC/ecslider.pas
Normal file
2245
ECC/ecslider.pas
Normal file
File diff suppressed because it is too large
Load Diff
2879
ECC/ecspinctrls.pas
Normal file
2879
ECC/ecspinctrls.pas
Normal file
File diff suppressed because it is too large
Load Diff
1099
ECC/ecswitch.pas
Normal file
1099
ECC/ecswitch.pas
Normal file
File diff suppressed because it is too large
Load Diff
1404
ECC/ectypes.pas
Normal file
1404
ECC/ectypes.pas
Normal file
File diff suppressed because it is too large
Load Diff
180
ECC/tree.xml
Normal file
180
ECC/tree.xml
Normal file
@@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TObject unit="System">
|
||||
<TCustomEdit>
|
||||
<TECEdit>
|
||||
<TCustomECEditBtn>
|
||||
<TCustomECColorBtn/>
|
||||
</TCustomECEditBtn>
|
||||
</TECEdit>
|
||||
<TECEdit>
|
||||
<TCustomECEditBtn/>
|
||||
</TECEdit>
|
||||
<TECEdit>
|
||||
<TCustomECEditBtn>
|
||||
<TCustomECColorBtn>
|
||||
<TECColorBtn/>
|
||||
</TCustomECColorBtn>
|
||||
</TCustomECEditBtn>
|
||||
</TECEdit>
|
||||
<TECEdit>
|
||||
<TCustomECEditBtn>
|
||||
<TECEditBtn/>
|
||||
</TCustomECEditBtn>
|
||||
</TECEdit>
|
||||
<TECEdit>
|
||||
<TECSpinEdit/>
|
||||
</TECEdit>
|
||||
<TECEdit/>
|
||||
</TCustomEdit>
|
||||
<TCustomControl>
|
||||
<TCustomECSpeedBtn/>
|
||||
<TCustomECSpeedBtn>
|
||||
<TECSpeedBtn/>
|
||||
</TCustomECSpeedBtn>
|
||||
<TCustomECSpeedBtn>
|
||||
<TECSpeedBtnPlus/>
|
||||
</TCustomECSpeedBtn>
|
||||
<TECBaseControl>
|
||||
<TCustomECGroupCtrl/>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECGroupCtrl>
|
||||
<TCustomECCheckGroup/>
|
||||
</TCustomECGroupCtrl>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECGroupCtrl>
|
||||
<TCustomECRadioGroup/>
|
||||
</TCustomECGroupCtrl>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECGroupCtrl>
|
||||
<TCustomECCheckGroup>
|
||||
<TECCheckGroup/>
|
||||
</TCustomECCheckGroup>
|
||||
</TCustomECGroupCtrl>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECGroupCtrl>
|
||||
<TCustomECRadioGroup>
|
||||
<TECRadioGroup/>
|
||||
</TCustomECRadioGroup>
|
||||
</TCustomECGroupCtrl>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECProgressBar>
|
||||
<TCustomECPositionBar/>
|
||||
</TCustomECProgressBar>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECProgressBar/>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECProgressBar>
|
||||
<TCustomECPositionBar>
|
||||
<TECPositionBar/>
|
||||
</TCustomECPositionBar>
|
||||
</TCustomECProgressBar>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECProgressBar>
|
||||
<TECProgressBar/>
|
||||
</TCustomECProgressBar>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECRuler/>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECRuler>
|
||||
<TECRuler/>
|
||||
</TCustomECRuler>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider/>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECSlider/>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TBaseECSlider>
|
||||
<TCustomECSlider>
|
||||
<TECSlider/>
|
||||
</TCustomECSlider>
|
||||
</TBaseECSlider>
|
||||
</TECBaseControl>
|
||||
<TCustomSpinBtns/>
|
||||
<TCustomSpinBtns>
|
||||
<TECSpinBtns/>
|
||||
</TCustomSpinBtns>
|
||||
<TCustomSpinBtns>
|
||||
<TECSpinBtnsPlus/>
|
||||
</TCustomSpinBtns>
|
||||
<TECBaseControl>
|
||||
<TCustomECSwitch/>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl>
|
||||
<TCustomECSwitch>
|
||||
<TECSwitch/>
|
||||
</TCustomECSwitch>
|
||||
</TECBaseControl>
|
||||
<TECBaseControl/>
|
||||
</TCustomControl>
|
||||
<TComboBox>
|
||||
<TECCombo/>
|
||||
</TComboBox>
|
||||
<TWinControlActionLink>
|
||||
<TECSpeedBtnActionLink/>
|
||||
<TECSwitchActionLink/>
|
||||
</TWinControlActionLink>
|
||||
<TCollectionItem>
|
||||
<TGroupCtrlItem/>
|
||||
<TImageMenuItem/>
|
||||
</TCollectionItem>
|
||||
<TCollection>
|
||||
<TGroupCtrlItems/>
|
||||
<TImageMenuItems/>
|
||||
</TCollection>
|
||||
<TCustomListBox>
|
||||
<TCustomECImageMenu/>
|
||||
<TCustomECImageMenu>
|
||||
<TECImageMenu/>
|
||||
</TCustomECImageMenu>
|
||||
</TCustomListBox>
|
||||
<TPersistent>
|
||||
<TCustomECScale>
|
||||
<TECRulerScale/>
|
||||
</TCustomECScale>
|
||||
<TCustomECScale/>
|
||||
<TCustomECScale>
|
||||
<TECScale/>
|
||||
</TCustomECScale>
|
||||
<TECCustomKnob>
|
||||
<TECSliderKnob/>
|
||||
</TECCustomKnob>
|
||||
<TSingleSpinBtn/>
|
||||
<TECCustomKnob>
|
||||
<TECSwitchKnob/>
|
||||
</TECCustomKnob>
|
||||
<TECCustomKnob/>
|
||||
<TFontOptions/>
|
||||
</TPersistent>
|
||||
<TCustomTimer>
|
||||
<TCustomControlTimer>
|
||||
<TControlTimer/>
|
||||
</TCustomControlTimer>
|
||||
<TCustomControlTimer/>
|
||||
</TCustomTimer>
|
||||
<TComponent>
|
||||
<TECSpinController/>
|
||||
</TComponent>
|
||||
</TObject>
|
Reference in New Issue
Block a user